Javascript -- v1.2.0: Reimplement esm transpilation, and swap to it as the default.#479
Merged
Javascript -- v1.2.0: Reimplement esm transpilation, and swap to it as the default.#479
Conversation
… from the fake test
… the example workflow in the readme
| export function hailstoneSequence({ initialValue, P = 2n, a = 3n, b = 1n, maxTotalStoppingTime = 1000, totalStoppingTime = true }) { | ||
| // Call out the function before any magic returns to trap bad values. | ||
| const throwaway = (0, function_1.collatzFunction)({ n: initialValue, P: P, a: a, b: b }); | ||
| const throwaway = collatzFunction({ n: initialValue, P: P, a: a, b: b }); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
| function hailstoneSequence({ initialValue, P = 2n, a = 3n, b = 1n, maxTotalStoppingTime = 1000, totalStoppingTime = true }) { | ||
| // Call out the function before any magic returns to trap bad values. | ||
| const throwaway = (0, function_1.collatzFunction)({ n: initialValue, P: P, a: a, b: b }); | ||
| const throwaway = (0, function_js_1.collatzFunction)({ n: initialValue, P: P, a: a, b: b }); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class
…ew package jsons in the libs
…ners, once in quick is enough
Owner
Author
|
This solved the issue that was blocking chai from updating the v5; see chaijs/chai#1597 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What issue is this addressing?
It would seem that previously setting the esm tsconfig's module to nodenext replaced the previously existing ems output and replaced it with two copies of the cjs output.
What type of issue is this addressing?
bug
What this PR does | solves
"type": "module"and swap default main and types to the esm build.actions/setup-node.demo'snpm run everythingto actually test bothcjsandesminstances against "CommonJS" and "ESNext" generated demo code.allowImportingTsExtensionstests/**.spec.tsnow refer to their imports with the appropriate.tsextension.src/**.tsnow refer to their imports with the appropriate.jsextension (as this will be what the transpiled file's extensions will be besides theindex.[c,m]js)build:esm:ftype::wipandbuild:cjs:ftype::wipincase the next iteration requires automating having all.cjsfiles import from other.cjsfiles and likewise for.mjsfiles importing from other.mjsfiles. But we've got around it for now by having apackage.jsonthat specifies itstypein the root of thelib/cjsand/lib/ems..