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

(chore) Builds ES and CJS modules side by side with conditional exports #3007

Merged
merged 19 commits into from
Apr 16, 2021

Conversation

joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Feb 15, 2021

Researching #2600.

Changes

  • Builds ES and CJS modules side by wide
  • Uses conditional exports

Checklist

  • Added markup tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md

@joshgoebel joshgoebel marked this pull request as draft February 15, 2021 01:09
@joshgoebel joshgoebel added 0-WIP package/build Issues relating to npm or packaging labels Feb 15, 2021
@joshgoebel joshgoebel added this to the 11.0 milestone Feb 15, 2021
@joshgoebel joshgoebel linked an issue Feb 15, 2021 that may be closed by this pull request
@aduh95
Copy link
Contributor

aduh95 commented Feb 15, 2021

You need to change

"main": "./lib/index.js",

to use the .mjs instead (or keep using the .js extension and add "type":"module" to the package.json).

@joshgoebel joshgoebel removed the 0-WIP label Feb 18, 2021
Base automatically changed from master to main March 18, 2021 17:26
@joshgoebel joshgoebel changed the title (chore) Build ESM modules instead of CJS modules (chore) Builds ES and CJS modules side by side with conditional exports Mar 24, 2021
tools/build_node.js Outdated Show resolved Hide resolved
tools/build_node.js Outdated Show resolved Hide resolved
tools/build_node.js Outdated Show resolved Hide resolved
@joshgoebel
Copy link
Member Author

Good?

@joshgoebel joshgoebel marked this pull request as ready for review March 25, 2021 08:19
@joshgoebel joshgoebel requested a review from allejo March 25, 2021 08:37
@joshgoebel joshgoebel modified the milestones: 11.0, 11.0 alpha 1 Mar 28, 2021
@joshgoebel joshgoebel self-assigned this Apr 5, 2021
tools/build_node.js Outdated Show resolved Hide resolved
tools/build_node.js Outdated Show resolved Hide resolved
tools/build_node.js Outdated Show resolved Hide resolved
@joshgoebel joshgoebel modified the milestones: 11.0 alpha 1, 11.0 Apr 13, 2021
@joshgoebel joshgoebel added this to To Do in Version 11 Apr 14, 2021
@joshgoebel joshgoebel moved this from To Do to In Progress in Version 11 Apr 14, 2021
@joshgoebel joshgoebel moved this from In Progress to Waiting merge in Version 11 Apr 14, 2021
@joshgoebel joshgoebel removed this from the 11.0 milestone Apr 14, 2021
@joshgoebel joshgoebel added this to the 11.0 alpha 1 milestone Apr 14, 2021
@joshgoebel joshgoebel merged commit 6a7c0e6 into highlightjs:main Apr 16, 2021
Version 11 automation moved this from Waiting merge/review to Done Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package/build Issues relating to npm or packaging
Projects
Development

Successfully merging this pull request may close these issues.

Discuss: Should Highlight.js version 11 npm release be ESM only?
2 participants