336 Commits

Author SHA1 Message Date
Jan Martin
c48a2da287 build: Preserve newlines when gathering stdout
If the chunk happens to end in a new line or other meaningful
whitespace, stripping it can lead to two words (e.g. targets)
being squished together and broken.
2025-02-03 14:35:34 -08:00
Alan Agius
2552093278 build: re-enable latest version checks during release
This commit restores the latest version checks, which are now fixed by using the stamped versions.
2025-01-30 17:52:13 +01:00
Alan Agius
98c8fb5907 build: disable checkSchematicsAngularLatestVersion pre-release check
This is current checking `packages/schematics/angular/utility/latest-versions/package.json` but recently we change how the version is set https://github.com/angular/angular-cli/pull/29368
2025-01-29 17:19:31 +01:00
Paul Gschwendtner
9ad7d9b08e build: add script to diff local npm package with snapshot repository
This script will be very useful for the `rules_js` migration, as it
allows us to quickly spot differences between the local `npm_package`
target and the valid golden (based on the snapshot repository).
2025-01-13 19:21:04 +01:00
Paul Gschwendtner
2218b0d0df build: migrate @angular-devkit/architect to npm_package
Migrates the `@angular-devkit/architect` package to the `rules_js` npm
package rule, consuming the direct `rules_ts` output JS files.

Notably, substitution is FAR different than what it used to be with
`rules_nodejs`, so we needed some extra work to leverage `make_template`
for substitutions in `package.json` files. **Keep in mind** that for
now, this does not apply to any other files; so we only substitute in
the `package.json`, but not in e.g. `.js` files as before. We will
follow-up on this.

The other jq merging/filtering for snapshot or tar references in
`package.json` files is kept as is, and is temporarily duplicated. This
is acceptable as the migration should be pretty smooth and quick.
2025-01-10 13:15:00 +01:00
sashaphmn
32d2e2d029 docs: readme
Made some corrections in the documentation
2024-11-27 15:59:19 +01:00
Joey Perrott
fcf6426732 ci: remove circleci as we no longer rely on it
Remove CircleCI artifacts and configuration
2024-11-12 13:09:11 -08:00
Alan Agius
743188ba62 refactor: Add lines-around-comment rule
I often struggle with spacing around block comments, so I've decided to add the `lines-around-comment` lint rule to help manage this.

For more details, see the https://eslint.style/rules/js/lines-around-comment
2024-09-11 12:10:54 +02:00
Alan Agius
607a97cdeb refactor(@angular/ssr): bundle Critters
This commit bundles the Critters library to ensure compatibility with Nodeless environments. Additionally, all licenses for bundled libraries, including Critters, are now included in the package. This helps maintain compliance with open-source license requirements.
2024-08-24 07:37:36 +02:00
Charles Lyding
7610d80efb test: update @typescript-eslint/eslint-plugin to v8.0.1
The `@typescript-eslint/eslint-plugin` package has been updated to v8.0.1.
With new major versions of the package, additional rules are added to the
default recommended list. Several such new rules have been disabled to
minimize the code changes to update the package. Several minor type only
fixes were however included to reduce the number of disabled rules.
2024-08-07 06:25:31 +02:00
Sanjaiyan Parthipan
f6952748f4 build: run async task in concurrent 2024-07-15 14:06:17 -07:00
Matthieu Riegler
be46c5fca1 refactor: use explicit coercion of exitCode to number.
Implicit coercion to number was removed in node 20, see https://nodejs.org/api/deprecations.html#DEP0164
2024-07-08 12:08:31 +02:00
Charles Lyding
d56c8de284 refactor: minor code cleanup to improve code health
Several smaller code changes to improve type information and remove now
unneeded code structures based on improvements to both Node.js, TypeScript,
and underlying dependencies.
2024-06-25 16:57:16 -04:00
Alan Agius
076afb7e15 build: remove --silent from yarn command
`--silent` is not a valid option for Yarn 4. This causes the build-schema script to fail.
2024-06-11 12:37:17 +02:00
Charles Lyding
ce850da171 build: update yarn version to v4.2.2 2024-06-10 18:17:03 -04:00
Charles Lyding
49ee88676d ci: only download saucelabs connect utility when running tests
The saucelabs connect tunnel utility is now only downloaded when a
saucelabs related test is executed. Previously it was part of the
root `package.json` and downloaded whenever a package install was
executed. The utility archive was also not an actual package which
incidentally worked with npm but does not work with newer versions
of yarn. A SHA256 check is also now performed prior to executing
the utility to verify the expected file is present.
2024-06-10 15:38:25 -04: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
Charles Lyding
5a63eff0dc ci: use Github action-based dependency license checking
Dependency know leverages the Github dependency review action instead
of the previous custom solution. The action uses the Github dependency
API to analyze dependencies. This not only should provide more accurate
results but also lower the maintenance costs for the license checking.
The initial allowed licenses list is based on the previous checker list
with licenses that are no longer used removed.

