Skip to content

Commit ee619c9

Browse files
committed
build: run Bazel format/lint fix
1 parent 1b6602c commit ee619c9

File tree

19 files changed

+140
-158
lines changed

19 files changed

+140
-158
lines changed

WORKSPACE

+14-11
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
55

66
http_archive(
77
name = "build_bazel_rules_nodejs",
8-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.7/rules_nodejs-0.27.7.tar.gz"],
98
sha256 = "fb87ed5965cef93188af9a7287511639403f4b0da418961ce6defb9dcf658f51",
9+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.7/rules_nodejs-0.27.7.tar.gz"],
1010
)
1111

1212
# TS API Guardian resides in Angular
@@ -20,56 +20,59 @@ http_archive(
2020
# We use protocol buffers for the Build Event Protocol
2121
git_repository(
2222
name = "com_google_protobuf",
23-
remote = "https://github.com/protocolbuffers/protobuf",
2423
commit = "b6375e03aa80274dae89410efdf46346413b2247",
24+
remote = "https://github.com/protocolbuffers/protobuf",
2525
)
2626

2727
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
2828

2929
protobuf_deps()
3030

3131
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
32+
3233
# 0.18.0 is needed for .bazelignore
33-
check_bazel_version("0.18.0")
34+
check_bazel_version(minimum_bazel_version = "0.18.0")
35+
3436
node_repositories(
35-
node_version = "10.9.0",
36-
yarn_version = "1.9.2",
3737
node_repositories = {
3838
"10.9.0-darwin_amd64": (
3939
"node-v10.9.0-darwin-x64.tar.gz",
4040
"node-v10.9.0-darwin-x64",
41-
"3c4fe75dacfcc495a432a7ba2dec9045cff359af2a5d7d0429c84a424ef686fc"
41+
"3c4fe75dacfcc495a432a7ba2dec9045cff359af2a5d7d0429c84a424ef686fc",
4242
),
4343
"10.9.0-linux_amd64": (
4444
"node-v10.9.0-linux-x64.tar.xz",
4545
"node-v10.9.0-linux-x64",
46-
"c5acb8b7055ee0b6ac653dc4e458c5db45348cecc564b388f4ed1def84a329ff"
46+
"c5acb8b7055ee0b6ac653dc4e458c5db45348cecc564b388f4ed1def84a329ff",
4747
),
4848
"10.9.0-windows_amd64": (
4949
"node-v10.9.0-win-x64.zip",
5050
"node-v10.9.0-win-x64",
51-
"6a75cdbb69d62ed242d6cbf0238a470bcbf628567ee339d4d098a5efcda2401e"
51+
"6a75cdbb69d62ed242d6cbf0238a470bcbf628567ee339d4d098a5efcda2401e",
5252
),
5353
},
54+
node_version = "10.9.0",
5455
yarn_repositories = {
5556
"1.9.2": (
5657
"yarn-v1.9.2.tar.gz",
5758
"yarn-v1.9.2",
58-
"3ad69cc7f68159a562c676e21998eb21b44138cae7e8fe0749a7d620cf940204"
59+
"3ad69cc7f68159a562c676e21998eb21b44138cae7e8fe0749a7d620cf940204",
5960
),
6061
},
62+
yarn_version = "1.9.2",
6163
)
6264

6365
yarn_install(
6466
name = "npm",
65-
package_json = "//:package.json",
66-
yarn_lock = "//:yarn.lock",
6767
data = [
6868
"//:tools/yarn/check-yarn.js",
6969
],
70+
package_json = "//:package.json",
71+
yarn_lock = "//:yarn.lock",
7072
)
7173

7274
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
75+
7376
install_bazel_dependencies()
7477

7578
load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")

etc/api/BUILD

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ load("@angular//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
1111
bundle[1],
1212
bundle[2],
1313
),
14+
allow_module_identifiers = [
15+
"fs",
16+
"ts",
17+
"ajv",
18+
"Symbol",
19+
"webpack",
20+
],
1421
data = glob([
1522
"%s/%s/**/*.d.ts" % (
1623
bundle[0],
@@ -38,13 +45,6 @@ load("@angular//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
3845
# @angular-devkit/build-optimizer
3946
"^buildOptimizerLoader$",
4047
],
41-
allow_module_identifiers = [
42-
"fs",
43-
"ts",
44-
"ajv",
45-
"Symbol",
46-
"webpack",
47-
],
4848
# At the moment using this will ignore a big change
4949
use_angular_tag_rules = False,
5050
) for bundle in [b[:-len(".d.ts")].split("/", 2) for b in glob(

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"scripts": {
2222
"admin": "node ./bin/devkit-admin",
23-
"bazel:format": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=args-order,attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unused-variable",
23+
"bazel:format": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unused-variable",
2424
"bazel:lint": "yarn bazel:format --lint=warn",
2525
"bazel:lint-fix": "yarn bazel:format --lint=fix",
2626
"bazel:test": "bazel test //...",

packages/angular/cli/BUILD

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ ts_library(
1919
"**/*_spec_large.ts",
2020
],
2121
),
22-
data = glob(["**/*.json", "**/*.md"]),
22+
data = glob([
23+
"**/*.json",
24+
"**/*.md",
25+
]),
2326
module_name = "@angular/cli",
2427
# strict_checks = False,
2528
deps = [

packages/angular/pwa/BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ ts_library(
2929
":pwa_schema",
3030
"//packages/angular_devkit/core",
3131
"//packages/angular_devkit/schematics",
32-
"@npm//rxjs",
3332
"@npm//@types/node",
33+
"@npm//rxjs",
3434
],
3535
)
3636

packages/angular_devkit/architect/BUILD

+15-15
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ ts_json_schema(
1515
name = "builder_input_schema",
1616
src = "src/input-schema.json",
1717
)
18+
1819
ts_json_schema(
1920
name = "builder_output_schema",
2021
src = "src/output-schema.json",
2122
)
23+
2224
ts_json_schema(
2325
name = "builder_builders_schema",
2426
src = "src/builders-schema.json",
2527
)
28+
2629
ts_json_schema(
2730
name = "progress_schema",
2831
src = "src/progress-schema.json",
@@ -41,15 +44,14 @@ ts_library(
4144
module_root = "node/index.d.ts",
4245
# strict_checks = False,
4346
deps = [
44-
"//packages/angular_devkit/core",
45-
"//packages/angular_devkit/core:node",
46-
"@npm//rxjs",
47-
48-
"@npm//@types/node",
4947
":architect",
5048
":builder_builders_schema",
5149
":builder_input_schema",
5250
":builder_output_schema",
51+
"//packages/angular_devkit/core",
52+
"//packages/angular_devkit/core:node",
53+
"@npm//@types/node",
54+
"@npm//rxjs",
5355
],
5456
)
5557

@@ -62,18 +64,18 @@ ts_library(
6264
"**/*_spec_large.ts",
6365
],
6466
),
65-
module_name = "@angular-devkit/architect",
66-
module_root = "src/index.d.ts",
6767
# strict_checks = False,
6868
data = glob(["**/*.json"]),
69+
module_name = "@angular-devkit/architect",
70+
module_root = "src/index.d.ts",
6971
deps = [
70-
"//packages/angular_devkit/core",
71-
"//packages/angular_devkit/core:node",
72-
"@npm//rxjs",
73-
"@npm//@types/node",
7472
":builder_input_schema",
7573
":builder_output_schema",
7674
":progress_schema",
75+
"//packages/angular_devkit/core",
76+
"//packages/angular_devkit/core:node",
77+
"@npm//@types/node",
78+
"@npm//rxjs",
7779
],
7880
)
7981

@@ -92,17 +94,15 @@ ts_library(
9294
":architect",
9395
"//packages/angular_devkit/core",
9496
"//packages/angular_devkit/core:node",
95-
"@npm//rxjs",
96-
9797
"@npm//@types/node",
98+
"@npm//rxjs",
9899
],
99100
)
100101

101-
102102
npm_package(
103103
name = "npm_package",
104104
deps = [
105105
":architect",
106-
":testing"
106+
":testing",
107107
],
108108
)

packages/angular_devkit/architect_cli/BUILD

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ ts_library(
1919
"//packages/angular_devkit/architect:node",
2020
"//packages/angular_devkit/core",
2121
"//packages/angular_devkit/core:node",
22-
"@npm//rxjs",
23-
24-
"@npm//@types/node",
2522
"@npm//@types/minimist",
23+
"@npm//@types/node",
2624
"@npm//@types/progress",
25+
"@npm//rxjs",
2726
],
2827
)

packages/angular_devkit/benchmark/BUILD

+10-12
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ ts_library(
2525
deps = [
2626
"//packages/angular_devkit/core",
2727
"//packages/angular_devkit/core:node",
28-
"@npm//rxjs",
29-
30-
"@npm//@types/node",
3128
"@npm//@types/minimist",
29+
"@npm//@types/node",
30+
"@npm//rxjs",
3231
],
3332
)
3433

3534
ts_library(
3635
name = "benchmark_test_lib",
36+
testonly = True,
3737
srcs = glob(
3838
include = [
3939
"src/**/*_spec.ts",
@@ -45,18 +45,16 @@ ts_library(
4545
"src/test/fibonacci.js",
4646
"src/test/test-script.js",
4747
],
48+
# @external_begin
49+
tsconfig = "//:tsconfig-test.json",
4850
deps = [
4951
":benchmark",
5052
"//packages/angular_devkit/core",
5153
"//packages/angular_devkit/core:node",
52-
"@npm//rxjs",
53-
54-
"@npm//@types/node",
5554
"@npm//@types/jasmine",
55+
"@npm//@types/node",
56+
"@npm//rxjs",
5657
],
57-
testonly = True,
58-
# @external_begin
59-
tsconfig = "//:tsconfig-test.json",
6058
# @external_end
6159
)
6260

@@ -65,12 +63,12 @@ jasmine_node_test(
6563
srcs = [":benchmark_test_lib"],
6664
deps = [
6765
"@npm//jasmine",
68-
"@npm//source-map",
6966
"@npm//minimist",
70-
"@npm//pidusage",
7167
"@npm//pidtree",
72-
"@npm//tree-kill",
68+
"@npm//pidusage",
69+
"@npm//source-map",
7370
"@npm//temp",
71+
"@npm//tree-kill",
7472
],
7573
)
7674

packages/angular_devkit/build_optimizer/BUILD

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,29 @@ ts_library(
2626
deps = [
2727
"@npm//@types/node",
2828
"@npm//@types/source-map",
29-
"@npm//typescript",
3029
"@npm//@types/webpack",
30+
"@npm//typescript",
3131
],
3232
)
3333

3434
ts_library(
3535
name = "build_optimizer_test_lib",
36+
testonly = True,
3637
srcs = glob(
3738
include = [
3839
"src/**/*_spec.ts",
3940
"src/**/*_spec_large.ts",
4041
],
4142
),
43+
# @external_begin
44+
tsconfig = "//:tsconfig-test.json",
4245
deps = [
4346
":build_optimizer",
4447
"//packages/angular_devkit/core",
45-
"@npm//@types/node",
4648
"@npm//@types/jasmine",
49+
"@npm//@types/node",
4750
"@npm//@types/source-map",
4851
],
49-
testonly = True,
50-
# @external_begin
51-
tsconfig = "//:tsconfig-test.json",
5252
# @external_end
5353
)
5454

@@ -58,7 +58,7 @@ jasmine_node_test(
5858
deps = [
5959
"@npm//jasmine",
6060
"@npm//source-map",
61-
]
61+
],
6262
)
6363

6464
npm_package(

0 commit comments

Comments
 (0)