X Tutup
The Wayback Machine - https://web.archive.org/web/20211112004034/https://github.com/angular/angular/commits/master
Skip to content
Permalink
master
Loading

Commits on Nov 10, 2021

  1. build: update to latest @angular/dev-infra-private to address issues …

    …related to verifying environment (#44137)
    
    Update to the latest package which properly checks if the running version of ng-dev is the version
    described in yarn lock.
    
    PR Close #44137
    josephperrott authored and atscott committed Nov 10, 2021
  2. refactor(core): format recently updated file to comply the lint rules (

    …#44136)
    
    This commit updates a file that was changed recently, but that change triggered the `lint` CI job to fail, since the lint rules were slightly changed.
    
    PR Close #44136
    AndrewKushnir authored and atscott committed Nov 10, 2021
  3. 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
    dario-piotrowicz authored and atscott committed Nov 10, 2021
  4. build: update angular (#44074)

    PR Close #44074
    renovate-bot authored and atscott committed Nov 10, 2021
  5. docs: update review tag to topic (#44008)

    PR Close #44008
    ileil authored and atscott committed Nov 10, 2021
  6. 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
    petebacondarwin authored and atscott committed Nov 10, 2021
  7. refactor(compiler): rename R3ProviderExpression and associated helpers (

    #44113)
    
    This interface will be used in other situations so this change renames it to be more general as `MaybeForwardRefExpression`.
    
    PR Close #44113
    petebacondarwin authored and atscott committed Nov 10, 2021
  8. build: lock file maintenance (#44111)

    PR Close #44111
    renovate-bot authored and atscott committed Nov 10, 2021
  9. 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
    petebacondarwin authored and atscott committed Nov 10, 2021
  10. 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
    pavankjadda authored and atscott committed Nov 10, 2021
  11. 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
    uraj authored and atscott committed Nov 10, 2021
  12. 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
    raman authored and atscott committed Nov 10, 2021
  13. refactor(language-service): Move language service code out of ivy/ fo…

    …lder (#44064)
    
    This commit moves code in the language service package out of the ivy
    subfolder. Ivy is the _only_ engine supported in v13+ so there's no need
    to have a name for it.
    
    PR Close #44064
    atscott committed Nov 10, 2021
  14. refactor(language-service): Remove View Engine code from language ser…

    …vice package (#44064)
    
    This commit removes ViewEngine-specific code from the langauge service
    package. This code is no longer used since VE is not supported in v13+.
    
    PR Close #44064
    atscott committed Nov 10, 2021

Commits on Nov 9, 2021

  1. build: update all non-major dependencies (#43974)

    PR Close #43974
    renovate-bot authored and atscott committed Nov 9, 2021
  2. 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
    crisbeto authored and atscott committed Nov 9, 2021
  3. refactor(ngcc): improve logging of progress (#43996)

    This commit adds additional information to encourage developers to contact
    the author of View Engine libraries and ask them to update to partial Ivy.
    
    Fixes #42308
    
    PR Close #43996
    petebacondarwin authored and atscott committed Nov 9, 2021
  4. build(docs-infra): remove unnecessary work-around for SW config gener…

    …ation (#44114)
    
    Since angular.io is now updated to a version that includes the fix
    from #43679, the work-around added in
    841c5ae can now be removed.
    
    PR Close #44114
    gkalpak authored and atscott committed Nov 9, 2021
  5. 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
    devversion authored and atscott committed Nov 9, 2021
  6. 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
    dario-piotrowicz authored and atscott committed Nov 9, 2021
  7. 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
    dario-piotrowicz authored and atscott committed Nov 9, 2021
  8. 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
    JoostK authored and atscott committed Nov 9, 2021
  9. 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
    profanis authored and atscott committed Nov 9, 2021
  10. 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
    JoostK authored and atscott committed Nov 9, 2021

Commits on Nov 8, 2021

  1. refactor(compiler-cli): use relative imports within the @angular/comp…

    …iler-cli package (#44118)
    
    Intrapackage imports should always be done via relative imports rather than using the external
    import location.
    
    PR Close #44118
    josephperrott authored and atscott committed Nov 8, 2021
  2. refactor(compiler): reverse testing of ternary operator to ensure typ…

    …escript properly narrows types (#44089)
    
    By checking if the providedIn is a function instead of everything but a function, typescript properly
    narrows the typings for creating the expressions.
    
    PR Close #44089
    josephperrott authored and atscott committed Nov 8, 2021
  3. docs: update getting started tutorial to use StackBlitz web-containers (

    #44085)
    
    Previous commits changed the docs to use web-container versions for StackBlitz examples.
    This commit updates the content of the tutorial to match.
    
    Fixes #44079
    
    PR Close #44085
    petebacondarwin authored and atscott committed Nov 8, 2021
  4. build(docs-infra): remove link to custom Stackblitz for running tests (

    …#44085)
    
    Previously there was a custom version of the testing app for Stackblitz that would run the tests in the browser.
    With the web-container approach, this is no longer necessary since the tests can be run directly from the command line.
    
    Fixes #44047
    
    PR Close #44085
    petebacondarwin authored and atscott committed Nov 8, 2021
  5. build(docs-infra): ensure necessary boilerplate files appear in Stack…

    …blitz examples (#44085)
    
    The `tsconfig.app.json` and similar were not appearing in the generated Stackblitz examples.
    
    PR Close #44085
    petebacondarwin authored and atscott committed Nov 8, 2021
  6. 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
    petebacondarwin authored and atscott committed Nov 8, 2021
  7. 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
    JoostK authored and atscott committed Nov 8, 2021
  8. docs: add Angular 13 support information (#44098)

    Closes #44097
    
    PR Close #44098
    petebacondarwin authored and atscott committed Nov 8, 2021
Older
X Tutup