Action Documentation: https://github.com/actions/dependency-review-action
2024-06-04 14:03:28 -04:00
David LJ
d6f7962b2a docs: aio->adev links in readme, docs & gh dirs 2024-05-27 08:08:52 +02:00
Charles Lyding
cb18da3917 fix(@angular/cli): change update guide link to angular.dev
References to the Angular update guide now use the new angular.dev site.
2024-05-17 12:44:40 -04:00
Charles Lyding
423353c955 build: replace lodash.template with lodash v4.17.21
The separate `lodash.template` package appears to no longer be updated.
To address https://github.com/angular/angular-cli/security/dependabot/87
the package has been switch to `lodash` which is the main package and
was updated to address the linked issue. This package is used within
the build infrastructure tooling for the repository.
2024-05-03 12:17:22 -04:00
Charles Lyding
eb8f1faa4c build: adjust create project script to ensure all built packages are used
The admin create script previously only updated the package.json dependencies
for direct dependencies. This did not ensure that all built packages were used
due to some built packages being used as transitive dependencies. The npm
`overrides` field is now also used to ensure that these dependencies are also
properly redirected to the built packages.
2024-04-18 19:36:10 +02:00
Alan Agius
7682a7145f build: address pre-release validation failure
Previously, the release process encountered an error due to ts-node's inability to transform `packages/schematics/angular/utility/latest-versions.ts`, resulting in the following error:

```
export const latestVersions: Record<string, string> & {
^^^^^^

SyntaxError: Unexpected token 'export'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1274:20)
    at Module._compile (node:internal/modules/cjs/loader:1320:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:202:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
    at async checkSchematicsAngularLatestVersion (file:///usr/..../git/angular-cli/scripts/release-checks/dependency-ranges/latest-versions-check.mts:9:46)
```

To resolve this issue, we now utilize the `package.json` directly to retrieve dependency versions.
2024-03-26 16:38:42 +01:00
Alan Agius
817d99d2b4 build: a couple of tweaks and fixes to yarn admin create.
This update addresses an issue where an older version of the CLI tarball was mistakenly employed in creating a new application via `yarn admin create`.

Additionally, `yarn admin create` now accommodates extra options that can be utilized with `ng new`.

Example:
```
yarn admin create my-app --ssr
```
2024-03-21 10:30:17 -04:00
Alan Agius
460e6aee16 build: remove validate-build-files script
Since we exclusively build with Bazel now, this check is unnecessary.
2024-03-14 16:28:28 +01:00
Alan Agius
846d63c071 build: trim SHA used for snapshot tags
This should fix

```
fatal: 'c22bda9
' is not a valid tag name.
Command failed: git "tag", "c22bda9\n"
file:///home/runner/work/angular-cli/angular-cli/scripts/devkit-admin.mts:39
        console.error(err.stack);
```
2024-03-14 16:23:24 +01:00
Alan Agius
c22bda930a build: address issue with snapshot publishing due incorrect property access
This should fix the snpashot publishing which are currently being skipped.

```
    Skipping @angular/cli.
    Skipping @angular/create.
    Skipping @angular/pwa.
    Skipping @angular/ssr.
    Skipping @angular-devkit/architect.
    Skipping @angular-devkit/architect-cli.
    Skipping @angular-devkit/build-angular.
    Skipping @angular-devkit/build-webpack.
    Skipping @angular-devkit/core.
    Skipping @angular-devkit/schematics.
    Skipping @angular-devkit/schematics-cli.
    Skipping @ngtools/webpack.
    Skipping @schematics/angular.
```
2024-03-14 16:14:26 +01:00
Alan Agius
021a434244 build: address issue with snapshot publishing due to non existing property
This should fix the snpashot publishing which are currently being skipped.

