Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: enable the new-headless mode by default #11815

Merged
merged 3 commits into from
Feb 2, 2024
Merged

Conversation

OrKoN
Copy link
Collaborator

@OrKoN OrKoN commented Feb 2, 2024

This PR changes the meaning for the headless flag. Previously, headless=true launched the old headless mode also known as chrome-headless-shell. After this change, the new headless module will be launched instead.

To migrate:

  1. if you were using 'headless=true' and want to use chrome-headless-shell, change to headless: 'chrome-headless-shell'.
  2. if you were using 'headless=new', change to headless: true

@OrKoN OrKoN added the full-ci label Feb 2, 2024
@OrKoN OrKoN changed the title refactor!: enable the new-headless mode by defaul refactor!: enable the new-headless mode by default Feb 2, 2024
Copy link
Collaborator

@Lightning00Blade Lightning00Blade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This PR changes the meaning for the `headless` flag.
Previously, `headless=true` would launch the old headless
mode also known as `chrome-headless-shell`. After this change,
the new headless module will be launched instead.

To migrate:

1) if you were using 'headless=true' and want to use `chrome-headless-shell`,
change to `headless: 'chrome-headless-shell'`.
2) if you were using 'headless=new', change to `headless: true`
@OrKoN OrKoN merged commit 75c9e11 into main Feb 2, 2024
2 of 5 checks passed
@OrKoN OrKoN deleted the orkon/old-headless branch February 2, 2024 12:25
deot added a commit to deot/dev that referenced this pull request Feb 5, 2024
@ouuan
Copy link

ouuan commented Feb 9, 2024

I think it's not user-friendly first to suggest users to change their codes to headless: 'new' and then break it soon after. If I knew this beforehand, I would rather keep my old headless: true to avoid changing it everywhere twice.

Maybe it's too late for this time, and further changes might cause more confusion. But when there are similar changes next time, I suggest that a better decision could be made. e.g. Set it to boolean | 'new' | 'shell' in the early version, and then change the semantic of true in the next version, but keep both 'new' and 'shell'. Or at least in the warning remind that 'new' would be removed in future and suggest setting PUPPETEER_DISABLE_HEADLESS_WARNING instead.

@OrKoN
Copy link
Collaborator Author

OrKoN commented Feb 9, 2024

@ouuan thanks for the feedback. Note that it is a breaking semver release, so we have done breaking changes to not support new anymore. Note that it was a mechanism for an early testing and the warning always mentioned that headless: true will become the new headless mode by default.

@ouuan
Copy link

ouuan commented Feb 9, 2024

the warning always mentioned that headless: true will become the new headless mode by default.

Yes, but it did not mention that 'new' will be removed.

Note that it is a breaking semver release, so we have done breaking changes to not support new anymore.

A breaking change is necessary to change the semantic of true. But the removal of 'new' is not necessary.

timvandermeij added a commit to timvandermeij/pdf.js that referenced this pull request Feb 10, 2024
This is a major version bump that requires two changes on our side:

- The new headless mode is now the default, so we can remove our
  transformation code (see puppeteer/puppeteer#11815).
- The `page.waitForTimeout` API is removed. Sadly we still used it in
  the integration tests (but fortunately much less than before we worked
  on fixing intermittent failures), so until we remove the final
  occurrences we provide an implementation ourselves (see
  puppeteer/puppeteer#11780).

The full changelog can be found here:
https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v22.0.0
JLEdward pushed a commit to JLEdward/WebCrawler that referenced this pull request Apr 26, 2024
nabondance added a commit to nabondance/texei-sfdx-plugin that referenced this pull request May 27, 2024
Krinkle added a commit to gruntjs/grunt-contrib-qunit that referenced this pull request Jun 9, 2024
Puppeteer 22 drops support for Node 16 and requires Node 18+ [1].

The main change for us is how `headless` is configured. [2] The new
headless mode is now enabled by default in Puppeteer, corresponding
to `headless: true` instead of `headless: 'new'`.

We already opted-in to this before in grunt-contrib-qunit so it is not
relevant for grunt-contrib-qunit release notes.

This also includes "roll to Chrome 125", from puppeteer 22.10.0 [3].

[1]: https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v22.0.0
[2]: puppeteer/puppeteer#11815
[3]: https://github.com/puppeteer/puppeteer/blob/puppeteer-v22.10.0/packages/puppeteer/CHANGELOG.md
nabondance added a commit to nabondance/texei-sfdx-plugin that referenced this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants