diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx b/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx index 2f4175d70518..f7b0b1fa6667 100755 --- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx +++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx @@ -2,7 +2,9 @@ # Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml"). # This file should be checked into version control along with the pnpm-lock.yaml file. .npmrc=-2023857461 -package.json=2055569205 -pnpm-lock.yaml=1847443622 -pnpm-workspace.yaml=1711114604 -yarn.lock=86020133 +package.json=1658609850 +packages/angular_devkit/architect/package.json=-107274537 +packages/angular_devkit/core/package.json=339935828 +pnpm-lock.yaml=1613268280 +pnpm-workspace.yaml=-1853274682 +yarn.lock=1185228888 diff --git a/WORKSPACE b/WORKSPACE index a1de5e2f5f22..afc2bcf6ee06 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -186,6 +186,8 @@ npm_translate_lock( data = [ "//:package.json", "//:pnpm-workspace.yaml", + "//packages/angular_devkit/architect:package.json", + "//packages/angular_devkit/core:package.json", ], npmrc = "//:.npmrc", patches = { @@ -225,3 +227,15 @@ http_file( sha256 = "5a5c46846ecda83e05b9da26f1672ad51c59bce08fed88419850d0e29c993b30", urls = ["https://raw.githubusercontent.com/devversion/rules_angular/4b7532ba2b29078d005899cd15b415593d03cceb/dist/worker.mjs"], ) + +http_archive( + name = "aspect_rules_jasmine", + sha256 = "0d2f9c977842685895020cac721d8cc4f1b37aae15af46128cf619741dc61529", + strip_prefix = "rules_jasmine-2.0.0", + url = "https://github.com/aspect-build/rules_jasmine/releases/download/v2.0.0/rules_jasmine-v2.0.0.tar.gz", +) + +load("@aspect_rules_jasmine//jasmine:dependencies.bzl", "rules_jasmine_dependencies") + +# Fetch dependencies which users need as well +rules_jasmine_dependencies() diff --git a/package.json b/package.json index d9630626309e..8c71bc902179 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "@types/http-proxy": "^1.17.4", "@types/ini": "^4.0.0", "@types/jasmine": "~5.1.0", + "@types/jasmine-reporters": "^2", "@types/karma": "^6.3.0", "@types/less": "^3.0.3", "@types/loader-utils": "^2.0.0", @@ -141,6 +142,7 @@ "istanbul-lib-instrument": "6.0.3", "jasmine": "^5.0.0", "jasmine-core": "~5.5.0", + "jasmine-reporters": "^2.5.2", "jasmine-spec-reporter": "~7.0.0", "jsonc-parser": "3.3.1", "karma": "~6.4.0", diff --git a/packages/angular_devkit/architect/BUILD.bazel b/packages/angular_devkit/architect/BUILD.bazel index 3401124c1946..d6b2748015f3 100644 --- a/packages/angular_devkit/architect/BUILD.bazel +++ b/packages/angular_devkit/architect/BUILD.bazel @@ -4,13 +4,15 @@ # found in the LICENSE file at https://angular.dev/license load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package") -load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") -load("//tools:defaults2.bzl", "npm_package", "ts_project") +load("@npm2//:defs.bzl", "npm_link_all_packages") +load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project") load("//tools:ts_json_schema.bzl", "ts_json_schema") +package(default_visibility = ["//visibility:public"]) + licenses(["notice"]) -package(default_visibility = ["//visibility:public"]) +npm_link_all_packages() ts_json_schema( name = "builder_input_schema", @@ -66,10 +68,9 @@ ts_project( data = JSON_FILES, module_name = "@angular-devkit/architect", deps = [ + ":node_modules/@angular-devkit/core", "//:node_modules/@types/node", "//:node_modules/rxjs", - "//packages/angular_devkit/core:core_rjs", - "//packages/angular_devkit/core/node:node_rjs", ], ) @@ -79,16 +80,16 @@ ts_project( srcs = glob(["src/**/*_spec.ts"]), deps = [ ":architect_rjs", + ":node_modules/@angular-devkit/core", "//:node_modules/@types/jasmine", "//:node_modules/rxjs", "//packages/angular_devkit/architect/testing:testing_rjs", - "//packages/angular_devkit/core:core_rjs", ], ) -jasmine_node_test( +jasmine_test( name = "architect_test", - srcs = [":architect_test_lib"], + data = [":architect_test_lib_rjs"], ) # @external_begin diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fffae954d726..8545f4f91088 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -160,6 +160,9 @@ importers: '@types/jasmine': specifier: ~5.1.0 version: 5.1.5 + '@types/jasmine-reporters': + specifier: ^2 + version: 2.5.3 '@types/karma': specifier: ^6.3.0 version: 6.3.9 @@ -310,6 +313,9 @@ importers: jasmine-core: specifier: ~5.5.0 version: 5.5.0 + jasmine-reporters: + specifier: ^2.5.2 + version: 2.5.2 jasmine-spec-reporter: specifier: ~7.0.0 version: 7.0.0 @@ -520,6 +526,39 @@ importers: puppeteer: built: true + packages/angular_devkit/architect: + dependencies: + '@angular-devkit/core': + specifier: 0.0.0-PLACEHOLDER + version: link:../core + rxjs: + specifier: 7.8.1 + version: 7.8.1 + + packages/angular_devkit/core: + dependencies: + ajv: + specifier: 8.17.1 + version: 8.17.1 + ajv-formats: + specifier: 3.0.1 + version: 3.0.1(ajv@8.17.1) + chokidar: + specifier: ^4.0.0 + version: 4.0.3 + jsonc-parser: + specifier: 3.3.1 + version: 3.3.1 + picomatch: + specifier: 4.0.2 + version: 4.0.2 + rxjs: + specifier: 7.8.1 + version: 7.8.1 + source-map: + specifier: 0.7.4 + version: 0.7.4 + packages: /@ampproject/remapping@2.3.0: @@ -4537,6 +4576,12 @@ packages: '@types/istanbul-lib-report': 3.0.3 dev: true + /@types/jasmine-reporters@2.5.3: + resolution: {integrity: sha512-8aojAUdgdiD9VQbllBJb/9gny3lOjz9T5gyMcbYlKe6npwGVsarbr8v2JYSFJSZSuFYXcPVzFG2lLX3ib0j/DA==} + dependencies: + '@types/jasmine': 5.1.5 + dev: true + /@types/jasmine@5.1.5: resolution: {integrity: sha512-SaCZ3kM5NjOiJqMRYwHpLbTfUC2Dyk1KS3QanNFsUYPGTk70CWVK/J9ueun6zNhw/UkgV7xl8V4ZLQZNRbfnNw==} dev: true @@ -5694,7 +5739,6 @@ packages: optional: true dependencies: ajv: 8.17.1 - dev: true /ajv-keywords@3.5.2(ajv@6.12.6): resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} @@ -5747,7 +5791,6 @@ packages: fast-uri: 3.0.5 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - dev: true /ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} @@ -6559,7 +6602,6 @@ packages: engines: {node: '>= 14.16.0'} dependencies: readdirp: 4.0.2 - dev: true /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -8168,7 +8210,6 @@ packages: /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true /fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} @@ -8215,7 +8256,6 @@ packages: /fast-uri@3.0.5: resolution: {integrity: sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q==} - dev: true /fastq@1.18.0: resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} @@ -9915,7 +9955,6 @@ packages: /json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - dev: true /json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} @@ -9955,7 +9994,6 @@ packages: /jsonc-parser@3.3.1: resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} - dev: true /jsonfile@3.0.1: resolution: {integrity: sha512-oBko6ZHlubVB5mRFkur5vgYR1UyqX+S6Y/oCfLhqNdcc2fYFlDpIoNc7AfKS1KOGcnNAkvsr0grLck9ANM815w==} @@ -11806,7 +11844,6 @@ packages: /picomatch@4.0.2: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} - dev: true /pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} @@ -12408,7 +12445,6 @@ packages: /readdirp@4.0.2: resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} engines: {node: '>= 14.16.0'} - dev: true /real-require@0.2.0: resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} @@ -12539,7 +12575,6 @@ packages: /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - dev: true /require-main-filename@2.0.0: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} @@ -12771,7 +12806,6 @@ packages: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: tslib: 2.8.1 - dev: true /safe-array-concat@1.1.3: resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==} @@ -13399,7 +13433,6 @@ packages: /source-map@0.7.4: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} engines: {node: '>= 8'} - dev: true /spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} @@ -14044,7 +14077,6 @@ packages: /tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - dev: true /tsscmp@1.0.6: resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index d05a7e7dc84a..48350d1ac507 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,4 @@ packages: - . + - packages/angular_devkit/architect + - packages/angular_devkit/core diff --git a/tools/defaults2.bzl b/tools/defaults2.bzl index aa2ff22e383a..8400da44268e 100644 --- a/tools/defaults2.bzl +++ b/tools/defaults2.bzl @@ -1,3 +1,4 @@ +load("@aspect_rules_jasmine//jasmine:defs.bzl", _jasmine_test = "jasmine_test") load("//tools:interop.bzl", _ts_project = "ts_project") load("//tools/bazel:npm_package.bzl", _npm_package = "npm_package") @@ -6,3 +7,11 @@ def ts_project(**kwargs): def npm_package(**kwargs): _npm_package(**kwargs) + +def jasmine_test(**kwargs): + _jasmine_test( + node_modules = "//:node_modules", + chdir = native.package_name(), + args = ["**/*.js"], + **kwargs + ) diff --git a/yarn.lock b/yarn.lock index 119d13f38c96..25b196053f28 100644 --- a/yarn.lock +++ b/yarn.lock @@ -357,6 +357,7 @@ __metadata: "@types/http-proxy": "npm:^1.17.4" "@types/ini": "npm:^4.0.0" "@types/jasmine": "npm:~5.1.0" + "@types/jasmine-reporters": "npm:^2" "@types/karma": "npm:^6.3.0" "@types/less": "npm:^3.0.3" "@types/loader-utils": "npm:^2.0.0" @@ -407,6 +408,7 @@ __metadata: istanbul-lib-instrument: "npm:6.0.3" jasmine: "npm:^5.0.0" jasmine-core: "npm:~5.5.0" + jasmine-reporters: "npm:^2.5.2" jasmine-spec-reporter: "npm:~7.0.0" jsonc-parser: "npm:3.3.1" karma: "npm:~6.4.0" @@ -4976,7 +4978,16 @@ __metadata: languageName: node linkType: hard -"@types/jasmine@npm:~5.1.0": +"@types/jasmine-reporters@npm:^2": + version: 2.5.3 + resolution: "@types/jasmine-reporters@npm:2.5.3" + dependencies: + "@types/jasmine": "npm:*" + checksum: 10c0/9e895e1b258bf59fbd7bb8c9079681ad48e1035c33c36e3ab0aa2034fd87e95abf71ef848996c21ca9ecd5a72ce2897cc26162fedf12e0ebaad9969f138a84a4 + languageName: node + linkType: hard + +"@types/jasmine@npm:*, @types/jasmine@npm:~5.1.0": version: 5.1.5 resolution: "@types/jasmine@npm:5.1.5" checksum: 10c0/904a2a6bfe7478478ec73d502708dc4b4cc46fa554c459cee3e0be01efda96fba7d26ef8bec2f246d9163cc517407b135acabcf6f076c11aa514ed9b79bc67e5 @@ -11913,7 +11924,7 @@ __metadata: languageName: node linkType: hard -"jasmine-reporters@npm:~2.5.0": +"jasmine-reporters@npm:^2.5.2, jasmine-reporters@npm:~2.5.0": version: 2.5.2 resolution: "jasmine-reporters@npm:2.5.2" dependencies: