Browse Source

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

pull/6377/head
Max Schmitt 2 weeks ago
committed by GitHub
parent
commit
a59a494e64
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/ISSUE_TEMPLATE/bug.md
  2. 4
      .github/workflows/infra.yml
  3. 2
      .github/workflows/publish_canary_docker.yml
  4. 2
      .github/workflows/publish_canary_driver.yml
  5. 2
      .github/workflows/publish_canary_npm.yml
  6. 6
      .github/workflows/publish_release.yml
  7. 27
      .github/workflows/tests.yml
  8. 2
      docs/src/intro-js.md
  9. 2
      docs/src/troubleshooting.md
  10. 2
      package.json
  11. 3
      packages/build_package.js
  12. 2
      tsconfig.json
  13. 2
      utils/generate_types/test/tsconfig.json

2
.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]

4
.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

2
.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

2
.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

2
.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

6
.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

27
.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

2
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

2
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

2
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",

3
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');

2
tsconfig.json

@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2018",
"target": "ES2019",
"module": "commonjs",
"lib": ["esnext", "dom", "DOM.Iterable"],
"sourceMap": true,

2
utils/generate_types/test/tsconfig.json

@ -1,7 +1,7 @@
{
"compilerOptions": {
"strict": true,
"target": "es2015",
"target": "ES2019",
"noEmit": true,
"moduleResolution": "node"
},

Loading…
Cancel
Save