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

chore: add babel/core to peer dependencies #20915

Merged
merged 2 commits into from
Jan 30, 2020

Conversation

cometkim
Copy link
Contributor

@cometkim cometkim commented Jan 27, 2020

Description

I've got errors when tried to using yarn@berry which doesn't support implicit transitive peer deps anymore.

➤ YN0002: │ babel-preset-gatsby-package@npm:0.2.3 doesn't provide @babel/core@^7.0.0-0 requested by @babel/plugin-proposal-class-properties@npm:7.5.5
➤ YN0002: │ babel-preset-gatsby-package@npm:0.2.3 doesn't provide @babel/core@^7.0.0-0 requested by @babel/plugin-proposal-optional-chaining@npm:7.2.0
➤ YN0002: │ babel-preset-gatsby-package@npm:0.2.3 doesn't provide @babel/core@^7.0.0-0 requested by @babel/plugin-syntax-dynamic-import@npm:7.2.0
➤ YN0002: │ babel-preset-gatsby-package@npm:0.2.3 doesn't provide @babel/core@^7.0.0-0 requested by @babel/plugin-transform-runtime@npm:7.5.5
➤ YN0002: │ babel-preset-gatsby-package@npm:0.2.3 doesn't provide @babel/core@^7.0.0-0 requested by @babel/preset-env@npm:7.5.5
➤ YN0002: │ babel-preset-gatsby-package@npm:0.2.3 doesn't provide @babel/core@^7.0.0-0 requested by @babel/preset-flow@npm:7.0.0
➤ YN0002: │ babel-preset-gatsby-package@npm:0.2.3 doesn't provide @babel/core@^7.0.0-0 requested by @babel/preset-react@npm:7.0.0

I added missing peer dependencies into the package.json of two packages:

Note

I know @Austaras requested removing @babel/plugin-proposal-nullish-coalescing-operator and @babel/plugin-proposal-optional-chaining from gatsby-plugin-typescript.

I think it's better to deal with another PR because removing the two plugins requires to raise existing gatsby peer dependency version from 2.0.0 to at least 2.18.11

Related Issues

Fixes #20900

@cometkim cometkim requested a review from a team as a code owner January 27, 2020 18:39
@cometkim
Copy link
Contributor Author

also related #20949

@wardpeet
Copy link
Contributor

I'm unsure if we should add @babel/core as a peerdep or a regular dep for typescript-plugin. I'm leaning more forward to dependency as users don't have to care about installing @babel/core as well.

@wardpeet wardpeet added the status: awaiting author response Additional information has been requested from the author label Jan 29, 2020
@cometkim
Copy link
Contributor Author

I'm unsure if we should add @babel/core as a peerdep or a regular dep for typescript-plugin. I'm leaning more forward to dependency as users don't have to care about installing @babel/core as well.

@wardpeet Ah, you right. @babel/core as dep for the typescript-plugin makes more sense to me either.

@cometkim
Copy link
Contributor Author

note there is no change in the lockfile

@cometkim cometkim removed the status: awaiting author response Additional information has been requested from the author label Jan 30, 2020
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

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

Thank you! this looks great.

@wardpeet wardpeet merged commit fd257da into gatsbyjs:master Jan 30, 2020
@bradleyayers
Copy link

Thanks for this! Amazing.

@cometkim cometkim deleted the preset-deps branch January 30, 2020 10:45
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.

gatsby-plugin-typescript missing dependency on @babel/core and graphql
3 participants