-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
// 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 Note
@@ -96,7 +96,7 @@ | |||
*/ | |||
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 Note
…ew package jsons in the libs
…ners, once in quick is enough
This solved the issue that was blocking chai from updating the v5; see chaijs/chai#1597 |
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 everything
to actually test bothcjs
andesm
instances against "CommonJS" and "ESNext" generated demo code.allowImportingTsExtensions
tests/**.spec.ts
now refer to their imports with the appropriate.ts
extension.src/**.ts
now refer to their imports with the appropriate.js
extension (as this will be what the transpiled file's extensions will be besides theindex.[c,m]js
)build:esm:ftype::wip
andbuild:cjs:ftype::wip
incase the next iteration requires automating having all.cjs
files import from other.cjs
files and likewise for.mjs
files importing from other.mjs
files. But we've got around it for now by having apackage.json
that specifies itstype
in the root of thelib/cjs
and/lib/ems
..