Skip to content

Commit 3d24045

Browse files
feat!: Support Node 18+ (#1879)
* chore: Support Node 18+ * feat: Support Node 18+ * chore: Additional Node 18 upgrades * chore: don't change test fixtures * feat: Move kokoro directories to 18 * chore: Update checkout and setup-node to v4 - https://github.com/actions/checkout/releases/tag/v4.0.0 - https://github.com/actions/setup-node/releases/tag/v4.0.0 Source-Link: googleapis/synthtool@c19dd80 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:8060aba1f6d5617d08091767141ab2a99ea1ccbd9371fd42ffc208c5329caa73 * chore: Update `engines` and minor functionality --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Daniel Bankhead <[email protected]> Co-authored-by: d-goog <[email protected]>
1 parent 5b60a95 commit 3d24045

File tree

5 files changed

+8
-21
lines changed

5 files changed

+8
-21
lines changed

.kokoro/continuous/node14/common.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.kokoro/presubmit/node14/common.cfg

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/puppeteer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "An example of using puppeteer to orchestrate a Google sign in flow.",
55
"main": "oauth2-test.js",
66
"engines": {
7-
"node": ">=12"
7+
"node": ">=18"
88
},
99
"scripts": {
1010
"start": "node oauth2-test.js"

src/messages.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ export function warn(warning: Warning) {
2424
}
2525
warning.warned = true;
2626
if (typeof process !== 'undefined' && process.emitWarning) {
27-
// @types/node doesn't recognize the emitWarning syntax which
28-
// accepts a config object, so `as any` it is
29-
// https://nodejs.org/docs/latest-v8.x/api/process.html#process_process_emitwarning_warning_options
30-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
31-
process.emitWarning(warning.message, warning as any);
27+
process.emitWarning(warning.message, warning);
3228
} else {
3329
console.warn(warning.message);
3430
}

system-test/test.kitchen.ts

+4-13
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,10 @@ describe('pack and install', () => {
114114
*/
115115
afterEach('cleanup staging', async () => {
116116
if (!keep) {
117-
if ('rm' in fs.promises) {
118-
await fs.promises.rm(stagingDir, {
119-
force: true,
120-
recursive: true,
121-
});
122-
} else {
123-
// Must be on Node 14-.
124-
// Here, `rmdir` can also delete files.
125-
// Background: https://github.com/nodejs/node/issues/34278
126-
await fs.promises.rmdir(stagingDir, {
127-
recursive: true,
128-
});
129-
}
117+
await fs.promises.rm(stagingDir, {
118+
force: true,
119+
recursive: true,
120+
});
130121
}
131122
});
132123
});

0 commit comments

Comments
 (0)