demonstrate changes to get esm graphql-js working with jest#8082
Closed
yaacovCR wants to merge 2 commits into
Closed
demonstrate changes to get esm graphql-js working with jest#8082yaacovCR wants to merge 2 commits into
yaacovCR wants to merge 2 commits into
Conversation
❌ Docs preview failedThe preview failed to build. Build ID: 7ce9a93c138c7e984289a7b7 ErrorsGeneral: Failed to fetch GitHub source: OK |
Author
|
Failing tests seem to be the expected ones secondary to the node version restrictions within the graphql-js esm canary. |
strategy: use babel to transform our dependency (A) globally: add @babel/preset-env as a devDependency to support 3 below (B) in package using an esm dependency such as graphql canary: 1. switch our "ts-jest" preset to "ts-jest/presets/js-with-babel" 2. override the default transformIgnorePatterns with an exception for our package of interest 3. add a babel config file with the @babel/preset-env preset targetting node -- The babel config files could be a base + override like the other configs in this repo, but it is pretty abbreviated, and this is just a demonstration, so I held off.
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@glasser
strategy: use babel to transform our dependency
(A) globally: add @babel/preset-env as a devDependency to support 3 below
(B) in package using an esm dependency such as graphql canary:
-- The babel config files could be a base + override like the other configs in this repo, but it is pretty abbreviated, and this is just a demonstration, so I held off.
context: graphql/graphql-js#4437