Skip to content
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!: Support Node 18+ #1879

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .kokoro/continuous/node14/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/presubmit/node14/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion samples/puppeteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "An example of using puppeteer to orchestrate a Google sign in flow.",
"main": "oauth2-test.js",
"engines": {
"node": ">=12"
"node": ">=18"
},
"scripts": {
"start": "node oauth2-test.js"
Expand Down
6 changes: 1 addition & 5 deletions src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ export function warn(warning: Warning) {
}
warning.warned = true;
if (typeof process !== 'undefined' && process.emitWarning) {
// @types/node doesn't recognize the emitWarning syntax which
// accepts a config object, so `as any` it is
// https://nodejs.org/docs/latest-v8.x/api/process.html#process_process_emitwarning_warning_options
// eslint-disable-next-line @typescript-eslint/no-explicit-any
process.emitWarning(warning.message, warning as any);
process.emitWarning(warning.message, warning);
} else {
console.warn(warning.message);
}
Expand Down
17 changes: 4 additions & 13 deletions system-test/test.kitchen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,10 @@ describe('pack and install', () => {
*/
afterEach('cleanup staging', async () => {
if (!keep) {
if ('rm' in fs.promises) {
await fs.promises.rm(stagingDir, {
force: true,
recursive: true,
});
} else {
// Must be on Node 14-.
// Here, `rmdir` can also delete files.
// Background: https://github.com/nodejs/node/issues/34278
await fs.promises.rmdir(stagingDir, {
recursive: true,
});
}
await fs.promises.rm(stagingDir, {
force: true,
recursive: true,
});
}
});
});
Loading