Public providers, aspects and helper surface is re-exported here.
Users should not load files under "/internal"
Macros and Functions
Constructs a DeclarationInfo including all transitive files needed to type-check from DeclarationInfo providers in a list of deps.
list of typings files
list of labels of dependencies where we should collect their DeclarationInfo to pass transitively
Constructs a JSEcmaScriptModuleInfo including all transitive sources from JSEcmaScriptModuleInfo providers in a list of deps.
Returns a single JSEcmaScriptModuleInfo.
Constructs a JSModuleInfo including all transitive sources from JSModuleInfo providers in a list of deps.
Returns a single JSModuleInfo.
Constructs a JSNamedModuleInfo including all transitive sources from JSNamedModuleInfo providers in a list of deps.
Returns a single JSNamedModuleInfo.
Helper to replace ctx.actions.run
This calls node programs with a node_modules directory in place
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
The DeclarationInfo provider allows JS rules to communicate typing information. TypeScript's .d.ts files are used as the interop format for describing types. package.json files are included as well, as TypeScript needs to read the "typings" property.
Do not create DeclarationInfo instances directly, instead use the declaration_info factory function.
Note: historically this was a subset of the string-typed "typescript" provider.
They should use modern syntax and ESModules. These files should typically be named "foo.mjs"
Historical note: this was the typescript.es6_sources output
For example named AMD/UMD or goog.module format. These files can be efficiently served with the concatjs bundler. 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.
The LinkablePackageInfo provider provides information to the linker for linking pkg_npm built packages
Provides data about the build context, like config_setting's
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.
Provides information about npm dependencies
node_modules_aspectPropagates along attributes named:
A unique name for this target.