Skip to content

Commit

Permalink
Release 8.0.0: upgrade to Puppeteer 21, require Node 16+
Browse files Browse the repository at this point in the history
From grunt-contrib-connect 4.0.0:
> gruntjs/grunt-contrib-connect#282
> * Fix deprecation warning about `opn@6`.

From puppeteer 20:
> https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-v20.0.0
> * switch from Chromium to "Chrome for Testing".

From puppeteer 20.9.0:
> https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v20.9.0
> * roll to Chrome 115

From puppeteer 21.1.0:
> https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v21.1.0
> * roll to Chrome 116

General "Chrome for Testing" announcement at [1].
Based on reading the linked design document [2] [3], I believe
"Chrome for Testing" continues to be a build of open-source Chromium.
It is not compiled from or with proprietary Google Chrome components.
Rather, it is a Chromium build that is 1) compiled feature flags and
defaults settings as similar to Google Chrome as possible, and 2)
built and published from the same Chromium revisions and at the same
cadence as Chrome releases. This means, that anytime a Google Chrome
release happens for Stable or Beta channel, there is also a
Chrome for Testing release.

Having said that, the design document does acknowledge that a previous
proposal (nicknamed "Chrome-", meaning start with Chrome and subtract
unwanted features) did exist. This was rejected in favour of "Chromium+"
which works as above with the Chrome-like app icon injected from their
build system from outside the Chromium source tree.

[1] https://developer.chrome.com/blog/chrome-for-testing/
[2] https://docs.google.com/document/d/1XJvxyqAQjhPfJ0rX84PjfXXb5sBx3m8DXzMxR0ipQNs/edit
[3] http://web.archive.org/web/20230503104427/https://docs.google.com/document/d/1XJvxyqAQjhPfJ0rX84PjfXXb5sBx3m8DXzMxR0ipQNs/edit

From puppeteer 19.11:
> https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v19.11.0
> * add warning for `headless: true`

There is no more pretending that Chrome Headless wasn't actually
"Chrome but headless" (like Firefox Headless), but a separate browser
implementation [4]. "Fake it until you make it". Starting in Chrome 112,
there is a "new" headless mode, which is now claimed to actually be
"Chrome, but headless". I propose that in grunt-contrib-qunit 8.0,
with the switch to "Chromium for Testing", we also switch to this
mode at the same time.

If we don't, Puppeteer prints the following warning on every CI build:

> Puppeteer old Headless deprecation warning:
> In the near feature `headless: true` will default to the new Headless mode
> Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`

[4] https://developer.chrome.com/articles/new-headless/
  • Loading branch information
Krinkle committed Sep 5, 2023
1 parent 8e88ec7 commit 327066b
Show file tree
Hide file tree
Showing 7 changed files with 1,834 additions and 565 deletions.
88 changes: 47 additions & 41 deletions .github/workflows/test.yml
@@ -1,41 +1,47 @@
name: Tests

on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 2

jobs:
run:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [14, 16, 18]
os: [ubuntu-latest, windows-latest]

steps:
- name: Clone repository
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install npm dependencies
run: npm ci

- name: Run tests
run: npm test

# We test multiple Windows shells because of prior stdout buffering issues
# filed against Grunt. https://github.com/joyent/node/issues/3584
- name: Run PowerShell tests
run: "npm test # PowerShell" # Pass comment to PS for easier debugging
shell: powershell
if: startsWith(matrix.os, 'windows')
name: Tests

on:
push:
branches:
- "**"
- "!dependabot/**"
pull_request:
workflow_dispatch:

env:
FORCE_COLOR: 2

jobs:
run:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node: [16, 18, 20]

steps:
- name: Clone repository
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install npm dependencies
run: npm ci

- name: Run tests
run: npm test

# We test multiple Windows shells because of prior stdout buffering issues
# filed against Grunt. https://github.com/joyent/node/issues/3584
- name: Run PowerShell tests
run: "npm test # PowerShell" # Pass comment to PS for easier debugging
shell: powershell
if: startsWith(matrix.os, 'windows')
5 changes: 5 additions & 0 deletions CHANGELOG
@@ -1,3 +1,8 @@
v8.0.0:
date: 2023-09-04
changes:
- Update to Puppeteer 21 (switch to "Chrome for Testing", and "new" Headless mode).
- Require Node.js 16 or later.
v7.0.1:
date: 2023-07-02
changes:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
@@ -1 +1 @@
Please see the [Contributing to grunt](https://gruntjs.com/contributing) guide for information on contributing to this project.
Please see the [Contributing to grunt](https://gruntjs.com/contributing) guide for information on contributing to this project.
3 changes: 2 additions & 1 deletion README.md
@@ -1,4 +1,4 @@
# grunt-contrib-qunit v7.0.1 [![Build Status](https://github.com/gruntjs/grunt-contrib-qunit/workflows/Tests/badge.svg)](https://github.com/gruntjs/grunt-contrib-qunit/actions?workflow=Tests)
# grunt-contrib-qunit v8.0.0 [![Build Status](https://github.com/gruntjs/grunt-contrib-qunit/workflows/Tests/badge.svg)](https://github.com/gruntjs/grunt-contrib-qunit/actions?workflow=Tests)

> Run QUnit unit tests in a headless Chrome instance
Expand Down Expand Up @@ -273,6 +273,7 @@ grunt.event.on('qunit.spawn', function (url) {

## Release History

* 2023-09-04   v8.0.0   Update to Puppeteer 21 (switch to "Chrome for Testing", and "new" Headless mode). Require Node.js 16 or later.
* 2023-07-02   v7.0.1   Fix unexpected bridge activation in unrated iframes.
* 2023-02-14   v7.0.0   Update to Puppeteer 19. Require Node.js 14 or later. Change actual/expected value to JSON when possible.
* 2022-10-18   v6.2.1   Fix serialization of assertions on circular objects.
Expand Down

0 comments on commit 327066b

Please sign in to comment.