diff --git a/packages/base64/package.json b/packages/base64/package.json index d27c8a7b7c..c4714f6f7a 100644 --- a/packages/base64/package.json +++ b/packages/base64/package.json @@ -54,11 +54,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/bundle-source/package.json b/packages/bundle-source/package.json index fb66e18951..5df175f823 100644 --- a/packages/bundle-source/package.json +++ b/packages/bundle-source/package.json @@ -48,12 +48,15 @@ }, "keywords": [], "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "rollup-*.tgz", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "repository": { "type": "git", diff --git a/packages/captp/package.json b/packages/captp/package.json index 4034086de1..d0217d8aba 100644 --- a/packages/captp/package.json +++ b/packages/captp/package.json @@ -22,11 +22,15 @@ "test": "test" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "repository": { "type": "git", diff --git a/packages/check-bundle/package.json b/packages/check-bundle/package.json index 182e3be733..2d30d56c88 100644 --- a/packages/check-bundle/package.json +++ b/packages/check-bundle/package.json @@ -60,11 +60,15 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/cjs-module-analyzer/package.json b/packages/cjs-module-analyzer/package.json index 8e5fe195e1..a7b9070d99 100644 --- a/packages/cjs-module-analyzer/package.json +++ b/packages/cjs-module-analyzer/package.json @@ -44,10 +44,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "*.js", - "*.ts" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/cli/package.json b/packages/cli/package.json index c829bbfa60..7fb495bbfe 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -62,9 +62,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/common/package.json b/packages/common/package.json index 4455837f8d..ecefc2212d 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -54,11 +54,15 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/compartment-mapper/package.json b/packages/compartment-mapper/package.json index 943e86c6f6..d204458d1e 100644 --- a/packages/compartment-mapper/package.json +++ b/packages/compartment-mapper/package.json @@ -73,11 +73,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/daemon/package.json b/packages/daemon/package.json index 5f34aa7c0a..06ed74b45d 100644 --- a/packages/daemon/package.json +++ b/packages/daemon/package.json @@ -79,11 +79,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/env-options/package.json b/packages/env-options/package.json index 6d950deef8..a0acdf3633 100644 --- a/packages/env-options/package.json +++ b/packages/env-options/package.json @@ -45,11 +45,15 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/errors/package.json b/packages/errors/package.json index ba41481e76..b04eca086a 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -48,11 +48,15 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 7715b48437..3298c06732 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -37,5 +37,16 @@ "license": "Apache-2.0", "repository": { "directory": "packages/eslint-plugin" - } + }, + "files": [ + "./*.d.ts", + "./*.js", + "./*.map", + "LICENSE*", + "SECURITY*", + "dist", + "lib", + "src", + "tools" + ] } diff --git a/packages/evasive-transform/package.json b/packages/evasive-transform/package.json index f4c22cf1a7..fb412d9bff 100644 --- a/packages/evasive-transform/package.json +++ b/packages/evasive-transform/package.json @@ -53,11 +53,15 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/eventual-send/package.json b/packages/eventual-send/package.json index 21993c2a1e..58adf171a5 100644 --- a/packages/eventual-send/package.json +++ b/packages/eventual-send/package.json @@ -50,11 +50,15 @@ "wavy dot" ], "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "eslintConfig": { "extends": [ diff --git a/packages/exo/package.json b/packages/exo/package.json index b5e0a277ff..4c60251e9d 100644 --- a/packages/exo/package.json +++ b/packages/exo/package.json @@ -55,11 +55,15 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/far/package.json b/packages/far/package.json index d671d43c34..fadbf137ca 100644 --- a/packages/far/package.json +++ b/packages/far/package.json @@ -52,11 +52,15 @@ "far" ], "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "eslintConfig": { "extends": [ diff --git a/packages/immutable-arraybuffer/package.json b/packages/immutable-arraybuffer/package.json index 2a4bed7509..7432914c09 100644 --- a/packages/immutable-arraybuffer/package.json +++ b/packages/immutable-arraybuffer/package.json @@ -43,11 +43,15 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/import-bundle/package.json b/packages/import-bundle/package.json index 117f7a08d5..57617c94ec 100644 --- a/packages/import-bundle/package.json +++ b/packages/import-bundle/package.json @@ -54,11 +54,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "eslintConfig": { "extends": [ diff --git a/packages/init/package.json b/packages/init/package.json index 82f602a7cc..5ad9319a71 100644 --- a/packages/init/package.json +++ b/packages/init/package.json @@ -40,11 +40,15 @@ "@endo/promise-kit": "workspace:^" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "repository": { "type": "git", diff --git a/packages/lockdown/package.json b/packages/lockdown/package.json index ce2454fedd..b143b67865 100644 --- a/packages/lockdown/package.json +++ b/packages/lockdown/package.json @@ -24,11 +24,15 @@ "ses": "workspace:^" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "repository": { "type": "git", diff --git a/packages/lp32/package.json b/packages/lp32/package.json index 98ea5b41ff..dec14d394e 100644 --- a/packages/lp32/package.json +++ b/packages/lp32/package.json @@ -69,11 +69,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/marshal/package.json b/packages/marshal/package.json index 209d7e323f..17fbc46ee9 100644 --- a/packages/marshal/package.json +++ b/packages/marshal/package.json @@ -58,13 +58,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "NEWS*", + "dist", + "lib", "src", - "*.js", - "*.ts", - "*.map" + "tools" ], "eslintConfig": { "extends": [ diff --git a/packages/memoize/package.json b/packages/memoize/package.json index f8ebbe83a9..28f5e28e78 100644 --- a/packages/memoize/package.json +++ b/packages/memoize/package.json @@ -50,11 +50,15 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/module-source/package.json b/packages/module-source/package.json index 6893a70a36..ca2822a3e3 100644 --- a/packages/module-source/package.json +++ b/packages/module-source/package.json @@ -57,11 +57,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/nat/package.json b/packages/nat/package.json index cb503f0fe5..ae0f2580cd 100644 --- a/packages/nat/package.json +++ b/packages/nat/package.json @@ -49,11 +49,15 @@ "overflow" ], "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "ava": { "files": [ diff --git a/packages/netstring/package.json b/packages/netstring/package.json index 9e6f2f5f0e..1667311979 100644 --- a/packages/netstring/package.json +++ b/packages/netstring/package.json @@ -53,11 +53,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/pass-style/package.json b/packages/pass-style/package.json index 0769522db6..0c59eeec45 100644 --- a/packages/pass-style/package.json +++ b/packages/pass-style/package.json @@ -54,11 +54,13 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", - "NEWS*", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", "tools" ], diff --git a/packages/patterns/package.json b/packages/patterns/package.json index c6a4a6c580..9a20d5a7fa 100644 --- a/packages/patterns/package.json +++ b/packages/patterns/package.json @@ -52,11 +52,15 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/promise-kit/package.json b/packages/promise-kit/package.json index 5e826df92a..9ee8a1e8e3 100644 --- a/packages/promise-kit/package.json +++ b/packages/promise-kit/package.json @@ -53,11 +53,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/ses-ava/package.json b/packages/ses-ava/package.json index c11c8beaa7..00b0c3a7bd 100644 --- a/packages/ses-ava/package.json +++ b/packages/ses-ava/package.json @@ -57,11 +57,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/ses/package.json b/packages/ses/package.json index 49331bfafb..5b9fd06c31 100644 --- a/packages/ses/package.json +++ b/packages/ses/package.json @@ -97,14 +97,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", - "NEWS*", "SECURITY*", "dist", - "types.d.ts", - "index.js", - "tools.js", - "src" + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/skel/package.json b/packages/skel/package.json index 08a8b13f22..1967766953 100644 --- a/packages/skel/package.json +++ b/packages/skel/package.json @@ -44,11 +44,15 @@ "typescript": "~5.6.1-rc" }, "files": [ - "*.js", - "*.ts", + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", - "src" + "dist", + "lib", + "src", + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/stream-node/package.json b/packages/stream-node/package.json index 1cecd00529..9ba05e7fdd 100644 --- a/packages/stream-node/package.json +++ b/packages/stream-node/package.json @@ -61,11 +61,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/stream-types-test/package.json b/packages/stream-types-test/package.json index c73a2f7156..9fb630e4c7 100644 --- a/packages/stream-types-test/package.json +++ b/packages/stream-types-test/package.json @@ -39,7 +39,17 @@ "prettier": "^3.2.5", "typescript": "~5.6.1-rc" }, - "files": [], + "files": [ + "./*.d.ts", + "./*.js", + "./*.map", + "LICENSE*", + "SECURITY*", + "dist", + "lib", + "src", + "tools" + ], "publishConfig": { "access": "restricted" }, diff --git a/packages/stream/package.json b/packages/stream/package.json index 22cc1fdec7..df513f285c 100644 --- a/packages/stream/package.json +++ b/packages/stream/package.json @@ -64,11 +64,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/syrup/package.json b/packages/syrup/package.json index 041e82dfa0..aef8c409c2 100644 --- a/packages/syrup/package.json +++ b/packages/syrup/package.json @@ -51,11 +51,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "private": true, "eslintConfig": { diff --git a/packages/test262-runner/package.json b/packages/test262-runner/package.json index c4a96bb780..c1065306cf 100644 --- a/packages/test262-runner/package.json +++ b/packages/test262-runner/package.json @@ -49,5 +49,16 @@ "extends": [ "plugin:@endo/internal" ] - } + }, + "files": [ + "./*.d.ts", + "./*.js", + "./*.map", + "LICENSE*", + "SECURITY*", + "dist", + "lib", + "src", + "tools" + ] } diff --git a/packages/where/package.json b/packages/where/package.json index 21aa671bf6..c046a219f7 100644 --- a/packages/where/package.json +++ b/packages/where/package.json @@ -49,11 +49,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/packages/zip/package.json b/packages/zip/package.json index 47fd84b449..0a9caa04d3 100644 --- a/packages/zip/package.json +++ b/packages/zip/package.json @@ -50,11 +50,15 @@ "typescript": "~5.6.1-rc" }, "files": [ + "./*.d.ts", + "./*.js", + "./*.map", "LICENSE*", "SECURITY*", + "dist", + "lib", "src", - "*.js", - "*.ts" + "tools" ], "publishConfig": { "access": "public" diff --git a/scripts/files-report.sh b/scripts/files-report.sh new file mode 100644 index 0000000000..3d4a886d0d --- /dev/null +++ b/scripts/files-report.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Generates a report of all files that will be included in npm tarballs before +# and after some changes between the generation of a pair of file lists. +# Generate those lists with files.sh before and after pertientent code changes. +# Use homogenize-files.sh to copy the "files" entry in +# packages/skel/package.json over all other public packages. +set -ueo pipefail +echo '```diff' +comm -23 "$1" "$2" | sed 's/^/< /' +comm -13 "$1" "$2" | sed 's/^/> /' +echo '```' diff --git a/scripts/files.sh b/scripts/files.sh new file mode 100644 index 0000000000..a97802a0a4 --- /dev/null +++ b/scripts/files.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Generates a list of all the files that will be packed up for npm from all +# packages. +# Depends on GNU tar, which is gnu-tar in Homebrew, and revealed as gtar on the +# PATH. +set -ueo pipefail +TAR=$(command -v gtar || command -v tar) +while read -r PKG; do + (cd "$PKG"; yarn pack 1>&2) + # shellcheck disable=SC2097,SC2098,SC2016 + PKG="$PKG" "$TAR" xf "$PKG/package.tgz" --to-command='echo "$PKG/${TAR_FILENAME#package/}"' +done < <(npm query '.workspace:not([private])' | jq -r '.[].location') | +sort diff --git a/scripts/homogenize-files.sh b/scripts/homogenize-files.sh new file mode 100644 index 0000000000..ffb7d55b33 --- /dev/null +++ b/scripts/homogenize-files.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# This script copies the "files" block from the package scaffold +# (packages/skel) into every other package's package.json. +# Review the results carefuly: some package deliberately deviate from the +# common pattern, including "ses" with its extra "dist" directory. + +set -ueo pipefail + +FILES=$(jq .files packages/skel/package.json | git hash-object -w --stdin) + +while read -r PKGJSON; do + echo "$PKGJSON" + NEWPKGJSON=$(git hash-object -w <( + jq '. + ({files: $files[0]})' --slurpfile files <(git cat-file blob "$FILES") "$PKGJSON" + )) + git cat-file blob "$NEWPKGJSON" > "$PKGJSON" +done < <( + npm query '.workspace:not([private])' | + jq -r '.[].location | "\(.)/package.json"' +)