Commit graph

2474 commits

Author SHA1 Message Date
Milo
33715b098a refactor(devtools): add dagre-d3-es (#61538)
add dagre-d3-es for use by the signals graph pane. Additionally, add a
patch so that html labels display correctly within d3-zoom

PR Close #61538
2025-05-21 09:56:40 +00:00
Joey Perrott
7f6bb91c5d build: update compiler-cli to not be stamped when used for the compiler in ng_project (#61535)
The compiler-cli package needs to be unstamped and will the resulting generated code will be stamped as expected.

PR Close #61535
2025-05-21 09:16:06 +00:00
Alan Agius
8f65223bd8 fix(core): update min Node.js support to 20.19, 22.12, and 24.0 (#61499)
This is to match the versions of the Angular CLI.

See: https://github.com/angular/angular-cli/pull/30349

PR Close #61499
2025-05-20 14:15:13 +00:00
Joey Perrott
8ef41f3e14 build: migrate adev to use ng_project (#61319)
Move all of adev to use ng_project instead of ng_module

PR Close #61319
2025-05-20 08:48:29 +00:00
Joey Perrott
abdfbefe74 build: use an unstamped version of compiler-cli for running the angular compiler in ng_project (#61479)
Use an unstamped version of the compiler when it runs in `ng_project` as it will get stamped appropriately
whenever the generated code gets stamped after its usage."

PR Close #61479
2025-05-20 08:46:34 +00:00
Joey Perrott
1818a84209 build: migrate benchpress to use rules_js (#61486)
Use ts_project to build targets in benchpress package

PR Close #61486
2025-05-20 08:44:53 +00:00
Kristiyan Kostadinov
92cbd7a412 build: fix symbol extractor script (#61407)
* Fixes that the symbol extractor approval script was broken after some recent build changes.
* Fixes the `run_all_symbol_extractor_tests` script which wasn't resolving any targets, because the rule name changed.

PR Close #61407
2025-05-16 13:59:09 +00:00
Paul Gschwendtner
b763059bdd build: migrate packages/core/schematics to ts_project (#61370)
Migrates `packages/core/schematics` to `ts_project`. As part of this,
this commit cleans up some of the mixed module types and tsconfigs in
the folder. A single tsconfig (and it's test variant) are now used.

For the shipped schematics, we explicitly use the `.cjs` extension, so
that the bundles are properly recognized as CommonJS; even if they are
part of the `type: module` `@angular/core` package.

The `package.json` with `type: commonjs` is removed from
`packages/core/schematics` as it's no longer needed given the explicit
extension & caused issues as schematics are compiled with ESM but are
only later bundled for shipping & some tests as ESM.

PR Close #61370
2025-05-16 11:02:07 +00:00
Paul Gschwendtner
8cd0e3f24c build: update legacy ESM interop rules to support explicit .js entrypoints (#61370)
As we migrate more and more code to `ts_project`, we are ending up with
`.js` file extensions (ts_library did generate `.mjs` magically).

Since we don't want to get into the business of migrating
`nodejs_binary` targets at this point (in some cases we might)— we
should support pointing to such files.

PR Close #61370
2025-05-16 11:02:07 +00:00
Paul Gschwendtner
d067dff394 build: migrate more targets of @angular/core to ts_project (#61370)
Migrates more targets of `@angular/core` to `ts_project`. Remaining are:

 - tests
 - schematics

PR Close #61370
2025-05-16 11:02:07 +00:00
Jan Martin
f1fc574920 docs: call out the available variables in track expressions (#61252)
At least to me it was surprising that values from the surrounding
"lexical-ish" scope weren't available in `track <expr>`.

PR Close #61252
2025-05-16 07:51:09 +00:00
Joey Perrott
68d774f49d build: use common macro to define tsconfig for service worker (#61341)
Define the tsconfig for service worker instead of manually including the tsconfig on each target

PR Close #61341
2025-05-14 10:43:25 -07:00
Paul Gschwendtner
925b923e85 build: add modified version of tsec that can work with interop (#61275)
As we roll out more PRs that migrate to `ts_project`, we need to make
sure that we don't break existing `tsec` targets. This PR copies the
original `tsec` Starlark code and adjusts it to work with the interop.

Note that we don't patch as this would unnecessarily complicate this
file that only exists during migration. Long-term, after migration, we
either need to consider switching to the new ESLint plugin that is being
worked on (I'm in contact with the team), or we send a CL to update the
Tsec Starlark code to keep our changes minimal and avoid scope increase.

PR Close #61275
2025-05-14 12:01:51 +00:00
Paul Gschwendtner
c123125ca1 build: fix ts_project interop to properly create linker mappings (#61275)
This commit fixes that the interop targets weren't properly creating
linker mappings in some cases. This could break spec bundling.

PR Close #61275
2025-05-14 12:01:51 +00:00
Paul Gschwendtner
b71c35a6b5 refactor: update packages/core:{core,src} to ts_project (#61275)
Updates `packages/core:core` and `packages/core/src/...` to `ts_project`
of `rules_js`.

PR Close #61275
2025-05-14 12:01:51 +00:00
Paul Gschwendtner
397f9987ef build: support new ng_project rule (#61275)
Supports the `ng_project` rule with the local compiler-cli version
from HEAD.

PR Close #61275
2025-05-14 12:01:51 +00:00
Paul Gschwendtner
810b0a7e5c refactor: add explicit types for exports relying on inferred call return type (#61312)
As part of the Bazel toolchain migration we noticed that implicit types
generated by the TypeScript compiler sometimes end up referencing types
from other packages (i.e. cross-package imports).

These imports currently work just because the Bazel `ts_library` and
`ng_module` rules automatically inserted a `<amd-module
name="@angular/x" />` into `.d.ts` of packages. This helped TS figure
out how to import a given file. Notably this is custom logic that is not
occuring in vanilla TS or Angular compilations—so we will drop this
magic as part of the toolchain cleanup!

To improve code quality and keep the existing behavior working, we are
doing the following:

- adding a lint rule that reduces the risk of such imports breaking. The
  failure scenario without the rule is that API goldens show unexpected
  diffs, and types might be duplicated in a different package!

- keeping the `<amd-module` headers, but we manually insert them into
  the package entry-points. This should ensure we don't regress
  anywhere; while we also improved general safety around this above.

Long-term, isolated declarations or a lint rule from eslint-typescript
can make this even more robust.

PR Close #61312
2025-05-13 22:45:18 +00:00
Joey Perrott
5f1c08d75f build: migrate adev shared-docs package to use ts_project (#61193)
Migrate the build rules for shared docs to use ts_project

PR Close #61193
2025-05-09 16:30:05 +00:00
Paul Gschwendtner
10bc80a788 build: migrate compiler-cli/src/ngtsc to ts_project (#61181)
Migrates all of `compiler-cli/src/ngtsc` to `ts_project`. This change
was generated using Gemini.

PR Close #61181
2025-05-09 15:59:46 +00:00
Paul Gschwendtner
81566ec1dc build: migrate manual_api_docs to rules_js (#61181)
Migrates `manual_api_docs` to `rules_js`. Since compiler CLI is ESM
compiled but doesn't have extensions, we can either bundle or simply use
the dependency as type only. This is easier and sufficient for this
use-case.

PR Close #61181
2025-05-09 15:59:46 +00:00
Paul Gschwendtner
54e785683a build: prepare for compiler-cli to be using ts_project (#61181)
Prepare the compiler-cli package for being ready for migration
to `ts_project`.

PR Close #61181
2025-05-09 15:59:46 +00:00
Paul Gschwendtner
a1bf58e32e build: migrate symbol-extractor to ts_project (#61156)
Migrates the symbol-extractor code to `ts_project`.

PR Close #61156
2025-05-07 11:28:59 -07:00
Paul Gschwendtner
032b802f54 build: remove irrelevant madge circular deps tests (#61156)
We don't need this tooling anymore because we are already validating
that there are no circular dependencies via the `ng-dev` tooling that
checks `.ts` files directly.

Also these tests never actually failed to my knowledge.

PR Close #61156
2025-05-07 11:28:59 -07:00
Andrew Scott
0c925af2dd test(router): This commit removes ZoneJS from the router tests (#61078)
There is nothing in the Router that requires ZoneJS and we do not need
`fakeAsync` as a mock clock. We can instead use any mock clock implementation
to speed up test execution.

This removes ZoneJS completely from the bundle of the Router tests.
ZoneJS causes the stacks to be unreadable when combined with the massive
rxjs stack in the router transition.

PR Close #61078
2025-05-05 08:55:01 -07:00
Joey Perrott
72b7de0d73 build: set up ts_project interop for rules_js migration (#61087)
The `ts_project` interop rule that we've built was also used in the
Angular CLI migration, and it allows us to mix `ts_project` and
`ts_library` targets; enabling an incremental migration. Additionally
set up the `ng_project` to replace `ng_module`.

PR Close #61087
2025-05-02 09:12:23 -07:00
Matthieu Riegler
8f803aa81a build: Run browsers tests without platform-browser-dynamic (#60937) (#61060)
Use the regular `platform-browser` providers instead.

PR Close #61060
2025-04-30 08:21:02 -07:00
Jessica Janiuk
867f389a98 Revert "build: Run browsers tests without platform-browser-dynamic (#60937)" (#61059)
This reverts commit b896ca8ed5.

PR Close #61059
2025-04-30 12:21:01 +02:00
Matthieu Riegler
b896ca8ed5 build: Run browsers tests without platform-browser-dynamic (#60937)
Use the regular `platform-browser` providers instead.

PR Close #60937
2025-04-29 12:10:53 -07:00
Andrew Kushnir
a16ba58e2b build: add build step to the symbol extractor script (#60573)
This commit adds a step where we build all found targets in parallel, which speeds up the process of completing symbol extractor test/update.

PR Close #60573
2025-03-27 18:13:04 +00:00
Matthieu Riegler
9ca2a58157 build: unpatch @angular/build (#60231)
This requires to bump the CLI to v20

PR Close #60231
2025-03-21 14:33:59 -07:00
Jessica Janiuk
4b312aeb43 ci: fix over extraction of init symbols in symbol tests (#60493)
This omits including any init_ symbols in the symbol tests that were unnecessary and causing friction.

PR Close #60493
2025-03-20 12:31:34 -07:00
Kristiyan Kostadinov
2637a0cdad build: enable strict templates and type checking of host bindings (#60481)
Enables strict templates and type checking of host bindings against our own code.

PR Close #60481
2025-03-20 11:55:52 -07:00
Paul Gschwendtner
a02e270fcb build: properly compile tests in core with Angular compiler (#60268)
Previously we never could use relative imports to import e.g. `Component`
in e.g. the `core/tests/bundling` folder. This was necessary because otherwise the
Angular compiler wouldn't process those files as it wouldn't recognize
the Angular decorator as the one from `@angular/core`.

Notably this still isn't a large issue because relative imports still
work for most core tests, that are JIT compiled!

For bundling tests though, or some smaller targets, our new upcoming
guidelines for using relative imports inside the full package; fall
apart. This commit unblocks this effort and allows us to use relative
imports in all tests of `packages/core`. This is achieved by leveraging
the existing `isCore` functionality of the compiler, and fixing a few
instances that were missing before.

PR Close #60268
2025-03-07 11:00:47 -08:00
Alan Agius
45f899a272 refactor: replace fast-glob usage with tinyglobby (#60264)
Usage of the `fast-glob` package has been replaced with the `tinyglobby` package. The change reduces the number of transitive dependencies related to these packages from 17 to 2 while also maintaining equivalent functionality. This was also changed in the Angular CLI packages.

PR Close #60264
2025-03-07 10:57:23 -08:00
Matthieu Riegler
e4ef74dbde build: temporarily patch @angular/build (#60024)
This is to allow building adev with the fw version bumped to v20 (CLI v20 isn't released yet)

PR Close #60024
2025-02-24 17:10:04 -05:00
Jeremy Elbourn
c38ea0767e docs: clarify that @for doesn't support break/continue (#59533)
We recently saw some confusion around this, so it's worth adding a
sentence to clarify

PR Close #59533
2025-01-15 12:00:21 -05:00
Sandeep Salwan
e702934080 docs: fix typos in let.md (#59526)
PR Close #59526
2025-01-15 09:44:25 -05:00
Johnson Chu
a6cdbec09f refactor: remove unnecessary TSLint rule flags (#59365)
There are many TSLint rule flags in the source code that have no effect, and they can be safely removed to keep the code clean.

PR Close #59365
2025-01-07 16:06:21 +00:00
Kristiyan Kostadinov
8230388aa8 build: simplify symbol tests format (#59147)
Switches the goldens for the symbol tests to be an array of strings, rather than an array of objects where each object only has a `name` property. This makes more compact, easier to read and easier to avoid merge conflicts.

PR Close #59147
2024-12-12 14:59:13 -08:00
Utku Gultopu
0f1c71869e docs: capitalize webpack with a lowercase W (#56812)
PR Close #56812
2024-11-26 22:24:11 +00:00
Joey Perrott
9fced64146 ci: remove circleci as we no longer rely on it (#58615)
Remove CircleCI artifacts and configuration

PR Close #58615
2024-11-12 18:39:25 +00:00
Alan Agius
7de7c52769 build: remove usages of useDefineForClassFields: false (#58297)
When setting `"useDefineForClassFields": false`, static fields are compiled within a block that relies on the `this` context. This output makes it more difficult for bundlers to treeshake and eliminate unused code.

PR Close #58297
2024-10-28 12:26:05 -07:00
Matthieu Riegler
fb321966aa build: Add LICENSE file to the generated packages (#58033)
This commit adds a parameter to `ng_package` to specify a license file that will be bundled with the generated packages.

fixes #58029

PR Close #58033
2024-10-01 16:34:27 +00:00
Joey Perrott
9dbe6fc18b refactor: update license text to point to angular.dev (#57901)
Update license text to point to angular.dev instead of angular.io

PR Close #57901
2024-09-24 15:33:00 +02:00
Kristiyan Kostadinov
e5adf92965 feat(core): stabilize @let syntax (#57813)
Removes the `@let` syntax from developer preview.

PR Close #57813
2024-09-16 12:16:12 +02:00
Jessica Janiuk
0ebb2be538 build: bump dev-infra dependencies (#57761)
This bumps the commit hashes for all of the dev-infra related dependencies.

PR Close #57761
2024-09-10 20:47:01 +00:00
Alan Agius
3896f86865 refactor(migrations): switch from esbuild to Rollup for schematics bundling (#57602)
Replaces esbuild with Rollup for bundling schematics to support code splitting, as esbuild does not handle code splitting when targeting CommonJS modules.

**Before:**
```
du -sh dist/bin/packages/core/npm_package/schematics
7.7M    dist/bin/packages/core/npm_package/schematics
```

**After:**
```
du -sh dist/bin/packages/core/npm_package/schematics
3.1M    dist/bin/packages/core/npm_package/schematics
```

PR Close #57602
2024-09-03 09:07:03 -07:00
Matthieu Riegler
6c2beba63d docs(docs-infra): Add dev-mode only mention for core/global (#57365)
PR Close #57365
2024-08-29 10:17:35 -07:00
Ben Hong
055e0d9835 docs: update template in-depth guide (#57475)
PR Close #57475
2024-08-28 08:44:31 -07:00
Alan Agius
099955bdf3 build: remove Sourcemaps from Schematics bundles (#57545)
This commit reduces the bundle size of `@angular/core` by 19.5 MB by excluding sourcemaps from the schematics.

Since the `esbuild` rule doesn't allow disabling sourcemaps directly, we work around this by setting the sourcemaps to `external`. Afterward, we filter the output to include only the `.js` files.

PR Close #57545
2024-08-27 13:27:33 -07:00