From 4c13c1aff75e4a51b4d1f85f208fdbd9e1d26bec Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 14:58:37 +0000 Subject: [PATCH 01/12] build: Switch from npmignore to files field From 14913d0a91238b7543bf0118beda1ce6c0327a75 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 15:49:26 +0000 Subject: [PATCH 02/12] npmignore -> files --- .npmignore | 9 --------- packages/angular-ivy/package.json | 6 ++++++ packages/angular/.npmignore | 4 ---- packages/angular/package.json | 5 +++++ packages/astro/.npmignore | 10 ---------- packages/astro/package.json | 7 +++++++ packages/browser/package.json | 6 ++++++ packages/bun/package.json | 6 ++++++ packages/core/package.json | 6 ++++++ packages/eslint-config-sdk/.npmignore | 2 -- packages/eslint-config-sdk/package.json | 3 +++ packages/eslint-plugin-sdk/.npmignore | 2 -- packages/eslint-plugin-sdk/package.json | 1 + packages/feedback/package.json | 6 ++++++ packages/gatsby/.npmignore | 15 --------------- packages/gatsby/package.json | 10 ++++++++++ packages/hub/package.json | 6 ++++++ packages/integrations/package.json | 6 ++++++ packages/node-experimental/package.json | 6 ++++++ packages/node/package.json | 6 ++++++ packages/opentelemetry-node/package.json | 6 ++++++ packages/opentelemetry/package.json | 6 ++++++ packages/react/package.json | 6 ++++++ packages/remix/.npmignore | 4 ---- packages/remix/package.json | 7 +++++++ packages/replay-worker/package.json | 6 ++++++ packages/replay/package.json | 6 ++++++ packages/serverless/package.json | 6 ++++++ packages/svelte/package.json | 6 ++++++ packages/sveltekit/package.json | 6 ++++++ packages/tracing-internal/package.json | 6 ++++++ packages/tracing/package.json | 6 ++++++ packages/types/package.json | 6 ++++++ packages/typescript/.npmignore | 2 -- packages/typescript/package.json | 3 +++ packages/utils/package.json | 6 ++++++ packages/vercel-edge/package.json | 6 ++++++ packages/vue/package.json | 6 ++++++ packages/wasm/package.json | 6 ++++++ 39 files changed, 180 insertions(+), 48 deletions(-) delete mode 100644 .npmignore delete mode 100644 packages/angular/.npmignore delete mode 100644 packages/astro/.npmignore delete mode 100644 packages/eslint-config-sdk/.npmignore delete mode 100644 packages/eslint-plugin-sdk/.npmignore delete mode 100644 packages/gatsby/.npmignore delete mode 100644 packages/remix/.npmignore delete mode 100644 packages/typescript/.npmignore diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 6cf3cd53d7e6..000000000000 --- a/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied -# into it by the prepack script `scripts/prepack.ts`. - -* - -!/cjs/**/* -!/esm/**/* -!/types/**/* -!/types-ts3.8/**/* diff --git a/packages/angular-ivy/package.json b/packages/angular-ivy/package.json index 4eeaf5479811..e2969a914474 100644 --- a/packages/angular-ivy/package.json +++ b/packages/angular-ivy/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=12" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/bundles/sentry-angular.umd.js", "module": "build/fesm2015/sentry-angular.js", "publishConfig": { diff --git a/packages/angular/.npmignore b/packages/angular/.npmignore deleted file mode 100644 index 75ee79933841..000000000000 --- a/packages/angular/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!/cjs/**/* -!/esm/**/* -!/build/types/**/* diff --git a/packages/angular/package.json b/packages/angular/package.json index ed439c918fdf..95be12195bd3 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -9,6 +9,11 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "build/types" + ], "main": "build/bundles/sentry-angular.umd.js", "module": "build/fesm2015/sentry-angular.js", "publishConfig": { diff --git a/packages/astro/.npmignore b/packages/astro/.npmignore deleted file mode 100644 index ded80d725803..000000000000 --- a/packages/astro/.npmignore +++ /dev/null @@ -1,10 +0,0 @@ -# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied -# into it by the prepack script `scripts/prepack.ts`. - -* - -!/cjs/**/* -!/esm/**/* -!/types/**/* -!/types-ts3.8/**/* -!/integration/**/* diff --git a/packages/astro/package.json b/packages/astro/package.json index a8b18e17611b..a8bd8070321a 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -17,6 +17,13 @@ "node": ">=18.14.1" }, "type": "module", + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8", + "integration" + ], "main": "build/cjs/index.client.js", "module": "build/esm/index.server.js", "browser": "build/esm/index.client.js", diff --git a/packages/browser/package.json b/packages/browser/package.json index 4acdb3713178..de646549de4d 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -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", diff --git a/packages/bun/package.json b/packages/bun/package.json index 4ef078a0b26d..70a3ee56e4b8 100644 --- a/packages/bun/package.json +++ b/packages/bun/package.json @@ -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", diff --git a/packages/core/package.json b/packages/core/package.json index 5462b3b1d301..14d7ab9f67fa 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -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", diff --git a/packages/eslint-config-sdk/.npmignore b/packages/eslint-config-sdk/.npmignore deleted file mode 100644 index 8f4f62a06989..000000000000 --- a/packages/eslint-config-sdk/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!/src/**/* diff --git a/packages/eslint-config-sdk/package.json b/packages/eslint-config-sdk/package.json index 952da9e2db44..03c3ddcd2209 100644 --- a/packages/eslint-config-sdk/package.json +++ b/packages/eslint-config-sdk/package.json @@ -14,6 +14,9 @@ "engines": { "node": ">=8" }, + "files": [ + "src" + ], "main": "src/index.js", "publishConfig": { "access": "public" diff --git a/packages/eslint-plugin-sdk/.npmignore b/packages/eslint-plugin-sdk/.npmignore deleted file mode 100644 index 8f4f62a06989..000000000000 --- a/packages/eslint-plugin-sdk/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!/src/**/* diff --git a/packages/eslint-plugin-sdk/package.json b/packages/eslint-plugin-sdk/package.json index 155468970e33..cf3a96163edb 100644 --- a/packages/eslint-plugin-sdk/package.json +++ b/packages/eslint-plugin-sdk/package.json @@ -14,6 +14,7 @@ "engines": { "node": ">=8" }, + "files": ["src"], "main": "src/index.js", "publishConfig": { "access": "public" diff --git a/packages/feedback/package.json b/packages/feedback/package.json index 5e50194d340f..39e4fc7330ee 100644 --- a/packages/feedback/package.json +++ b/packages/feedback/package.json @@ -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", diff --git a/packages/gatsby/.npmignore b/packages/gatsby/.npmignore deleted file mode 100644 index 05a81b2542dd..000000000000 --- a/packages/gatsby/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied -# into it by the prepack script `scripts/prepack.ts`. - -* - -!/cjs/**/* -!/esm/**/* -!/types/**/* -!/types-ts3.8/**/* - -# Gatsby specific -!gatsby-browser.js -!gatsby-node.js -!gatsby-browser.d.ts -!gatsby-node.d.ts diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 33fdb7406da3..0e5c74d642bc 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -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", diff --git a/packages/hub/package.json b/packages/hub/package.json index 1b75ff7ca666..faef7cda93f1 100644 --- a/packages/hub/package.json +++ b/packages/hub/package.json @@ -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", diff --git a/packages/integrations/package.json b/packages/integrations/package.json index 6505a33c08fc..5ffc239ac305 100644 --- a/packages/integrations/package.json +++ b/packages/integrations/package.json @@ -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", diff --git a/packages/node-experimental/package.json b/packages/node-experimental/package.json index 0b9295e59943..a9e0b21aaba3 100644 --- a/packages/node-experimental/package.json +++ b/packages/node-experimental/package.json @@ -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", diff --git a/packages/node/package.json b/packages/node/package.json index 5c93f0d94bf1..071e0babec46 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -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", diff --git a/packages/opentelemetry-node/package.json b/packages/opentelemetry-node/package.json index 893d8b618215..44f20306560e 100644 --- a/packages/opentelemetry-node/package.json +++ b/packages/opentelemetry-node/package.json @@ -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", diff --git a/packages/opentelemetry/package.json b/packages/opentelemetry/package.json index e7154a90edc1..7d9498996fca 100644 --- a/packages/opentelemetry/package.json +++ b/packages/opentelemetry/package.json @@ -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", diff --git a/packages/react/package.json b/packages/react/package.json index 7579b83bf9f8..5293414ead65 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -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", diff --git a/packages/remix/.npmignore b/packages/remix/.npmignore deleted file mode 100644 index e1bb7e5136bd..000000000000 --- a/packages/remix/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied -# into it by the prepack script `scripts/prepack.ts`. - -!/scripts/**/* diff --git a/packages/remix/package.json b/packages/remix/package.json index 4a60ee77d61c..b206252c8fcb 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -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", diff --git a/packages/replay-worker/package.json b/packages/replay-worker/package.json index f8428075d677..23940f558472 100644 --- a/packages/replay-worker/package.json +++ b/packages/replay-worker/package.json @@ -12,6 +12,12 @@ ] } }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "sideEffects": false, "private": true, "scripts": { diff --git a/packages/replay/package.json b/packages/replay/package.json index 65089f1ed56f..665cb8b3210e 100644 --- a/packages/replay/package.json +++ b/packages/replay/package.json @@ -12,6 +12,12 @@ ] } }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "sideEffects": false, "scripts": { "build": "run-p build:transpile build:types build:bundle", diff --git a/packages/serverless/package.json b/packages/serverless/package.json index 7ce0f1b2f13e..591888375979 100644 --- a/packages/serverless/package.json +++ b/packages/serverless/package.json @@ -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", diff --git a/packages/svelte/package.json b/packages/svelte/package.json index b0d2f85c5b99..f77abf2a86e8 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -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", diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index 391a45940e19..2037a2550836 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -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", diff --git a/packages/tracing-internal/package.json b/packages/tracing-internal/package.json index 7177ed989ac2..65a0431576df 100644 --- a/packages/tracing-internal/package.json +++ b/packages/tracing-internal/package.json @@ -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", diff --git a/packages/tracing/package.json b/packages/tracing/package.json index 8f5c58751592..a79725574494 100644 --- a/packages/tracing/package.json +++ b/packages/tracing/package.json @@ -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", diff --git a/packages/types/package.json b/packages/types/package.json index b21aaaee0e68..d148772ff61a 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -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", diff --git a/packages/typescript/.npmignore b/packages/typescript/.npmignore deleted file mode 100644 index 457274275b7c..000000000000 --- a/packages/typescript/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!/tsconfig.json diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 4f527af3605f..2b6210de2a3d 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -10,6 +10,9 @@ "publishConfig": { "access": "public" }, + "files": [ + "tsconfig.json" + ], "peerDependencies": { "typescript": "4.9.5" }, diff --git a/packages/utils/package.json b/packages/utils/package.json index fe04f12a4cd8..9ca7925bab1d 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -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", diff --git a/packages/vercel-edge/package.json b/packages/vercel-edge/package.json index 3d96c7f7d517..1e3f1c80d267 100644 --- a/packages/vercel-edge/package.json +++ b/packages/vercel-edge/package.json @@ -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", diff --git a/packages/vue/package.json b/packages/vue/package.json index a1189b8a87c7..c06a1ce83058 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -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", diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 4bf7315760a9..32cb82d6a387 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -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", From 2a770af8f548c83eaa0a860677b668d06278e387 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 16:00:06 +0000 Subject: [PATCH 03/12] Update central pre-pack script --- scripts/prepack.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/prepack.ts b/scripts/prepack.ts index 9118226f08e7..bd34f5bd95c8 100644 --- a/scripts/prepack.ts +++ b/scripts/prepack.ts @@ -11,9 +11,13 @@ import * as path from 'path'; const NPM_BUILD_DIR = 'build/npm'; const BUILD_DIR = 'build'; -const NPM_IGNORE = fs.existsSync('.npmignore') ? '.npmignore' : '../../.npmignore'; -const ASSETS = ['README.md', 'LICENSE', 'package.json', NPM_IGNORE] as const; +const ASSETS = ['README.md', 'LICENSE', 'package.json']; + +if (fs.existsSync('.npmignore')) { + ASSETS.push('.npmignore'); +} + const ENTRY_POINTS = ['main', 'module', 'types', 'browser'] as const; const CONDITIONAL_EXPORT_ENTRY_POINTS = ['import', 'require', ...ENTRY_POINTS] as const; const EXPORT_MAP_ENTRY_POINT = 'exports'; From f3681105b9fe339ac1c8716f0d0de877db52cfe3 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 16:00:20 +0000 Subject: [PATCH 04/12] Create script to check tarball contents --- scripts/get-files-in-tarballs.sh | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/get-files-in-tarballs.sh diff --git a/scripts/get-files-in-tarballs.sh b/scripts/get-files-in-tarballs.sh new file mode 100644 index 000000000000..02bd58d12ffc --- /dev/null +++ b/scripts/get-files-in-tarballs.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Check if the correct number of arguments is provided +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + + +# Get the directory of the script +script_dir=$(cd "$(dirname "$0")" && pwd) + +folder_path="$script_dir/.." + +output_file=$1 + +# Find all .tgz files in the specified folder +find "$folder_path" -type f -name "*.tgz" | while read -r tgz_file; do + echo "Processing $tgz_file..." + + # Extract the contents of the .tgz file to a temporary directory + temp_dir=$(mktemp -d) + tar -xzf "$tgz_file" -C "$temp_dir" + + # Get the filename of the .tgz file + tgz_filename=$(basename "$tgz_file") + + # Find and print all file paths prefixed with the filename + find "$temp_dir" -type f -printf "%P\t$tgz_filename\n" >> "$output_file" + + # Clean up the temporary directory + rm -r "$temp_dir" + + echo "Done processing $tgz_file." +done + +echo "Script completed. Results are stored in $output_file." From d19d85a6b839cf71b4003e17138c8568b84fca24 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 16:17:57 +0000 Subject: [PATCH 05/12] Fix angular includes --- packages/angular-ivy/package.json | 6 ------ packages/angular/package.json | 5 ----- 2 files changed, 11 deletions(-) diff --git a/packages/angular-ivy/package.json b/packages/angular-ivy/package.json index e2969a914474..4eeaf5479811 100644 --- a/packages/angular-ivy/package.json +++ b/packages/angular-ivy/package.json @@ -9,12 +9,6 @@ "engines": { "node": ">=12" }, - "files": [ - "cjs", - "esm", - "types", - "types-ts3.8" - ], "main": "build/bundles/sentry-angular.umd.js", "module": "build/fesm2015/sentry-angular.js", "publishConfig": { diff --git a/packages/angular/package.json b/packages/angular/package.json index 95be12195bd3..ed439c918fdf 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -9,11 +9,6 @@ "engines": { "node": ">=8" }, - "files": [ - "cjs", - "esm", - "build/types" - ], "main": "build/bundles/sentry-angular.umd.js", "module": "build/fesm2015/sentry-angular.js", "publishConfig": { From 026fb77e20a565e1e90992fa442d80678d98f419 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 16:19:34 +0000 Subject: [PATCH 06/12] deterministic script --- scripts/get-files-in-tarballs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get-files-in-tarballs.sh b/scripts/get-files-in-tarballs.sh index 02bd58d12ffc..20371e7c1582 100644 --- a/scripts/get-files-in-tarballs.sh +++ b/scripts/get-files-in-tarballs.sh @@ -15,7 +15,7 @@ folder_path="$script_dir/.." output_file=$1 # Find all .tgz files in the specified folder -find "$folder_path" -type f -name "*.tgz" | while read -r tgz_file; do +find "$folder_path" -type f -name "*.tgz" | sort | while read -r tgz_file; do echo "Processing $tgz_file..." # Extract the contents of the .tgz file to a temporary directory From cde9fe10f796084229b56bb2301a449361983811 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 16:30:43 +0000 Subject: [PATCH 07/12] . --- scripts/get-files-in-tarballs.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/get-files-in-tarballs.sh b/scripts/get-files-in-tarballs.sh index 20371e7c1582..9e6679087b49 100644 --- a/scripts/get-files-in-tarballs.sh +++ b/scripts/get-files-in-tarballs.sh @@ -25,8 +25,11 @@ find "$folder_path" -type f -name "*.tgz" | sort | while read -r tgz_file; do # Get the filename of the .tgz file tgz_filename=$(basename "$tgz_file") - # Find and print all file paths prefixed with the filename - find "$temp_dir" -type f -printf "%P\t$tgz_filename\n" >> "$output_file" + # Find all file paths within the extracted directory and sort them + sorted_file_paths=$(find "$temp_dir" -type f -printf "$tgz_filename\t%P\n" | sort) + + # Print the sorted file paths to the output file + echo "$sorted_file_paths" >> "$output_file" # Clean up the temporary directory rm -r "$temp_dir" From d3efa78f23082b3cd27a17d53ecc3108481d0fa2 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 16:38:25 +0000 Subject: [PATCH 08/12] . --- scripts/get-files-in-tarballs.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/get-files-in-tarballs.sh b/scripts/get-files-in-tarballs.sh index 9e6679087b49..6e32d519fa67 100644 --- a/scripts/get-files-in-tarballs.sh +++ b/scripts/get-files-in-tarballs.sh @@ -26,10 +26,10 @@ find "$folder_path" -type f -name "*.tgz" | sort | while read -r tgz_file; do tgz_filename=$(basename "$tgz_file") # Find all file paths within the extracted directory and sort them - sorted_file_paths=$(find "$temp_dir" -type f -printf "$tgz_filename\t%P\n" | sort) + file_paths=$(find "$temp_dir" -type f -printf "$tgz_filename\t%P\n") - # Print the sorted file paths to the output file - echo "$sorted_file_paths" >> "$output_file" + # Print the sorted file paths to a temporary file + echo "$file_paths" >> "$output_file.tmp" # Clean up the temporary directory rm -r "$temp_dir" @@ -37,4 +37,10 @@ find "$folder_path" -type f -name "*.tgz" | sort | while read -r tgz_file; do echo "Done processing $tgz_file." done +# Sort the lines in the output file and overwrite the original file +sort -o "$output_file" "$output_file.tmp" + +# Remove the temporary file +rm "$output_file.tmp" + echo "Script completed. Results are stored in $output_file." From 9e4b7f918ac5e9c817c0cea792e9981d6082c304 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 16:56:47 +0000 Subject: [PATCH 09/12] ember --- packages/ember/.npmignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/ember/.npmignore b/packages/ember/.npmignore index ff9862207d8e..a41abd750def 100644 --- a/packages/ember/.npmignore +++ b/packages/ember/.npmignore @@ -1,6 +1,3 @@ -# Disable rules of .npmignore in workspace root for this package -!* - # compiled output /dist/ /tmp/ From 195da130ffa957df9295d2fe5f035c6f0d3a4409 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 29 Dec 2023 09:56:14 +0000 Subject: [PATCH 10/12] Rm unnecessary file --- packages/astro/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/astro/package.json b/packages/astro/package.json index a8bd8070321a..061b6bbdcac5 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -21,8 +21,7 @@ "cjs", "esm", "types", - "types-ts3.8", - "integration" + "types-ts3.8" ], "main": "build/cjs/index.client.js", "module": "build/esm/index.server.js", From 7411aec2f231c5bb278807280e08832e80654d00 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 2 Jan 2024 10:23:27 +0000 Subject: [PATCH 11/12] Smol logic change --- scripts/prepack.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/scripts/prepack.ts b/scripts/prepack.ts index bd34f5bd95c8..65cd9ddbf631 100644 --- a/scripts/prepack.ts +++ b/scripts/prepack.ts @@ -12,11 +12,7 @@ import * as path from 'path'; const NPM_BUILD_DIR = 'build/npm'; const BUILD_DIR = 'build'; -const ASSETS = ['README.md', 'LICENSE', 'package.json']; - -if (fs.existsSync('.npmignore')) { - ASSETS.push('.npmignore'); -} +const ASSETS = ['README.md', 'LICENSE', 'package.json', '.npmignore']; const ENTRY_POINTS = ['main', 'module', 'types', 'browser'] as const; const CONDITIONAL_EXPORT_ENTRY_POINTS = ['import', 'require', ...ENTRY_POINTS] as const; @@ -57,13 +53,11 @@ if (!fs.existsSync(path.resolve(buildDir))) { // copy non-code assets to build dir ASSETS.forEach(asset => { const assetPath = path.resolve(asset); - if (!fs.existsSync(assetPath)) { - console.error(`\nERROR: Asset '${asset}' does not exist.`); - process.exit(1); + if (fs.existsSync(assetPath)) { + const destinationPath = path.resolve(buildDir, path.basename(asset)); + console.log(`Copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}.`); + fs.copyFileSync(assetPath, destinationPath); } - const destinationPath = path.resolve(buildDir, path.basename(asset)); - console.log(`Copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}.`); - fs.copyFileSync(assetPath, destinationPath); }); // package.json modifications From 623dc50675c9bef3780d0ba5e7292f8a3f5e184e Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 2 Jan 2024 11:54:02 +0000 Subject: [PATCH 12/12] Remove non-essential scripts --- scripts/get-files-in-tarballs.sh | 46 -------------------------------- scripts/tarball-checksums.sh | 25 ----------------- 2 files changed, 71 deletions(-) delete mode 100644 scripts/get-files-in-tarballs.sh delete mode 100644 scripts/tarball-checksums.sh diff --git a/scripts/get-files-in-tarballs.sh b/scripts/get-files-in-tarballs.sh deleted file mode 100644 index 6e32d519fa67..000000000000 --- a/scripts/get-files-in-tarballs.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -# Check if the correct number of arguments is provided -if [ "$#" -ne 1 ]; then - echo "Usage: $0 " - exit 1 -fi - - -# Get the directory of the script -script_dir=$(cd "$(dirname "$0")" && pwd) - -folder_path="$script_dir/.." - -output_file=$1 - -# Find all .tgz files in the specified folder -find "$folder_path" -type f -name "*.tgz" | sort | while read -r tgz_file; do - echo "Processing $tgz_file..." - - # Extract the contents of the .tgz file to a temporary directory - temp_dir=$(mktemp -d) - tar -xzf "$tgz_file" -C "$temp_dir" - - # Get the filename of the .tgz file - tgz_filename=$(basename "$tgz_file") - - # Find all file paths within the extracted directory and sort them - file_paths=$(find "$temp_dir" -type f -printf "$tgz_filename\t%P\n") - - # Print the sorted file paths to a temporary file - echo "$file_paths" >> "$output_file.tmp" - - # Clean up the temporary directory - rm -r "$temp_dir" - - echo "Done processing $tgz_file." -done - -# Sort the lines in the output file and overwrite the original file -sort -o "$output_file" "$output_file.tmp" - -# Remove the temporary file -rm "$output_file.tmp" - -echo "Script completed. Results are stored in $output_file." diff --git a/scripts/tarball-checksums.sh b/scripts/tarball-checksums.sh deleted file mode 100644 index 60487f9037d3..000000000000 --- a/scripts/tarball-checksums.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# Get the directory of the script -script_dir=$(cd "$(dirname "$0")" && pwd) - -# Function to calculate SHA checksums for files -calculate_sha_checksum() { - file="$1" - # Strip the directory name from the file path - file_name=$(basename "$file") - sha_checksum=$(sha256sum "$file" | awk '{print $1}') - # Align the output - printf "%-48s: %s\n" "$file_name" "$sha_checksum" -} - -# Main function to process files recursively -process_files() { - # Find all ".tgz" files recursively - find "$script_dir/.." -type f -name "*.tgz" | while IFS= read -r file; do - calculate_sha_checksum "$file" - done -} - -# Call the main function to process files -process_files