-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use vitest, update deps, security fixes
- Loading branch information
Showing
14 changed files
with
993 additions
and
1,813 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
19.6.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
import type { Headers } from "./fetch.d"; | ||
|
||
export function fromRawHeaders(rawHeaders: string[]): Headers { | ||
// const headers = rawHeaders.reduce((acc, _, index, array) => { | ||
// if (index % 2 === 0) { | ||
// const entry = array.slice(index, index + 2); | ||
// acc.push(entry); | ||
// } | ||
|
||
// return acc; | ||
// }, [] as string[][]); | ||
|
||
const headers = rawHeaders.reduce((acc, _, index, array) => { | ||
if (index % 2 === 0) { | ||
const entry = array.slice(index, index + 2); | ||
acc.push(entry); | ||
const [key, value] = entry; | ||
acc[key] = value; | ||
} | ||
|
||
return acc; | ||
}, [] as string[][]); | ||
}, {} as Record<string, string>); | ||
|
||
return new URLSearchParams(headers) as Headers; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { setupServer } from "msw/node"; | ||
|
||
import { handlers } from "./handlers"; | ||
|
||
export const server = setupServer(...handlers); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import path from "node:path"; | ||
import { defineConfig } from "vitest/config"; | ||
|
||
export default defineConfig({ | ||
test: { | ||
globals: true, | ||
setupFiles: "./vitest.setup.ts", | ||
coverage: { | ||
reporter: ["lcov"], | ||
}, | ||
}, | ||
resolve: { | ||
alias: { | ||
src: path.resolve(__dirname, "./src/"), | ||
}, | ||
}, | ||
}); |
File renamed without changes.
Oops, something went wrong.