87 Commits

Author SHA1 Message Date
Paul Gschwendtner
9dd3f0344f
Further clean-up rules_nodejs npm workspace and remove yarn.lock (#29779)
* build: disconnect `@npm` workspace from main project

This will speed up significantly as we don't need to fetch all
dependencies again just for the `@npm` repository that is at this point
only leveraged by the `ng_package` rule for some of its dependencies.

This commit allows us to drop the `yarn.lock` and Aspect lock files, and
allows us to independently migrate `ng_package` to `rules_js`.

It also allows us to drop the `_rjs` TS interop layer in follow-up commits.

* build: drop `_rjs` suffix from `ts_project` targets

We don't need the `ts_project` interop in principle
at this point. We only have one remaining instance left for the SSR
`ng_package` integration. This commit cleans up all usages.

* build: remove yarn

* build: avoid duplicated dependencies at top-level

`rules_js` seems to be sensitive if there are similar versions of the same
package installed, but with differently matched peer dependencies. This
is fine because we can (and should long-term) move those dependencies to
their package-local `package.json` files. This commit unblocks the
migration and highlights how we can move deps to the individual packages
in the future.

* build: update checkout github action

This will allow us to use pnpm.

* build: update node to avoid strict-engines error caused by `npm`

Avoids:

```
Lockfile is up to date, resolution step is skipped
 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

Your Node version is incompatible with "npm@11.2.0".

Expected version: ^20.17.0 || >=22.9.0
Got: v20.11.1
```

Note that we won't update the WORKSPACE test version as that would mean
we need to update the Node engines for shipped packages; and we can't do
this right now without introducing a breaking change.

* build: fix missing dependency for spec bundling

The beasties JS sources weren't available for bundling in the
`bazel-bin`, and this surfaced in RBE. This commit fixes this.
2025-03-11 10:05:52 +01:00
Joey Perrott
c9273f8b85 build: add @types/node to assorted locations where node types are being relied on and currently obtained transitively. 2025-02-19 12:53:55 -05:00
Joey Perrott
33ed6e875e refactor: move builtin module imports to use node: prefix imports 2025-02-14 11:09:23 -08:00
Paul Gschwendtner
74162d54b2 build: migrate @angular-devkit/architect-cli tests to rules_js
Migrates `@angular-devkit/architect-cli` jasmine rules to the
native `rules_js` variant.
2025-01-17 16:29:45 +01:00
Paul Gschwendtner
4fee94a96c build: rename //:root_modules to //:node_modules.
This is necessary as `rules_js` requires this "common name" when dealing
with Yarn workspaces, linking first party dependencies automatically.

In the future, we may be able to send a PR to `rules_js` to support a
custom name somehow.
2025-01-15 19:20:40 +01:00
Paul Gschwendtner
ea79fabc39 build: migrate @angular-devkit/architect-cli to npm_package
Updates to the `rules_js` npm archive rule, as part of the overall
migration effort.
2025-01-14 16:06:07 +01:00
Paul Gschwendtner
a8335cf950 build: never use interop targets for ts compilations
* Removes `interop_deps` from the `ts_project` interop macro.
* Keeps `_rjs` suffix for now as we still need the interop targets for
  e.g. `jasmine_node_test` and the `rules_nodejs` linker.

In follow-ups we can remove the suffix, and interop layer.
2025-01-09 09:42:06 +01:00
Paul Gschwendtner
f728f2f526 build: migrate angular-devkit/architect-cli to ts_project
This migrates more package code to `ts_project` of `rules_js`.
2024-12-17 11:47:09 -05:00
Ash Ramirez
434a3740f0 refactor(@angular/cli): update aio links -> adev links
Updates for all angular.io links to the new angular.dev domain. Additionally, adjustment to new resources where the equivalent does not exist on the new site (e.g. Tour of Heroes tutorial)
2024-06-06 11:12:06 +02:00
Angular Robot
cb0c22ee9b build: update all non-major dependencies 2023-11-08 15:04:56 +01:00
Angular Robot
7bf5cd8e7b build: update all non-major dependencies 2023-10-18 20:47:49 -07:00
Alan Agius
8095268fa4 build: update to rxjs 7
G3 is now using RXJS version 7 which makes it possible for the CLI to also be updated to RXJS 7.

NB: this change does not remove all usages of the deprecated APIs.

Closes #24371
2023-02-16 14:59:40 +00:00
Charles Lyding
7f93735e98 build: use bazel to perform release builds
When performing a release via the dev-infra `ng-dev` tooling, the release
builds for the packages that will be published are now performed using bazel.
Prior to this, the release builds were performed using a custom build script
that programmatically invoked TypeScript APIs. The Bazel build and discovery
process for the releasable packages is performed by a script that is based on
the scripts from components and framework repositories. Several small modifications
were performed to match the behavior and structure of the cli repository:
* Use of `packages` as the source root in the bazel query
* Use of `pkg_npm` rule in the bazel query
* Partial transition to native Node.js `fs` APIs instead of `shelljs`
* Directory creation per package when copying output (supports multiple package scopes)
* Copying of archives (tgz) for each package

The snapshot and local build capabilities are not modified as part of this change
but will be merged in a followup as part of a larger transition to use bazel
throughout the package build process.
2023-01-05 03:21:58 +00:00
Charles Lyding
b2add316e7 build: remove unneeded BUILD file licenses rule comments 2022-09-13 10:33:49 -07:00
Angular Robot
36b68a5195 build: update all non-major dependencies 2022-08-05 16:47:36 -07:00
Alan Agius
6258153d01 build: update all non-major dependencies
(cherry picked from commit db047b22e31ee196792636ee3349e3033ded0f49)
2022-08-04 11:27:22 -07:00
Charles Lyding
17a91a058f refactor(@angular-devkit/architect-cli): remove rxjs as a dependency
`rxjs` was only a dependency for the `tap` operator which can be replaced
by accessing the result object returned from awaiting the builder output
`Observable` which is already converted to a Promise.
2022-07-18 12:52:38 -04:00
Alan Agius
a69000407c refactor: clean up old ansi-colors castings
This has been fixed in https://github.com/doowb/ansi-colors/pull/44
2022-06-28 08:49:44 -04:00
Charles Lyding
1b9880c5cb refactor(@angular-devkit/architect): assert catch clause variable type before usage
Prepares the `@angular-devkit/architect` package for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
2022-06-14 11:28:21 +02:00
Renovate Bot
0fc1c33a7c build: update all non-major dependencies 2022-05-19 15:00:48 -07:00
Renovate Bot
9fd042dcce build: update all non-major dependencies 2022-05-16 09:13:32 -04:00
Alan Agius
ac98f25a31 build: update @types/yargs-parser to 21.0.0 2022-03-03 07:25:24 +01:00
Alan Agius
c7556b62b7 refactor(@angular-devkit/architect-cli): replace parser with yargs-parser
BREAKING CHANGE: camel case arguments are no longer allowed.
2022-03-02 10:28:37 -08:00
Derek Cormier
4721b2796c build: correctly stamp experimental packages in bazel build 2022-01-21 12:50:53 +01:00
Derek Cormier
c2737dd51a build: use placeholder version for stamping 2022-01-12 10:02:23 -08:00
Derek Cormier
4b5c52b0d8 build: perform package.json substitutions in bazel build 2022-01-10 10:25:49 -08:00
Derek Cormier
31801c1a1a build: reproduce original package structure using bazel 2021-12-10 11:06:41 +01:00
Derek Cormier
83b7390c68 build: add pkg_npm rules for remaining packages 2021-11-30 12:06:07 -08:00
Charles Lyding
a7de97e485 build: add Bazel ts_library rule package_name properties to all packages
rules_nodejs 4 requires that a package_name property be specified within a ts_library rule for the output to be linked into the package repository. Failing to add the property can cause test failures due to unresolved packages.
2021-08-26 07:30:44 +02:00
Renovate Bot
86dd832828 build: update all non-major dependencies 2021-08-05 08:03:51 +02:00
Renovate Bot
fc78658cb5 build: update all non-major dependencies 2021-07-08 11:30:46 -04:00
Charles Lyding
b3d7080147 build: enable esModuleInterop TypeScript option
The `esModuleInterop` option is recommended to be enable by TypeScript and corrects several assumptions TypeScript would otherwise make when importing CommonJS files.
This option change helps ensure compatibility as packages move towards ESM.
Reference: https://www.typescriptlang.org/tsconfig#esModuleInterop
2021-06-13 11:45:55 -04:00
Charles Lyding
c1512e4274 build: update files to be eslint compliant
All TypeScript files have been updated to pass the new eslint-based linting checks. eslint compatible disabling comments have also been added in place of the previous tslint comments.
2021-05-03 07:31:02 -04:00
Charles Lyding
37a06a7c37 build: format all files
All files are now formatted using the ng-dev tools via prettier.
2021-04-28 16:05:49 -07:00
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Renovate Bot
626d67fa2c build: update symbol-observable to version 4.0.0 2021-04-19 20:30:48 +02:00
Charles Lyding
1dc9754bb2 docs(@angular-devkit/architect-cli): add a README file for the package
A `README.md` file is now included in the package with an overview of the utility and the help output of the command.
2021-04-19 09:43:25 -05:00
Renovate Bot
c2c9a4169c build: update rxjs to version 6.6.7 2021-03-29 08:20:35 -06:00
Renovate Bot
02db14ae95 build: update rxjs to version 6.6.6 2021-02-25 13:59:51 -05:00
Renovate Bot
a84c18b982 build: update symbol-observable to version 3.0.0 2020-11-03 17:40:55 -06:00
Renovate Bot
b9c5670dae build: update symbol-observable to version 2.0.3 2020-10-01 08:44:21 -04:00
Renovate Bot
efb97c87f0 build: update symbol-observable to version 2.0.2 2020-09-30 09:08:54 +02:00
Alan Agius
c6aeb60f4d fix(@angular-devkit/architect-cli): remove minimist _ from options
Closes #18889
2020-09-25 18:20:06 +02:00
Alan Agius
622d08447d refactor: use ansi-colors instead of removed terminal utils 2020-09-10 20:19:33 +02:00
Renovate Bot
8dac017e23 build: update rxjs to version 6.6.3 2020-09-07 14:44:16 +02:00
Renovate Bot
2aa01ac2ca build: update symbol-observable to version 2.0.1 2020-09-05 11:59:41 +02:00
Renovate Bot
b5560ebebe build: update symbol-observable to version 2.0.0 2020-09-03 00:20:40 +03:00
Alan Agius
e40c72a8dc feat(@angular-devkit/architect-cli): show warning when using deprecated options 2020-08-17 18:18:24 +02:00
Renovate Bot
36668a36a7 build: update rxjs to version 6.6.2 2020-07-31 09:52:10 +02:00
Alan Agius
a85ba990eb refactor: clean up several files
Most of these changes are requires for TS 4 update
2020-07-22 12:56:34 +01:00