-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
misc: drop node 16 support #15290
misc: drop node 16 support #15290
Changes from 8 commits
62f6fa2
1ada62a
f8a9b5d
f3a96aa
f68b34e
231957c
6eacbab
b61f999
ea9456b
d7ce576
d4ddf6b
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 |
---|---|---|
|
@@ -82,7 +82,7 @@ async function runBundledLighthouse(url, config, testRunnerOptions) { | |
const logLevel = testRunnerOptions.isDebug ? 'verbose' : 'info'; | ||
|
||
// Puppeteer is not included in the bundle, we must create the page here. | ||
const browser = await puppeteer.connect({browserURL: `http://localhost:${port}`}); | ||
const browser = await puppeteer.connect({browserURL: `http://127.0.0.1:${port}`}); | ||
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. Node http/fetch no longer autoresolves localhost to the ipv4 address nodejs/node#40702 I guess it does in Node 20 though so this is only an issue for Node 18 |
||
const page = await browser.newPage(); | ||
const runnerResult = await lighthouse(url, {port, logLevel}, config, page); | ||
if (!runnerResult) throw new Error('No runnerResult'); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -424,7 +424,7 @@ describe('.resolveGathererToDefn', () => { | |
it('throws but not for missing gatherer when it has a node dependency error', async () => { | ||
const resultPromise = | ||
resolveGathererToDefn('../fixtures/invalid-gatherers/require-error.js', [], moduleDir); | ||
await expect(resultPromise).rejects.toThrow(/Cannot find module/); | ||
await expect(resultPromise).rejects.toThrow(/no such file or directory/); | ||
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 "Cannot find module" text came from an error constructed by quibble. Updates in v0.7.0 of quibble appear to surface the actual node error instead. Good change IMO. |
||
}); | ||
}); | ||
|
||
|
@@ -502,7 +502,7 @@ describe('.resolveAuditsToDefns', () => { | |
const resultPromise = resolveAuditsToDefns([ | ||
'../fixtures/invalid-audits/require-error.js', | ||
], moduleDir); | ||
await expect(resultPromise).rejects.toThrow(/Cannot find module/); | ||
await expect(resultPromise).rejects.toThrow(/no such file or directory/); | ||
}); | ||
}); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
"smokehouse": "./cli/test/smokehouse/frontends/smokehouse-bin.js" | ||
}, | ||
"engines": { | ||
"node": ">=16.16" | ||
"node": ">=18" | ||
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. Did you try on 18.0.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. Good point, I got some failures locally on 18.0.0 so I'll add a minor version |
||
}, | ||
"scripts": { | ||
"prepack": "yarn build-report --standalone --flow --esm && yarn build-types", | ||
|
@@ -172,7 +172,7 @@ | |
"rollup-plugin-polyfill-node": "^0.12.0", | ||
"tabulator-tables": "^4.9.3", | ||
"terser": "^5.18.2", | ||
"testdouble": "^3.17.2", | ||
"testdouble": "^3.18.0", | ||
"typed-query-selector": "^2.6.1", | ||
"typescript": "^5.0.4", | ||
"wait-for-expect": "^3.0.2", | ||
|
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.
I'm can't find any info in the docs, but for some reason
response.writeHead
will end the response in Node 20 and send it to the user. We want to be able to amend the headers and status code later in execution (e.g. if there was a redirect) so we should usesetHeader
andstatusCode =
now.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.
nodejs/node#45508