master
Commits on Nov 10, 2021
-
-
-
build: update to latest @angular/dev-infra-private to address issues …
-
refactor(core): format recently updated file to comply the lint rules (…
-
refactor(core): move outdated comment to view.ts (#44099)
remove the comment suggesting to use a const enum for ViewEncapsulation in the renderer3/definitions.ts file and add a similar comment in the view.ts file in which the enum is defined Note: the new comment does not contain the suggestion of changing `None` to `0` as it is unclear what benefits that would bring (for more info see: #44099 (comment)) PR Close #44099
-
build: update angular (#44074)
PR Close #44074
-
fix(compiler): ensure that partially compiled queries can handle forw…
…ard references (#44113) When a partially compiled component or directive is "linked" in JIT mode, the body of its declaration is evaluated by the JavaScript runtime. If a class is referenced in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the file, then the reference must be wrapped in a `forwardRef()` call. Previously, query predicates were not wrapped correctly in partial declarations causing the code to crash at runtime. In AOT mode, this code is never evaluated but instead transformed as part of the build, so this bug did not become apparent until Angular Material started running JIT mode tests on its distributable output. This change fixes this problem by noting when queries are wrapped in `forwardRef()` calls and ensuring that this gets passed through to partial compilation declarations and then suitably stripped during linking. See angular/components#23882 and angular/components#23907 PR Close #44113
-
refactor(compiler): rename R3ProviderExpression and associated helpers (
-
test(compiler): remove IE11 match in JIT compiler tests (#44122)
Since we no longer support (nor test on) IE11 we can remove these matches for `anonymous` functions. PR Close #44122
-
docs: updates typescript configuration file links (#44131)
The links for `tsconfig.json` target and module sections no longer valid. This commit updates the document with correct links PR Close #44131
-
ci: Windows support for tsec_test. (#43924)
Contents of generated tsconfig for tsec_test now depend on whether Bazel uses symlinked runfiles for nodejs_test. The current implementation assumes that symlinked runfiles are not available on Windows. PR Close #43924
-
fix(platform-browser): use correct parent in animation removeChild ca…
…llback (#44033) Animation's `onRemovalComplete` callback is using incorrect `parentNode`. Should be parentNode provided by `delegate.parentNode(element)` instead of direct `element.parentNode`. This is not a problem with default renderer but can cause problems with custom renderer if it uses another logic to add/remove nodes. Fixes #44023 PR Close #44033
-
refactor(language-service): Move language service code out of ivy/ fo…
-
refactor(language-service): Remove View Engine code from language ser…
Commits on Nov 9, 2021
-
fix(compiler-cli): handle pre-release versions when checking version (#…
…44109) Currently the TS version checking function interprets a version like `1.2.3-rc.5` as `1.2.NaN` which would allow it to bypass the version checking altogether. These changes add a little bit more logic to ensure that such versions are handled correctly. There's also an error if we don't manage to parse the version string. Also it seemed like we never actually ran the version check unit tests, because they didn't have a test target. PR Close #44109
-
-
build(docs-infra): remove unnecessary work-around for SW config gener…
-
ci: instruct renovate to apply patch label to avoid divergence with o…
…ther version branches (#44065) Renovate currently always applies the minor label. This often causes the patch/FF/RC branches to quickly diverge. We should always apply the patch label with the goal of keeping infra-related changes in sync as much as possible.. Then it is still possible to selectively apply the minor/major label if needed (this forces the reviewer to actually think about where this should go in, if it fails!). PR Close #44065
-
fix(docs-infra): prevent automatic linking of 'number' (#44000)
add 'number' to the ignoreGenericWords set so that it doesn't get wrongly linked to the decimalPipe during the aio docs generation as it is a generic typescript term PR Close #44000
-
refactor(docs-infra): remove eslint directive comments from examples (#…
…43831) Linting has recently been removed from the examples provided in angular.io (see PRs #43592 and #43746) such removal effects the downloadable and stackblitz examples but linting is still generally used in the examples in the aio project itself (they are being migrated from tslint to eslint in PR #43218) thus eslint directive comments are still necessary in the code itself. So the comments need to be present but need not to be exposed to the users (not in the zips, stackblitzes nor docs themselves), these changes are removing such comments during the examples' parsing phase (effectively removing them from all three sources mentioned above). Original discussion: #43218 (comment) resolves #43788 PR Close #43831
-
fix(core): do not use Function constructors in development mode to av…
…oid CSP violations (#43587) This commit removes the dynamic creation of named arrays for internal runtime storage arrays as they may cause CSP violations in development mode, when an application's CSP configuration does not include `unsafe-eval`. Named arrays for view data can still be enabled in development mode using the `ngDevMode=namedConstructors` query parameter when loading the application. The usage of native class syntax for named arrays does not have the desired effect when the code is downleveled to ES5. Since ES5 targets are becoming increasingly more rare this is considered less of a problem than the CSP violation. Fixes #43494 PR Close #43587
-
docs(animations): express the seconds in numbers (#40098)
I've noticed that the seconds are expressed both by using numbers and words. For example, the doc says `0.5 second` and not `half second`. I believe is more readable to express them by using numbers and is consistent too. PR Close #40098
-
fix(compiler-cli): ensure literal types are retained when `strictNull…
…InputTypes` is disabled (#38305) Consider the `NgModel` directive which has the `ngModelOptions` input: ```ts class NgModel { @input() ngModelOptions: { updateOn: 'blur'|'change'|'submit' }; } ``` In a template this may be set using an object literal as follows: ```html <input ngModel [ngModelOptions]="{updateOn: 'blur'}"> ``` This assignment should be accepted, as the object's type aligns with the `ngModelOptions` input in `NgModel`. However, if the `strictNullInputTypes` option is disabled this assignment would inadvertently produce an error: ``` Type '{ updateOn: string; }' is not assignable to type '{ updateOn: "blur"|"change"|"submit"; }'. Types of property 'updateOn' are incompatible. Type 'string' is not assignable to type '"blur"|"change"|"submit"' ``` This is due to the `'blur'` value being inferred to be of type `string` instead of retaining its literal type. The non-null assertion operator that is automatically inserted for input binding assignments when `strictNullInputTypes` is disabled inhibits TypeScript from inferring the string value as its literal type. This commit fixes the issue by omitting the insertion of the non-null operator for object literals and array literals. PR Close #38305
Commits on Nov 8, 2021
-
refactor(compiler-cli): use relative imports within the @angular/comp…
-
refactor(compiler): reverse testing of ternary operator to ensure typ…
-
docs: update getting started tutorial to use StackBlitz web-containers (
-
build(docs-infra): remove link to custom Stackblitz for running tests (…
-
build(docs-infra): ensure necessary boilerplate files appear in Stack…
-
build(docs-infra): remove unused code (#44085)
This import was not being used and so it is redundant and can be removed. PR Close #44085
-
fix(compiler): generate correct code for safe method calls (#44088)
When a safe method call such as `person?.getName()` is used, the compiler would generate invalid code if the argument list also contained a safe method call. For example, the following code: ``` person?.getName(config?.get('title').enabled) ``` would generate ``` let tmp; ctx.person == null ? null : ctx.person.getName((tmp = tmp) == null ? null : tmp.enabled) ``` Notice how the call to `config.get('title')` has completely disappeared, with `(tmp = tmp)` having taken its place. The issue occurred due to how the argument list would be converted from expression AST to output AST twice. First, the outer safe method call would first convert its arguments list. This resulted in a temporary being allocated for `config.get('title')`, which was stored in the internal `_resultMap`. Only after the argument list has been converted would the outer safe method call realize that it should be guarded by a safe access of `person`, entering the `convertSafeAccess` procedure to convert itself. This would convert the argument list once again, but this time the `_resultMap` would already contain the temporary `tmp` for `config?.get('title')`. Consequently, the safe method in the argument list would be emitted as `tmp`. This commit fixes the issue by ensuring that nodes are only converted once. Closes #44069 PR Close #44088 -

