-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
build: Switch from npmignore to files field #9991
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
Changes from 9 commits
4c13c1a
14913d0
2a770af
f368110
d19d85a
026fb77
cde9fe1
d3efa78
9e4b7f9
195da13
bcd7756
7411aec
623dc50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,13 @@ | |
"node": ">=18.14.1" | ||
}, | ||
"type": "module", | ||
"files": [ | ||
"cjs", | ||
"esm", | ||
"types", | ||
"types-ts3.8", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Astro doesn't have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh you're right. I believe we had it at some point, so we probably forgot to remove it previously. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need to explicitly add READMEs. They are included by npm by default just like the license and the package json itself: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files |
||
"integration" | ||
], | ||
"main": "build/cjs/index.client.js", | ||
"module": "build/esm/index.server.js", | ||
"browser": "build/esm/index.client.js", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# Disable rules of .npmignore in workspace root for this package | ||
!* | ||
|
||
# compiled output | ||
/dist/ | ||
/tmp/ | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
m (not just relevant for this file but for all):
Right now, the
files
array's contents point to paths relative to<package>/build
. This conflicts a bit with the entry points semantics where we point to files from<package>
. There's good reason for both but we could consider unifying this to<package>
to avoid confusion.WDYT? I don't have a strong opinion that we should do this because I'm well aware of this fact but maybe it'd be worth doing so. The downside is that we need to rewrite the array in
prepack.ts
just like we do for the entry points.If our plan is still to remove prepacking, feel free to completely disregard this.