Skip to content

Peer dependency warnings from @graphql-tools/graphql-tag-pluck on @babel/core #5066

@shawnmcknight

Description

@shawnmcknight

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox

    Make sure to fork this template and run yarn generate in the terminal.

    Please make sure the GraphQL Tools package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

@graphql-tools/graphql-tag-pluck has a dependency on @babel/plugin-syntax-import-assertions. That package has a peer dependency on @babel/core^7.0.0-0. As a result, pnpm is emitting peer dependency warnings due to @babel/core not being present:

└─┬ @graphql-codegen/cli 3.0.0
  └─┬ @graphql-tools/code-file-loader 7.3.21
    └─┬ @graphql-tools/graphql-tag-pluck 7.5.0
      └─┬ @babel/plugin-syntax-import-assertions 7.20.0
        └── ✕ missing peer @babel/core@^7.0.0-0
Peer dependencies that should be installed:
  @babel/core@^7.0.0-0

The dependency for @babel/plugin-syntax-import-assertions was added in #4863. Since that package has a peer dependency on @babel/core, that should be added as well so that consumers without @babel/core do not get peer dependency warnings or an alternative approach devised which makes the syntax transformation opt-in.

To Reproduce
Steps to reproduce the behavior:

Add @graphql-tools/graphql-tag-pluck as a dependency without installing @babel/core. pnpm will emit a peer dependency warning. It's been a while since I've used npm or yarn, but I suspect they would exhibit similar warnings.

Expected behavior

No peer dependency warnings.

Environment:

  • OS: Windows
  • @graphql-tools/...: See dependency tree in description
  • NodeJS: 18.14.0

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions