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

use ES modules #23

Merged
merged 1 commit into from
Dec 12, 2023
Merged

use ES modules #23

merged 1 commit into from
Dec 12, 2023

Conversation

davidchambers
Copy link
Member

@@ -2,4 +2,3 @@ repo-owner = sanctuary-js
repo-name = sanctuary-show
contributing-file = .github/CONTRIBUTING.md
heading-level = 3
module-type = commonjs
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module-type defaults to esm as of sanctuary-js/sanctuary-scripts#56.

index.js Show resolved Hide resolved
Comment on lines +11 to +14
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://nodejs.org/api/packages.html#package-entry-points

I want to continue to support importing from sanctuary-show/package.json as I consider this part of the public API.


const assert = require ('assert');
import show from 'sanctuary-show';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidchambers davidchambers merged commit cbae402 into main Dec 12, 2023
3 checks passed
@davidchambers davidchambers deleted the davidchambers/esm branch December 12, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants