build: update to use npm_package.pack rule (#39636)
Remove the work around solution for the `npm pack`, we can now use `npm_package.pack` rule of bazel, since the windows os issue has been fixed here https://github.com/bazelbuild/rules_nodejs/commit/bc36519 PR Close #39636
This commit is contained in:
parent
68cf012f7a
commit
35a1975697
12
package.json
12
package.json
|
@ -52,12 +52,12 @@
|
||||||
"@babel/template": "^7.8.6",
|
"@babel/template": "^7.8.6",
|
||||||
"@babel/traverse": "^7.8.6",
|
"@babel/traverse": "^7.8.6",
|
||||||
"@babel/types": "^7.8.6",
|
"@babel/types": "^7.8.6",
|
||||||
"@bazel/jasmine": "2.2.0",
|
"@bazel/jasmine": "2.3.1",
|
||||||
"@bazel/karma": "2.2.0",
|
"@bazel/karma": "2.3.1",
|
||||||
"@bazel/protractor": "2.2.0",
|
"@bazel/protractor": "2.3.1",
|
||||||
"@bazel/rollup": "2.2.0",
|
"@bazel/rollup": "2.3.1",
|
||||||
"@bazel/terser": "2.2.0",
|
"@bazel/terser": "2.3.1",
|
||||||
"@bazel/typescript": "2.2.0",
|
"@bazel/typescript": "2.3.1",
|
||||||
"@microsoft/api-extractor": "7.7.11",
|
"@microsoft/api-extractor": "7.7.11",
|
||||||
"@octokit/rest": "16.28.7",
|
"@octokit/rest": "16.28.7",
|
||||||
"@octokit/types": "^5.0.1",
|
"@octokit/types": "^5.0.1",
|
||||||
|
|
|
@ -79,6 +79,7 @@ def karma_test(name, env_srcs, env_deps, env_entry_point, test_srcs, test_deps,
|
||||||
tags = ["zone_karma_test"],
|
tags = ["zone_karma_test"],
|
||||||
runtime_deps = [
|
runtime_deps = [
|
||||||
"@npm//karma-browserstack-launcher",
|
"@npm//karma-browserstack-launcher",
|
||||||
|
"@npm//karma-sauce-launcher",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -110,5 +111,6 @@ def karma_test(name, env_srcs, env_deps, env_entry_point, test_srcs, test_deps,
|
||||||
visibility = ["//:__pkg__"],
|
visibility = ["//:__pkg__"],
|
||||||
runtime_deps = [
|
runtime_deps = [
|
||||||
"@npm//karma-browserstack-launcher",
|
"@npm//karma-browserstack-launcher",
|
||||||
|
"@npm//karma-sauce-launcher",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -35,7 +35,7 @@ function buildZoneJsPackage(destPath) {
|
||||||
console.info(`${scriptPath}:`);
|
console.info(`${scriptPath}:`);
|
||||||
console.info(' Building zone.js npm package');
|
console.info(' Building zone.js npm package');
|
||||||
console.info('##############################');
|
console.info('##############################');
|
||||||
exec(`${bazelCmd} build //packages/zone.js:npm_package`);
|
exec(`${bazelCmd} run //packages/zone.js:npm_package.pack`);
|
||||||
|
|
||||||
// Create the output directory.
|
// Create the output directory.
|
||||||
const absDestPath = resolve(baseDir, destPath);
|
const absDestPath = resolve(baseDir, destPath);
|
||||||
|
@ -46,10 +46,6 @@ function buildZoneJsPackage(destPath) {
|
||||||
const buildOutputDir = `${bazelBin}/packages/zone.js/npm_package`;
|
const buildOutputDir = `${bazelBin}/packages/zone.js/npm_package`;
|
||||||
const distTargetDir = `${absDestPath}/zone.js`;
|
const distTargetDir = `${absDestPath}/zone.js`;
|
||||||
|
|
||||||
// Also create an archive so we can test the package itself.
|
|
||||||
// Currently, the `npm_package.pack` rule does not work on Windows, so run `npm pack` directly.
|
|
||||||
exec(`npm pack ${buildOutputDir}`, false, {cwd: baseDir});
|
|
||||||
|
|
||||||
console.info(`# Copy npm_package artifacts to ${distTargetDir}`);
|
console.info(`# Copy npm_package artifacts to ${distTargetDir}`);
|
||||||
rm('-rf', distTargetDir);
|
rm('-rf', distTargetDir);
|
||||||
cp('-R', buildOutputDir, distTargetDir);
|
cp('-R', buildOutputDir, distTargetDir);
|
||||||
|
|
57
yarn.lock
57
yarn.lock
|
@ -1972,40 +1972,38 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.12.4.tgz#ddda7c8ead6e29dc8d637af446086a750f395218"
|
resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.12.4.tgz#ddda7c8ead6e29dc8d637af446086a750f395218"
|
||||||
integrity sha512-FzOy+esB/fXVDbAmL6Ce2yCEy+PESZih8GypKhi0B8XzoZHAAn3QNnQcMNwo9PrIfp3G1989nM/JQ1b8jwEinQ==
|
integrity sha512-FzOy+esB/fXVDbAmL6Ce2yCEy+PESZih8GypKhi0B8XzoZHAAn3QNnQcMNwo9PrIfp3G1989nM/JQ1b8jwEinQ==
|
||||||
|
|
||||||
"@bazel/jasmine@2.2.0":
|
"@bazel/jasmine@2.3.1":
|
||||||
version "2.2.0"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-2.2.0.tgz#78fc4171362113d993e2473b0168ee8c255e05c9"
|
resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-2.3.1.tgz#e4df8dd2b8d906e41e4073b5c49c700a962fe853"
|
||||||
integrity sha512-NmrgbHBSWUaBXT9rFqeC+bYYWfHtPphnfgchusy7LOQMs/aWVePEo9tsbggNBt1pf6NYv+Y/cHLgtlL/EdQ6Dg==
|
integrity sha512-6QYTfJfbwPxCvKu4rOhG1YZUm94MbG4K2Dq1q2A2OUiM0eqAZG8T1HJAswDh7L286r5x9nRX8h7Pb7CyJvSmbg==
|
||||||
dependencies:
|
dependencies:
|
||||||
c8 "~7.1.0"
|
c8 "~7.1.0"
|
||||||
jasmine-reporters "~2.3.2"
|
jasmine-reporters "~2.3.2"
|
||||||
|
|
||||||
"@bazel/karma@2.2.0":
|
"@bazel/karma@2.3.1":
|
||||||
version "2.2.0"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-2.2.0.tgz#9bf6f6f1aa5f12b25468b1cad5e4404138436600"
|
resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-2.3.1.tgz#9a52128cefc4e061fc4e934c4918d7a3e17b1007"
|
||||||
integrity sha512-qyVE7vZ/qaibmpmcRdjS0rlorLGR0zZtlUSImVVTcPTSXqt364fp8TWBWe7oOneJ1SOVyUmTOAzyE86ArxZ/AA==
|
integrity sha512-4w1aS3qaKY8eekyDujAFD7xsM+z0rCsEofs8QliEmZaF+RCKw+QsxWEMrxIXkdoftcQS+MBatAoSDhHbl47VpQ==
|
||||||
dependencies:
|
|
||||||
tmp "0.1.0"
|
|
||||||
|
|
||||||
"@bazel/protractor@2.2.0":
|
"@bazel/protractor@2.3.1":
|
||||||
version "2.2.0"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-2.2.0.tgz#721b06507b84bf6d61d0e843e0af9939c6ad35a4"
|
resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-2.3.1.tgz#470c280841f5ec91b0a80d2ffb692841a125e240"
|
||||||
integrity sha512-7dvAXxf/rGoi+S4+DWg8HNx3Co9s0kMg1xnBJ4T4nPF5wqSEoItkR6wsjkjQyocA2kIXan+HQcQvw4iIDMhGmg==
|
integrity sha512-1MF3JlGE6HyYzPFXJBFnv5eEOuTuXhsJT70g66+lMgPZ9g0uUPh6CPu/iUkT6/92sw+pHGUsaptxwNu89Z7Dag==
|
||||||
|
|
||||||
"@bazel/rollup@2.2.0":
|
"@bazel/rollup@2.3.1":
|
||||||
version "2.2.0"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-2.2.0.tgz#15651d545114e08db056f10a1eeaa4e76fc4df56"
|
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-2.3.1.tgz#30265ac682149e82f3a4a0cfda216f3d860e7373"
|
||||||
integrity sha512-N4SyrvFkdAVc24CqFNhDtrR6P3XJTdPGziCuF7QM/BGihnsGlxF6+Dt2n5BTLJnObiB1St8vtRwCtAY8faxYWQ==
|
integrity sha512-KyMIYr8UV1MkwdW+2HUnwUNAddFhETM8OSaaOQK5I7hV4XKjBzc2EZstt4HRcNtsVF5Lnsi7Arb8xjbBdXTqvw==
|
||||||
|
|
||||||
"@bazel/terser@2.2.0":
|
"@bazel/terser@2.3.1":
|
||||||
version "2.2.0"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-2.2.0.tgz#e0452f3d20e41d5e63048b3eea3280256172fd30"
|
resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-2.3.1.tgz#c1aa0e88988d913be61d601e581a60c3bf771e06"
|
||||||
integrity sha512-vukKS9ayJsW/eFFX6tG2Blem+NmEWbcYuCXxwgjL/uYiMCL/uowaTpcvVp9B+DsNSXhGyohOYwud0nBreSUFzg==
|
integrity sha512-G0I7niJyQzDFx+Z4WlA19g8SQuWpfMKbMHi+e94NHVYYpoUF0nRhLfysvNx5Kx5J6/N2gErmtwYsTQpRUI/vCQ==
|
||||||
|
|
||||||
"@bazel/typescript@2.2.0":
|
"@bazel/typescript@2.3.1":
|
||||||
version "2.2.0"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-2.2.0.tgz#f2d3dce8715d574fe3146f19fdb8479abcc4d608"
|
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-2.3.1.tgz#f103c4a5230cabaffd8d574b7278265b5478f056"
|
||||||
integrity sha512-Thf8pXntBzE3EvJtyiTBNsfIf1QnYmGPQmUSGLcKUuuFoplUVYShMRHaxBoPZmYsnD/x+BFLgUKIzlXiEQpGqQ==
|
integrity sha512-blgLpx+9Vh8DZWTVOYTWSk1HEU28FF+GwU1stFaemfY7/pUQfK/URb9FARRkw/v2UrPKCd9EBywFYQyPGSAb1A==
|
||||||
dependencies:
|
dependencies:
|
||||||
protobufjs "6.8.8"
|
protobufjs "6.8.8"
|
||||||
semver "5.6.0"
|
semver "5.6.0"
|
||||||
|
@ -15277,13 +15275,6 @@ tmp@0.0.33, tmp@0.0.x, tmp@^0.0.33:
|
||||||
dependencies:
|
dependencies:
|
||||||
os-tmpdir "~1.0.2"
|
os-tmpdir "~1.0.2"
|
||||||
|
|
||||||
tmp@0.1.0:
|
|
||||||
version "0.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.1.0.tgz#ee434a4e22543082e294ba6201dcc6eafefa2877"
|
|
||||||
integrity sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==
|
|
||||||
dependencies:
|
|
||||||
rimraf "^2.6.3"
|
|
||||||
|
|
||||||
to-array@0.1.4:
|
to-array@0.1.4:
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890"
|
resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890"
|
||||||
|
|
Loading…
Reference in New Issue