Commit graph

75 commits

Author SHA1 Message Date
Alan Agius
25e8bcbdf6 build: refactor location of best-practices.md
This commit moves the best-practices.md file from adev/src/context to packages/core/resources. The BUILD.bazel files and other configuration files have been updated to reflect this change.
2025-10-27 09:31:36 +01:00
Alan Agius
620e2c4926 Revert "build: refactor location of best-practices.md"
This reverts commit 07a51872d5.
2025-10-24 19:02:37 +02:00
Alan Agius
07a51872d5
build: refactor location of best-practices.md
This commit moves the best-practices.md file from adev/src/context to packages/core/resources. The BUILD.bazel files and other configuration files have been updated to reflect this change.
2025-10-24 18:45:32 +02:00
Alan Agius
229cdde4d0 fix(core): mark zone.js as an optional peer dependency (#61616)
`zone.js` is no longer mandatory.

PR Close #61616
2025-05-22 12:14:06 -07: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
Alan Agius
d5c6f2c4de refactor: add Node.js 24 as supported version (#61142)
Node.js 24 has been released https://nodejs.org/en/about/previous-releases

Closes: #61140

PR Close #61142
2025-05-06 13:38:25 -07:00
Alan Agius
fe9b79b615 feat(core): update Node.js version support (#60545)
Node.js v18 will reach End-of-Life on April 30, 2025, and will no longer be supported in Angular v20.
Node.js Release Schedule: https://github.com/nodejs/release#release-schedule

BREAKING CHANGE:
- Angular no longer supports Node.js v18.
- Node.js versions 22.0 to 22.10 are also no longer supported.

Before upgrading to Angular v20, ensure the Node.js version is at least 20.11.1.
For the full list of supported versions, visit: https://angular.dev/reference/versions

PR Close #60545
2025-03-26 20:42:16 -07:00
Emil Rowland
7eb59d3887 fix(core): added @angular/compiler as a peer dependency (#55610)
This fixes an issue with packages managers likes pmpm
that will not link the @angular/compiler package to the @angular/core
package if it is not listed as a peer dependency.
I added it as optional peer dependency as it's only used in special cases.

Fixes #38096

PR Close #55610
2025-03-04 22:06:59 +00:00
Andrew Kushnir
5cc63c2135 build: update zone.js peer dependency for core package to 0.15.0 (#57431)
This commit updates zone.js peer dependency versioon for core package to 0.15.0.

PR Close #57431
2024-08-21 13:17:52 -07:00
Andrew Scott
a55ecb9429 build: update zone.js version to 0.14.10 instead of 0.15 (#57266)
this fixes the  version of zone.js in the package deps

PR Close #57266
2024-08-05 18:15:41 +00:00
Andrew Scott
f7918f5272 feat(core): Add 'flush' parameter option to fakeAsync to flush after the test (#57239)
From the internal issue on the matter:

> When using the standard Jasmine version of it promises returned by the body function are automatically awaited. The Catalyst version of it is fake-async, so awaiting the promise does not make sense; however it would be nice if Catalyst automatically flushed the promise to replicate the experience of using standard it. This would allow users to do the following:

```
it('should fail later', async () => {
  await new Promise(r => setTimeout(r));
  fail('failure');
});
```
> In Catalyst today the above test will pass. If this proposal to automatically flush the resulting promise were implemented it would fail.

Flushing after the tests complete has been the default behavior inside
Google since 2020. Very few tests remain that use the old behavior of
only flushing microtasks. The example above would actually fail with
`fakeAsync` due to the pending timer, but the argument still remains the
same. We might as well just flush if we're going to fail the test
anyways by throwing if there's no flush at the end.

PR Close #57239
2024-08-05 17:46:04 +00:00
Alan Agius
01172b84d9 build: update Node.js to match Angular CLI engines (#56187)
The current supported Node.js engines by the Angular CLI are `^18.19.1 || ^20.11.1 || >=22.0.0`

PR Close #56187
2024-06-03 18:00:46 +00:00
Alan Agius
9f5e90e03d build: make JSA contract binary accessible (#55361)
This commit integrates the JSA contract binary into the NPM package and ensures its accessibility by including it in the package exports. This adjustment is essential for enabling Angular CLI to effectively access and inject the script. Additionally, sourcemaps are removed from the minified bundle to prevent their inclusion in the HTML page.

PR Close #55361
2024-04-17 10:37:31 +02:00
Alan Agius
19a426d54e build: update node.js engines version to be more explicate about v20 support (#52448)
This commit adds Node.js 20 as explicitly supported version to match the Angular CLI engines.

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

PR Close #52448
2023-10-31 14:18:36 -07:00
Alan Agius
81b67aa987 feat(core): add support for zone.js 0.14.0 (#51774)
This commit adds support for zone.js 0.14.0 and drops support for older versions

BREAKING CHANGE: Angular now required `zone.js` version `~0.14.0`

PR Close #51774
2023-09-18 11:56:17 +02:00
Alan Agius
59aa0634f4 build: remove support for Node.js v16 (#51755)
BREAKING CHANGE: Node.js v16 support has been removed and the minimum support version has been bumped to 18.13.0.

Node.js v16 is planned to be End-of-Life on 2023-09-11. Angular will stop supporting Node.js v16 in Angular v17. For Node.js release schedule details, please see: https://github.com/nodejs/release#release-schedule

PR Close #51755
2023-09-13 10:49:06 -07:00
Andrew Kushnir
b98ecbc0ce build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771)
This commit updates the minimum supported Node version across packages from 16.13.0 -> 16.14.0 to ensure compatibility with dependencies.

PR Close #49771
2023-04-11 07:56:31 -07:00
Alan Agius
fdf61974d1 feat(core): drop support for zone.js versions <=0.12.0 (#49331)
BREAKING CHANGE: `zone.js` versions `0.11.x` and `0.12.x` are not longer supported.

PR Close #49331
2023-03-07 19:12:22 +00:00
Alan Agius
e9edea363c fix(core): update zone.js peerDependencies ranges (#49244)
This ensures that the latest version of zone.js is supported.

PR Close #49244
2023-02-28 11:55:53 -08:00
Alan Agius
f594725951 refactor(core): remove Node.js v14 support (#49255)
BREAKING CHANGE: Node.js v14 support has been removed

Node.js v14 is planned to be End-of-Life on 2023-04-30. Angular will stop supporting Node.js v14 in Angular v16. Angular v16 will continue to officially support Node.js versions v16 and v18.

PR Close #49255
2023-02-28 11:00:25 -08:00
Kristiyan Kostadinov
b37a624985 build: set up ng generate schematics for core (#48790)
Adds the necessary boilerplate to allow for `ng generate` schematics to be included with `@angular/core`.

PR Close #48790
2023-01-24 16:48:19 +00:00
Alan Agius
046ce43388 fix(core): add zone.js version 0.12.x as a valid peer dependency (#48002)
This commit adds `zone.js` version `0.12.x` as a valid peer dependency

PR Close #48002
2022-11-09 09:54:10 -08:00
Alan Agius
1b9fd46d14 feat(core): add support for Node.js version 18 (#47730)
This change aligns with the supported Node.js versions of the Angular CLI.
See: https://github.com/angular/angular-cli/pull/24026

BREAKING CHANGE: Angular no longer supports Node.js versions `14.[15-19].x` and `16.[10-12].x`. Current supported versions of Node.js are `14.20.x`, `16.13.x` and `18.10.x`.

PR Close #47730
2022-10-11 17:21:19 +00:00
Alan Agius
6eaaefd22e feat(core): drop support for Node.js 12 (#45286)
Node.js v12 will become EOL on 2022-04-30. As a result, Angular CLI v14 will no longer support Node.js v12.

BREAKING CHANGE:

Support for Node.js v12 has been removed as it will become EOL on 2022-04-30. Please use Node.js v14.15 or later.

PR Close #45286
2022-03-08 12:05:03 -08:00
Alex Rickabaugh
48aa0039ea refactor(compiler-cli): update peerDependencies to require rxjs ^7.4.0 (#43748)
RxJS 7 versions prior to 7.4.0 export ES5 code, whereas Angular
applications using RxJS 6 today use ES2015. This was fixed in RxJS 7.4.0
which exposes ES2015 entrypoints as well. This commit updates Angular's
peer dependencies to require the newer RxJS.

PR Close #43748
2021-10-06 15:57:59 -07:00
Paul Gschwendtner
e0a0d05d45 feat(core): update node version support range to support v16 (#43740)
This commit updates the `node` engines range for all Angular
framework packages to:

* No longer support NodeJS v12 `< 12.20`. This is done because APF v13
  uses package export patterns which are only supported as of v12.20.
  https://nodejs.org/api/packages.html#packages_subpath_patterns.

* Allows for the latest v16 NodeJS versions. This matches with the CLI
  which added NodeJS v16 support with https://github.com/angular/angular-cli/pull/21854.

  We already limit this to `>= v16.10.0` in preparation to only
  supporting the LTS minors of Node v16.

BREAKING CHANGE: NodeJS versions older than `v12.20.0` are no longer
supported due to the Angular packages using the NodeJS package exports
feature with subpath patterns.

PR Close #43740
2021-10-06 10:55:44 -07:00
Charles Lyding
6d1c2f79da refactor(migrations): ensure CommonJS migrations can be accessed (#43657)
The `@angular/core` migrations are currently published as CommonJS and also not bundled. Schematics, of which migrations are a type, are currently required to be CommonJS modules due to the Schematics Runtime not yet supporting ESM-based schematics. To ensure that the migration files are loaded as CommonJS modules, a nested `package.json` file has been introduced within the `schematics` directory of the package to set the `type` field for all containing JavaScript files as CommonJS. Since the migrations are also not currently bundled and the `devmode` output used to build the migrations will replace all relative imports with fully-qualified module specifiers, an additional `exports` entry must be added to allow the fully-qualified module specifiers to correctly resolve. If `devmode` did not change the relative imports the additional entry would not be needed. Bundling would also remedy the situation and is the long-term path, especially once the migrations are converted to ESM. Additional followup changes should investigate bundling each migration. The additional `exports` entry should be removed if either `devmode` behavior is changed or the migrations are bundled.

PR Close #43657
2021-10-04 16:24:48 -07:00
Kristiyan Kostadinov
ea61ec2562 feat(core): support TypeScript 4.4 (#43281)
Adds support for TypeScript 4.4. High-level overview of the changes made in this PR:

* Bumps the various packages to `typescript@4.4.2` and `tslib@2.3.0`.
* The `useUnknownInCatchVariables` compiler option has been disabled so that we don't have to cast error objects explicitly everywhere.
* TS now passes in a third argument to the `__spreadArray` call inside child class constructors. I had to update a couple of places in the runtime and ngcc to be able to pick up the calls correctly.
* TS now generates code like `(0, foo)(arg1, arg2)` for imported function calls. I had to update a few of our tests to account for it. See https://github.com/microsoft/TypeScript/pull/44624.
* Our `ngtsc` test setup calls the private `matchFiles` function from TS. I had to update our usage, because a new parameter was added.
* There was one place where we were setting the readonly `hasTrailingComma` property. I updated the usage to pass in the value when constructing the object instead.
* Some browser types were updated which meant that I had to resolve some trivial type errors.
* The downlevel decorators tranform was running into an issue where the Closure synthetic comments were being emitted twice. I've worked around it by recreating the class declaration node instead of cloning it.

PR Close #43281
2021-09-23 14:49:19 -07:00
Kristiyan Kostadinov
9a3cf661a2 refactor(core): update peerDependencies to allow rxjs7 (#42991)
We can't update the framework to rxjs7 until version 13, because it contains breaking changes, but we can allow users to opt into it since all of our code should be compatible.

These changes expand the allowed version range of rxjs and add an integration test to verify that we don't get compilation errors. Note that we also have a test that runs the AIO examples against rxjs 7 already (#42660).

Fixes #41897.

PR Close #42991
2021-08-02 13:55:01 -07:00
Paul Gschwendtner
25f763cff8 feat(core): support TypeScript 4.3 (#42022)
Switches the repository to TypeScript 4.3 and the latest
version of tslib. This involves updating the peer dependency
ranges on `typescript` for the compiler CLI and for the Bazel
package. Tests for new TypeScript features have been added to
ensure compatibility with Angular's ngtsc compiler.

PR Close #42022
2021-06-04 11:17:09 -07:00
Joey Perrott
9f09c3b9b1 build(core): update supported range of node versions to be less restrictive (#42205)
Update the supported range of node versions for to be less restrictive, no longer causing
yarn or npm to fail engine's checks for future versions of node.

While this change will no longer cause yarn or npm to fail these engine's check, this does
not reflect a change in the officially supported versions of node for Angular.  Angular
continues to maintain support for Active LTS and Maintenance LTS versions of node.

PR Close #42205
2021-05-25 17:48:47 +00:00
Joey Perrott
2dd956421c build: remove publishConfig entry from package.json entries (#42104)
Remove publishConfig property from the package.json entry for each of the entries in
the publish configuration.  Using the wombat proxy is now ensured/managed by the
ng-dev release tooling.

PR Close #42104
2021-05-18 15:41:33 -07:00
Joey Perrott
af12d8deaa fix(core): update supported range of node versions to only include LTS versions (#41822)
Update the supported range of node versions for Angular to only include supported LTS versions.

PR Close #41822
2021-04-26 15:21:14 -07:00
Joey Perrott
e66a5fbca6 feat(core): update supported range of node versions (#41544)
Update the supported range of node versions for Angular.  Angular now
supports node >=12.14.1 to <16.0.0, dropping support for Node v10.

BREAKING CHANGE: Angular no longer maintains support for node v10

PR Close #41544
2021-04-14 09:40:17 -07:00
Kristiyan Kostadinov
59ef40988e feat(core): support TypeScript 4.2 (#41158)
Updates the repo to TypeScript 4.2 and tslib 2.1.0.

PR Close #41158
2021-03-17 09:10:25 -07:00
Alan Agius
aaf9b31fb4 feat(core): drop support for zone.js 0.10.x (#40823)
With this change we drop support for zone.js 0.10.x.
This is needed because in version 12 the CLI will only work with `~0.11.4`. See angular/angular-cli#20034.

BREAKING CHANGE:

Minimum supported `zone.js` version is `0.11.4`

PR Close #40823
2021-02-24 07:58:29 -08:00
JiaLiPassion
c43267b912 build: update peerDependencies of zone.js to 0.10~0.11 (#39809)
`@angular/core` support zone.js `^0.10.2 and ^0.11.3`, so this PR updates the
peerDependencies to `^0.10.2 || ^ 0.11.3`, so the app will not show warning about
peer denepdency not consistent when using zone.js 0.10.x version.

PR Close #39809
2020-11-25 14:25:48 -08:00
JiaLiPassion
f8956adb73 build: update zone.js version to 0.11.3 (#39317)
Update the version of `zone.js` from 0.10.3 to 0.11.3 inside
Angular repo.

PR Close #39317
2020-11-12 13:51:29 -08:00
Joey Perrott
0a1d078a74 Revert "build: remove wombot proxy registry from package.jsons for release (#37378)" (#37495)
This reverts commit 26849ca99d.

PR Close #37495
2020-06-10 08:21:45 -07:00
Joey Perrott
26849ca99d build: remove wombot proxy registry from package.jsons for release (#37378)
Due to an outage with the proxy we rely on for publishing, we need
to temporarily directly publish to NPM using our own angular
credentials again.

PR Close #37378
2020-06-01 12:41:19 -04:00
Alan Agius
772c5b8f64 refactor: update to tslib 2.0 and move to direct dependencies (#37198)
Tslib version is bound to the TypeScript version used to compile the library. Thus, we shouldn't list `tslib` as a  `peerDependencies`. This is because, a user can install libraries which have been compiled with older versions of TypeScript and thus require multiple `tslib` versions to be installed.

Reference: TOOL-1374 and TOOL-1375

Closes: #37188

PR Close #37198
2020-05-19 14:57:09 -07:00
Igor Minar
d578ab8f3c build: simplify package.jsons for all of our packages (#36944)
We can remove all of the entry point resolution configuration from the package.json
in our source code as ng_package rule adds the properties automatically and correctly
configures them.

This change simplifies our code base but doesn't have any impact on the package.json
in the distributed npm_packages.

PR Close #36944
2020-05-06 13:54:26 -07:00
JiaLiPassion
c5df9ce474 build(zone.js): update zone.js version to 0.10.3 (#36214)
PR Close #36214
2020-03-31 10:59:17 -07:00
Felix Becker
1e20b2ca36 build(packaging): add repository.directory field to package.jsons (#27544)
PR Close #27544
2020-02-25 13:12:45 -08:00
Joey Perrott
1d563a7acd build: set up all packages to publish via wombot proxy (#33747)
PR Close #33747
2019-11-13 11:34:33 -08:00
Igor Minar
86e1e6c082 feat: typescript 3.6 support (#32946)
BREAKING CHANGE: typescript 3.4 and 3.5 are no longer supported, please update to typescript 3.6

Fixes #32380

PR Close #32946
2019-10-18 13:15:16 -04:00
Alan Agius
e2d5bc2514 feat: change tslib from direct dependency to peerDependency (#32167)
BREAKING CHANGE:

We no longer directly have a direct depedency on `tslib`. Instead it is now listed a `peerDependency`.

Users not using the CLI will need to manually install `tslib` via;
```
yarn add tslib
```
or
```
npm install tslib --save
```

PR Close #32167
2019-10-14 16:34:47 +00:00
Alan Agius
66658c447f feat: update rxjs peerDependencies minimum requirment to 6.5.3 (#32812)
PR Close #32812
2019-10-01 14:56:45 -07:00
JiaLiPassion
ee486233e9 build(zone.js): update zone.js to 0.10.2 (#31975)
Bundle size changed in both zone.js(legacy) and zone-evergreen.js

- zone.js(legacy) package increased a little because the following feature and fixes.
1. #31699, handle MSPointer events PR
2. https://github.com/angular/zone.js/pull/1219 to add __zone_symbol__ customization support

- zone-evergreen.js package decreased because
1. the MSPointer PR only for legacy
2. the Object.defineProperty patch is moved to legacy #31660

PR Close #31975
2019-08-16 09:56:41 -07:00
JiaLiPassion
5ab809ddf9 build: upgrade zone.js to 0.9.1 (#30260)
Close 30203

resolves the issue that zone-legacy XHR issue

PR Close #30260
2019-05-10 14:25:56 -07:00