fix(bazel): specify the package and lock files using the workspace (#25694)
PR Close #25694
This commit is contained in:
		
							parent
							
								
									62be8c2e2f
								
							
						
					
					
						commit
						ddc13352e9
					
				| @ -244,14 +244,14 @@ filegroup( | |||||||
| 
 | 
 | ||||||
|     yarn_install( |     yarn_install( | ||||||
|         name = "ts-api-guardian_runtime_deps", |         name = "ts-api-guardian_runtime_deps", | ||||||
|         package_json = "//tools/ts-api-guardian:package.json", |         package_json = "@angular//tools/ts-api-guardian:package.json", | ||||||
|         yarn_lock = "//tools/ts-api-guardian:yarn.lock", |         yarn_lock = "@angular//tools/ts-api-guardian:yarn.lock", | ||||||
|     ) |     ) | ||||||
| 
 | 
 | ||||||
|     yarn_install( |     yarn_install( | ||||||
|         name = "http-server_runtime_deps", |         name = "http-server_runtime_deps", | ||||||
|         package_json = "//tools/http-server:package.json", |         package_json = "@angular//tools/http-server:package.json", | ||||||
|         yarn_lock = "//tools/http-server:yarn.lock", |         yarn_lock = "@angular//tools/http-server:yarn.lock", | ||||||
|     ) |     ) | ||||||
| 
 | 
 | ||||||
|     _ng_setup_workspace() |     _ng_setup_workspace() | ||||||
|  | |||||||
| @ -13,6 +13,7 @@ ts_library( | |||||||
|     name = "lib", |     name = "lib", | ||||||
|     srcs = glob(["lib/*.ts"]), |     srcs = glob(["lib/*.ts"]), | ||||||
|     module_name = "ts-api-guardian", |     module_name = "ts-api-guardian", | ||||||
|  |     node_modules = "@ts-api-guardian_runtime_deps//:node_modules", | ||||||
|     tsconfig = "//tools:tsconfig.json", |     tsconfig = "//tools:tsconfig.json", | ||||||
|     visibility = ["//visibility:public"], |     visibility = ["//visibility:public"], | ||||||
| ) | ) | ||||||
|  | |||||||
| @ -17,14 +17,14 @@ | |||||||
| 
 | 
 | ||||||
| load("@build_bazel_rules_nodejs//internal/node:node.bzl", "nodejs_binary", "nodejs_test") | load("@build_bazel_rules_nodejs//internal/node:node.bzl", "nodejs_binary", "nodejs_test") | ||||||
| 
 | 
 | ||||||
| COMMON_MODULE_IDENTIFIERS = ["angular", "jasmine", "protractor"] | COMMON_MODULE_IDENTIFIERS = ["angular", "jasmine", "protractor", "fs", "Symbol"] | ||||||
| 
 | 
 | ||||||
| def ts_api_guardian_test(name, golden, actual, data = [], **kwargs): | def ts_api_guardian_test(name, golden, actual, data = [], **kwargs): | ||||||
|     """Runs ts_api_guardian |     """Runs ts_api_guardian | ||||||
|     """ |     """ | ||||||
|     data += [ |     data += [ | ||||||
|         "//tools/ts-api-guardian:lib", |         "@angular//tools/ts-api-guardian:lib", | ||||||
|         "//tools/ts-api-guardian:bin/ts-api-guardian", |         "@angular//tools/ts-api-guardian:bin/ts-api-guardian", | ||||||
|         "@bazel_tools//tools/bash/runfiles", |         "@bazel_tools//tools/bash/runfiles", | ||||||
|     ] |     ] | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -19,6 +19,9 @@ | |||||||
|     "minimist": "^1.2.0" |     "minimist": "^1.2.0" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|  |     "@types/diff": "^3.5.1", | ||||||
|  |     "@types/minimist": "^1.2.0", | ||||||
|  |     "@types/node": "^10.9.2", | ||||||
|     "chai": "^4.1.2", |     "chai": "^4.1.2", | ||||||
|     "jasmine": "^3.1.0", |     "jasmine": "^3.1.0", | ||||||
|     "typescript": "~3.0.1" |     "typescript": "~3.0.1" | ||||||
|  | |||||||
| @ -2,6 +2,18 @@ | |||||||
| # yarn lockfile v1 | # yarn lockfile v1 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | "@types/diff@^3.5.1": | ||||||
|  |   version "3.5.1" | ||||||
|  |   resolved "https://registry.yarnpkg.com/@types/diff/-/diff-3.5.1.tgz#30253f6e177564ad7da707b1ebe46d3eade71706" | ||||||
|  | 
 | ||||||
|  | "@types/minimist@^1.2.0": | ||||||
|  |   version "1.2.0" | ||||||
|  |   resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" | ||||||
|  | 
 | ||||||
|  | "@types/node@^10.9.2": | ||||||
|  |   version "10.9.2" | ||||||
|  |   resolved "https://registry.yarnpkg.com/@types/node/-/node-10.9.2.tgz#f0ab8dced5cd6c56b26765e1c0d9e4fdcc9f2a00" | ||||||
|  | 
 | ||||||
| ansi-styles@^3.2.1: | ansi-styles@^3.2.1: | ||||||
|   version "3.2.1" |   version "3.2.1" | ||||||
|   resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" |   resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user