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 an exports map to package.json. #2231

Closed
wants to merge 1 commit into from

Conversation

benmccann
Copy link
Contributor

@benmccann benmccann commented Oct 7, 2021

Marked version: master

Markdown flavor: all

Description

Adds an exports map to package.json. There is an existing PR for this, but it changes a bunch of unnecessary things. The comment on that PR was that it would be fine to merge if it was rebased, so I'm sending this one.

It may be better to release this as a major version bump because it will stop people from reaching into the internals. They will only be able to use officially exported APIs. Alternatively, I think we could update this to expose the ./src directory. If it's going to be a major version bump, we might be able to make other changes as well such as setting "type": "module"

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

@vercel
Copy link

vercel bot commented Oct 7, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/markedjs/markedjs/BPZGckKUtVMz3t5EnittPqZQg7Am
✅ Preview: https://markedjs-git-fork-benmccann-exports-map-markedjs.vercel.app

"import": "./lib/marked.esm.js",
"default": "./lib/marked.js"
},
"./package.json": "./package.json"
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to expose the ./src directory too?

If not, this would be semver major, right?

Copy link
Member

Choose a reason for hiding this comment

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

Yes I think this would be a major update either way.

@UziTech
Copy link
Member

UziTech commented Oct 8, 2021

Can you move this to #2227? I think I would rather release all of this as one major update.

@benmccann
Copy link
Contributor Author

Sounds good. Moved to that PR

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.

3 participants