Commit graph

12 commits

Author SHA1 Message Date
Joey Perrott
2050ffa691 build: migrate remaing esbuild and nodejs_binary usages to new toolchain (#62435)
Migrate the remaing usages of esbuild and nodejs_binary in adev to the new toolchain versions.

PR Close #62435
2025-07-03 08:09:33 +00:00
Joey Perrott
a024c4af77 build: migrate adev to use rules_angular based cli rules (#62435)
Use the @angular/cli rules from rules_angular instead of the npm package directly

PR Close #62435
2025-07-03 08:09:33 +00:00
Paul Gschwendtner
d081ef9b06 build: replace all ng_package with new rule from rules_angular (#61843)
Replaces all `ng_package` rule with the new rule from `rules_angular`.

PR Close #61843
2025-06-04 09:13:41 +00:00
Paul Gschwendtner
7fc14d7f26 build: fix adev first party linking and re-enable tests (#60825)
This commit attempts to finally fix the long-standing first-party
package linking issue with the rather tricky `rules_nodejs` toolchain.

I've verified that no version of e.g. `@angular/core` ends up in the
Bazel sandbox. This is achieved by also filtering transitive Angular
deps for first-party linked packages. e.g. `@angular/docs`.

In addition, `@angular/docs` accidentally ended up bundling parts of
Angular core because it relied on an entry-point that was not part of
the "well known externals". As part of the ongoing `ng_package`
update/rewrite, we should look into disabling bundling of ANY external
dependency/module. This is possible because we use relative imports
inside APF packages as of recently!

This commit should allow us to develop and continue new compiler
features, without having to temporarily (or longer) disable all
`angular.dev` unit tests!

Fixes #54858.

PR Close #60825
2025-04-10 14:19:52 +00:00
Matthieu Riegler
f15ccb94b9 docs(docs-infra): enable tslint (#58961)
PR Close #58961
2024-12-05 16:03:35 -08:00
Joey Perrott
3bdead1b2f refactor(docs-infra): migrate api-gen from dev-infra into the repo (#57241)
Move the api-gen pipeline into the shared-docs directory.

PR Close #57241
2024-08-05 17:06:29 +00:00
Joey Perrott
2d8635d29d refactor(docs-infra): migrate @angular/docs from dev-infra into adev directory (#57132)
To increase the ease of development we are moving @angular/docs into the adev directory within this repo. While
we are doing this to improve our development experience in the short term, efforts are also in place
to maintain a division between this @angular/docs (shared) code and adev itself, so that it can be extracted
back out in the future when components is ready to leverage it as well.

PR Close #57132
2024-07-30 15:51:26 +00:00
Joey Perrott
0bd55a684f refactor(docs-infra): complete removal of aio directory (#56496)
Finish removal of aio directory as it is no longer used or relied upon.

PR Close #56496
2024-06-18 12:26:00 -07:00
Joey Perrott
7208d05a38 refactor(docs-infra): move windows-chromium-path to adev (#56496)
Move windows-chromium-path help from aio to adev

PR Close #56496
2024-06-18 12:25:59 -07:00
Alan Agius
b5ab2ef269 build: fix adev build (#55662)
adev is broken at head

PR Close #55662
2024-05-03 10:20:58 -07:00
Paul Gschwendtner
3471c41ca9 build(docs-infra): fix playground lezer parsing (#55349)
When we started fixing the version mismatch with local 1st-party
packages, we also re-routed all dependencies like `@lezer/javascript`
into `adev/node_modules`. This works fine, but results in a different
version mismatch because the codemirror dependencies may resolve the
Angular version from `/node_modules`- causing some subtle complex
runtime error.

This commit fixes this by only re-routing dependencies that have
dependency on e.g. `@angular/core` into `adev/node_modules`.

Fixes #55298.

PR Close #55349
2024-04-15 16:36:39 +02:00
Paul Gschwendtner
f82898436e build(docs-infra): fix version mismatch of local built packages (#55282)
There is quite some trickery going on with the adev build related to
local packages:

- Adev builds using npm packages from `/node_modules`
- At runtime, we are adding `HEAD` packages for e.g. `@angular/core` to
  the bundles.
- At build time, the CLI, or Angular devkit may accidentally resolve to
  `@angular/core` from `/node_modules/`— which is the core version from
  npm, transitively installed via `@angular/docs`.

This causes a version mismatch, leading to issues like:

- CLI throwing because of a mismatch. https://github.com/angular/angular/issues/54858#issuecomment-2047188739
- Compiler changes not being picked up. https://github.com/angular/angular/issues/54858#issuecomment-2041322427

This commit attempts to fix this by:

- Linking all Angular `HEAD` packages into `adev/node_modules`. The
  current logic attempts to link into `/node_modules`, but this does not
  override existing `@angular/core`!
- Linking all direct external NPM packages, like
  `@angular_devkit/build-angular` into `adev/node_modules` without their
  transitive deps. This allows proper resolution of e.g. compiler as
  node looks in `adev/node_modules` first, and falls back for the rest
  to the execroot `node_modules`, or symlink target destination (if
  `preserveSymlinks=false`).

Note: This is still not 100% ideal because a direct external NPM
dependency may have a transitive dependency that has another transitive
dependency on `@angular/core`. In those cases, the may be a conflict
that is not resolvable until we switch to a Bazel toolchain with better
first party resolution support.

PR Close #55282
2024-04-10 10:48:38 -07:00