Skip to content

deploy full ESM with "type": "module" in "latest-esm" npm tag#3361

Merged
IvanGoncharov merged 1 commit intographql:mainfrom
PabloSzx:deploy-esm
Sep 21, 2022
Merged

deploy full ESM with "type": "module" in "latest-esm" npm tag#3361
IvanGoncharov merged 1 commit intographql:mainfrom
PabloSzx:deploy-esm

Conversation

@PabloSzx
Copy link
Copy Markdown

@PabloSzx PabloSzx commented Nov 4, 2021

I also just re-published graphql@16.0.1 as graphql-esm@16.0.1 https://npm.im/graphql-esm, tested it in an example project using libraries with full ESM support https://github.com/PabloSzx/test-graphql-esm, everything works perfectly 👌

It can be tested right now doing this:

{
  "dependencies": {
    "graphql": "npm:graphql-esm@^16.0.1"
  }
}

@PabloSzx PabloSzx marked this pull request as ready for review November 4, 2021 03:34
@PabloSzx PabloSzx changed the title deploy full ESM with "type": "module" deploy full ESM with "type": "module" in "esm" npm tag Nov 4, 2021
Comment thread resources/build-npm-esm.js Outdated
Copy link
Copy Markdown
Member

@IvanGoncharov IvanGoncharov left a comment

Choose a reason for hiding this comment

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

Please add integrationTests/esm for this package.
Try to test as many esm-specific things as possible.

@IvanGoncharov
Copy link
Copy Markdown
Member

Also please ensure that this package works with upcoming TS 4.5 that should support esm natively and add integration tests for that.

Comment thread integrationTests/ts-esm/package.json Outdated
Comment thread resources/build-npm.js Outdated
Comment thread resources/build-npm-esm.js Outdated
Comment thread integrationTests/webpack/webpack.config.json
Comment thread integrationTests/ts/package.json Outdated
Comment thread integrationTests/ts-esm/package.json Outdated
Comment thread integrationTests/node-esm/index.js Outdated
Comment thread package.json Outdated
@PabloSzx PabloSzx marked this pull request as draft November 7, 2021 15:29
@PabloSzx PabloSzx force-pushed the deploy-esm branch 2 times, most recently from 1f2d271 to 48cfc07 Compare November 10, 2021 02:11
@PabloSzx PabloSzx marked this pull request as ready for review November 10, 2021 02:12
Comment thread .gitignore
Comment thread resources/gen-version.js Outdated
Copy link
Copy Markdown
Contributor

@yaacovCR yaacovCR left a comment

Choose a reason for hiding this comment

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

Looks good to me!

looks like esm tag makes sense out of band from canaries and all that

@yaacovCR
Copy link
Copy Markdown
Contributor

Looks good to me!

looks like esm tag makes sense out of band from canaries and all that

@IvanGoncharov is this ready for re-review?

@IvanGoncharov

This comment has been minimized.

@github-actions
Copy link
Copy Markdown

@github-actions publish-pr-on-npm

@IvanGoncharov The latest changes of this PR are available on NPM as
graphql@17.0.0-alpha.1.canary.pr.3361.04ab27334641e170ce0e05bc927b972991953882
Note: no gurantees provided so please use your own discretion.

Also you can depend on latest version built from this PR:
npm install --save graphql@canary-pr-3361

@IvanGoncharov
Copy link
Copy Markdown
Member

I rebased this PR to the latest main as the solution for #3603

@IvanGoncharov IvanGoncharov merged commit 87d003d into graphql:main Sep 21, 2022
IvanGoncharov added a commit to IvanGoncharov/graphql-js that referenced this pull request Sep 21, 2022
@IvanGoncharov IvanGoncharov added the PR: feature 🚀 requires increase of "minor" version number label Sep 23, 2022
@yaacovCR
Copy link
Copy Markdown
Contributor

@IvanGoncharov @PabloSzx et al

question about the current state => the build scripts add a build qualifier of "+esm" and a tag suffix of "-esm", but do not rename the package to graphql-esm => the integration tests that use graphql-esm just point to a local tarball with the distribution, presumably where the name of the package is still graphql.

Over at the graphql-esm on npm -- it doesn't seem like we have used the exact machinery within this repo to publish as on npm graphql-esm is up to 16.5 and the tag is just 'latest' not 'latest-esm'.

So, where are we with this? Some options:

(1) we can get rid of the build qualifiers and tag suffix, and have a package name suffix of "-esm" and every time we publish to graphql, we should also publish to graphql-esm....
(2) we can get rid of the cjs version and also get rid of the build qualifiers and tag suffix.

So either way, the end goal will be to get rid of the build qualifier and tag suffix, right?

But have we decided on what will happen?

yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Dec 11, 2025
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Dec 11, 2025
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Dec 11, 2025
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Dec 11, 2025
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Dec 11, 2025
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Dec 16, 2025
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Dec 17, 2025
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Dec 17, 2025
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Dec 22, 2025
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: feature 🚀 requires increase of "minor" version number

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants