https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
115aafb release: cut the v14.0.0-next.10 release (#45484) PR Close #45484 30 March 2022, 21:10:34 UTC
e1e440d docs: add Angular university website to resources list (#45437) PR Close #45437 30 March 2022, 00:13:07 UTC
82956dc Update aio/content/marketing/resources.json (#45076) Co-authored-by: Alan Agius <alan.agius4@gmail.com> PR Close #45076 30 March 2022, 00:11:54 UTC
eb9dd8d docs: add Rangle's Angular Training book (#45076) PR Close #45076 30 March 2022, 00:11:54 UTC
7d94923 fix(docs-infra): implement focus trap for aio search results (#44989) currently if a user tries to navigate via keyboard, once the are presented with search results, the search results panel remains present and can potentially hide most of the content on the page, in such case keyboard navigation will be severly hindered and the only option for the user would be to go back to the seach input text and clear its value, fix such inconvenience by looping the focus in the header area close to the search results and the results panel itself note: an alternative implementation using the cdkTrapFocus has been attempted in PR #45194, such alternative implementation presented a number of (minor) drawbacks (including the increase main bundle size due to the inclusion of the A11yModule), so it was agreed to proceed with the manual implementation present in these changes instead. PR Close #44989 29 March 2022, 23:56:03 UTC
8e09445 test: update aio payload size golden to reflect Angular update (#45376) PR Close #45376 29 March 2022, 22:25:49 UTC
099fedc docs: add notification to support ukraine (#45376) PR Close #45376 29 March 2022, 22:25:49 UTC
06050ac fix(compiler-cli): handle inline type-check blocks in nullish coalescing extended check (#45454) This commit fixes an inconsistency where a type check location for an inline type check block would be interpreted to occur in a type-checking shim instead. This resulted in a missing template mapping, causing a crash due to an unsafe non-null assertion operator. In the prior commit the `TcbLocation` has been extended with an `isShimFile` field that is now being used to look for the template mapping in the correct location. Additionally, the non-null assertion operator is refactored such that a missing template mapping will now ignore the warning instead of crashing the compiler. Fixes #45413 PR Close #45454 29 March 2022, 21:09:33 UTC
ff32301 refactor(compiler-cli): track whether a `TcbPosition` corresponds with a shim file (#45454) Extends `TcbPosition` with a field that indicates whether the `tcbPath` is a type-checking shim file, or an original source file with an inline type check block. This field is used in an upcoming commit that fixes an inconsistency with how inline type check blocks are incorrectly interpreted as a type-checking shim file instead. PR Close #45454 29 March 2022, 21:09:33 UTC
b2758d7 refactor(compiler-cli): rename `ShimLocation` to `TcbLocation` (#45454) Inline type check blocks (TCBs) are emitted into the original source file, but node positions would still be represented as a `ShimLocation` with a `shimPath` corresponding with the type-checking shim file. This results in inconsistencies, as the `positionInShimFile` field of `ShimLocation` would not correspond with the `shimPath` of that `ShimLocation`. This commit is a precursor to letting `ShimLocation` also represent the correct location for inline type check blocks, by renaming the interface to `TcbLocation`. A followup commit addresses the actual inconsistency. PR Close #45454 29 March 2022, 21:09:33 UTC
e55e98d build: update all non-major dependencies (#45374) PR Close #45374 29 March 2022, 20:22:26 UTC
2142ffd feat(compiler-cli): propagate `standalone` flag to runtime (#44973) This commit carries the `standalone` flag forward from a directive/pipe into its generated directive/pipe definition, allowing the runtime to recognize standalone entities. PR Close #44973 29 March 2022, 20:06:26 UTC
6f653e0 feat(compiler-cli): standalone types imported into NgModule scopes (#44973) This commit implements the next step of Angular's "standalone" functionality, by allowing directives/components/pipes declared as `standalone` to be imported into NgModules. Errors are raised when such a type is not standalone but is included in an NgModule's imports. PR Close #44973 29 March 2022, 20:06:26 UTC
459766b test(compiler-cli): split standalone tests into component & module tests (#44973) This just helps organize the standalone tests a little bit. PR Close #44973 29 March 2022, 20:06:26 UTC
60ef6e5 refactor(compiler-cli): move error for declaring standalone things (#44973) This commit moves the error for declaring a standalone directive/component/ pipe to the `LocalModuleScopeRegistry`. Previously the error was produced by the `NgModuleHandler` directly. Producing the error in the scope registry allows the scope to be marked as poisoned when the error occurs, preventing spurious downstream errors from surfacing. PR Close #44973 29 March 2022, 20:06:26 UTC
3d13343 fix(compiler-cli): better error messages for NgModule structural issues (#44973) This commit improves the error messages generated by the compiler when NgModule scope analysis finds structural issues within a compilation. In particular, errors are now shown on a node within the metadata of the NgModule which produced the error, as opposed to the node of the erroneous declaration/import/ export. For example, if an NgModule declares `declarations: [FooCmp]` and `FooCmp` is not annotated as a directive, component, or pipe, the error is now shown on the reference to `FooCmp` in the `declarations` array expression. Previously, the error would have been shown on `FooCmp` itself, with a mention in the error text of the NgModule name. Additional error context in some cases has been moved to related information attached to the diagnostic, which further improves the legibility of such errors. Error text has also been adjusted to be more succinct, since more info about the error is now delivered through context. PR Close #44973 29 March 2022, 20:06:26 UTC
f027bfb refactor(compiler-cli): remove NgModule tracking from scope data (#44973) Before the `SemanticSymbol` system which now powers incremental compilation, the compiler previously needed to track which NgModules contributed to the scope of a component in order to recompile correctly if something changed. This commit removes that legacy field (which had no consumers) as well as the logic to populate it. PR Close #44973 29 March 2022, 20:06:26 UTC
6e1fce5 test: update aio payload size golden to reflect Angular update (#45461) Updates the AIO payload size goldens to reflect the Angular update affecting both the `aio` and `aio_local` build (due to CLI devkit changes affecting both goldens, and the Angular update also affecting the non-local `aio` build / job). Overall, the Material themes got a little larger, but this is not caused by the framwork, so not relevant here. PR Close #45461 29 March 2022, 16:26:00 UTC
209a73e test: update api goldens to reflect api-golden bazel rule change (#45461) The API golden Bazel rule has changed in the shared dev-infra code. Instead of putting golden API reports into the golden folder as per their original location in the NPM package, golden reports are now stored based on the package exports. This makes it more obvious how entry-points are consumable As part of this change, since the API golden rule now consutls the NPM package `exports` field, the `localize/tools` entry-point golden file is now generated. Previously it wasn't generated due to it not having a secondary entry-point `package.json` file. Such package json files should not be needed anymore and will be gone in future APF versions. PR Close #45461 29 March 2022, 16:26:00 UTC
468c776 build: update angular (#45461) PR Close #45461 29 March 2022, 16:25:59 UTC
16e635c fix(docs-infra): update a11y min-scores (#45209) update (decrease) the value of some of the accessibility MIN_SCORES_PER_PAGE after recent changes PR Close #45209 29 March 2022, 16:23:12 UTC
0fc4571 fix(docs-infra): assign different aria labels to main aio navs (#45209) assign different aria labels to the primary nav and the one used for guides and docs, so that impaired users can more easily distinguish the two PR Close #45209 29 March 2022, 16:23:12 UTC
734bd8d fix(docs-infra): remove redundant main roles (#45209) remove redundant main role as pages should always have a single element with a main role (also remove the role assigne to the main tag as that is implied) PR Close #45209 29 March 2022, 16:23:12 UTC
be5dce2 fix(docs-infra): wrap the main aio mat-toolbar in a header (#45209) wrap the main aio mat-toolbar in a header element to provide better accessibility resolves #16938 (the first point) PR Close #45209 29 March 2022, 16:23:12 UTC
7ef0717 fix(docs-infra): remove navigation role to aio-top-menu ul (#45209) currently the navigation ul used in aio-top-menu has a role of navigation, but listitems should be owned by list parents (see more: https://www.w3.org/TR/wai-aria-1.1/#listitem) so wrap the ul in a nav and remove the role="navigation" from the ul element to fix such issue resolves #44562 resolves #16938 (the second point) PR Close #45209 29 March 2022, 16:23:12 UTC
6e4cb48 docs: adjust contributing, developing and overview markdown files (#45464) Adjust the contributing, developing and overview markdown files based on the new repository location angular/angular PR Close #45464 29 March 2022, 16:22:50 UTC
801d11d Revert "fix(compiler): scope css keyframes in emulated view encapsulation (#42608)" (#45466) This reverts commit f03e313f24465cbe9ce99aa5f9f482a6c6b5485f. PR Close #45466 29 March 2022, 16:12:19 UTC
f03e313 fix(compiler): scope css keyframes in emulated view encapsulation (#42608) Ensure that keyframes rules, defined within components with emulated view encapsulation, are scoped to avoid collisions with keyframes in other components. This is achieved by renaming these keyframes to add a prefix that makes them unique across the application. In order to enable the handling of keyframes names defined as strings the previous strategy of replacing quoted css content with `%QUOTED%` (introduced in commit 7f689a2) has been removed and in its place now only specific characters inside quotes are being replaced with placeholder text (those are `;`, `:` and `,`, more can be added in the future if the need arises). Closes #33885 BREAKING CHANGE: Keyframes names are now prefixed with the component's "scope name". For example, the following keyframes rule in a component definition, whose "scope name" is host-my-cmp: @keyframes foo { ... } will become: @keyframes host-my-cmp_foo { ... } Any TypeScript/JavaScript code which relied on the names of keyframes rules will no longer match. The recommended solutions in this case are to either: - change the component's view encapsulation to the `None` or `ShadowDom` - define keyframes rules in global stylesheets (e.g styles.css) - define keyframes rules programmatically in code. PR Close #42608 29 March 2022, 00:12:25 UTC
bf98c64 docs: add image directive to public roadmap (#45448) PR Close #45448 28 March 2022, 17:30:26 UTC
d43c0e9 fix(http): Throw error when headers are supplied in JSONP request (#45210) JSONP does not support headers being set on requests. This enables JSONP to throw an error when headers are supplied in the request to prevent attempts to set them. BREAKING CHANGE: JSONP will throw an error when headers are set on a reques JSONP does not support headers being set on requests. Before when a request was sent to a JSONP backend that had headers set the headers were ignored. The JSONP backend will now throw an error if it receives a request that has any headers set. Any uses of JSONP on requests with headers set will need to remove the headers to avoid the error. Closes #9141 PR Close #45210 28 March 2022, 16:38:19 UTC
b36dec6 fix(forms): not picking up disabled state if group is swapped out and disabled (#43499) Fixes a long-standing issue where swapping out the `FormGroup` and calling `disable` immediately afterwards doesn't actually disable the `ControlValueAccessor`. Fixes #22556. PR Close #43499 28 March 2022, 16:26:19 UTC
3d2a60e build: update dependency @bazel/ibazel to ^0.16.0 (#45259) PR Close #45259 28 March 2022, 16:25:26 UTC
c996b47 build: replace bazel devserver with shared dev-infra implementation (#45452) As part of the devtools migration, we copied the custom http server/ dev-server from the `angular/components` repo. This server implementation has now moved to the shared dev-infra code, and we can clean up the copy in this repository now. PR Close #45452 28 March 2022, 16:23:28 UTC
aebf165 fix(zone.js): should ignore multiple resolve call (#45283) Close #44913 The following case is not handled correctly by `zone.js`. ``` const delayedPromise = new Promise((resolve) => { setTimeout(resolve, 1, 'timeout'); }); new Promise((resolve) => { resolve(delayedPromise); resolve('second call'); }).then(console.log); ``` It should output `timeout`, since the promise is resolved by the 1st resolve, the `second call` should be ignored. So this is a bug that the original implementation not ensure the `resolve` is only called once. PR Close #45283 26 March 2022, 00:31:03 UTC
d36fa11 fix(core): avoid Closure Compiler error in restoreView (#45445) Closure Compiler in advanced optimization mode may end up inlining the `ɵɵrestoreView` into the event listener which can lead to a runtime null pointer exception after the changes in #43075. These changes add an annotation to prevent function inlining of the specific instruction. PR Close #45445 26 March 2022, 00:19:30 UTC
96c7cc9 docs: deprecated relativeLinkResolution in the Router (#45308) The `relativeLinkResolution` option was added as an option to opt-in to corrected behavior when generating links relative to a route that has an empty path parent. This was needed to avoid a breaking change. Since then, we have switched the default to be the corrected behavior. It's time to close the turn the lights off on this option so we no longer have to maintain and document buggy behavior. PR Close #45308 25 March 2022, 23:50:46 UTC
3143494 build: disable payload size uploading within bazel (#45446) Uploading payload size is unreliable from within Bazel. This is because tests might not run for every commit, tests might have been cached from a pull request RBE-build (causing payload uploading to be skipped most of the time as every change comes from a PR) We should disable the uploading as this is a fundamental problem (good thing to note now) that we can solve with better payload size tracking that we want to establish as part of dev-infra. PR Close #45446 25 March 2022, 23:50:09 UTC
4ea70e3 fix(zone.js): swallow the error when the element callback is not patchable (#45400) The `patchCallbacks` is used for patching the `document.registerElement` and `customElements.define`. We explicitly wrap the patching code into try-catch since callbacks may be already patched by other web components frameworks (e.g. LWC), and they make those properties non-writable. This means that patching callback will throw an error `cannot assign to read-only property`. See this code as an example: https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186 We don't want to stop the application rendering if we couldn't patch some callback, e.g. `attributeChangedCallback`. PR Close #42546 PR Close #45400 25 March 2022, 23:31:09 UTC
1177b4e ci: make payload size tracking script work with CircleCI and Bazel limitation (#45444) For quite some time now, since we started to use Bazel for integration tests, we relied on some size tracking logic that did not actually fully work under Bazel. It was thought that all the necessary CI push/PR information is available to the Bazel test, but that was not the case. This was now fixed with the recent Rules NodeJS v5 update where I made sure the `env.sh` variables are actually available before we write them to the temporary file for the Bazel-access. This now will unveil an issue because payload size goldens would start being based on their branch name. e.g. the golden key in `13.3.x` should not be `master` but `13.3.x`. This makes more sense than `master` as key, but makes things more cumbersome and ideally we would not store the branch name at all (this is a larger change though -- not worth now since we might refactor this anyway). For now we will update the size tracking logic to always use `master` as golden key (like it worked in the past year(s)) With the environment fix we now (again) start uploading payload size results to Firebase. This did not work by accident either. The uploading logic is reliant on the CircleCI commit range which is not working/reliable in upstream branches. This commit removes this reliance on `COMMIT_RANGE` since it's not strictly necessary and currently breaking renovate PRs. We can re-enable this when we have a solution with CircleCI, or a workaround/resolution logic provided in e.g. `ng-dev ci determine-commit-range`. PR Close #45444 25 March 2022, 21:25:03 UTC
7ab7181 release: cut the v14.0.0-next.9 release (#45442) PR Close #45442 25 March 2022, 19:41:33 UTC
78eace6 build: shorten partial compilation test case target names for windows (#45431) Shortens the partial compilation test case target names as the paths/ manifest paths in Bazel became too large, exceeding some Windows path length limits. Relevant context/resources: * https://angular-team.slack.com/archives/C02PARQNMC1/p1648137933069659 (internal) * https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd * https://github.com/bazelbuild/rules_nodejs/pull/3215/files#r782271592 PR Close #45431 25 March 2022, 19:18:34 UTC
fed7630 ci: improve stability of windows bazel CI job (#45431) Improves stability of the Windows Bazel CI job by installing Bazelisk globally. Also makes the environment helpers more convenient by evaluating the variable assignments directly, simplifying some Bash logic. PR Close #45431 25 March 2022, 19:18:34 UTC
a7c81da ci: dedupe top-level yarn install in circleci config (#45431) Dedupes the Yarn run steps, avoiding the need to manually keep this step in sync (e.g. with the timeout -- which is currently missing for the windows job) PR Close #45431 25 March 2022, 19:18:34 UTC
9e3e970 test: refactor compiler-cli compliance test to work on windows (#45431) Recent changes in `rules_nodejs` caused the test case copy file actions to be transitioned into the `exec` configuration, resulting in much larger file paths. These paths break on Windows with the shell argument limit, and with the path limit, causing errors like: ``` ERROR: C:/users/circleci/ng/packages/compiler-cli/test/compliance/test_cases/BUILD.bazel:9:12: Copying file packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/value_composition/structural_directives_if_directive_def.js failed: (Exit 1): cmd.exe failed: error executing command cd /d C:/users/circleci/_bazel_circleci/u4uoan2j/execroot/angular SET PATH=C:\Program Files\Git\usr\bin;C:\Program Files\Git\bin;C:\Windows;C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0 SET RUNFILES_MANIFEST_ONLY=1 cmd.exe /C bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\packages\compiler-cli\test\compliance\test_cases\test_cases--1973427149-cmd.bat The system cannot find the path specified ``` https://app.circleci.com/pipelines/github/angular/angular/44038/workflows/4b530cb2-f232-4e1d-b35a-e6e085151d08/jobs/1140017 PR Close #45431 25 March 2022, 19:18:34 UTC
a48683b ci: make windows circleci job more robust and use git bash (#45431) It is totally fine, and expected to use Git Bash for running Bazel on Windows. In fact this is the most common setup for Bazel on Windows and it's unrealistic to run without it. This allows us to remove the old/legacy Powershell setup from CI which is also quite flaky sometimes and does not reproduce how Bazel is used on windows-users dev machines. PR Close #45431 25 March 2022, 19:18:34 UTC
b1fadbd ci: temporarily disable components-repo-unit-tests job for Bazel NodeJS v5 update (#45431) The Angular components repository can only start using Bazel Rules NodeJS v5 when `@angular/bazel` is published with support for it. To work around this cycle we temporarily disable the unit tests job until we migrated the COMP repo as well. PR Close #45431 25 March 2022, 19:18:34 UTC
af303d9 refactor: remove unused variables in starlark code to satisfy buildifier (#45431) We updated buildifier and a few warnings became errors now. This commit cleans up the failing unused variable instances, making the linter happy. Additionally for the API extractor BUILD file, the package defaults need to move to satisfy buildifier. PR Close #45431 25 March 2022, 19:18:34 UTC
a24293a build: migrate more usages from `@bazel/typescript` to `@bazel/concatjs` (#45431) As mentioned in previous commits (check them for more details), `@bazel/typescript` no longer contains `ts_library`-specific code, so we no longer need that dependency. PR Close #45431 25 March 2022, 19:18:34 UTC
ffa331b refactor(bazel): update api-extractor to account for `@bazel/typescript` change (#45431) `@bazel/typescript` code moved to `@bazel/concatjs` for the tsc-wrapped code. Note that this code is likely going to be removed anyway soon when we move dts bundling from `ng_module` to `ng_package`. PR Close #45431 25 March 2022, 19:18:34 UTC
c56f05c build: add temporary patch to make `tsec` compatible with `rules_nodejs` v5 (#45431) Adds a temporary patch to make `tsec` compatible with `rules_nodejs` v5 until https://github.com/google/tsec/pull/25 is available/released. PR Close #45431 25 March 2022, 19:18:33 UTC
7f6859e refactor(bazel): update ngc-wrapped to account for `tsc-wrapped` move to `@bazel/concatjs` (#45431) Previously `tsc-wrapped` which is the foundation for `ngc-wrapped`, resided in `@bazel/typescript`. It has been moved to `@bazel/concatjs` in rules_nodejs so we need to account for that as part of our rules_nodejs v5 update. PR Close #45431 25 March 2022, 19:18:33 UTC
010a39f build: update bazel (#45431) Update `@bazel` packages to the latest 5.x version. Some of the changes here are modeled after angular/dev-infra@40c0ac855975ce9586b07af3a36a0bf4e3b58350. Co-Authored-By: George Kalpakas <kalpakas.g@gmail.com> PR Close #45431 25 March 2022, 19:18:33 UTC
05cd0e0 build: update angular to 5a82e60 (#45431) Update the `@angular/dev-infra-private` package to the latest commit. PR Close #45431 25 March 2022, 19:18:33 UTC
aed95cd release: cut the v14.0.0-next.8 release (#45440) PR Close #45440 25 March 2022, 17:42:59 UTC
e2eaac3 fix(zone.js): read `Symbol.species` safely (#45369) We must read `Symbol.species` safely because `this` may be anything. For instance, `this` may be an object without a prototype (created through `Object.create(null)`); thus `this.constructor` will be undefined. One of the use cases is SystemJS creating prototype-less objects (modules) via `Object.create(null)`. The SystemJS creates an empty object and copies promise properties into that object (within the `getOrCreateLoad` function). The zone.js then checks if the resolved value has the `then` method and invokes it with the `value` context. Otherwise, this will throw an error: `TypeError: Cannot read properties of undefined (reading 'Symbol(Symbol.species)')`. PR Close #45369 25 March 2022, 01:56:36 UTC
7a9c6f5 build: update dependency send to ^0.18.0 (#45428) PR Close #45428 24 March 2022, 21:32:00 UTC
dc0e39a docs: update for 2022 angular events (#45386) PR Close #45386 24 March 2022, 21:29:49 UTC
4ddcf81 refactor: replace deprecated String.prototype.substr() (#45397) .substr() is deprecated so we replace it with functions which work similarily but aren't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com> PR Close #45397 24 March 2022, 18:48:09 UTC
0f9b3c6 docs: update the public roadmap (#45415) Change status of existing projects and add new projects we're working on. PR Close #45415 24 March 2022, 18:29:29 UTC
638e860 docs: small English improvement (#45375) PR Close #45375 24 March 2022, 18:24:58 UTC
be161be fix(core): memory leak in event listeners inside embedded views (#43075) When we have an event listener inside an embedded view, we generate a `restoreView` call which saves the view inside of the LFrame. The problem is that we don't clear it until it gets overwritten which can lead to memory leaks. These changes rework the generated code in order to generate a `resetView` call which will clear the view from the LFrame. Fixes #42848. PR Close #43075 24 March 2022, 18:05:24 UTC
71ee417 refactor(core): remove unused logic from reflection capabilities (#45335) This commit removes a bunch of methodss from `ReflectionCapabilities` as they have gone unused. This also removes `Reflector` as it doesn't serve any purpose and it is not exposed as public API, so can be safely removed. PR Close #45335 24 March 2022, 18:02:39 UTC
8198bb9 build: lock file maintenance (#45402) PR Close #45402 24 March 2022, 17:57:25 UTC
f671dd5 fix(docs-infra): update (and unpin) dependency versions for preview server (#45390) Update the `Dockerfile` used to create the preview server to use the latest stable version of Debian (`bullseye`) and also update package versions to latest versions. Also, unpin the versions of installed packages (except for Node.js related ones) as pinning proved problematic due to many packages removing old versions from the official repositories. NOTE: This change will allow the preview server to be updated on the VM and take advantage of recent fixes, such as #45349. Currently, the update fails with the error: ``` E: Version '7.64.0-4+deb10u1' for 'curl' was not found The command '/bin/sh -c apt-get update -y && apt-get install -y curl=7.64.0-4+deb10u1' returned a non-zero code: 100 ``` PR Close #45390 24 March 2022, 17:53:58 UTC
f19b36f fix(zone.js): in TaskTrackingZoneSpec track a periodic task until it is cancelled (#45391) Before this change, the macrotask for `setInterval(callback, ms)` was no longer tracked by `TaskTrackingZoneSpec` after the `callback` was invoked for the first time. Now the periodic macrotask is tracked until it is cancelled, e.g. `clearInterval(id)`. BREAKING CHANGE: in TaskTrackingZoneSpec track a periodic task until it is cancelled The breaking change is scoped only to the plugin `zone.js/plugins/task-tracking`. If you used `TaskTrackingZoneSpec` and checked the pending macroTasks e.g. using `(this.ngZone as any)._inner ._parent._properties.TaskTrackingZone.getTasksFor('macroTask')`, then its behavior slightly changed for periodic macrotasks. For example, previously the `setInterval` macrotask was no longer tracked after its callback was executed for the first time. Now it's tracked until the task is explicitly cancelled, e.g with `clearInterval(id)`. fixes 45350 PR Close #45391 24 March 2022, 17:53:36 UTC
c7bcc1b fix(zone.js): check if `process` is defined when patching the `GlobalErrors.install` (#45392) Jasmine checks internally if `process` and `process.on` is defined. Otherwise, it installs the browser rejection handler through the `global.addEventListener`. This code may be run in the browser environment where `process` is not defined, and this will lead to a runtime exception since Webpack 5 removed automatic Node.js polyfills. PR Close #42260 PR Close #45392 24 March 2022, 17:52:34 UTC
dc72f30 fix(bazel): ng module compilation workers are subject to linker race-conditions (#45393) The Bazel NodeJS rules provide two ways of accessing node modules: * A linker which creates a `node_modules` directory in the execroot/or in the runfiles. * A patched module resolution where no node modules directory necessarily needs to exist. The first is the default in `rules_nodejs` and the second is technically the most idiomatic resolution mechanism in Bazel (as it matches with a runfile resolution library). The linker is prone to race conditions in persistent workers, or non-sandbox environments (like windows). This is because the linker for all workers will operate on a shared `execroot` directory and the same `node_modules` directory is modified all the time / potentially conflicting with other linker processes from other concurrently-running workers. We rely on the patched module resolution anyway, but just need to disable the unused linker to avoid issues like the following: ``` ---8<---8<--- Start of log, file at /private/var/tmp/_bazel_splaktar/280f06d55552a0d01f89f0955b5acd78/bazel-workers/worker-8-TypeScriptCompile.log ---8<---8<--- [link_node_modules.js] An error has been reported: [Error: ENOENT: no such file or directory, unlink 'node_modules'] { errno: -2, code: 'ENOENT', syscall: 'unlink', path: 'node_modules' } Error: ENOENT: no such file or directory, unlink 'node_modules' ---8<---8<--- End of log ---8<---8<--- INFO: Elapsed time: 12.796s, Critical Path: 5.39s INFO: 645 processes: 477 internal, 12 darwin-sandbox, 156 worker. ``` PR Close #45393 24 March 2022, 17:52:12 UTC
c9d566c feat(core): drop support for TypeScript 4.4 and 4.5 (#45394) Drops support for TypeScript older than 4.6 and removes some workarounds in the compiler. BREAKING CHANGE: TypeScript versions older than 4.6 are no longer supported. PR Close #45394 24 March 2022, 17:51:47 UTC
0dca774 build(docs-infra): upgrade cli command docs sources to c0a0bfb65 (#45408) Updating [angular#master](https://github.com/angular/angular/tree/master) from [cli-builds#master](https://github.com/angular/cli-builds/tree/master). ## Relevant changes in [commit range](https://github.com/angular/cli-builds/compare/bff1908b4...c0a0bfb65): **Modified** - help/add.json PR Close #45408 24 March 2022, 17:50:19 UTC
fc97499 build(docs-infra): remove `defaultProject` workspace option (#45410) The `defaultProject` workspace option has been deprecated. The project to use will be determined from the current working directory. See: https://github.com/angular/angular-cli/pull/22852 PR Close #45410 24 March 2022, 17:49:57 UTC
5ff459e test: remove `defaultProject` workspace option (#45410) The `defaultProject` workspace option has been deprecated. The project to use will be determined from the current working directory. See: https://github.com/angular/angular-cli/pull/22852 PR Close #45410 24 March 2022, 17:49:57 UTC
85782e6 docs(router): Fix typo on segments (#45411) PR Close #45411 24 March 2022, 17:49:35 UTC
fe0e42a fix(forms): Make UntypedFormBuilder assignable to FormBuilder, and vice versa. (#45421) There was a subtle bug involving the opt-out class for FormBuilder, which I discovered during the ongoing migration. The types must be structurally the same, because people pass around FormBuilders, in addition to passing around the controls they produce. This PR ensures FormBuilder and UntypedFormBuilder are assignable to each other. PR Close #45421 24 March 2022, 17:49:10 UTC
38ad849 fix(docs-infra): prevent framing of AIO with X-Frame-Options (#45419) Prevent the docs site from being place in an iframe. PR Close #45419 23 March 2022, 19:20:49 UTC
8155428 perf(compiler-cli): ignore the module.id anti-pattern for NgModule ids (#45024) In early versions of Angular, it was sometimes necessary to provide a `moduleId` to `@Component` metadata, and the common pattern for doing this was to set `moduleId: module.id`. This relied on the bundler to fill in a value for `module.id`. However, due to the superficial similarity between `Component.moduleId` and `NgModule.id`, many users ended up setting `id: module.id` in their NgModules. This is an anti-pattern that has a few negative effects, including preventing the NgModule from tree-shaking properly. This commit changes the compiler to ignore `id: module.id` in NgModules, and instead provide a warning which suggests removing the line entirely. PR Close #45024 22 March 2022, 18:11:54 UTC
34c5b7a refactor(compiler-cli): support non-error diagnostics from traits (#45024) Previously, the `TraitCompiler` would naively consider a compilation as failed if either analysis or resolution produced any diagnostics. This commit adjusts the logic to only consider error diagnostics, which allows warnings to be produced from `DecoratorHandler`s. This is a precursor commit to introducing such a warning. As such, the logic here will be tested in the next commit. PR Close #45024 22 March 2022, 18:11:53 UTC
27b4af7 fix(compiler-cli): full side-effectful registration of NgModules with ids (#45024) Angular contains an NgModule registry, which allows a user to declare NgModules with string ids and retrieve them via those ids, using the `getNgModuleById` API. Previously, we attempted to structure this registration in a clever fashion to allow for tree-shaking of registered NgModules (that is, those with ids). This sort of worked due to the accidental alignment of behaviors from the different tree-shakers involved. However, this trick relies on the generation of `.ngfactory` files and how they're specifically processed in various bundling scenarios. We intend to remove `.ngfactory` files, hence we can no longer rely on them in this way. The correct solution here is to recognize that `@NgModule({id})` is inherently declaring a global side-effect, and such classes should not really be eligible for tree-shaking in the first place. This commit removes all the old registration machinery, and standardizes on generating a side- effectful call to `registerNgModuleType` for NgModules that have ids. There is some risk here that NgModules with unnecessary `id`s may not tree-shake as a result of this change, whereas they would have in previous circumstances. The fix here should be to remove the `id` if it's not needed. Specifying an `id` is a request that the NgModule be retained regardless of any other references, in case it is later looked up by string id. PR Close #45024 22 March 2022, 18:11:53 UTC
e57b410 refactor(compiler-cli): linker honors associated statements for a field (#45024) When `@angular/compiler` processes metadata and compiles a definition field, it might also choose to return statements that are associated with that definition, and should be included after the type being compiled. Currently, the linker ignores these statements, as there are none generated that are relevant in the linking operation. A challenge to supporting such associated statements is that the linker operates on "declare" expressions, and replaces those expressions with other expressions. It does not have the capability to append statements after the whole type. The linker actually faces this challenge with statements from the `ConstantPool` as well, and solves this problem by generating an IIFE expression that executes the statements and then returns the definition expression. Previously, an `EmitScope` processed the definition and converted it to an expression, as well as collected constant statements from a `ConstantPool`. A special `IifeEmitScope` implementation was used when emitting into a context where top-level constant statements couldn't be added at all, and uses the IIFE strategy in this case. This commit adds blanket support for associated statements to the linker using this IIFE strategy. The main `EmitScope` now uses the IIFE strategy to emit associated statements, and `IifeEmitScope` has been renamed to `LocalEmitScope`. Now, the `LocalEmitScope` represents constant statements as associated statements to the main `EmitScope` implementation, so they get included in the IIFE as well. Tests are adjusted/added to cover this new behavior. This is a refactoring commit because no live generated code is affected - there are no cases where associated statements are present in linked definitions today. PR Close #45024 22 March 2022, 18:11:53 UTC
72e7d09 refactor(compiler): change NgModule scoping emit flag to enum (#45024) The `compileNgModule` operation previously supported a flag `emitInline`, which controlled whether template scoping information for the NgModule was emitted directly into the compiled NgModule definition, or whether an associated statement was generated which patched the information onto the NgModule definition. Both options are useful in different contexts. This commit changes this flag to an enum (and renames it), which allows for a third option - do not emit any template scoping information. This option is added to better represent the actual behavior of the Angular Linker, which sometimes configures `compileNgModule` to use the side-effectful statement generation but which does not actually emit such associated statements. In other words, the linker effectively does not generate scoping information for NgModules at all (in some configurations) and this option more directly expresses that behavior. This is a refactoring as no generated code is changed as a result of introducing this flag, due to the linker's behavior of not emitting associated statements. PR Close #45024 22 March 2022, 18:11:53 UTC
9d8ff5d build: update dependency @types/chrome to ^0.0.180 (#45357) PR Close #45357 21 March 2022, 23:59:56 UTC
6507150 build(docs-infra): upgrade cli command docs sources to bff1908b4 (#45395) Updating [angular#master](https://github.com/angular/angular/tree/master) from [cli-builds#master](https://github.com/angular/cli-builds/tree/master). ## Relevant changes in [commit range](https://github.com/angular/cli-builds/compare/a517160a2...bff1908b4): **Added** - help/cache.json **Modified** - help/add.json - help/analytics.json - help/build.json - help/config.json - help/deploy.json - help/doc.json - help/e2e.json - help/extract-i18n.json - help/generate.json - help/lint.json - help/new.json - help/run.json - help/serve.json - help/test.json - help/update.json - help/version.json ## Relevant changes in [commit range](https://github.com/angular/cli-builds/compare/207de70b7...bff1908b4) since PR #45385: **Added** - help/cache.json **Modified** - help/config.json ## Closes #45330 Closes #45346 Closes #45361 Closes #45385 PR Close #45395 21 March 2022, 23:58:00 UTC
15dbb4d docs(docs-infra): fix TypeScript casing (#45307) PR Close #45307 21 March 2022, 23:57:11 UTC
b716a81 docs: replace `defaultCollection` with `schematicCollections` (#45406) `defaultCollection` has deprecated in favor of `schematicCollections`. Related to https://github.com/angular/angular-cli/pull/22860 PR Close #45406 21 March 2022, 23:56:10 UTC
e80df0d build: update to bazel v5 for new runfiles API used in dev-infra (#45407) https://blog.bazel.build/2022/01/19/bazel-5.0.html#starlark-build-language PR Close #45407 21 March 2022, 23:55:36 UTC
fffa023 fix(compiler): scope css rules within `@layer` blocks (#45396) This commit starts scoping CSS rules nested within `@layer` blocks. Fixes #45389 PR Close #45396 21 March 2022, 21:51:45 UTC
aec9abd fix(docs-infra): don't wrap subcommands in code element (#45343) With this change we no longer wrap subcommands titles and sub navigation items in code element for nicer UI PR Close #45343 21 March 2022, 21:49:27 UTC
c26915c refactor(core): Make the typed forms migration apply to all usages of the symbols. (#45311) Previously, the migration only migrated constructor calls. Now, the migration will rewrite every usage, in all contexts. Both ways are technically correct, but migrating all symbols is likely to produce clearer and more readable results. PR Close #45311 21 March 2022, 21:40:59 UTC
79d334b feat(animations): provide warnings for non-animatable CSS properties (#45212) warn developers when they are trying to animate non-animatable CSS properties so that can more easily understand why something is not being animated as they would expect it to resolves #27577 PR Close #45212 21 March 2022, 21:33:19 UTC
a049840 build(docs-infra): move to circleci v2 api for aio-builds (#45349) Move to the CircleCI v2 api as the authentication fails for downloading artifacts using the v1 methods. CircleCI v2 api now requires authentication to occur view the headers instead of being done in a query parameter, all of the CircleCI interactions are now performed through one fetchFromCircleCi method which ensures the token is provided in the headers as expected. PR Close #45349 17 March 2022, 21:03:26 UTC
2a75754 fix(animations): apply default params when resolved value is null or undefined (#45339) The animations package supports adding default parameter values to an animation that will be used as a fallback if some parameters aren't defined. The problem is that they're applied using a spread expression which means that any own property of the animation parameters will override the defaults, even if it resolves to null or undefined. This can lead to obscure errors like "Cannot read property toString of undefined" for an animation that looks like `{params: {foo: undefined}}` with defaults `{foo: 123}`. I ran into this issue while debugging some test failures on Material. These changes address the issue by: 1. Applying the defaults if the resolved value is null or undefined. 2. Updating the validation function to use a null check instead of `hasOwnProperty`. PR Close #45339 17 March 2022, 21:02:37 UTC
59a5b54 docs: add how to access the resolved data (#45345) complete resolver example and add how to access the resolved data in component resolves angular#45313 PR Close #45345 16 March 2022, 22:05:24 UTC
9d5ad67 build: lock file maintenance (#45341) PR Close #45341 16 March 2022, 21:36:28 UTC
2b6749f release: cut the v14.0.0-next.7 release (#45368) 16 March 2022, 19:41:35 UTC
34c48a3 docs: release notes for the v13.3.0 release (#45366) 16 March 2022, 19:27:54 UTC
306fb5e docs: release notes for the v13.2.7 release (#45364) 16 March 2022, 18:35:43 UTC
3ad033c build: update github/codeql-action action to v1.1.5 (#45358) PR Close #45358 16 March 2022, 18:21:45 UTC
e47ba49 docs: add ngx-gantt to "EXPLORE ANGULAR RESOURCES" page (#45351) PR Close #45351 15 March 2022, 23:29:23 UTC
9db9091 fix(forms): improve error message for invalid value accessors (#45192) improve error message for invalid value accessors when accessor is not provided as array PR Close #45192 15 March 2022, 20:26:03 UTC
8a7e624 fix(docs-infra): fix tour of heroes global styles (#45329) fix button styles in src/styles.css that are missing from code snippets PR Close #45329 15 March 2022, 20:24:52 UTC
c12b327 docs: fix small English typo (#45340) PR Close #45340 14 March 2022, 20:10:19 UTC
back to top