diff --git a/packages/minimal/.npmignore b/packages/minimal/.npmignore new file mode 100644 index 000000000000..4ab7cc4f278f --- /dev/null +++ b/packages/minimal/.npmignore @@ -0,0 +1,11 @@ +# 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`. + +* + +# TODO remove bundles (which in the tarball are inside `build`) in v7 +!/build/**/* + +!/dist/**/* +!/esm/**/* +!/types/**/* diff --git a/packages/node/.npmignore b/packages/node/.npmignore new file mode 100644 index 000000000000..4ab7cc4f278f --- /dev/null +++ b/packages/node/.npmignore @@ -0,0 +1,11 @@ +# 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`. + +* + +# TODO remove bundles (which in the tarball are inside `build`) in v7 +!/build/**/* + +!/dist/**/* +!/esm/**/* +!/types/**/* diff --git a/packages/serverless/scripts/build-awslambda-layer.js b/packages/serverless/scripts/build-awslambda-layer.js index 674dba133c73..6031883e60b7 100644 --- a/packages/serverless/scripts/build-awslambda-layer.js +++ b/packages/serverless/scripts/build-awslambda-layer.js @@ -144,6 +144,13 @@ async function main() { const version = serverlessPackage.version; const zipFilename = `sentry-node-serverless-${version}.zip`; + try { + fs.symlinkSync(path.resolve(destRoot, 'build', 'dist'), path.resolve(destRoot, 'dist')); + fs.symlinkSync(path.resolve(destRoot, 'build', 'esm'), path.resolve(destRoot, 'esm')); + } catch (error) { + console.error(error); + } + try { fs.unlinkSync(path.resolve(dist, zipFilename)); } catch (error) { diff --git a/packages/tracing/.npmignore b/packages/tracing/.npmignore new file mode 100644 index 000000000000..4ab7cc4f278f --- /dev/null +++ b/packages/tracing/.npmignore @@ -0,0 +1,11 @@ +# 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`. + +* + +# TODO remove bundles (which in the tarball are inside `build`) in v7 +!/build/**/* + +!/dist/**/* +!/esm/**/* +!/types/**/* diff --git a/packages/tracing/package.json b/packages/tracing/package.json index 8911702f2233..cd9387be66b8 100644 --- a/packages/tracing/package.json +++ b/packages/tracing/package.json @@ -29,7 +29,7 @@ "jsdom": "^16.2.2" }, "scripts": { - "build": "run-p build:cjs build:esm build:types build:bundle && ts-node ../../scripts/prepack.ts #necessary for integration tests", + "build": "run-p build:cjs build:esm build:types build:bundle && ts-node ../../scripts/prepack.ts --bundles #necessary for integration tests", "build:bundle": "rollup --config", "build:cjs": "tsc -p tsconfig.cjs.json", "build:dev": "run-p build:cjs build:esm build:types", @@ -82,8 +82,8 @@ "sideEffects": [ "./dist/index.js", "./esm/index.js", - "./npm/dist/index.js", - "./npm/esm/index.js", + "./build/npm/dist/index.js", + "./build/npm/esm/index.js", "./src/index.ts" ] } diff --git a/packages/types/.npmignore b/packages/types/.npmignore new file mode 100644 index 000000000000..4ab7cc4f278f --- /dev/null +++ b/packages/types/.npmignore @@ -0,0 +1,11 @@ +# 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`. + +* + +# TODO remove bundles (which in the tarball are inside `build`) in v7 +!/build/**/* + +!/dist/**/* +!/esm/**/* +!/types/**/* diff --git a/packages/utils/.npmignore b/packages/utils/.npmignore new file mode 100644 index 000000000000..4ab7cc4f278f --- /dev/null +++ b/packages/utils/.npmignore @@ -0,0 +1,11 @@ +# 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`. + +* + +# TODO remove bundles (which in the tarball are inside `build`) in v7 +!/build/**/* + +!/dist/**/* +!/esm/**/* +!/types/**/*