Folders in this directory are published to npm in the @bazel/ scoped package.
Run /scripts/mirror_bazel.sh to fetch a Bazel release and populate the bazel-* packages. The script will also update the package.json files and publish to npm. Similarly, for a release of bazelbuild/buildtools, run the /scripts/mirror_buildtools.sh script.
The script relies on the excellent jq tool, which you‘ll need to install if you don’t have it already.
Login to npm using the angular account. The password is shared in http://valentine.
When adding a new package, you'll need to add the package explicitly in the following locations:
/.circleci/config.yml: Add a build_foobar_package job for your package and set its dependencies accordingly in the workflow if it depends on another package./scripts/packages.sh: Add your package name to the list of packages to used for scripts.If your package depends on other packages then add the dependency to the package.json for your package such as
"devDependencies": {
"@bazel/jasmine": "file:../../dist/npm_package_jasmine",
...
}
The new package should be automatically tested with yarn test in CI by the test_packages_all.sh script.
To test your package locally, you can run yarn test_packages bar. If you package depends on other packages you must run yarn build_packages foo to build a specific dependency or yarn build_packages_all to build all dependencies.
Any e2e tests that depend on your package should go under /e2e. The package.json for your e2e test should link to your package like so:
{
"name": "e2e-foo",
"dependencies": {
"@bazel/foo": "bazel://@npm_bazel_foo//:npm_package"
},
"scripts": {
"test": "bazel test ..."
}
}