chore: sunset Node.js 12 (#16512)

This commit is contained in:
Max Schmitt 2022-08-15 18:10:04 +02:00 committed by GitHub
parent 0a70c624d6
commit 09e6bb9c0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 10 deletions

View file

@ -34,9 +34,6 @@ jobs:
os: [ubuntu-22.04] os: [ubuntu-22.04]
node-version: [14] node-version: [14]
include: include:
- os: ubuntu-22.04
node-version: 12
browser: chromium
- os: ubuntu-22.04 - os: ubuntu-22.04
node-version: 16 node-version: 16
browser: chromium browser: chromium
@ -106,8 +103,6 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14] node-version: [14]
include: include:
- os: ubuntu-latest
node-version: 12
- os: ubuntu-latest - os: ubuntu-latest
node-version: 16 node-version: 16
- os: ubuntu-latest - os: ubuntu-latest

View file

@ -18,13 +18,13 @@ const currentNodeVersion = process.versions.node;
const semver = currentNodeVersion.split('.'); const semver = currentNodeVersion.split('.');
const [major] = [+semver[0]]; const [major] = [+semver[0]];
if (major < 12) { if (major < 14) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.error( console.error(
'You are running Node.js ' + 'You are running Node.js ' +
currentNodeVersion + currentNodeVersion +
'.\n' + '.\n' +
'Playwright requires Node.js 12 or higher. \n' + 'Playwright requires Node.js 14 or higher. \n' +
'Please update your version of Node.js.' 'Please update your version of Node.js.'
); );
process.exit(1); process.exit(1);

View file

@ -64,9 +64,6 @@ export function isInternalFileName(file: string, functionName?: string): boolean
// EventEmitter.emit has 'events.js' file. // EventEmitter.emit has 'events.js' file.
if (file === 'events.js' && functionName?.endsWith('emit')) if (file === 'events.js' && functionName?.endsWith('emit'))
return true; return true;
// Node 12
if (file === '_stream_readable.js' || file === '_stream_writable.js')
return true;
return false; return false;
} }