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

[Internal] Configure babel-plugin-private-methods loose explicitly #2554

Merged
merged 1 commit into from
May 19, 2021

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented May 19, 2021

What?

As title

Why?

When running yarn build, we got warnings from babel. To reproduce, in main, run build in the cli package.

cd packages/cli
yarn build

you should see warnings like this:

The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
	["@babel/plugin-proposal-private-methods", { "loose": true }]
to the "plugins" section of your Babel config.
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding

@dac09 dac09 requested a review from peterp May 19, 2021 15:47
@dac09 dac09 added this to the next-release milestone May 19, 2021
@peterp
Copy link
Contributor

peterp commented May 19, 2021

I always thought stage-4 proposals were added automatically, are they, but because we have loose: true on the others we need to do these for all class related proposals?

@dac09 dac09 merged commit b9adfdd into redwoodjs:main May 19, 2021
@dac09
Copy link
Collaborator Author

dac09 commented May 19, 2021

The preset-env does add a bunch of plugins automatically, but I think this is mainly that dependency between class and private methods plugins.

@dac09 dac09 deleted the fix/internal-babel-warnings branch May 19, 2021 16:59
dac09 added a commit to dac09/redwood that referenced this pull request May 19, 2021
…-codegen

* 'main' of github.com:redwoodjs/redwood: (54 commits)
  Add private methods loose explicitly (redwoodjs#2554)
  Custom `useAuth` pass through for `RedwoodApolloProvider` (redwoodjs#2455)
  Prerender all routes nested in Set with prerender prop (redwoodjs#2542)
  Upgrade eslint and prettier packages including formatting fixes (redwoodjs#2540)
  contributors updates (redwoodjs#2544)
  Rename default datasource (redwoodjs#1941)
  Add default config for Component generation (redwoodjs#1814)
  build(deps): bump core-js from 3.10.1 to 3.12.1 (redwoodjs#2481)
  upgrade babel 7.14.2 with misc babel packages (redwoodjs#2541)
  build(deps): bump http-proxy-middleware from 1.1.0 to 2.0.0 (redwoodjs#2536)
  build(deps): bump pino-pretty from 4.7.1 to 4.8.0 (redwoodjs#2534)
  build(deps): bump concurrently from 6.0.2 to 6.1.0 (redwoodjs#2533)
  build(deps-dev): bump firebase-admin from 9.7.0 to 9.8.0 (redwoodjs#2522)
  build(deps): bump esbuild-loader from 2.10.0 to 2.13.0 (redwoodjs#2518)
  build(deps): bump @graphql-tools/merge from 6.2.13 to 6.2.14 (redwoodjs#2516)
  updating minor dependency versions across packages (redwoodjs#2532)
  Add JSON headers to Function generator template (redwoodjs#2457)
  fixed firebase promises so that they can be caught (redwoodjs#2503)
  Prevent re-initialization of a Firebase app that is already initialized (redwoodjs#2504)
  build(deps-dev): bump magic-sdk from 2.7.0 to 4.3.0 (redwoodjs#2463)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants