Commit graph

18 commits

Author SHA1 Message Date
Herdiyan IT Dev
316d49a8ae refactor(dev-infra): use shell: false and quote args in benchmark-compare workflow
Currently, the exec() utility uses childProcess.spawn() with shell: true. This commit changes the spawn option to shell: false to prevent OS command injection vulnerabilities and quotes the benchmark target in the github action.

(cherry picked from commit f219e65841)
2026-04-28 17:29:28 +00:00
Kristiyan Kostadinov
81cabc1477 feat(core): add support for TypeScript 6
Updates the project to support TypeScript 6 and accounts for some of the breakages.
2026-02-17 08:40:38 -08:00
Charles Lyding
6758f9326e build: use Node.js built-in TypeScript support for dev-infra scripts
This change removes the use of `tsx` to execute both `ng-dev` and the repo level development scripts.
2026-01-02 08:15:40 +01:00
Joey Perrott
0bb09dc5ba build: update to latest ng-dev tooling for caretaker handoff update
Update to the latest tooling to upate how caretaker handoff is handled, using new standardized groupings
2025-11-19 14:30:17 -08:00
Joey Perrott
82cc576e6f build: use pnpm as the package manager instead of yarn (#62924)
Use pnpm instead of yarn as the package manager and interaction tool for the repo

PR Close #62924
2025-07-31 22:06:27 +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
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
Paul Gschwendtner
d35e7f2a68 build: replace deprecated inquirer with new npm package (#57205)
The new package comes with types by default, and also has a nicer
API.

The old package had broken types and couldn't be used anymore; and
it's deprecated/unmaintained. We did a similar switch in
angular/dev-infra.

PR Close #57205
2024-07-31 16:02:11 +00:00
Arek
278c4a1fcb docs: fix outdated links from docs to contributing-docs folder in markdown documents (#56462)
PR Close #56462
2024-06-17 08:53:17 -07:00
Pawel Kozlowski
b771539eb3 build: improve results logging in perf script (#51902)
Add git references when printing perf comparison results.

PR Close #51902
2023-09-26 09:09:01 -07:00
Paul Gschwendtner
aaad27b8df build: avoid shallow fetch for benchmark comparison (#50851)
Currently when `yarn benchmarks run-compare` is used, the local
repository could be converted to a shallow clone. This is not
a problem but might result in confusion. We avoid this by
not performing a shallow fetch when a comparison is initiated.

The performance gains seem neglegible.

PR Close #50851
2023-06-26 13:37:38 -07:00
Paul Gschwendtner
bdd8813451 build: print benchmark results at the end of yarn benchmarks run invocation (#50816)
We already collect and report benchmark results for comparison runs, but
for normal benchmark runs we should do the same to make the results
more discoverable (and not in the middle of Bazel output).

PR Close #50816
2023-06-23 14:19:17 -07:00
Paul Gschwendtner
254023a03c build: resolve benchmark compare ref from upstream if rev-parse fails
`rev-parse` returns the original ref name in stdout, even if it wasn't
able to resolve the reference. This was preventing the upstream
resolution from never happening- causing `main` to be never resolved
to the actual SHA.
2023-06-19 15:38:06 +02:00
Paul Gschwendtner
619c318dcb build: fix benchmark sha resolution breaking when compare ref is abbreviated (#50767)
When we fetch e.g. `main`, the branch name will not be available
locally, and `rev-parse` will fail later. We can make the logic
more safe by just using `FETCH_HEAD` then.

PR Close #50767
2023-06-19 13:04:02 +00:00
Paul Gschwendtner
17a95dac22 build: resolve benchmark compare SHA from PR branch or upstream remote (#50764)
If we try to resolve the benchmark compare ref (which may be just
`main`), we are just looking inside the PR branch- but that may
not include the `main` SHA. i.e. it's possible to run a comparison
where the PR is slightly behind of the `main` branch, or a comparison
commit from a different branch is used.

We fix this/ and simplify the logic by resolving the SHAs directly in
the TypeScript code, instead of relying on the rather brittle Bash.

Note that current solution still works, but we sometimes may not be able
to resolve to an actual SHA- causing issues as in 864bd72cb2

PR Close #50764
2023-06-19 12:54:54 +00:00
Paul Gschwendtner
1b3202ca3b build: more concise markdown output for benchmark compare results
We only show the full sample results if someone clicks the markdown
details spoiler button. Most of the time only the stats summary is
relevant.
2023-06-19 14:10:31 +02:00
Paul Gschwendtner
9a01ac3f49 build: add documentation for running benchmarks
Adds documentation for running benchmarks.
2023-06-19 14:10:31 +02:00
Paul Gschwendtner
bb52edee31 build: create script to run benchmarks and perform comparisons (#50745)
This commit creates a new script that solves the following use-cases:

 - Running benchmarks. It's not trivial to figure out the benchmark
   target names, and it's also easy to mess up the right Bazel flags.

 - Performing comparisons. When e.g. working on a runtime senstive
   change, it should be trivial to run benchmarks between the current
   working stage, and a base revision (e.g. `main`).

The script takes care of both these use-cases and comes with a
prompt-based command line tool experience.

The script will also be used by a future GitHub action that can run
comparisons triggered via GitHub PR comment (by trusted team members).

PR Close #50745
2023-06-18 19:32:34 +00:00