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

Export package.json #908

Merged
merged 2 commits into from Aug 6, 2020
Merged

Export package.json #908

merged 2 commits into from Aug 6, 2020

Conversation

wheresrhys
Copy link
Contributor

Fixes #907 (see the issue for context)

".": {
"import": "./src/index.js",
"require": "./dist/index.cjs"
},
"./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.

Are we able to remove this then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand the question, sorry

Copy link
Member

Choose a reason for hiding this comment

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

Are we now able to remove "./package.json": "./package.json"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's one of the main things I'm adding in this PR. It's essential to achieving the aims of the PR, namely being able to import/require 'node-fetch/package.json' in nodejs 12.7.0+

@MylesBorins
Copy link

Member of the Node.js modules team here. It is likely a very good idea to land this change. package.json needs to be explicitly exported.

@jimmywarting jimmywarting merged commit b7076bb into node-fetch:master Aug 6, 2020
@wheresrhys
Copy link
Contributor Author

@jimmywarting Are you able to release a new beta containing this update?

@xxczaki xxczaki mentioned this pull request Aug 9, 2020
@xxczaki
Copy link
Member

xxczaki commented Aug 9, 2020

@wheresrhys See #912

@wheresrhys
Copy link
Contributor Author

Thank you

@xxczaki
Copy link
Member

xxczaki commented Aug 10, 2020

@wheresrhys Released v3.0.0-beta.8.

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.

Bug: 3.0.0-beta.7's package.json cannot be required in nodejs ^12.7.0
5 participants