-
Notifications
You must be signed in to change notification settings - Fork 17
chore: upgrade TypeScript from 5.6.3 to 6.0.3 #504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
18649e2
0995f65
296c2a9
50f197a
adf0a3e
1a2ead5
e26d99b
0239085
b9d1d9b
977c771
1d4b8e8
447dcad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import { getErrnoCode } from "../../build/utils/misc.js"; | ||
|
|
||
| describe("utils/misc", () => { | ||
| describe("getErrnoCode", () => { | ||
| it("returns the string code from an Error with a code property", () => { | ||
| const err = Object.assign(new Error("ENOENT"), { code: "ENOENT" }); | ||
| expect(getErrnoCode(err)).toBe("ENOENT"); | ||
| }); | ||
|
|
||
| it("returns the string code from a plain object with a code property", () => { | ||
| expect(getErrnoCode({ code: "EACCES" })).toBe("EACCES"); | ||
| }); | ||
|
|
||
| it("returns undefined when the code property is not a string", () => { | ||
| expect(getErrnoCode({ code: 42 })).toBeUndefined(); | ||
| }); | ||
|
|
||
| it("returns undefined for an Error without a code property", () => { | ||
| expect(getErrnoCode(new Error("oops"))).toBeUndefined(); | ||
| }); | ||
|
|
||
| it("returns undefined for null", () => { | ||
| expect(getErrnoCode(null)).toBeUndefined(); | ||
| }); | ||
|
|
||
| it("returns undefined for undefined", () => { | ||
| expect(getErrnoCode(undefined)).toBeUndefined(); | ||
| }); | ||
|
|
||
| it("returns undefined for a string", () => { | ||
| expect(getErrnoCode("ENOENT")).toBeUndefined(); | ||
| }); | ||
|
|
||
| it("returns undefined for a number", () => { | ||
| expect(getErrnoCode(404)).toBeUndefined(); | ||
| }); | ||
| }); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,7 +83,7 @@ class Logger { | |
| id: string; | ||
| input: unknown; | ||
| timings: Record<string, Date> = {}; | ||
| result: { type: "success" | "failure"; value: unknown }; | ||
| result!: { type: "success" | "failure"; value: unknown }; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this do?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL! |
||
| stdout: [date: Date, line: string][] = []; | ||
| stderr: [date: Date, line: string][] = []; | ||
|
|
||
|
|
@@ -118,7 +118,9 @@ class Logger { | |
| } | ||
| } | ||
|
|
||
| type TaskModule = { default: (input?: unknown) => unknown }; | ||
| // Method shorthand syntax enables bivariant parameter checking so concrete | ||
| // worker input types (e.g. `{ webhookId: string }`) satisfy this constraint. | ||
| type TaskModule = { default(input?: unknown): unknown }; | ||
| /** | ||
| * Create a worker thread to run a task in background. A task/job added to the | ||
| * queue with `add()`, and run serially in order of calling `run()` on the job | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.