graphql / graphiql

GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.
MIT License
15.81k stars 1.69k forks source link

The package.json of codemirror-graphql points to files that do not exist #1942

Open MrSnix opened 2 years ago

MrSnix commented 2 years ago

I think there is some kind of mis-configuration in the building or publishing process related to the codemirror-graphql package. The sub-modules usually have the ESM folder exported but this one... well it doesn't.

The main and module properties are pointing to files/folders that do not exist.

immagine

Some examples:

  1. codemirror-graphql (bug, no ESM folder exported) https://unpkg.com/browse/codemirror-graphql@1.0.2/

  2. graphql-language-service-interface (yes, ESM folder exported) https://unpkg.com/browse/graphql-language-service-interface@2.8.4/

  3. graphql-language-service-parser (yes, ESM folder exported) https://unpkg.com/browse/graphql-language-service-parser@1.9.2/

  4. graphql-language-service-server (yes, ESM folder exported) https://unpkg.com/browse/graphql-language-service-server@2.6.3/

Considerations:

1) It seems that the ESM files are scattered within the root folder rather than in the /esm sub-folder on the registry version 2) I forked the codemirror-graphql package and I built it according to configuration and the esm folder is correctly created ... but this doesn't reflect the published version on the npm registry. 3) This seems a long time bug affecting all previous releases

NPM Registry: https://unpkg.com/browse/codemirror-graphql@1.0.2/

My build: image

acao commented 2 years ago
  1. is for legacy support. codemirror-graphql needs to publish its files from the root folder because there are a ton of legacy implementations

the other issues should not be present and it seems are a hiccup from the esm transition. codemirror-graphql will be dropped from graphiql for 2.0 so we are still deciding on the future of it's lifecycle.