```
Skipping @angular/cli.
Skipping @angular/create.
Skipping @angular/pwa.
Skipping @angular/ssr.
Skipping @angular-devkit/architect.
Skipping @angular-devkit/architect-cli.
Skipping @angular-devkit/build-angular.
Skipping @angular-devkit/build-webpack.
Skipping @angular-devkit/core.
Skipping @angular-devkit/schematics.
Skipping @angular-devkit/schematics-cli.
Skipping @ngtools/webpack.
Skipping @schematics/angular.
```
2024-03-14 16:07:07 +01:00
Alan Agius
a88bc7c91f build: remove the need to bootstrap-local
This commit removes the need for the bootstrap-local logic and moves the scripts to` mts`
2024-03-14 15:46:54 +01:00
Alan Agius
3362b8f53f build: clean up build scripts
Several cleanups to build scripts
2024-03-14 15:46:54 +01:00
Charles Lyding
6ab44d8736 build: remove template string helpers from validation scripts
The helpers are unneeded and behavior can be reproduced with direct
string usage.  Also, this removes a runtime dependency on the packages
being validated.
2024-03-12 09:45:54 -07:00
Charles Lyding
9f4e818bf9 build: add infrastructure to build local-variant package outputs to main build script
The main release build script now has the infrastructure needed to build
using the `local` bazel configuration. This is not yet used within the build
process but provides the base infrastructure to support local builds of the
packages in the future. `local` builds are package builds that contain file
path dependencies to the other built package archives in the workspace and
are used for local development and testing purposes only.
2024-03-12 09:45:34 -07:00
Alan Agius
bb08763b01 build: update ng-dev config to work with Node.js 18.19
Update ng-dev setup to work with 18.19 For more details, refer to: https://github.com/TypeStrong/ts-node/issues/2094
2024-03-12 16:51:03 +01:00
Charles Lyding
e20e397587 build: remove usage of built package from build script
Previously, the `@angular/core` package which was being built was used
during the build process. This package was only used for logging and
has now been replaced with the Console instead. This prevents potential
logging issues if there are bugs or errors within the package being built.
2024-03-06 19:46:11 +01:00
Charles Lyding
64346a5eca test: remove unneeded exceptions and aliases from license validator
The `fs-monkey`, `memfs` and `spdx-license-ids` packages all now have valid license
fields and allowed licenses. All three have been removed from the exceptions
list.
Several SPDX license aliases have been removed as they are no longer used
by any dependencies within the project. The aliases only existed due to
previous non-standard SPDX identifiers present in used packages.
Additionally, the license validator automatically handles SPDX combination
syntax and combinations do not need to be listed explicitly.
2023-11-02 14:00:14 +01:00
Charles Lyding
2595ff3e84 ci: move saucelabs browser testing to GHA 2023-10-30 11:27:16 +01:00
Alan Agius
5e4b532be1 build: update peer deps check to support stable versions when cutting a major prerelease
Prior, to this change when a new major prerelease the check did not allow `^17.0.0 || ^17.0.0-next.0`.
2023-08-30 20:02:48 +02:00
Alan Agius
3fe432c71b refactor: update code to integrate universal repo
This commit updates the moved universal code into the cli pipeline
2023-08-22 20:44:53 +00:00
aanchal
5345336cb6 docs: update the http tag with https 2023-08-14 10:57:26 +02:00
alkavats1
e3556b3298 docs: removed the deprecated tag of align center in readme file 2023-06-14 11:23:13 +02:00
alkavats1
6abff16f03 docs: updated the i tag to the em tag in the html and docs 2023-06-09 10:49:11 +02:00
Charles Lyding
ee5763dcac refactor(@angular-devkit/build-angular): use fast-glob for file searching support
The file searching within the build system (both Webpack and esbuild) now use the
`fast-glob` package for globbing which provides a small performance improvement.
Since the assets option in particular is within the critical path of the buil pipeline,
the performance benefit from the switch will be most prevalent in asset heavy projects.
As an example, the Angular Material documentation site saw the asset discovery time
reduced by over half with the switch. `fast-glob` is also the package used by Vite
which provides additional benefit by ensuring that the Angular CLI behavior matches
that of the newly integrated Vite development server.
2023-05-31 14:54:13 -04:00
Doug Parker
59c5ae00dd ci: add BlueOak license now that it is approved by legal
https://skyvine.corp.google.com/issues/1044744690
2023-04-11 21:32:00 +00:00
Paul Gschwendtner
5b4188f047 build: add pre-release checks for dependency on framework
Adds an automatic check that runs before cutting releases. This
will help avoiding issues where we forget to update peer dependencies
or the `latest-versions.ts` file.
2023-02-24 19:12:50 +00:00
Alan Agius
3cbeee7377 build: remove no longer used scripts
This commit removes scripts which have been replaced with Bazel.
2023-02-16 14:36:10 +00:00
Alan Agius
05aefbf886 build: update use bazel to build schemas for development
This commit updates the build-schema script to use Bazel.
2023-02-16 14:35:51 +00:00
Charles Lyding
9b935a2afb Revert "build: remove no longer used scripts"
This reverts commit 8f4e1018ddfa1c421769fda4e4e973375c7b8db6.
2023-02-15 19:09:34 +00:00
Alan Agius
8f4e1018dd build: remove no longer used scripts
This commit removes scripts which have been replaced with Bazel.
2023-02-15 17:06:16 +00:00
Alan Agius
c3adf11a5a build: update dependency minimatch to v6 2023-01-17 17:30:43 +00:00
Charles Lyding
e9de6a7468 build: cleanup unneeded and/or default tsconfig options
General cleanup of the main repository `tsconfig.json` file that is used by the IDE and as a base for the build and test tsconfig files. This includes removal of options that contain default values and removal of no longer existing paths from several options. A project relative path in one of the development scripts was also fixed to use a relative path to be consist with all other paths.
2023-01-13 08:28:40 +00:00