Public providers, aspects and helpers that are shipped in the built-in build_bazel_rules_nodejs repository.
Users should not load files under “/internal”
USAGE
Provides information about one or more external npm packages
FIELDS
Depset of direct source files in these external npm package(s)
The local workspace path that these external npm deps should be linked at. If empty, they will be linked at the root.
Depset of direct & transitive source files in these external npm package(s) and transitive dependencies
The workspace name that these external npm package(s) are provided from
USAGE
JavaScript files (and sourcemaps) that are intended to be consumed by downstream tooling.
They should use modern syntax and ESModules. These files should typically be named “foo.mjs”
Historical note: this was the typescript.es6_sources output
FIELDS
Depset of direct JavaScript files and sourcemaps
Depset of direct and transitive JavaScript files and sourcemaps
USAGE
JavaScript files whose module name is self-contained.
For example named AMD/UMD or goog.module format. These outputs should be named “foo.umd.js” (note that renaming it from “foo.js” doesn't affect the module id)
Historical note: this was the typescript.es5_sources output.
FIELDS
Depset of direct JavaScript files and sourcemaps
Depset of direct and transitive JavaScript files and sourcemaps
USAGE
Stores runtime dependencies of a nodejs_binary or nodejs_test
These are files that need to be found by the node module resolver at runtime.
Historically these files were passed using the Runfiles mechanism. However runfiles has a big performance penalty of creating a symlink forest with FS API calls for every file in node_modules. It also causes there to be separate node_modules trees under each binary. This prevents user-contributed modules passed as deps[] to a particular action from being found by node module resolver, which expects everything in one tree.
In node, this resolution is done dynamically by assuming a node_modules tree will exist on disk, so we assume node actions/binary/test executions will do the same.
FIELDS
depset of runtime dependency labels
list of labels of packages that provide ExternalNpmPackageInfo
USAGE
Constructs a JSEcmaScriptModuleInfo including all transitive sources from JSEcmaScriptModuleInfo providers in a list of deps.
Returns a single JSEcmaScriptModuleInfo.
PARAMETERS
Defaults to []
USAGE
Constructs a JSNamedModuleInfo including all transitive sources from JSNamedModuleInfo providers in a list of deps.
Returns a single JSNamedModuleInfo.
PARAMETERS
Defaults to []
USAGE
Helper to replace ctx.actions.run
This calls node programs with a node_modules directory in place
PARAMETERS
rule context from the calling rule implementation function
list or depset of inputs to the action
list or ctx.actions.Args object containing arguments to pass to the executable
stringy representation of the executable this action will run, eg eg. “my_executable” rather than ctx.executable.my_executable
directory we should change to be the working dir
Defaults to None
all other args accepted by ctx.actions.run
USAGE
ASPECT ATTRIBUTES
ATTRIBUTES
(Name, {util.mandatoryString(name: “name” doc_string: “A unique name for this target.” type: NAME mandatory: true )}) A unique name for this target.