Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1f3531f

Browse filesBrowse files
Luca ForstnerAbhiPrasad
authored andcommitted
ref(bundles): Stop publishing CDN bundles on npm (getsentry#4901)
1 parent 4a5bdec commit 1f3531f
Copy full SHA for 1f3531f

File tree

Expand file treeCollapse file tree

8 files changed

+1
-40
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

8 files changed

+1
-40
lines changed
Open diff view settings
Collapse file

‎.npmignore‎

Copy file name to clipboardExpand all lines: .npmignore
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
*
55

6-
# TODO remove bundles (which in the tarball are inside `build`) in v7
7-
!/build/**/*
8-
96
!/dist/**/*
107
!/esm/**/*
118
!/types/**/*
Collapse file

‎packages/minimal/.npmignore‎

Copy file name to clipboardExpand all lines: packages/minimal/.npmignore
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
*
55

6-
# TODO remove bundles (which in the tarball are inside `build`) in v7
7-
!/build/**/*
8-
96
!/dist/**/*
107
!/esm/**/*
118
!/types/**/*
Collapse file

‎packages/node/.npmignore‎

Copy file name to clipboardExpand all lines: packages/node/.npmignore
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
*
55

6-
# TODO remove bundles (which in the tarball are inside `build`) in v7
7-
!/build/**/*
8-
96
!/dist/**/*
107
!/esm/**/*
118
!/types/**/*
Collapse file

‎packages/tracing/.npmignore‎

Copy file name to clipboardExpand all lines: packages/tracing/.npmignore
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
*
55

6-
# TODO remove bundles (which in the tarball are inside `build`) in v7
7-
!/build/**/*
8-
96
!/dist/**/*
107
!/esm/**/*
118
!/types/**/*
Collapse file

‎packages/types/.npmignore‎

Copy file name to clipboardExpand all lines: packages/types/.npmignore
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
*
55

6-
# TODO remove bundles (which in the tarball are inside `build`) in v7
7-
!/build/**/*
8-
96
!/dist/**/*
107
!/esm/**/*
118
!/types/**/*
Collapse file

‎packages/utils/.npmignore‎

Copy file name to clipboardExpand all lines: packages/utils/.npmignore
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
*
55

6-
# TODO remove bundles (which in the tarball are inside `build`) in v7
7-
!/build/**/*
8-
96
!/dist/**/*
107
!/esm/**/*
118
!/types/**/*
Collapse file

‎packages/wasm/package.json‎

Copy file name to clipboardExpand all lines: packages/wasm/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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": "ts-node ../../scripts/prepack.ts --bundles --skipBundleCopy && npm pack ./build/npm",
46+
"build:npm": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
4747
"circularDepCheck": "madge --circular src/index.ts",
4848
"clean": "rimraf dist esm build coverage *.js.map *.d.ts",
4949
"fix": "run-s fix:eslint fix:prettier",
Collapse file

‎scripts/prepack.ts‎

Copy file name to clipboardExpand all lines: scripts/prepack.ts
-21Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
import * as fs from 'fs';
10-
import * as fse from 'fs-extra';
1110
import * as path from 'path';
1211

1312
const NPM_BUILD_DIR = 'build/npm';
@@ -49,26 +48,6 @@ ASSETS.forEach(asset => {
4948
}
5049
});
5150

52-
// TODO remove in v7! Until then:
53-
// copy CDN bundles into npm dir to temporarily keep bundles in npm tarball
54-
// inside the tarball, they are located in `build/`
55-
// for now, copy it by default, unless explicitly forbidden via an command line arg
56-
const tmpCopyBundles = packageWithBundles && !process.argv.includes('--skipBundleCopy');
57-
if (tmpCopyBundles) {
58-
const npmTmpBundlesPath = path.resolve(buildDir, 'build');
59-
const cdnBundlesPath = path.resolve('build', 'bundles');
60-
try {
61-
if (!fs.existsSync(npmTmpBundlesPath)) {
62-
fs.mkdirSync(npmTmpBundlesPath);
63-
}
64-
void fse.copy(cdnBundlesPath, npmTmpBundlesPath);
65-
} catch (error) {
66-
console.error(`Error while tmp copying CDN bundles to ${buildDir}`);
67-
process.exit(1);
68-
}
69-
}
70-
// end remove
71-
7251
// package.json modifications
7352
const packageJsonPath = path.resolve(buildDir, 'package.json');
7453
// eslint-disable-next-line @typescript-eslint/no-var-requires

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.