The Wayback Machine - https://web.archive.org/web/20200627234148/https://github.com/angular/angular/commits/master
Skip to content
Permalink
Branch: master
Commits on Jun 26, 2020
  1. ci: decrease payload size limit for integration tests (#37784)

    AndrewKushnir committed Jun 26, 2020
    This commit updates the payload size limit for the `hello_world` test app built using Closure. This is likely an effect of the changes in #36578 (that reduces the bundle size for most of the apps) and additional changes in subsequent commits.
    
    PR Close #37784
  2. fix(core): error when invoking callbacks registered via ViewRef.onDes…

    crisbeto authored and AndrewKushnir committed Jun 25, 2020
    …troy (#37543)
    
    Invoking a callback registered through `ViewRef.onDestroy` throws an error, because we weren't registering it correctly in the internal data structure. These changes also remove the `storeCleanupFn` function, because it was mostly identical to `storeCleanupWithContext` and was only used in one place.
    
    Fixes #36213.
    
    PR Close #37543
  3. fix(core): don't consider inherited NG_ELEMENT_ID during DI (#37574)

    crisbeto authored and AndrewKushnir committed Jun 14, 2020
    Special DI tokens like `ChangeDetectorRef` and `ElementRef` can provide a factory via `NG_ELEMENT_ID`. The problem is that we were reading it off the token as `token[NG_ELEMENT_ID]` which will go up the prototype chain if it couldn't be found on the current token, resulting in the private `ViewRef` API being exposed, because it extends `ChangeDetectorRef`.
    
    These changes fix the issue by guarding the property access with `hasOwnProperty`.
    
    Fixes #36235.
    
    PR Close #37574
  4. ci: decrease expected AIO and integration payload sizes (#36578) (#36578

    peruukki authored and AndrewKushnir committed May 21, 2020
    )
    
    The changes in #36687 removed enough code to exceed the CI check limits, so
    the expected main-es2015 size needs adjusting.
    
    PR Close #36578
  5. fix(core): determine required DOMParser feature availability (#36578) (

    peruukki authored and AndrewKushnir committed Apr 25, 2020
    …#36578)
    
    Verify that HTML parsing is supported in addition to DOMParser existence.
    This maybe wasn't as important before when DOMParser was used just as a
    fallback on Firefox, but now that DOMParser is the default choice, we need
    to be more accurate.
    
    PR Close #36578
  6. refactor(core): split inert strategies to separate classes (#36578) (#…

    peruukki authored and AndrewKushnir committed Apr 25, 2020
    …36578)
    
    The `inertDocument` member is only needed when using the InertDocument
    strategy. By separating the DOMParser and InertDocument strategies into
    separate classes, we can easily avoid creating the inert document
    unnecessarily when using DOMParser.
    
    PR Close #36578
  7. fix(core): do not trigger CSP alert/report in Firefox and Chrome (#36578

    peruukki authored and AndrewKushnir committed Apr 11, 2020
    ) (#36578)
    
    If [innerHTML] is used in a component and a Content-Security-Policy is set
    that does not allow inline styles then Firefox and Chrome show the following
    message:
    
    > Content Security Policy: The page’s settings observed the loading of a
    resource at self (“default-src”). A CSP report is being sent.
    
    This message is caused because Angular is creating an inline style tag to
    test for a browser bug that we use to decide what sanitization strategy to
    use, which causes CSP violation errors if inline CSS is prohibited.
    
    This test is no longer necessary, since the `DOMParser` is now safe to use
    and the `style` based check is redundant.
    
    In this fix, we default to using `DOMParser` if it is available and fall back
    to `createHTMLDocument()` if needed. This is the approach used by DOMPurify
    too.
    
    The related unit tests in `html_sanitizer_spec.ts`, "should not allow
    JavaScript execution when creating inert document" and "should not allow
    JavaScript hidden in badly formed HTML to get through sanitization (Firefox
    bug)", are left untouched to assert that the behavior hasn't changed in
    those scenarios.
    
    Fixes #25214.
    
    PR Close #36578
  8. fix(language-service): incorrect autocomplete results on unknown symb…

    kyliau authored and AndrewKushnir committed Jun 9, 2020
    …ol (#37518)
    
    This commit fixes a bug whereby the language service would incorrectly
    return HTML elements if autocomplete is requested for an unknown symbol.
    This is because we walk through every possible scenario, and fallback to
    element autocomplete if none of the scenarios match.
    
    The fix here is to return results from interpolation if we know for sure
    we are in a bound text. This means we will now return an empty results if
    there is no suggestions.
    
    This commit also refactors the code a little to make it easier to
    understand.
    
    PR Close #37518
  9. docs: release notes for the v10.0.1 release

    AndrewKushnir committed Jun 26, 2020
  10. ci: exclude "docs" commit type from minBodyLength commit message vali…

    IgorMinar authored and AndrewKushnir committed Jun 26, 2020
    …dation (#37764)
    
    docs commits are sometimes trivial (e.g. an obvious typo fix) and in such cases its very
    akward to to write up 100 chars worth of text about why this typo fix is the best thing in the
    world and why it is so important and crucial that we must know why we are fixing the typo
    at all. After all most typos are not just typos. Or are they? We'll shall see...
    
    PR Close #37764
  11. feat(dev-infra): add support for minBodyLengthTypeExcludes to commit-…

    IgorMinar authored and AndrewKushnir committed Jun 26, 2020
    …message validation (#37764)
    
    This feature will allow us to exclude certain commits from the 100 chars minBodyLength requirement for commit
    messages which is hard to satisfy for commits that make trivial changes (e.g. fixing typos in docs or comments).
    
    PR Close #37764
  12. feat(platform-browser): Allow `sms`-URLs (#31463)

    santoshyadav198613 authored and AndrewKushnir committed Jun 25, 2020
    sms ulr is already supported by google/closure-library and and validations are added to check
    if the body passed is safe or not you can refer https://github.com/google/closure-library/blob/bb7ea653194b590711614fd79b0a88a38a600740/closure/goog/html/safeurl.js#L440-L454 for more details
    
    Fixes #31462
    
    PR Close #31463
  13. refactor(core): throw more descriptive error message in case of inval…

    AndrewKushnir committed Mar 6, 2020
    …id host element (#35916)
    
    This commit replaces an assert with more descriptive error message that is thrown in case `<ng-template>` or `<ng-container>` is used as host element for a Component.
    
    Resolves #35240.
    
    PR Close #35916
  14. build: move shims_for_IE to third_party directory (#37624)

    josephperrott authored and AndrewKushnir committed Jun 17, 2020
    The shims_for_IE.js file contains vendor code that predates the third_party
    directory. This file is currently used for internal karma testing setup. This
    change corrects this by moving the shims_for_IE file to //third_part/
    
    PR Close #37624
  15. refactor(compiler-cli): Remove any cast for CompilerHost (#37079)

    kyliau authored and AndrewKushnir committed May 12, 2020
    This commit removes the FIXME for casting CompilerHost to any since
    google3 is now already on TS 3.8.
    
    PR Close #37079
  16. fix(language-service): reinstate getExternalFiles() (#37750)

    kyliau authored and AndrewKushnir committed Jun 25, 2020
    `getExternalFiles()` is an API that could optionally be provided by a tsserver plugin
    to notify the server of any additional files that should belong to a particular project.
    
    This API was removed in #34260 mainly
    due to performance reasons.
    
    However, with the introduction of "solution-style" tsconfig in typescript 3.9,
    the Angular extension could no longer reliably detect the owning Project solely
    based on the ancestor tsconfig.json. In order to support this use case, we have
    to reinstate `getExternalFiles()`.
    
    Fixes angular/vscode-ng-language-service#824
    
    PR Close #37750
  17. docs: correct outdated dev instructions for public api golds (#37026)

    ajitsinghkaler authored and AndrewKushnir committed May 9, 2020
    This change updates the dev instructions to reflect the location and generation of public API golds, which changed in #35768.
    
    PR Close #37026
  18. docs: add note about the month being zero-based in the Date construct…

    NickHodges authored and AndrewKushnir committed Jun 26, 2020
    …or (#37770)
    
    Because the month is zero based, it may confuse some users that '3'
    is in fact 'April'. This comment should clear that up.
    
    PR Close #37770
  19. fix(dev-infra): merge script should not always require full repo perm…

    devversion authored and AndrewKushnir committed Jun 24, 2020
    …issions (#37718)
    
    We recently added OAuth scope checking to the dev-infra Git client
    and started leveraging it for the merge script. We set the `repo` scope
    as required for running the merge script. We can loosen this requirement
    as in the Angular org where the script is consumed, only pull requests on
    public repositories are merged through the script.
    
    This should help with reducing the risk with compromised tokens as no
    access had to be granted on `repo:invite`, `repo_deployment` etc.
    
    PR Close #37718
  20. fix(dev-infra): support running scripts from within a detached head (#…

    devversion authored and AndrewKushnir committed Jun 25, 2020
    …37737)
    
    Scripts provided in the `ng-dev` command might use local `git`
    commands. For such scripts, we keep track of the branch that
    has been checked out before the command has been invoked.
    
    We do this so that we can later (upon command completion)
    restore back to the original branch. We do not want to
    leave the Git repository in a dirty state.
    
    It looks like this logic currently only deals with branches
    but does not work properly when a command is invoked from
    a detached head. We can make it work by just checking out
    the previous revision (if no branch is checked out).
    
    PR Close #37737
  21. ci(docs-infra): store JS bundles as CI artifacts to debug size check …

    gkalpak authored and AndrewKushnir committed Jun 24, 2020
    …flakes (#37703)
    
    As reported in #37699, the size of the main angular.io bundle sometimes
    ends up bigger than expected on CI. This usually goes away after
    rerunning the job a couple of times.
    
    It is unclear what is causing this. In order to help debug the issue,
    this commit stores the JS files that are checked as part of the aio
    payload-size check as CI artifacts, where they can be retrieved from and
    inspected.
    
    PR Close #37703
  22. build: add wombot proxy for publish config for @angular/benchpress (#…

    josephperrott authored and AndrewKushnir committed Jun 25, 2020
    …37752)
    
    Adds the publishConfig registry value to the package.json of the
    @angular/benchpress package to publish it via wombat rather than
    through npm directly.
    
    PR Close #37752
  23. docs(elements): fixed command that adds the package @angular/elements (

    guiseek authored and AndrewKushnir committed Jun 25, 2020
    …#37681)
    
    I was using schematics with the `--name` parameter instead of the `--project`, I did both ways before sending and my suspicion about outdated documentation was confirmed
    
    PR Close #37681
  24. docs: typo fixes for schematics-for-libraries.md (#37753)

    EdricChan03 authored and AndrewKushnir committed Mar 25, 2019
    Addresses small typos such as extra whitespaces.
    
    This change was extracted from #29505.
    This change was extracted from #29505.
    This change was extracted from #29505.
    
    PR Close #37753
  25. test(compiler-cli): disable DynamicValue diagnostic tests on Windows (#…

    alxhub authored and AndrewKushnir committed Jun 25, 2020
    …37763)
    
    This commit disables all diagnostic tests for DynamicValue diagnostics which
    make assertions about the diagnostic filename while running tests on Windows.
    
    Such assertions are currently suffering from a case sensitivity issue.
    
    PR Close #37763
  26. fix(docs-infra): fix deploy-to-firebase.sh for master and v10.0.x bra…

    IgorMinar authored and AndrewKushnir committed Jun 25, 2020
    …nches (#37762)
    
    The deployment to aio is currently failing because #37721 introduced
    "project" entry into the firebase.json which means that we now need to
    select the deployment target before deploying to firebase.
    
    This change fixes the issue and refactors the file to be easier to read.
    
    I also added extra echo statements so that the CI logs are easier to
    read in case we need to troubleshoot future issues.
    
    PR Close #37762
Commits on Jun 25, 2020
  1. test(compiler-cli): fix assertion of diagnostic filename on Windows (#…

    alxhub authored and AndrewKushnir committed Jun 25, 2020
    …37758)
    
    Several partial_evaluator tests in the diagnostics_spec check assert
    correctness of diagnostic filenames. Previously these assertions compared
    a resolved (`absoluteFrom`) filename with the TypeScript `ts.SourceFile`'s
    `fileName` string, which caused the tests to fail on Windows because the
    drive letter case differed.
    
    This commit changes the assertions to use `absoluteFromSourceFile` instead
    of the `fileName` string, resulting in an apples-to-apples comparison of
    canonicalized paths.
    
    PR Close #37758
  2. fix(docs-infra): fix typo in the deploy-to-firebase.sh script (#37754)

    IgorMinar authored and AndrewKushnir committed Jun 25, 2020
    This typo caused the script to fail on Linux (interestingly it works fine on Mac).
    
    This is a painful reminder that we should not write any more Bash scripts EVER. shelljs FTW! :-)
    
    PR Close #37754
  3. fix(core): cleanup DOM elements when root view is removed (#37600)

    AndrewKushnir committed Jun 16, 2020
    Currently when bootstrapped component is being removed using `ComponentRef.destroy` or `NgModuleRef.destroy` methods, DOM nodes may be retained in the DOM tree. This commit fixes that problem by always attaching host element of the internal root view to the component's host view node, so the cleanup can happen correctly.
    
    Resolves #36449.
    
    PR Close #37600
  4. feat(platform-server): add option for absolute URL HTTP support (#37539)

    CaerusKaru authored and AndrewKushnir committed Jun 11, 2020
    In version 10.0.0-next.8, we introduced absolute URL support for
    server-based HTTP requests, so long as the fully-resolved URL was
    provided in the initial config. However, doing so represents a
    breaking change for users who already have their own interceptors
    to model this functionality, since our logic executes before all
    interceptors fire on a request. See original PR #37071.
    
    Therefore, we introduce a flag to make this change consistent with
    v9 behavior, allowing users to opt in to this new behavior. This
    commit also fixes two issues with the previous implementation:
    1. if the server was initiated with a relative URL, the absolute
    URL construction would fail because needed components were empty
    2. if the user's absolute URL was on a port, the port would not
    be included
    
    PR Close #37539
  5. fix(migrations): do not incorrectly add todo for @Injectable or @pipe (

    devversion authored and AndrewKushnir committed Jun 25, 2020
    …#37732)
    
    As of v10, the `undecorated-classes-with-decorated-fields` migration
    generally deals with undecorated classes using Angular features. We
    intended to run this migation as part of v10 again as undecorated
    classes with Angular features are no longer supported in planned v11.
    
    The migration currently behaves incorrectly in some cases where an
    `@Injectable` or `@Pipe` decorated classes uses the `ngOnDestroy`
    lifecycle hook. We incorrectly add a TODO for those classes. This
    commit fixes that.
    
    Additionally, this change makes the migration more robust to
    not migrate a class if it inherits from a component, pipe
    injectable or non-abstract directive. We previously did not
    need this as the undecorated-classes-with-di migration ran
    before, but this is no longer the case.
    
    Last, this commit fixes an issue where multiple TODO's could be
    added. This happens when multiple Angular CLI build targets have
    an overlap in source files. Multiple programs then capture the
    same source file, causing the migration to detect an undecorated
    class multiple times (i.e. adding a TODO twice).
    
    Fixes #37726.
    
    PR Close #37732
  6. refactor(compiler-cli): more accurate reporting of complex function c…

    JoostK authored and AndrewKushnir committed Jun 15, 2020
    …all (#37587)
    
    This commit introduces a dedicated `DynamicValue` kind to indicate that a value
    cannot be evaluated statically as the function body is not just a single return
    statement. This allows more accurate reporting of why a function call failed
    to be evaluated, i.e. we now include a reference to the function declaration
    and have a tailor-made diagnostic message.
    
    PR Close #37587
  7. feat(compiler-cli): explain why an expression cannot be used in AOT c…

    JoostK authored and AndrewKushnir committed Jun 15, 2020
    …ompilations (#37587)
    
    During AOT compilation, the value of some expressions need to be known at
    compile time. The compiler has the ability to statically evaluate expressions
    the best it can, but there can be occurrences when an expression cannot be
    evaluated statically. For instance, the evaluation could depend on a dynamic
    value or syntax is used that the compiler does not understand. Alternatively,
    it is possible that an expression could be statically evaluated but the
    resulting value would be of an incorrect type.
    
    In these situations, it would be helpful if the compiler could explain why it
    is unable to evaluate an expression. To this extend, the static interpreter
    in Ivy keeps track of a trail of `DynamicValue`s which follow the path of nodes
    that were considered all the way to the node that causes an expression to be
    considered dynamic. Up until this commit, this rich trail of information was
    not surfaced to a developer so the compiler was of little help to explain
    why static evaluation failed, resulting in situations that are hard to debug
    and resolve.
    
    This commit adds much more insight to the diagnostic that is produced for static
    evaluation errors. For dynamic values, the trail of `DynamicValue` instances
    is presented to the user in a meaningful way. If a value is available but not
    of the correct type, the type of the resolved value is shown.
    
    Resolves FW-2155
    
    PR Close #37587
  8. refactor(compiler-cli): create diagnostics using `ts.DiagnosticRelate…

    JoostK authored and AndrewKushnir committed Jun 12, 2020
    …dInformation` (#37587)
    
    Previously, an anonymous type was used for creating a diagnostic with related
    information. The anonymous type would then be translated into the necessary
    `ts.DiagnosticRelatedInformation` shape within `makeDiagnostic`. This commit
    switches the `makeDiagnostic` signature over to taking `ts.DiagnosticRelatedInformation`
    directly and introduces `makeRelatedInformation` to easily create such objects.
    This is done to aid in making upcoming work more readable.
    
    PR Close #37587
  9. perf(compiler-cli): fix regressions in incremental program reuse (#37641

    alxhub authored and AndrewKushnir committed Jun 19, 2020
    )
    
    Commit 4213e8d introduced shim reference tagging into the compiler, and
    changed how the `TypeCheckProgramHost` worked under the hood during the
    creation of a template type-checking program. This work enabled a more
    incremental flow for template type-checking, but unintentionally introduced
    several regressions in performance, caused by poor incrementality during
    `ts.Program` creation.
    
    1. The `TypeCheckProgramHost` was made to rely on the `ts.CompilerHost` to
       retrieve instances of `ts.SourceFile`s from the original program. If the
       host does not return the original instance of such files, but instead
       creates new instances, this has two negative effects: it incurs
       additional parsing time, and it interferes with TypeScript's ability to
       reuse information about such files.
    
    2. During the incremental creation of a `ts.Program`, TypeScript compares
       the `referencedFiles` of `ts.SourceFile` instances from the old program
       with those in the new program. If these arrays differ, TypeScript cannot
       fully reuse the old program. The implementation of reference tagging
       introduced in 4213e8d restores the original `referencedFiles` array
       after a `ts.Program` is created, which means that future incremental
       operations involving that program will always fail this comparison,
       effectively limiting the incrementality TypeScript can achieve.
    
    Problem 1 exacerbates problem 2: if a new `ts.SourceFile` is created by the
    host after shim generation has been disabled, it will have an untagged
    `referencedFiles` array even if the original file's `referencedFiles` was
    not restored, triggering problem 2 when creating the template type-checking
    program.
    
    To fix these issues, `referencedFiles` arrays are now restored on the old
    `ts.Program` prior to the creation of a new incremental program. This allows
    TypeScript to get the most out of reusing the old program's data.
    
    Additionally, the `TypeCheckProgramHost` now uses the original `ts.Program`
    to retrieve original instances of `ts.SourceFile`s where possible,
    preventing issues when a host would otherwise return fresh instances.
    
    Together, these fixes ensure that program reuse is as incremental as
    possible, and tests have been added to verify this for certain scenarios.
    
    An optimization was further added to prevent the creation of a type-checking
    `ts.Program` in the first place if no type-checking is necessary.
    
    PR Close #37641
Older
You can’t perform that action at this time.