Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: drop support for Node.js 10 (#6371)

Max Schmitta59a494e6477
diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md
index 6b9c74a255..3277cf41ba 100644
--- a/.github/ISSUE_TEMPLATE/bug.md
+++ b/.github/ISSUE_TEMPLATE/bug.md
@@ -10,7 +10,7 @@ assignees: ''
**Context:**
- Playwright Version: [what Playwright version do you use?]
- Operating System: [e.g. Windows, Linux or Mac]
-- Node.js version: [e.g. 10.12, 10.14]
+- Node.js version: [e.g. 12.22, 14.6]
- Browser: [e.g. All, Chromium, Firefox, WebKit]
- Extra: [any specific details about your environment]
diff --git a/.github/workflows/infra.yml b/.github/workflows/infra.yml
index 4a082cf6d7..d9965b3176 100644
--- a/.github/workflows/infra.yml
+++ b/.github/workflows/infra.yml
@@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- uses: microsoft/playwright-github-action@v1
- run: npm ci
- run: npm run build
@@ -38,7 +38,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- uses: microsoft/playwright-github-action@v1
- run: npm ci
- run: npm run build
diff --git a/.github/workflows/publish_canary_docker.yml b/.github/workflows/publish_canary_docker.yml
index 1185d8866a..6c854d03c9 100644
--- a/.github/workflows/publish_canary_docker.yml
+++ b/.github/workflows/publish_canary_docker.yml
@@ -25,7 +25,7 @@ jobs:
- uses: microsoft/playwright-github-action@v1
- uses: actions/setup-node@v2
with:
- node-version: 10.15
+ node-version: 12
- run: npm ci
- run: npm run build
- run: ./utils/docker/build.sh bionic playwright:localbuild-bionic
diff --git a/.github/workflows/publish_canary_driver.yml b/.github/workflows/publish_canary_driver.yml
index 4342c97ee7..934ca6e990 100644
--- a/.github/workflows/publish_canary_driver.yml
+++ b/.github/workflows/publish_canary_driver.yml
@@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 12.x
+ node-version: 12
registry-url: 'https://registry.npmjs.org'
- uses: microsoft/playwright-github-action@v1
- run: npm ci
diff --git a/.github/workflows/publish_canary_npm.yml b/.github/workflows/publish_canary_npm.yml
index 7a4a5e1551..4e3a1fa2c1 100644
--- a/.github/workflows/publish_canary_npm.yml
+++ b/.github/workflows/publish_canary_npm.yml
@@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
registry-url: 'https://registry.npmjs.org'
- uses: microsoft/playwright-github-action@v1
- run: npm ci
diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml
index dc695d0be5..a6e5132511 100644
--- a/.github/workflows/publish_release.yml
+++ b/.github/workflows/publish_release.yml
@@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
registry-url: 'https://registry.npmjs.org'
- uses: microsoft/playwright-github-action@v1
- run: npm ci
@@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 12.x
+ node-version: 12
registry-url: 'https://registry.npmjs.org'
- uses: microsoft/playwright-github-action@v1
- run: npm ci
@@ -56,7 +56,7 @@ jobs:
- uses: microsoft/playwright-github-action@v1
- uses: actions/setup-node@v2
with:
- node-version: 10.15
+ node-version: 12
- run: npm ci
- run: npm run build
- run: ./utils/docker/build.sh bionic playwright:localbuild-bionic
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 0f3b333d36..9c4e44f6a9 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
- run: npm run build
- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium
@@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
- run: npm run build
- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium
@@ -104,7 +104,6 @@ jobs:
fail-fast: false
matrix:
node_version:
- - "^10.17.0" # pre 10.17, --unhandled-rejections=strict was not an option (https://github.com/nodejs/node/pull/26599) which we need in our tests
- "^12.0.0"
- "^14.1.0" # pre 14.1, zip extraction was broken (https://github.com/microsoft/playwright/issues/1988)
timeout-minutes: 20
@@ -129,7 +128,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
- run: npm run build
- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium
@@ -158,7 +157,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
- run: npm run build
- run: node lib/cli/cli install-deps chromium
@@ -186,7 +185,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
- run: npm run build
- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium
@@ -239,7 +238,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- name: Install Chrome Stable
run: sudo apt install google-chrome-stable
- run: npm ci
@@ -272,7 +271,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
@@ -299,7 +298,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
@@ -324,7 +323,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
@@ -354,7 +353,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
@@ -380,7 +379,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
@@ -407,7 +406,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
@@ -431,7 +430,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
- node-version: 10
+ node-version: 12
- run: npm ci
- run: npm run build
- run: node lib/cli/cli install-deps chromium
diff --git a/docs/src/intro-js.md b/docs/src/intro-js.md
index 07ccbd3be1..cc43541c70 100644
--- a/docs/src/intro-js.md
+++ b/docs/src/intro-js.md
@@ -97,7 +97,7 @@ let page: import('playwright').Page;
## System requirements
-Playwright requires Node.js version 10.17 or above. The browser binaries for Chromium,
+Playwright requires Node.js version 12 or above. The browser binaries for Chromium,
Firefox and WebKit work across the 3 platforms (Windows, macOS, Linux):
### Windows
diff --git a/docs/src/troubleshooting.md b/docs/src/troubleshooting.md
index 5574834c6b..457b097f6d 100644
--- a/docs/src/troubleshooting.md
+++ b/docs/src/troubleshooting.md
@@ -30,7 +30,7 @@ await page.evaluate(`(async() => {
### ReferenceError: URL is not defined
-Playwright requires Node.js 10 or higher. Node.js 8 is not supported, and will cause you to receive this error.
+Playwright requires Node.js 12 or higher. Node.js 8 is not supported, and will cause you to receive this error.
# Please file an issue
diff --git a/package.json b/package.json
index fa135481a1..8092e9fc11 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
"repository": "github:Microsoft/playwright",
"homepage": "https://playwright.dev",
"engines": {
- "node": ">=10.17.0"
+ "node": ">=12"
},
"scripts": {
"ctest": "folio --config=tests/config/default.config.ts --tag=chromium",
diff --git a/packages/build_package.js b/packages/build_package.js
index e3d04532e0..e6a10fb822 100755
--- a/packages/build_package.js
+++ b/packages/build_package.js
@@ -141,6 +141,9 @@ if (!args.some(arg => arg === '--no-cleanup')) {
bin: {
playwright: './lib/cli/cli.js',
},
+ engines: {
+ node: '>=12',
+ },
exports: {
// Root import: we have a wrapper ES Module to support the following syntax.
// const { chromium } = require('playwright');
diff --git a/tsconfig.json b/tsconfig.json
index 7bc45b7d90..1507a055a0 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
- "target": "es2018",
+ "target": "ES2019",
"module": "commonjs",
"lib": ["esnext", "dom", "DOM.Iterable"],
"sourceMap": true,
diff --git a/utils/generate_types/test/tsconfig.json b/utils/generate_types/test/tsconfig.json
index f042a91379..f4caa29cf9 100644
--- a/utils/generate_types/test/tsconfig.json
+++ b/utils/generate_types/test/tsconfig.json
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"strict": true,
- "target": "es2015",
+ "target": "ES2019",
"noEmit": true,
"moduleResolution": "node"
},