Skip to content

Commit

Permalink
Add files field to packages (#7104)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored May 17, 2023
1 parent 2994bc5 commit 826e028
Show file tree
Hide file tree
Showing 25 changed files with 116 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .changeset/young-impalas-boil.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions packages/astro-prism/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"./Prism.astro": "./Prism.astro",
"./dist/highlighter": "./dist/highlighter.js"
},
"files": [
"dist",
"Prism.astro"
],
"keywords": [
"astro",
"astro-component"
Expand Down
3 changes: 3 additions & 0 deletions packages/astro-rss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
3 changes: 3 additions & 0 deletions packages/integrations/alpinejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
4 changes: 4 additions & 0 deletions packages/integrations/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
3 changes: 3 additions & 0 deletions packages/integrations/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
1 change: 0 additions & 1 deletion packages/integrations/image/.npmignore

This file was deleted.

8 changes: 8 additions & 0 deletions packages/integrations/lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
5 changes: 5 additions & 0 deletions packages/integrations/markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
4 changes: 4 additions & 0 deletions packages/integrations/mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
1 change: 0 additions & 1 deletion packages/integrations/netlify/.npmignore

This file was deleted.

3 changes: 3 additions & 0 deletions packages/integrations/netlify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
3 changes: 3 additions & 0 deletions packages/integrations/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
3 changes: 3 additions & 0 deletions packages/integrations/partytown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
3 changes: 3 additions & 0 deletions packages/integrations/preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
3 changes: 3 additions & 0 deletions packages/integrations/prefetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
10 changes: 10 additions & 0 deletions packages/integrations/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
3 changes: 3 additions & 0 deletions packages/integrations/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
5 changes: 5 additions & 0 deletions packages/integrations/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions packages/integrations/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
4 changes: 4 additions & 0 deletions packages/integrations/turbolinks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
3 changes: 3 additions & 0 deletions packages/integrations/vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
]
}
},
"files": [
"dist"
],
"scripts": {
"build": "astro-scripts build \"src/**/*.ts\" && tsc",
"build:ci": "astro-scripts build \"src/**/*.ts\"",
Expand Down
6 changes: 6 additions & 0 deletions packages/integrations/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions packages/markdown/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"astro": "./Markdown.astro"
}
},
"files": [
"Markdown.astro"
],
"scripts": {
"test": "mocha --exit --timeout 20000"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/markdown/remark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 826e028

Please sign in to comment.