Skip to content

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

Merged
merged 13 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .npmignore

This file was deleted.

4 changes: 0 additions & 4 deletions packages/angular/.npmignore

This file was deleted.

10 changes: 0 additions & 10 deletions packages/astro/.npmignore

This file was deleted.

7 changes: 7 additions & 0 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
"node": ">=18.14.1"
},
"type": "module",
"files": [
"cjs",
Copy link
Member

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.

"esm",
"types",
"types-ts3.8",
Copy link
Contributor

Choose a reason for hiding this comment

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

Astro doesn't have integration and types-ts3.8 on npm. Also I think we should also add README.md files. https://www.npmjs.com/package/@sentry/astro?activeTab=code

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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",
Expand Down
6 changes: 6 additions & 0 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/esm/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
3 changes: 0 additions & 3 deletions packages/ember/.npmignore
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/
Expand Down
2 changes: 0 additions & 2 deletions packages/eslint-config-sdk/.npmignore

This file was deleted.

3 changes: 3 additions & 0 deletions packages/eslint-config-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"engines": {
"node": ">=8"
},
"files": [
"src"
],
"main": "src/index.js",
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/eslint-plugin-sdk/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/eslint-plugin-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"engines": {
"node": ">=8"
},
"files": ["src"],
"main": "src/index.js",
"publishConfig": {
"access": "public"
Expand Down
6 changes: 6 additions & 0 deletions packages/feedback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=12"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
Expand Down
15 changes: 0 additions & 15 deletions packages/gatsby/.npmignore

This file was deleted.

10 changes: 10 additions & 0 deletions packages/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8",
"gatsby-browser.js",
"gatsby-node.js",
"gatsby-browser.d.ts",
"gatsby-node.d.ts"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
"publishConfig": {
"access": "public"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/node-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=14"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/opentelemetry-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/opentelemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=14"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
4 changes: 0 additions & 4 deletions packages/remix/.npmignore

This file was deleted.

7 changes: 7 additions & 0 deletions packages/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
"engines": {
"node": ">=14"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8",
"scripts"
],
"main": "build/cjs/index.server.js",
"module": "build/esm/index.server.js",
"browser": "build/esm/index.client.js",
Expand Down
6 changes: 6 additions & 0 deletions packages/replay-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
]
}
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"sideEffects": false,
"private": true,
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions packages/replay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
]
}
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"sideEffects": false,
"scripts": {
"build": "run-p build:transpile build:types build:bundle",
Expand Down
6 changes: 6 additions & 0 deletions packages/serverless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=10"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=16"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.server.js",
"module": "build/esm/index.server.js",
"browser": "build/esm/index.client.js",
Expand Down
6 changes: 6 additions & 0 deletions packages/tracing-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/tracing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
2 changes: 0 additions & 2 deletions packages/typescript/.npmignore

This file was deleted.

3 changes: 3 additions & 0 deletions packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"publishConfig": {
"access": "public"
},
"files": [
"tsconfig.json"
],
"peerDependencies": {
"typescript": "4.9.5"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"engines": {
"node": ">=8"
},
"files": [
"cjs",
"esm",
"types",
"types-ts3.8"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
Loading