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

core(fr): make FR navigations the default in node #13783

Merged
merged 16 commits into from
Apr 15, 2022
Merged

Conversation

adamraine
Copy link
Member

@adamraine adamraine commented Mar 24, 2022

Doc

This PR makes FR navigations the default for the node API. One important requirement for this change is making puppeteer-core a package dependency.

@@ -91,6 +91,7 @@ async function build(entryPath, distPath, opts = {minify: true}) {
const shimsObj = {};

const modulesToIgnore = [
'puppeteer',
Copy link
Member Author

Choose a reason for hiding this comment

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

Puppeteer isn't needed if the environment provides a puppeteer page as a dependency. We don't need puppeteer bloating our bundle.

package.json Outdated
@@ -199,6 +198,7 @@
"metaviewport-parser": "0.2.0",
"open": "^8.4.0",
"parse-cache-control": "1.0.1",
"puppeteer": "^10.2.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we do not need puppeteer's bundled chromium (we use chrome-launcher), we should use puppeteer-core instead.

https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#puppeteer-vs-puppeteer-core

Copy link
Collaborator

Choose a reason for hiding this comment

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

In fact, it might be worth first doing a PR that changes our devDep from pup to pup-core.

There's also #13657 to consider.

Copy link
Member Author

Choose a reason for hiding this comment

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

In that case, we can keep puppeteer as a dev dep because we use it in a few scripts, and then just have pup-core as the package dep.

@adamraine adamraine marked this pull request as ready for review March 30, 2022 17:08
@adamraine adamraine requested a review from a team as a code owner March 30, 2022 17:08
@adamraine adamraine requested review from connorjclark and removed request for a team March 30, 2022 17:08
if (flags.fraggleRock) {
flags.channel = 'fraggle-rock-cli';
} else {
flags.channel = 'cli';
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we emit a console.warning stating that this is deprecated?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah but I think it makes more sense in the next PR, once we switch --fraggle-rock to --legacy-navigation. Right now the default behavior would be to emit the deprecation warning.

@adamraine adamraine changed the title core: make FR navigations the default in node core(fr): make FR navigations the default in node Apr 15, 2022
@adamraine adamraine merged commit bd7232e into master Apr 15, 2022
@adamraine adamraine deleted the fr-as-default-node branch April 15, 2022 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants