Skip to content
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

feat: Native ESM Support #68

Merged
merged 21 commits into from
Nov 24, 2020
Merged

feat: Native ESM Support #68

merged 21 commits into from
Nov 24, 2020

Conversation

lukeed
Copy link
Owner

@lukeed lukeed commented Nov 24, 2020


Closes #7

- all test files must be mjs
- allows -r esm hook still, if wanted
- does not work in < Node 12

Node 8-10 throw with `import()` immediately
With `esm`, "native `require` cannot sideload `mjs` files"
- blocked by kpdecker/jsdiff#292
- will (finally) craft own diff library if unwilling to resolve
- avoids Node 8.x and 10.x syntax error
When invoking `node` directly on a test file, allow native `stderr` output error(s) to write to console, allowing Node to explain why _it_ aborted. Important for ESM adopters/transitions.
@codecov-io
Copy link

Codecov Report

Merging #68 (434a76d) into master (0c7d9ac) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #68   +/-   ##
=======================================
  Coverage   89.89%   89.89%           
=======================================
  Files           3        3           
  Lines         297      297           
=======================================
  Hits          267      267           
  Misses         30       30           
Impacted Files Coverage Δ
src/index.js 76.28% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c7d9ac...434a76d. Read the comment docs.

@lukeed lukeed merged commit 5ae6740 into master Nov 24, 2020
@lukeed lukeed deleted the feat/esm branch November 24, 2020 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native ESM Support
2 participants