From 878a02767f79b125aa2fc4ec5e3b0655fbeed139 Mon Sep 17 00:00:00 2001 From: bluwy Date: Tue, 16 May 2023 20:42:53 +0800 Subject: [PATCH] Add files field to packages --- .changeset/young-impalas-boil.md | 26 +++++++++++++++++++ packages/astro-prism/package.json | 4 +++ packages/astro-rss/package.json | 3 +++ packages/integrations/alpinejs/package.json | 3 +++ packages/integrations/cloudflare/package.json | 4 +++ packages/integrations/deno/package.json | 3 +++ packages/integrations/image/.npmignore | 1 - packages/integrations/lit/package.json | 8 ++++++ packages/integrations/markdoc/package.json | 5 ++++ packages/integrations/mdx/package.json | 4 +++ packages/integrations/netlify/.npmignore | 1 - packages/integrations/netlify/package.json | 3 +++ packages/integrations/node/package.json | 3 +++ packages/integrations/partytown/package.json | 3 +++ packages/integrations/preact/package.json | 3 +++ packages/integrations/prefetch/package.json | 3 +++ packages/integrations/react/package.json | 10 +++++++ packages/integrations/solid/package.json | 3 +++ packages/integrations/svelte/package.json | 5 ++++ packages/integrations/tailwind/package.json | 4 +++ packages/integrations/turbolinks/package.json | 4 +++ packages/integrations/vercel/package.json | 3 +++ packages/integrations/vue/package.json | 6 +++++ packages/markdown/component/package.json | 3 +++ packages/markdown/remark/package.json | 3 +++ 25 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 .changeset/young-impalas-boil.md delete mode 100644 packages/integrations/image/.npmignore delete mode 100644 packages/integrations/netlify/.npmignore diff --git a/.changeset/young-impalas-boil.md b/.changeset/young-impalas-boil.md new file mode 100644 index 000000000000..bfcb25107e59 --- /dev/null +++ b/.changeset/young-impalas-boil.md @@ -0,0 +1,26 @@ +--- +'@astrojs/cloudflare': patch +'@astrojs/turbolinks': patch +'@astrojs/partytown': patch +'@astrojs/alpinejs': patch +'@astrojs/prefetch': patch +'@astrojs/tailwind': patch +'@astrojs/markdoc': patch +'@astrojs/netlify': patch +'@astrojs/preact': patch +'@astrojs/svelte': patch +'@astrojs/vercel': patch +'@astrojs/react': patch +'@astrojs/solid-js': patch +'@astrojs/markdown-component': patch +'@astrojs/deno': patch +'@astrojs/node': patch +'@astrojs/lit': patch +'@astrojs/mdx': patch +'@astrojs/vue': patch +'@astrojs/markdown-remark': patch +'@astrojs/prism': patch +'@astrojs/rss': patch +--- + +Specify `"files"` field to only publish necessary files diff --git a/packages/astro-prism/package.json b/packages/astro-prism/package.json index acbb3dd7de13..abf05dffb2bd 100644 --- a/packages/astro-prism/package.json +++ b/packages/astro-prism/package.json @@ -23,6 +23,10 @@ "./Prism.astro": "./Prism.astro", "./dist/highlighter": "./dist/highlighter.js" }, + "files": [ + "dist", + "Prism.astro" + ], "keywords": [ "astro", "astro-component" diff --git a/packages/astro-rss/package.json b/packages/astro-rss/package.json index 52051b32db27..4151647d0cbc 100644 --- a/packages/astro-rss/package.json +++ b/packages/astro-rss/package.json @@ -17,6 +17,9 @@ ".": "./dist/index.js", "./package.json": "./package.json" }, + "files": [ + "dist" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/alpinejs/package.json b/packages/integrations/alpinejs/package.json index fcb61e9158ba..bba68e333324 100644 --- a/packages/integrations/alpinejs/package.json +++ b/packages/integrations/alpinejs/package.json @@ -24,6 +24,9 @@ ".": "./dist/index.js", "./package.json": "./package.json" }, + "files": [ + "dist" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index 6b2d506c9fe8..9eddb2f60d37 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -27,6 +27,10 @@ "./server.directory.js": "./dist/server.directory.js", "./package.json": "./package.json" }, + "files": [ + "dist", + "runtime.d.ts" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index 68da19493e19..e6c6f3ab0508 100644 --- a/packages/integrations/deno/package.json +++ b/packages/integrations/deno/package.json @@ -23,6 +23,9 @@ "./__deno_imports.js": "./dist/__deno_imports.js", "./package.json": "./package.json" }, + "files": [ + "dist" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/image/.npmignore b/packages/integrations/image/.npmignore deleted file mode 100644 index 65e3ba2edadd..000000000000 --- a/packages/integrations/image/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/ diff --git a/packages/integrations/lit/package.json b/packages/integrations/lit/package.json index 596b6de5b996..44f7626ecb9c 100644 --- a/packages/integrations/lit/package.json +++ b/packages/integrations/lit/package.json @@ -27,6 +27,14 @@ "./hydration-support.js": "./hydration-support.js", "./package.json": "./package.json" }, + "files": [ + "dist", + "client-shim.js", + "client-shim.min.js", + "hydration-support.js", + "server.js", + "server-shim.js" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index 5eb65e0d47d1..b048ba2e9496 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -26,6 +26,11 @@ "./experimental-assets-config": "./dist/experimental-assets-config.js", "./package.json": "./package.json" }, + "files": [ + "components", + "dist", + "template" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index 659e8b9a1fbd..40d9d32c38a3 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -22,6 +22,10 @@ ".": "./dist/index.js", "./package.json": "./package.json" }, + "files": [ + "dist", + "template" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/netlify/.npmignore b/packages/integrations/netlify/.npmignore deleted file mode 100644 index 65e3ba2edadd..000000000000 --- a/packages/integrations/netlify/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/ diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index b4c3cc72ee46..d30e44c90951 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -25,6 +25,9 @@ "./netlify-edge-functions.js": "./dist/netlify-edge-functions.js", "./package.json": "./package.json" }, + "files": [ + "dist" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index de72fb89c799..152e281e81db 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -23,6 +23,9 @@ "./preview.js": "./dist/preview.js", "./package.json": "./package.json" }, + "files": [ + "dist" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/partytown/package.json b/packages/integrations/partytown/package.json index 139c4e9344f1..549730f9ee10 100644 --- a/packages/integrations/partytown/package.json +++ b/packages/integrations/partytown/package.json @@ -23,6 +23,9 @@ ".": "./dist/index.js", "./package.json": "./package.json" }, + "files": [ + "dist" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/preact/package.json b/packages/integrations/preact/package.json index 37598d18d865..ccff0a95e6e6 100644 --- a/packages/integrations/preact/package.json +++ b/packages/integrations/preact/package.json @@ -26,6 +26,9 @@ "./server.js": "./dist/server.js", "./package.json": "./package.json" }, + "files": [ + "dist" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/prefetch/package.json b/packages/integrations/prefetch/package.json index 178214ad972a..7c7bc7ea6989 100644 --- a/packages/integrations/prefetch/package.json +++ b/packages/integrations/prefetch/package.json @@ -23,6 +23,9 @@ "./client.js": "./dist/client.js", "./package.json": "./package.json" }, + "files": [ + "dist" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index 318c4bc2731a..8947f6b161c1 100644 --- a/packages/integrations/react/package.json +++ b/packages/integrations/react/package.json @@ -28,6 +28,16 @@ "./package.json": "./package.json", "./jsx-runtime": "./jsx-runtime.js" }, + "files": [ + "dist", + "client.js", + "client-v17.js", + "context.js", + "jsx-runtime.js", + "server.js", + "server-v17.js", + "static-html.js" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json index 5adec5a2b806..5d9a23698893 100644 --- a/packages/integrations/solid/package.json +++ b/packages/integrations/solid/package.json @@ -26,6 +26,9 @@ "./server.js": "./dist/server.js", "./package.json": "./package.json" }, + "files": [ + "dist" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 78d3a8f8187c..6abc3e9d624d 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -27,6 +27,11 @@ "./server.js": "./server.js", "./package.json": "./package.json" }, + "files": [ + "dist", + "client.js", + "server.js" + ], "scripts": { "build": "astro-scripts build \"src/index.ts\" && astro-scripts build \"src/editor.cts\" --force-cjs --no-clean-dist && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\" && astro-scripts build \"src/editor.cts\" --force-cjs --no-clean-dist", diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 876c5f9eb69c..43c76a5b6fa0 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -22,6 +22,10 @@ "./base.css": "./base.css", "./package.json": "./package.json" }, + "files": [ + "dist", + "base.css" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/turbolinks/package.json b/packages/integrations/turbolinks/package.json index e888a5a4724d..d7505030c7c8 100644 --- a/packages/integrations/turbolinks/package.json +++ b/packages/integrations/turbolinks/package.json @@ -23,6 +23,10 @@ "./client.js": "./client.js", "./package.json": "./package.json" }, + "files": [ + "dist", + "client.js" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index fd885686b0a1..05a389f566b3 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -40,6 +40,9 @@ ] } }, + "files": [ + "dist" + ], "scripts": { "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index a336714447bb..6de8c2ad2cbf 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -27,6 +27,12 @@ "./server.js": "./server.js", "./package.json": "./package.json" }, + "files": [ + "dist", + "client.js", + "server.js", + "static-html.js" + ], "scripts": { "build": "astro-scripts build \"src/index.ts\" && astro-scripts build \"src/editor.cts\" --force-cjs --no-clean-dist && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\" && astro-scripts build \"src/editor.cts\" --force-cjs --no-clean-dist", diff --git a/packages/markdown/component/package.json b/packages/markdown/component/package.json index 2eee2c3dddf8..5cfcfdc7ea07 100644 --- a/packages/markdown/component/package.json +++ b/packages/markdown/component/package.json @@ -18,6 +18,9 @@ "astro": "./Markdown.astro" } }, + "files": [ + "Markdown.astro" + ], "scripts": { "test": "mocha --exit --timeout 20000" }, diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index bf9d4262d2b6..b4a0ae4cebfa 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -16,6 +16,9 @@ ".": "./dist/index.js", "./dist/internal.js": "./dist/internal.js" }, + "files": [ + "dist" + ], "scripts": { "prepublish": "pnpm build", "build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json",