Skip to content

Commit 7b49f65

Browse files
committed
add central build dir to @sentry/tracing
1 parent c0b315d commit 7b49f65

File tree

9 files changed

+27
-19
lines changed

9 files changed

+27
-19
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ jobs:
205205
path: |
206206
${{ github.workspace }}/packages/browser/build/bundles/**
207207
${{ github.workspace }}/packages/integrations/build/bundles/**
208-
${{ github.workspace }}/packages/tracing/build/**
208+
${{ github.workspace }}/packages/tracing/build/bundles/**
209209
${{ github.workspace }}/packages/**/*.tgz
210210
${{ github.workspace }}/packages/serverless/dist-awslambda-layer/*.zip
211211

.size-limit.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ module.exports = [
5353
},
5454
{
5555
name: '@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)',
56-
path: 'packages/tracing/build/bundle.tracing.min.js',
56+
path: 'packages/tracing/build/bundles/bundle.tracing.min.js',
5757
gzip: true,
5858
limit: '100 KB',
5959
},
6060
{
6161
name: '@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)',
62-
path: 'packages/tracing/build/bundle.tracing.es6.min.js',
62+
path: 'packages/tracing/build/bundles/bundle.tracing.es6.min.js',
6363
gzip: true,
6464
limit: '100 KB',
6565
},

packages/integration-tests/utils/generatePlugin.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ const BUNDLE_PATHS: Record<string, Record<string, string>> = {
2525
bundle_es6_min: 'build/bundles/bundle.es6.min.js',
2626
},
2727
tracing: {
28-
cjs: 'dist/index.js',
29-
esm: 'esm/index.js',
30-
bundle_es5: 'build/bundle.tracing.js',
31-
bundle_es5_min: 'build/bundle.tracing.min.js',
32-
bundle_es6: 'build/bundle.tracing.es6.js',
33-
bundle_es6_min: 'build/bundle.tracing.es6.min.js',
28+
cjs: 'build/npm/dist/index.js',
29+
esm: 'build/npm/esm/index.js',
30+
bundle_es5: 'build/bundles/bundle.tracing.js',
31+
bundle_es5_min: 'build/bundles/bundle.tracing.min.js',
32+
bundle_es6: 'build/bundles/bundle.tracing.es6.js',
33+
bundle_es6_min: 'build/bundles/bundle.tracing.es6.min.js',
3434
},
3535
};
3636

packages/tracing/.npmignore

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
# Info: the paths in this file are specified so that they align with the file
2+
# structure in `./build` where this file is copied to. This is done by the
3+
# postbuild script `sentry-javascript/scripts/postbuild.ts`.
4+
15
*
2-
!/dist/**/*
6+
7+
# TODO remove bundles (which in the tarball are inside `build`) in v7
38
!/build/**/*
9+
10+
!/dist/**/*
411
!/esm/**/*
12+
!/types/**/*

packages/tracing/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"engines": {
1010
"node": ">=6"
1111
},
12-
"main": "dist/index.js",
13-
"module": "esm/index.js",
14-
"types": "build/types/index.d.ts",
12+
"main": "build/npm/dist/index.js",
13+
"module": "build/npm/esm/index.js",
14+
"types": "build/npm/types/index.d.ts",
1515
"publishConfig": {
1616
"access": "public"
1717
},
@@ -29,7 +29,7 @@
2929
"jsdom": "^16.2.2"
3030
},
3131
"scripts": {
32-
"build": "run-p build:cjs build:esm build:types build:bundle",
32+
"build": "run-p build:cjs build:esm build:types build:bundle && ts-node ../../scripts/postbuild.ts",
3333
"build:bundle": "rollup --config",
3434
"build:cjs": "tsc -p tsconfig.cjs.json",
3535
"build:dev": "run-p build:cjs build:esm build:types",
@@ -43,7 +43,7 @@
4343
"build:es5:watch": "yarn build:cjs:watch # *** backwards compatibility - remove in v7 ***",
4444
"build:esm:watch": "tsc -p tsconfig.esm.json --watch",
4545
"build:types:watch": "tsc -p tsconfig.types.json --watch",
46-
"build:npm": "npm pack",
46+
"build:npm": "npm pack ./build/npm",
4747
"clean": "rimraf dist esm build coverage",
4848
"circularDepCheck": "madge --circular src/index.ts",
4949
"fix": "run-s fix:eslint fix:prettier",

packages/tracing/rollup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const builds = [];
88
isAddOn: false,
99
jsVersion,
1010
licenseTitle: '@sentry/tracing & @sentry/browser',
11-
outputFileBase: `bundle.tracing${jsVersion === 'es6' ? '.es6' : ''}`,
11+
outputFileBase: `bundles/bundle.tracing${jsVersion === 'es6' ? '.es6' : ''}`,
1212
});
1313

1414
builds.push(...makeConfigVariants(baseBundleConfig));

packages/tracing/tsconfig.cjs.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
"compilerOptions": {
55
"module": "commonjs",
6-
"outDir": "dist"
6+
"outDir": "build/npm/dist"
77
}
88
}

packages/tracing/tsconfig.esm.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
"compilerOptions": {
55
"module": "es6",
6-
"outDir": "esm"
6+
"outDir": "build/npm/esm"
77
}
88
}

packages/tracing/tsconfig.types.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"declaration": true,
66
"declarationMap": true,
77
"emitDeclarationOnly": true,
8-
"outDir": "build/types"
8+
"outDir": "build/npm/types"
99
}
1010
}

0 commit comments

Comments
 (0)