diff --git a/examples/parcel/parcel.bzl b/examples/parcel/parcel.bzl index eab5dcced0..707ea4fc8f 100644 --- a/examples/parcel/parcel.bzl +++ b/examples/parcel/parcel.bzl @@ -49,7 +49,6 @@ def _parcel_impl(ctx): parcel = rule( implementation = _parcel_impl, attrs = { - "srcs": attr.label_list(allow_files = True), "entry_point": attr.label( allow_single_file = True, mandatory = True, @@ -60,6 +59,7 @@ parcel = rule( executable = True, cfg = "host", ), + "srcs": attr.label_list(allow_files = True), }, outputs = { "bundle": "%{name}.js", diff --git a/internal/common/copy_to_bin.bzl b/internal/common/copy_to_bin.bzl index 74473e2c89..88243eb8d7 100644 --- a/internal/common/copy_to_bin.bzl +++ b/internal/common/copy_to_bin.bzl @@ -32,8 +32,8 @@ def _copy_to_bin_impl(ctx): _copy_to_bin = rule( implementation = _copy_to_bin_impl, attrs = { - "srcs": attr.label_list(mandatory = True, allow_files = True), "is_windows": attr.bool(mandatory = True, doc = "Automatically set by macro"), + "srcs": attr.label_list(mandatory = True, allow_files = True), }, ) diff --git a/internal/common/params_file.bzl b/internal/common/params_file.bzl index 09a579aeb9..a0a1652a97 100644 --- a/internal/common/params_file.bzl +++ b/internal/common/params_file.bzl @@ -21,7 +21,6 @@ _DOC = """Generates a params file from a list of arguments.""" # See params_file macro below for docstrings _ATTRS = { - "out": attr.output(mandatory = True), "args": attr.string_list(), "data": attr.label_list(allow_files = True), "is_windows": attr.bool(mandatory = True), @@ -29,6 +28,7 @@ _ATTRS = { values = ["unix", "windows", "auto"], default = "auto", ), + "out": attr.output(mandatory = True), } def _expand_location_into_runfiles(ctx, s): diff --git a/internal/coverage/BUILD.bazel b/internal/coverage/BUILD.bazel index 29b8606d2a..9da8434439 100644 --- a/internal/coverage/BUILD.bazel +++ b/internal/coverage/BUILD.bazel @@ -1,9 +1,5 @@ load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary") -exports_files([ - "lcov_merger-js.js", -]) - # BEGIN-INTERNAL load("//packages/typescript:checked_in_ts_project.bzl", "checked_in_ts_project") @@ -14,7 +10,11 @@ checked_in_ts_project( visibility = ["//visibility:public"], deps = ["@npm//@types/node"], ) + # END-INTERNAL +exports_files([ + "lcov_merger-js.js", +]) nodejs_binary( name = "lcov_merger_js", diff --git a/internal/js_library/js_library.bzl b/internal/js_library/js_library.bzl index 58aaa15312..87f92ee8e2 100644 --- a/internal/js_library/js_library.bzl +++ b/internal/js_library/js_library.bzl @@ -86,16 +86,16 @@ def _impl(ctx): _js_library = rule( implementation = _impl, attrs = { - "package_name": attr.string(), - "srcs": attr.label_list( - allow_files = True, - mandatory = True, - ), "amd_names": attr.string_dict(doc = _AMD_NAMES_DOC), "is_windows": attr.bool(mandatory = True, doc = "Automatically set by macro"), # module_name for legacy ts_library module_mapping support # TODO: remove once legacy module_mapping is removed "module_name": attr.string(), + "package_name": attr.string(), + "srcs": attr.label_list( + allow_files = True, + mandatory = True, + ), }, ) diff --git a/internal/linker/test/integration/rule.bzl b/internal/linker/test/integration/rule.bzl index 157cbb041f..d146c78d59 100644 --- a/internal/linker/test/integration/rule.bzl +++ b/internal/linker/test/integration/rule.bzl @@ -15,10 +15,10 @@ def _linked(ctx): ) linked = rule(_linked, attrs = { - "out": attr.output(), - "program": attr.label(executable = True, cfg = "host", mandatory = True), "deps": attr.label_list( allow_files = True, aspects = [module_mappings_aspect], ), + "out": attr.output(), + "program": attr.label(executable = True, cfg = "host", mandatory = True), }) diff --git a/internal/node/npm_package_bin.bzl b/internal/node/npm_package_bin.bzl index 719f9b33c4..2cfad48deb 100644 --- a/internal/node/npm_package_bin.bzl +++ b/internal/node/npm_package_bin.bzl @@ -7,11 +7,11 @@ load("//internal/linker:link_node_modules.bzl", "module_mappings_aspect") # Note: this API is chosen to match nodejs_binary # so that we can generate macros that act as either an output-producing tool or an executable _ATTRS = { - "outs": attr.output_list(), "args": attr.string_list(mandatory = True), "configuration_env_vars": attr.string_list(default = []), "data": attr.label_list(allow_files = True, aspects = [module_mappings_aspect, node_modules_aspect]), "output_dir": attr.bool(), + "outs": attr.output_list(), "tool": attr.label( executable = True, cfg = "host", diff --git a/internal/npm_install/node_module_library.bzl b/internal/npm_install/node_module_library.bzl index 104c018a11..56abe9abef 100644 --- a/internal/npm_install/node_module_library.bzl +++ b/internal/npm_install/node_module_library.bzl @@ -81,16 +81,16 @@ def _node_module_library_impl(ctx): node_module_library = rule( implementation = _node_module_library_impl, attrs = { - "srcs": attr.label_list( - doc = "The list of files that comprise the package", - allow_files = True, + "deps": attr.label_list( + doc = "Transitive dependencies of the package", ), "named_module_srcs": attr.label_list( doc = "A subset of srcs that are javascript named-UMD or named-AMD for use in rules such as ts_devserver", allow_files = True, ), - "deps": attr.label_list( - doc = "Transitive dependencies of the package", + "srcs": attr.label_list( + doc = "The list of files that comprise the package", + allow_files = True, ), }, doc = "Defines an npm package under node_modules", diff --git a/internal/npm_install/npm_install.bzl b/internal/npm_install/npm_install.bzl index 1b72a37597..7bbe12972c 100644 --- a/internal/npm_install/npm_install.bzl +++ b/internal/npm_install/npm_install.bzl @@ -27,10 +27,6 @@ load("//internal/common:os_name.bzl", "is_windows_os", "os_name") load("//internal/node:node_labels.bzl", "get_node_label", "get_npm_label", "get_yarn_label") COMMON_ATTRIBUTES = dict(dict(), **{ - "timeout": attr.int( - default = 3600, - doc = """Maximum duration of the package manager execution in seconds.""", - ), "data": attr.label_list( doc = """Data files required by this rule. @@ -104,6 +100,10 @@ data attribute. """, default = True, ), + "timeout": attr.int( + default = 3600, + doc = """Maximum duration of the package manager execution in seconds.""", + ), }) def _create_build_files(repository_ctx, rule_type, node, lock_file): diff --git a/internal/npm_install/npm_umd_bundle.bzl b/internal/npm_install/npm_umd_bundle.bzl index 5fca19800f..466eeee7ee 100644 --- a/internal/npm_install/npm_umd_bundle.bzl +++ b/internal/npm_install/npm_umd_bundle.bzl @@ -57,10 +57,6 @@ def _npm_umd_bundle(ctx): ] NPM_UMD_ATTRS = { - "package_name": attr.string( - doc = """The name of the npm package""", - mandatory = True, - ), "entry_point": attr.label( doc = """Entry point for the npm package""", mandatory = True, @@ -93,6 +89,10 @@ This target would be then be used instead of the generated `@npm//typeorm:typeor mandatory = True, aspects = [node_modules_aspect], ), + "package_name": attr.string( + doc = """The name of the npm package""", + mandatory = True, + ), "_browserify_wrapped": attr.label( executable = True, cfg = "host", diff --git a/internal/pkg_npm/pkg_npm.bzl b/internal/pkg_npm/pkg_npm.bzl index ef520aa676..0f0a837605 100644 --- a/internal/pkg_npm/pkg_npm.bzl +++ b/internal/pkg_npm/pkg_npm.bzl @@ -74,11 +74,8 @@ You can pass arguments to npm by escaping them from Bazel using a double-hyphen, # Used in angular/angular /packages/bazel/src/ng_package/ng_package.bzl PKG_NPM_ATTRS = { - "package_name": attr.string( - doc = """Optional package_name that this npm package may be imported as.""", - ), - "srcs": attr.label_list( - doc = """Files inside this directory which are simply copied into the package.""", + "deps": attr.label_list( + doc = """Other targets which produce files that should be included in the package, such as `rollup_bundle`""", allow_files = True, ), "nested_packages": attr.label_list( @@ -90,11 +87,18 @@ PKG_NPM_ATTRS = { providers = [NodeContextInfo], doc = "Internal use only", ), + "package_name": attr.string( + doc = """Optional package_name that this npm package may be imported as.""", + ), "replace_with_version": attr.string( doc = """If set this value is replaced with the version stamp data. See the section on stamping in the README.""", default = "0.0.0-PLACEHOLDER", ), + "srcs": attr.label_list( + doc = """Files inside this directory which are simply copied into the package.""", + allow_files = True, + ), "substitutions": attr.string_dict( doc = """Key-value pairs which are replaced in all the files while building the package.""", ), @@ -102,10 +106,6 @@ PKG_NPM_ATTRS = { doc = """External workspaces whose contents should be vendored into this workspace. Avoids 'external/foo' path segments in the resulting package.""", ), - "deps": attr.label_list( - doc = """Other targets which produce files that should be included in the package, such as `rollup_bundle`""", - allow_files = True, - ), "_npm_script_generator": attr.label( default = Label("//internal/pkg_npm:npm_script_generator"), cfg = "host", diff --git a/internal/pkg_web/pkg_web.bzl b/internal/pkg_web/pkg_web.bzl index 41b72a314b..d36929411c 100644 --- a/internal/pkg_web/pkg_web.bzl +++ b/internal/pkg_web/pkg_web.bzl @@ -18,13 +18,13 @@ _DOC = """Assembles a web application from source files.""" _ATTRS = { + "additional_root_paths": attr.string_list( + doc = """Path prefixes to strip off all srcs, in addition to the current package. Longest wins.""", + ), "srcs": attr.label_list( allow_files = True, doc = """Files which should be copied into the package""", ), - "additional_root_paths": attr.string_list( - doc = """Path prefixes to strip off all srcs, in addition to the current package. Longest wins.""", - ), "_assembler": attr.label( default = "@build_bazel_rules_nodejs//internal/pkg_web:assembler", executable = True, diff --git a/internal/providers/linkable_package_info.bzl b/internal/providers/linkable_package_info.bzl index 9c8439bcb4..ad450debc2 100644 --- a/internal/providers/linkable_package_info.bzl +++ b/internal/providers/linkable_package_info.bzl @@ -18,13 +18,13 @@ LinkablePackageInfo = provider( doc = "A doc string", fields = { + "files": "Depset of files in this package (must all be contained within path)", "package_name": """The package name. Should be the same as name field in the package's package.json. In the future, the linker may validate that the names match the name in a package.json file. """, - "files": "Depset of files in this package (must all be contained within path)", "path": """The path to link to. Path must be relative to execroot/wksp. It can either an output dir path such as, diff --git a/internal/providers/node_runtime_deps_info.bzl b/internal/providers/node_runtime_deps_info.bzl index 18597bdbf9..63d0dd8b3a 100644 --- a/internal/providers/node_runtime_deps_info.bzl +++ b/internal/providers/node_runtime_deps_info.bzl @@ -34,8 +34,8 @@ tree will exist on disk, so we assume node actions/binary/test executions will do the same. """, fields = { - "pkgs": "list of labels of packages that provide NpmPackageInfo", "deps": "depset of runtime dependency labels", + "pkgs": "list of labels of packages that provide NpmPackageInfo", }, ) diff --git a/package.json b/package.json index 89c2388169..95fc55975a 100644 --- a/package.json +++ b/package.json @@ -21,10 +21,10 @@ "@babel/cli": "^7.6.2", "@babel/core": "^7.6.2", "@babel/preset-env": "^7.6.2", - "@bazel/bazelisk": "^1.4.0", - "@bazel/buildifier": "^0.26.0", - "@bazel/buildozer": "^0.29.0", - "@bazel/ibazel": "^0.10.3", + "@bazel/bazelisk": "^1.5.0", + "@bazel/buildifier": "^3.2.0", + "@bazel/buildozer": "^3.2.0", + "@bazel/ibazel": "^0.13.1", "@commitlint/cli": "^8.0.0", "@commitlint/config-conventional": "^8.0.0", "@gregmagolan/test-a": "0.0.5", diff --git a/packages/karma/karma_web_test.bzl b/packages/karma/karma_web_test.bzl index df91e73dfa..5d85f3f9bf 100644 --- a/packages/karma/karma_web_test.bzl +++ b/packages/karma/karma_web_test.bzl @@ -33,10 +33,6 @@ KARMA_PEER_DEPS = [ ] KARMA_WEB_TEST_ATTRS = { - "srcs": attr.label_list( - doc = "A list of JavaScript test files", - allow_files = [".js"], - ), "bootstrap": attr.label_list( doc = """JavaScript files to include *before* the module loader (require.js). For example, you can include Reflect,js for TypeScript decorator metadata reflection, @@ -60,6 +56,11 @@ KARMA_WEB_TEST_ATTRS = { doc = "Runtime dependencies", allow_files = True, ), + "deps": attr.label_list( + doc = "Other targets which produce JavaScript such as `ts_library`", + allow_files = True, + aspects = [node_modules_aspect], + ), "karma": attr.label( doc = "karma binary label", # NB: replaced during pkg_npm with "@npm//karma/bin:karma" @@ -68,13 +69,6 @@ KARMA_WEB_TEST_ATTRS = { cfg = "target", allow_files = True, ), - "static_files": attr.label_list( - doc = """Arbitrary files which are available to be served on request. - Files are served at: - `/base//`, e.g. - `/base/npm_bazel_typescript/examples/testing/static_script.js`""", - allow_files = True, - ), "runtime_deps": attr.label_list( doc = """Dependencies which should be loaded after the module loader but before the srcs and deps. These should be a list of targets which produce JavaScript such as `ts_library`. @@ -82,10 +76,16 @@ KARMA_WEB_TEST_ATTRS = { allow_files = True, aspects = [node_modules_aspect], ), - "deps": attr.label_list( - doc = "Other targets which produce JavaScript such as `ts_library`", + "srcs": attr.label_list( + doc = "A list of JavaScript test files", + allow_files = [".js"], + ), + "static_files": attr.label_list( + doc = """Arbitrary files which are available to be served on request. + Files are served at: + `/base//`, e.g. + `/base/npm_bazel_typescript/examples/testing/static_script.js`""", allow_files = True, - aspects = [node_modules_aspect], ), "_conf_tmpl": attr.label( default = "//packages/karma:karma.conf.js", diff --git a/packages/labs/protobufjs/ts_proto_library.bzl b/packages/labs/protobufjs/ts_proto_library.bzl index 378f75cf86..e33c401a0c 100644 --- a/packages/labs/protobufjs/ts_proto_library.bzl +++ b/packages/labs/protobufjs/ts_proto_library.bzl @@ -147,11 +147,11 @@ def _ts_proto_library(ctx): ts_proto_library = rule( implementation = _ts_proto_library, attrs = { + "deps": attr.label_list(doc = "proto_library targets"), "output_name": attr.string( doc = """Name of the resulting module, which you will import from. If not specified, the name will match the target's name.""", ), - "deps": attr.label_list(doc = "proto_library targets"), "_pbjs": attr.label( default = Label("//packages/labs/protobufjs:pbjs"), executable = True, diff --git a/packages/protractor/protractor_web_test.bzl b/packages/protractor/protractor_web_test.bzl index 6dc7bae4e5..60091dd88f 100644 --- a/packages/protractor/protractor_web_test.bzl +++ b/packages/protractor/protractor_web_test.bzl @@ -183,10 +183,6 @@ _protractor_web_test = rule( outputs = {"script": "%{name}.sh"}, toolchains = ["@bazel_tools//tools/sh:toolchain_type"], attrs = { - "srcs": attr.label_list( - doc = "A list of JavaScript test files", - allow_files = [".js"], - ), "configuration": attr.label( doc = "Protractor configuration file", allow_single_file = True, @@ -195,6 +191,11 @@ _protractor_web_test = rule( doc = "Runtime dependencies", allow_files = True, ), + "deps": attr.label_list( + doc = "Other targets which produce JavaScript such as `ts_library`", + allow_files = True, + aspects = [node_modules_aspect], + ), "on_prepare": attr.label( doc = """A file with a node.js script to run once before all tests run. If the script exports a function which returns a promise, protractor @@ -213,10 +214,9 @@ _protractor_web_test = rule( cfg = "target", allow_files = True, ), - "deps": attr.label_list( - doc = "Other targets which produce JavaScript such as `ts_library`", - allow_files = True, - aspects = [node_modules_aspect], + "srcs": attr.label_list( + doc = "A list of JavaScript test files", + allow_files = [".js"], ), "_conf_tmpl": attr.label( default = Label("//packages/protractor:protractor.conf.js"), diff --git a/packages/rollup/rollup_bundle.bzl b/packages/rollup/rollup_bundle.bzl index bdfe6fe630..45f26d89da 100644 --- a/packages/rollup/rollup_bundle.bzl +++ b/packages/rollup/rollup_bundle.bzl @@ -57,14 +57,6 @@ This will produce one output per requested format. """ _ROLLUP_ATTRS = { - "srcs": attr.label_list( - doc = """Non-entry point JavaScript source files from the workspace. - -You must not repeat file(s) passed to entry_point/entry_points. -""", - # Don't try to constrain the filenames, could be json, svg, whatever - allow_files = True, - ), "args": attr.string_list( doc = """Command line arguments to pass to rollup. Can be used to override config file settings. @@ -86,6 +78,10 @@ If not set, a default basic Rollup config is used. allow_single_file = True, default = "//packages/rollup:rollup.config.js", ), + "deps": attr.label_list( + aspects = [module_mappings_aspect, node_modules_aspect], + doc = """Other libraries that are required by the code, or by the rollup.config.js""", + ), "entry_point": attr.label( doc = """The bundle's entry point (e.g. your main.js or app.js or index.js). @@ -205,6 +201,14 @@ Passed to the [`--sourcemap` option](https://github.com/rollup/rollup/blob/maste default = "inline", values = ["inline", "hidden", "true", "false"], ), + "srcs": attr.label_list( + doc = """Non-entry point JavaScript source files from the workspace. + +You must not repeat file(s) passed to entry_point/entry_points. +""", + # Don't try to constrain the filenames, could be json, svg, whatever + allow_files = True, + ), "supports_workers": attr.bool( doc = """Experimental! Use only with caution. @@ -213,10 +217,6 @@ When enabled, this rule invokes the "rollup_worker_bin" worker aware binary rather than "rollup_bin".""", default = False, ), - "deps": attr.label_list( - aspects = [module_mappings_aspect, node_modules_aspect], - doc = """Other libraries that are required by the code, or by the rollup.config.js""", - ), } def _desugar_entry_point_names(name, entry_point, entry_points): diff --git a/packages/terser/terser_minified.bzl b/packages/terser/terser_minified.bzl index ef15a5abbf..1369b173d0 100644 --- a/packages/terser/terser_minified.bzl +++ b/packages/terser/terser_minified.bzl @@ -35,16 +35,6 @@ If the input is a directory, then the output will also be a directory, named aft """ _TERSER_ATTRS = { - "src": attr.label( - doc = """File(s) to minify. - -Can be a .js file, a rule producing .js files as its default output, or a rule producing a directory of .js files. - -Note that you can pass multiple files to terser, which it will bundle together. -If you want to do this, you can pass a filegroup here.""", - allow_files = [".js", ".map", ".mjs"], - mandatory = True, - ), "args": attr.string_list( doc = """Additional command line arguments to pass to terser. @@ -96,6 +86,16 @@ so that it only affects the current build. doc = "Whether to produce a .js.map output", default = True, ), + "src": attr.label( + doc = """File(s) to minify. + +Can be a .js file, a rule producing .js files as its default output, or a rule producing a directory of .js files. + +Note that you can pass multiple files to terser, which it will bundle together. +If you want to do this, you can pass a filegroup here.""", + allow_files = [".js", ".map", ".mjs"], + mandatory = True, + ), "terser_bin": attr.label( doc = "An executable target that runs Terser", default = Label("//packages/terser/bin:terser"), diff --git a/packages/typescript/internal/build_defs.bzl b/packages/typescript/internal/build_defs.bzl index 6f249710b6..55fb56c0b0 100644 --- a/packages/typescript/internal/build_defs.bzl +++ b/packages/typescript/internal/build_defs.bzl @@ -341,11 +341,6 @@ def _ts_library_impl(ctx): ts_library = rule( _ts_library_impl, attrs = dict(COMMON_ATTRIBUTES, **{ - "srcs": attr.label_list( - doc = "The TypeScript source files to compile.", - allow_files = [".ts", ".tsx"], - mandatory = True, - ), "angular_assets": attr.label_list( doc = """Additional files the Angular compiler will need to read as inputs. Includes .css and .html files""", @@ -365,6 +360,10 @@ install the @bazel/typescript npm package. executable = True, cfg = "host", ), + "deps": attr.label_list( + aspects = DEPS_ASPECTS + [node_modules_aspect], + doc = "Compile-time dependencies, typically other ts_library targets", + ), "devmode_module": attr.string( doc = """Set the typescript `module` compiler option for devmode output. @@ -456,6 +455,11 @@ This value will override the `target` option in the user supplied tsconfig.""", values = _TYPESCRIPT_SCRIPT_TARGETS, default = _PRODMODE_TARGET_DEFAULT, ), + "srcs": attr.label_list( + doc = "The TypeScript source files to compile.", + allow_files = [".ts", ".tsx"], + mandatory = True, + ), "supports_workers": attr.bool( doc = """Intended for internal use only. @@ -490,10 +494,6 @@ either: "use_angular_plugin": attr.bool( doc = """Run the Angular ngtsc compiler under ts_library""", ), - "deps": attr.label_list( - aspects = DEPS_ASPECTS + [node_modules_aspect], - doc = "Compile-time dependencies, typically other ts_library targets", - ), }), outputs = { "tsconfig": "%{name}_tsconfig.json", diff --git a/packages/typescript/internal/devserver/ts_devserver.bzl b/packages/typescript/internal/devserver/ts_devserver.bzl index e2a26ab2ec..badd0418db 100644 --- a/packages/typescript/internal/devserver/ts_devserver.bzl +++ b/packages/typescript/internal/devserver/ts_devserver.bzl @@ -136,6 +136,11 @@ ts_devserver = rule( doc = "Scripts to include in the JS bundle before the module loader (require.js)", allow_files = [".js"], ), + "deps": attr.label_list( + doc = "Targets that produce JavaScript, such as `ts_library`", + allow_files = True, + aspects = [node_modules_aspect], + ), "devserver": attr.label( doc = """Go based devserver executable. @@ -183,11 +188,6 @@ ts_devserver = rule( They are served relative to the package where this rule is declared.""", allow_files = True, ), - "deps": attr.label_list( - doc = "Targets that produce JavaScript, such as `ts_library`", - allow_files = True, - aspects = [node_modules_aspect], - ), "_bash_runfile_helpers": attr.label(default = Label("@build_bazel_rules_nodejs//third_party/github.com/bazelbuild/bazel/tools/bash/runfiles")), "_launcher_template": attr.label(allow_single_file = True, default = Label("//packages/typescript/internal/devserver:launcher_template.sh")), "_requirejs_script": attr.label(allow_single_file = True, default = Label("//packages/typescript/third_party/npm/requirejs:require.js")), diff --git a/packages/typescript/internal/ts_config.bzl b/packages/typescript/internal/ts_config.bzl index 8499de6165..2fc4f8e690 100644 --- a/packages/typescript/internal/ts_config.bzl +++ b/packages/typescript/internal/ts_config.bzl @@ -27,16 +27,16 @@ def _ts_config_impl(ctx): ts_config = rule( implementation = _ts_config_impl, attrs = { - "src": attr.label( - doc = """The tsconfig.json file passed to the TypeScript compiler""", - allow_single_file = True, - mandatory = True, - ), "deps": attr.label_list( doc = """Additional tsconfig.json files referenced via extends""", allow_files = True, mandatory = True, ), + "src": attr.label( + doc = """The tsconfig.json file passed to the TypeScript compiler""", + allow_single_file = True, + mandatory = True, + ), }, doc = """Allows a tsconfig.json file to extend another file. diff --git a/packages/typescript/internal/ts_project.bzl b/packages/typescript/internal/ts_project.bzl index 9e50e7f557..c624dc1f89 100644 --- a/packages/typescript/internal/ts_project.bzl +++ b/packages/typescript/internal/ts_project.bzl @@ -10,17 +10,17 @@ _DEFAULT_TSC = ( ) _ATTRS = { + "args": attr.string_list(), + "deps": attr.label_list(providers = [DeclarationInfo]), + "extends": attr.label_list(allow_files = [".json"]), + "outdir": attr.string(), # NB: no restriction on extensions here, because tsc sometimes adds type-check support # for more file kinds (like require('some.json')) and also # if you swap out the `compiler` attribute (like with ngtsc) # that compiler might allow more sources than tsc does. "srcs": attr.label_list(allow_files = True, mandatory = True), - "args": attr.string_list(), - "extends": attr.label_list(allow_files = [".json"]), - "outdir": attr.string(), "tsc": attr.label(default = Label(_DEFAULT_TSC), executable = True, cfg = "host"), "tsconfig": attr.label(mandatory = True, allow_single_file = [".json"]), - "deps": attr.label_list(providers = [DeclarationInfo]), } # tsc knows how to produce the following kinds of output files. diff --git a/yarn.lock b/yarn.lock index 7132d4d81c..1f36eeaa61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -937,63 +937,25 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@bazel/bazelisk@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.4.0.tgz#401d7b89b8d89dd579d1e16cc24cd4d9281a4fbb" - integrity sha512-VNI/jF7baQiBy4x+u8gmSDsFehqaAuzMyLuCj0j6/aZCZSw2OssytJVj73m8sFYbXgj67D8iYEQ0gbuoafDk6w== - -"@bazel/buildifier-darwin_x64@0.26.0": - version "0.26.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier-darwin_x64/-/buildifier-darwin_x64-0.26.0.tgz#0e4f5066750f7984689857e332f93368e0d782dd" - integrity sha512-yvlHuaP2FIMJ4Z4Ucs/R1wgwkDjhDkwvGD1eyhy9Qblqu7Ypgxtv2wz8dygrxDJVxhk3Kiwzlrp3otq6OYjv5A== - -"@bazel/buildifier-linux_x64@0.26.0": - version "0.26.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier-linux_x64/-/buildifier-linux_x64-0.26.0.tgz#05020641f17441145056821ec33a2c667e253a3f" - integrity sha512-4+ZGEVMQdJr39My2eH6GmQrBIQfuw/DWO3Vwpy5vS1p61EvV0a5+jaukRelA3p//FD0j2cAKaBvwZdsijtDsZw== - -"@bazel/buildifier-win32_x64@0.26.0": - version "0.26.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier-win32_x64/-/buildifier-win32_x64-0.26.0.tgz#51d983d36fd41f59063347e027487a447e4ea83e" - integrity sha512-S3QvjopF6cQ0rMv8zxi/SWfRBtA+oBGiTPcfpn1wJZa8Q21PdOcjH9ZgPJKpIV53x6sJ8XBVs7HSW44dPrwxQA== - -"@bazel/buildifier@^0.26.0": - version "0.26.0" - resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-0.26.0.tgz#65af3851f9ebe8b9ac651185d051b1a155012dbb" - integrity sha512-PVzkCOYhjlgcRCXUO31dy/GmtjDWzeTyVmPCFc4pxTFBvlrG7qkVlUW3DCIbBI5neTes0pY8mju837UBdK0OFQ== - optionalDependencies: - "@bazel/buildifier-darwin_x64" "0.26.0" - "@bazel/buildifier-linux_x64" "0.26.0" - "@bazel/buildifier-win32_x64" "0.26.0" - -"@bazel/buildozer-darwin_x64@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/buildozer-darwin_x64/-/buildozer-darwin_x64-0.29.0.tgz#d7b907d96b763f6c8401a664b41c4b0b9efb8a2c" - integrity sha512-mXIgemdvCbhHpcOFQzOVLgi/ukogB5NtXFGRQ/jBM5tVv3cbqB7CnlfzA2tNB4FLIGtz5P95EuD2zYi3KUy9Nw== - -"@bazel/buildozer-linux_x64@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/buildozer-linux_x64/-/buildozer-linux_x64-0.29.0.tgz#c118dd53d6293c517bb8bb71c542a14b7f9f845a" - integrity sha512-AZ84DpmGYcuE1C12RjDvvr3K/Jmw0jkuxA0aZHiuEL8+jymBx5UIfpR0HJxGXq4ZLINPOTbdknsLah+ONyClZA== - -"@bazel/buildozer-win32_x64@0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/buildozer-win32_x64/-/buildozer-win32_x64-0.29.0.tgz#440b6cd5ac19f29c92ab8753f3c3a3b11183d348" - integrity sha512-yItrsCcUHz/eh5vORBx1g/Hcz4K+uSSq8esiJelBoK5Zxrh4noOLc+ik/8VHTrfXXIa5xu/aWikNMQO22lYh9g== - -"@bazel/buildozer@^0.29.0": - version "0.29.0" - resolved "https://registry.yarnpkg.com/@bazel/buildozer/-/buildozer-0.29.0.tgz#31e3d716011de064aaf3de48ae31588cdfc457ff" - integrity sha512-+iVFqueCDSikFRnuwn1UF4xUpoo8ry0spoLVQK6rIHRD0k6XBpHQsPIkIV7OTzzoCw24uF8msdGZY+kiMOcH2Q== - optionalDependencies: - "@bazel/buildozer-darwin_x64" "0.29.0" - "@bazel/buildozer-linux_x64" "0.29.0" - "@bazel/buildozer-win32_x64" "0.29.0" - -"@bazel/ibazel@^0.10.3": - version "0.10.3" - resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.10.3.tgz#2e2b8a1d3e885946eac41db2b1aa6801fb319887" - integrity sha512-v1nXbMTHVlMM4z4uWp6XiRoHAyUlYggF1SOboLLWRp0+D22kWixqArWqnozLw2mOtnxr97BdLjluWiho6A8Hjg== +"@bazel/bazelisk@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@bazel/bazelisk/-/bazelisk-1.5.0.tgz#61f583ed93be138b47be7180403938ea4057f54b" + integrity sha512-qhOGN1WmfZYNJXGrRL/0byii9hX5FBomMv3WWI2OEL2+Bxm4t/bR3zMxN3xwQX1C8meSSrAfKGSzxVOZfpJsOg== + +"@bazel/buildifier@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-3.2.0.tgz#5dbb32e1592a27eac52c74d0f8c8206e1a045240" + integrity sha512-gdqRnPClkwZw7YLv9Xc6XLovTtrUB6XFuu6Jo1T7gXn1AB7I09KlCgfJgKRJRMskrVDx3UVZaFK06ztGjyHnWw== + +"@bazel/buildozer@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@bazel/buildozer/-/buildozer-3.2.0.tgz#df3f222cc0d395d4b873f9b374d4bbd95df59b32" + integrity sha512-zhZtHyzs26rWG1QekzyzRAogeordEulV5yV57pbY+bzuQS60xU4YD15Bau2To5nNnt2HEfSaFpjXzSHRyeOt/Q== + +"@bazel/ibazel@^0.13.1": + version "0.13.1" + resolved "https://registry.yarnpkg.com/@bazel/ibazel/-/ibazel-0.13.1.tgz#23788f67a6fbe83d96f2d055691df4917c10ac8d" + integrity sha512-FO1hBKpzpeBL0adnFYF2Dwl/7gox6ccKM6bb+x26AXrQpLbinXPuTi4zeXRL/MW4383mF6i4RovLCmwUU/YW0w== "@bcoe/v8-coverage@^0.2.3": version "0.2.3"