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

cleanup package.json #1303

Closed
wants to merge 4 commits into from
Closed

cleanup package.json #1303

wants to merge 4 commits into from

Conversation

benmccann
Copy link

@benmccann benmccann commented Jun 27, 2024

  • added types to exports
  • removed module which will be ignored since exports is present
  • removed require since it duplicates default
  • add type field because node may change the default in the future

@marijnh
Copy link
Member

marijnh commented Jun 27, 2024

The module field will be useful to some older tools. "type": "commonjs" is the default, so I'm not sure why you'd add that.

acorn/package.json Outdated Show resolved Hide resolved
@benmccann
Copy link
Author

benmccann commented Jun 27, 2024

I've added module back and removed type

acorn/package.json Outdated Show resolved Hide resolved
@marijnh
Copy link
Member

marijnh commented Jun 27, 2024

Is there any situation in which TypeScript will not find the types as they currently are, and needs the types field?

@benmccann
Copy link
Author

It's usually necessary if you're dual publishing but I'm not sure if there's case where it's strictly necessary for a cjs-only package

@marijnh
Copy link
Member

marijnh commented Jun 27, 2024

This all feels very much like a patch-for-the-sake-of-a-patch. Unless there is an actual concrete problem you're solving with these changes, I'm leaning towards closing this PR.

@benmccann
Copy link
Author

Fair enough

@benmccann benmccann closed this Jun 27, 2024
@benmccann benmccann deleted the patch-1 branch June 27, 2024 12:51
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.

None yet

2 participants