Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/angular/angular.git. Pull mirroring updated .
  1. Oct 15, 2020
  2. Oct 14, 2020
  3. Oct 13, 2020
  4. Oct 12, 2020
    • George Kalpakas's avatar
      build(docs-infra): support passing args to `ng serve` via `serve-and-sync` (#39201) · 2d37e47e
      George Kalpakas authored
      When working on the docs, it is helpful to run a local instance of the
      angular.io app and run scripts that watch both the docs contents and the
      app build artifacts to automatically update the running instance on
      changes. Typically, this is achieved via the `start` and `docs-watch`
      npm scripts. As a convenience, one can run the `serve-and-sync` script,
      which runs both in one terminal.
      
      Previously, it was not possible to pass arguments to `ng nerve` (which
      is what the `start` script runs under the hood) when running it via
      `serve-and-sync`.
      
      This commit adds support for passing any arguments passed to
      `serve-and-sync` through to the `start` script. This can be useful for
      things like specifying a custom host or port.
      
      PR Close #39201
      2d37e47e
    • George Kalpakas's avatar
      docs: add linkable section about updating commit messages in `CONTRIBUTING.md` (#39215) · 27c80666
      George Kalpakas authored
      A common review request is updating the commit message of a commit.
      Since this is something that is not straight forward for inexperienced
      contributors, it is useful to be able to point a contributor to some
      docs outlining the process.
      
      This commit adds such a section in `CONTRIBUTING.md` (as discussed in
      https://github.com/angular/angular/pull/39110#discussion_r499935502).
      
      PR Close #39215
      27c80666
  5. Oct 10, 2020
  6. Oct 09, 2020
    • crisbeto's avatar
      fix(compiler): incorrectly encapsulating @import containing colons and semicolons (#38716) · 52a0c6b3
      crisbeto authored
      At a high level, the current shadow DOM shim logic works by escaping the content of a CSS rule
      (e.g. `div {color: red;}` becomes `div {%BLOCK%}`), using a regex to parse out things like the
      selector and the rule body, and then re-adding the content after the selector has been modified.
      The problem is that the regex has to be very broad in order capture all of the different use cases,
      which can cause it to match strings suffixed with a semi-colon in some places where it shouldn't,
      like this URL from Google Fonts `https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap`.
      Most of the time this is fine, because the logic that escapes the rule content to `%BLOCK%` will
      have converted it to something that won't be matched by the regex. However, it breaks down for rules
      like `@import` which don't have a body, but can still have quoted content with characters that can
      match the regex.
      
      These changes resolve the issue by making a second pass over the escaped string and replacing all
      of the remaining quoted content with `%QUOTED%` before parsing it with the regex. Once everything
      has been processed, we make a final pass where we restore the quoted content.
      
      In a previous iteration of this PR, I went with a shorter approach which narrowed down the
      regex so that it doesn't capture rules without a body. It fixed the issue, but it also ended
      up breaking some of the more contrived unit test cases. I decided not to pursue it further, because
      we would've ended up with a very long and brittle regex that likely would've broken in even weirder
      ways.
      
      Fixes #38587.
      
      PR Close #38716
      52a0c6b3
    • Bjarki's avatar
      build: bump Chromium to next stable version: 84.0.4147 (#39179) · 8913aee5
      Bjarki authored
      Bump Chrome to the next stable release (84.0.4147) by following the
      instructions in dev-infra/browsers/README.md.
      
      With Chrome 86 about to be released as stable, the current local version
      (Chrome 83) is starting to lag behind. It also contains a bug that
      blocks Angular unit and integration tests from using Trusted Types.
      
      PR Close #39179
      8913aee5
    • Greg Magolan's avatar
      build: upgrade angular build, integration/bazel and @angular/bazel package to... · 7628c36f
      Greg Magolan authored
      build: upgrade angular build, integration/bazel and @angular/bazel package to rule_nodejs 2.2.0 (#39182)
      
      Updates to rules_nodejs 2.2.0. This is the first major release in 7 months and includes a number of features as well
      as breaking changes.
      
      Release notes: https://github.com/bazelbuild/rules_nodejs/releases/tag/2.0.0
      
      Features of note for angular/angular:
      
      * stdout/stderr/exit code capture; this could be potentially be useful
      
      * TypeScript (ts_project); a simpler tsc rule that ts_library that can be used in the repo where ts_library is too
        heavy weight
      
      Breaking changes of note for angular/angular:
      
      * loading custom rules from npm packages: `ts_library` is no longer loaded from `@npm_bazel_typescript//:index.bzl`
        (which no longer exists) but is now loaded from `@npm//@bazel/typescript:index.bzl`
      
      * with the loading changes above, `load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")` is
        no longer needed in the WORKSPACE which also means that yarn_install does not need to run unless building/testing
        a target that depends on @npm. In angular/angular this is a minor improvement as almost everything depends on @npm.
      
      * @angular/bazel package is also updated in this PR to support the new load location; Angular + Bazel users that
        require it for ng_package (ng_module is no longer needed in OSS with Angular 10) will need to load from
        `@npm//@angular/bazel:index.bzl`. I investigated if it was possible to maintain backward compatability for the old
        load location `@npm_angular_bazel` but it is not since the package itself needs to be updated to load from
        `@npm//@bazel/typescript:index.bzl` instead of `@npm_bazel_typescript//:index.bzl` as it depends on ts_library
        internals for ng_module.
      
      * runfiles.resolve will now throw instead of returning undefined to match behavior of node require
      
      Other changes in angular/angular:
      
      * integration/bazel has been updated to use both ng_module and ts_libary with use_angular_plugin=true.
        The latter is the recommended way for rules_nodejs users to compile Angular 10 with Ivy. Bazel + Angular ViewEngine is
        supported with @angular/bazel <= 9.0.5 and Angular <= 8. There is still Angular ViewEngine example on rules_nodejs
        https://github.com/bazelbuild/rules_nodejs/tree/stable/examples/angular_view_engine on these older versions but users
        that want to update to Angular 10 and are on Bazel must switch to Ivy and at that point ts_library with
        use_angular_plugin=true is more performant that ng_module. Angular example in rules_nodejs is configured this way
        as well: https://github.com/bazelbuild/rules_nodejs/tree/stable/examples/angular. As an aside, we also have an
        example of building Angular 10 with architect() rule directly instead of using ts_library with angular plugin:
        https://github.com/bazelbuild/rules_nodejs/tree/stable/examples/angular_bazel_architect.
      
      NB: ng_module is still required for angular/angular repository as it still builds ViewEngine & @angular/bazel
      also provides the ng_package rule. ng_module can be removed in the future if ViewEngine is no longer needed in
      angular repo.
      
      * JSModuleInfo provider added to ng_module. this is for forward compat for future rules_nodejs versions.
      
      PR Close #39182
      7628c36f
    • Chellappan's avatar
      docs: fix for HttpRequest expansion panel (#39166) · b417dd7b
      Chellappan authored
      Fixes #39156
      
      PR Close #39166
      b417dd7b
  7. Oct 08, 2020
    • Alan Agius's avatar
      feat(docs-infra): add short url for strict mode guide (#39129) · 8cf16b48
      Alan Agius authored
      With this change we add a short url to strict mode guide
      (angular.io/strict -> angular.io/guide/strict-mode). This is important because
      of two reasons.
      
      1) Reduce the clutter in the terminal when we include the strict mode guide url in a prompt.
      2) Easiler to share in conferences, slides etc..
      
      PR Close #39129
      8cf16b48