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

add second set of tests #25

Merged
merged 8 commits into from
Aug 11, 2022

Conversation

iambumblehead
Copy link
Owner

@iambumblehead iambumblehead commented Aug 11, 2022

please review this small PR

This PR adds the second set of example esm export patterns from nodejs' documentation site here https://nodejs.org/api/packages.html#package-entry-points

{
  "name": "my-package",
  "exports": {
    ".": "./lib/index.js",
    "./lib": "./lib/index.js",
    "./lib/*": "./lib/*.js",
    "./lib/*.js": "./lib/*.js",
    "./feature": "./feature/index.js",
    "./feature/*": "./feature/*.js",
    "./feature/*.js": "./feature/*.js",
    "./package.json": "./package.json"
  }
}

The tests are maybe a little easy and better tests could be added later. Some resolutions were verified with something like this, not committed,

const imported = await import( 'nodejsexample_02_exports/lib' );

@iambumblehead
Copy link
Owner Author

@tripodsan awesome thank you

@iambumblehead
Copy link
Owner Author

adding a few more tests in a moment before merging

@iambumblehead iambumblehead merged commit bfb36fe into master Aug 11, 2022
@iambumblehead iambumblehead deleted the support-second-send-of-nodejs-export-patterns branch August 11, 2022 06:42
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.

4 participants