-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat!: bump engines
requirement to Node 22
#222
base: main
Are you sure you want to change the base?
Changes from 1 commit
c776075
7269753
e917ff8
95f9915
99d0cbe
1b04111
1e024cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1 @@ | ||||||||
22.13.0 | ||||||||
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. nit:
Suggested change
From the nvm readme:
Also a question: shouldn't this version match the one in the I think this is a similar point to @dsanders11's on 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. I like the idea of having it on the lower bound so that we ensure that development happens on the minimum I guess the one thing is that leaving it running on the lower bound in theory would leave us open to running insecure Node.js versions (e.g. if |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import debug from 'debug'; | ||
import * as fs from 'fs-extra'; | ||
import * as os from 'os'; | ||
import * as path from 'path'; | ||
|
||
import * as fs from 'node:fs/promises'; | ||
import * as os from 'node:os'; | ||
import * as path from 'node:path'; | ||
|
||
const d = debug('electron-notarize:helpers'); | ||
|
||
|
@@ -13,11 +14,11 @@ export async function withTempDir<T>(fn: (dir: string) => Promise<T>) { | |
result = await fn(dir); | ||
} catch (err) { | ||
d('work failed'); | ||
await fs.remove(dir); | ||
await fs.rm(dir, { recursive: true }); | ||
erickzhao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
throw err; | ||
} | ||
d('work succeeded'); | ||
await fs.remove(dir); | ||
await fs.rm(dir, { recursive: true }); | ||
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. Just checking my assumptions here, but we had to add the recursive option here due to a behavior change when we moved from 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. Yup. It's not very explicitly documented but If we look at the latest But this is a good callout, because I think to ensure there's no regression in behavior here we need to add the 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. Keeping For example, I was running into a case in 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. Fair point. I think for migration purposes we should strive for no intentional behavior change, and then we can follow-up with that change after? 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. Yep, I think removing
erickzhao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return result; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I've thought about in the past (and I feel like @BlackHole1 has pointed this out before), is we should probably explicitly test our lower bound Node.js version to ensure we remain compatible with it. It's extra CI runs, but since we just reduced the matrix here we'll still have a net reduction if we add back '20.0.0' to the matrix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the lower bound being
22.0.0
(minimum engines value)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, typo on my part. 🙁