diff --git a/.npmignore b/.npmignore index 4ab7cc4f278f..facb3a101f90 100644 --- a/.npmignore +++ b/.npmignore @@ -3,9 +3,6 @@ * -# TODO remove bundles (which in the tarball are inside `build`) in v7 -!/build/**/* - !/dist/**/* !/esm/**/* !/types/**/* diff --git a/packages/wasm/package.json b/packages/wasm/package.json index babefffec6ba..775e80b8ec43 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -43,7 +43,7 @@ "build:es5:watch": "yarn build:cjs:watch # *** backwards compatibility - remove in v7 ***", "build:esm:watch": "tsc -p tsconfig.esm.json --watch", "build:types:watch": "tsc -p tsconfig.types.json --watch", - "build:npm": "ts-node ../../scripts/prepack.ts --bundles --skipBundleCopy && npm pack ./build/npm", + "build:npm": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf dist esm build coverage *.js.map *.d.ts", "fix": "run-s fix:eslint fix:prettier", diff --git a/scripts/prepack.ts b/scripts/prepack.ts index bac7a544a2f5..a7609a8087bd 100644 --- a/scripts/prepack.ts +++ b/scripts/prepack.ts @@ -7,7 +7,6 @@ */ import * as fs from 'fs'; -import * as fse from 'fs-extra'; import * as path from 'path'; const NPM_BUILD_DIR = 'build/npm'; @@ -49,26 +48,6 @@ ASSETS.forEach(asset => { } }); -// TODO remove in v7! Until then: -// copy CDN bundles into npm dir to temporarily keep bundles in npm tarball -// inside the tarball, they are located in `build/` -// for now, copy it by default, unless explicitly forbidden via an command line arg -const tmpCopyBundles = packageWithBundles && !process.argv.includes('--skipBundleCopy'); -if (tmpCopyBundles) { - const npmTmpBundlesPath = path.resolve(buildDir, 'build'); - const cdnBundlesPath = path.resolve('build', 'bundles'); - try { - if (!fs.existsSync(npmTmpBundlesPath)) { - fs.mkdirSync(npmTmpBundlesPath); - } - void fse.copy(cdnBundlesPath, npmTmpBundlesPath); - } catch (error) { - console.error(`Error while tmp copying CDN bundles to ${buildDir}`); - process.exit(1); - } -} -// end remove - // package.json modifications const packageJsonPath = path.resolve(buildDir, 'package.json'); // eslint-disable-next-line @typescript-eslint/no-var-requires