eddeee888 / graphql-code-generator-plugins

List of GraphQL Code Generator plugins that complements the official plugins.
MIT License
51 stars 12 forks source link

Fix dependencies #218

Closed lensbart closed 9 months ago

lensbart commented 9 months ago

When using Yarn (latest) with plug ‘n’ play/zero-installs, some stricter rules on dependencies apply. Specifically, packages can’t import anything not listed in their package.json. In this case, it seems like tslib is missing.

A workaround is to put the following in .yarnrc.yml:

# .yarnrc.yml
packageExtensions:
  # awaiting fix: https://github.com/eddeee888/graphql-code-generator-plugins/issues/218
  '@eddeee888/gcg-typescript-resolver-files@*':
    dependencies:
      'tslib': '*'
eddeee888 commented 9 months ago

Thanks for reporting this @lensbart !

Could you please try this alpha version:

yarn add -D @eddeee888/gcg-typescript-resolver-files@pr219-run357-1

I have added tslib into package.json's deps for this version.

lensbart commented 9 months ago

This seems to work indeed! Thanks.

eddeee888 commented 9 months ago

I have released this fix in @eddeee888/gcg-typescript-resolver-files@0.7.2.

Thanks for taking the time to collaborate with me 🙏