repositories
Declare runtime dependencies
These are needed for local dev, and users must install them as well. See https://docs.bazel.build/versions/main/skylark/deploying.html#dependencies
Macros and Functions
rules_ts_dependencies
Dependencies needed by users of rules_ts.
To skip fetching the typescript package, call rules_ts_bazel_dependencies
instead.
Example usage (generated):
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
rules_ts_dependencies(
)
ts_version_from
Optional. Default: None
label of a json file which declares a typescript version.
This may be a package.json
file, with "typescript" in the dependencies or
devDependencies property, and the version exactly specified.
With rules_js v1.32.0 or greater, it may also be a resolved.json
file
produced by npm_translate_lock
, such as
@npm//path/to/linked:typescript/resolved.json
Exactly one of ts_version
or ts_version_from
must be set.
ts_version
Optional. Default: None
version of the TypeScript compiler.
Exactly one of ts_version
or ts_version_from
must be set.
ts_integrity
Optional. Default: None
integrity hash for the npm package.
By default, uses values mirrored into rules_ts.
For example, to get the integrity of version 4.6.3 you could run
curl --silent https://registry.npmjs.org/typescript/4.6.3 | jq -r '.dist.integrity'
check_for_updates
Optional. Default: True
Whether to check for newer releases of rules_ts and notify the user with a log message when an update is available.
Note, to better understand our users, we also include basic information about the build in the request to the update server. This never includes confidential or personally-identifying information (PII). The values sent are:
- Currently used version. Helps us understand which older release(s) users are stuck on.
- bzlmod (true/false). Helps us roll out this feature which is mandatory by Bazel 9.
- Some CI-related environment variables to understand usage:
- BUILDKITE_ORGANIZATION_SLUG
- CIRCLE_PROJECT_USERNAME (this is not the username of the logged in user)
- GITHUB_REPOSITORY_OWNER
- BUILDKITE_BUILD_NUMBER
- CIRCLE_BUILD_NUM
- GITHUB_RUN_NUMBER