Skip to content

Commit

Permalink
chore: drop support for Node.js 10 (#6371)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Apr 30, 2021
1 parent 7405655 commit a59a494
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_canary_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_canary_driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_canary_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/intro-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions packages/build_package.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2018",
"target": "ES2019",
"module": "commonjs",
"lib": ["esnext", "dom", "DOM.Iterable"],
"sourceMap": true,
Expand Down
2 changes: 1 addition & 1 deletion utils/generate_types/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"strict": true,
"target": "es2015",
"target": "ES2019",
"noEmit": true,
"moduleResolution": "node"
},
Expand Down

0 comments on commit a59a494

Please sign in to comment.