This project is mirrored from Updated .
  1. 01 Apr, 2020 24 commits
    • crisbeto's avatar
      build: enable service-worker tests on saucelabs (#36129) · e9de2811
      crisbeto authored
      Enables the `service-worker` tests on Saucelabs and fixes some issues that were preventing them from running on IE. The issues were:
      1. We were serving es2017 code during tests. I've set it to es5.
      2. The check which was verifying whether the environment is supported ended up hitting a `require` call in the browser which caused it to fail on browsers that don't support the `URL` API.
      PR Close #36129
    • JoostK's avatar
      refactor(compiler): add `@nocollapse` annotation using a synthetic comment (#35932) · 75afd80a
      JoostK authored
      In Ivy, Angular decorators are compiled into static fields that are
      inserted into a class declaration in a TypeScript transform. When
      targeting Closure compiler such fields need to be annotated with
      `@nocollapse` to prevent them from being lifted from a static field into
      a variable, as that would prevent the Ivy runtime from being able to
      find the compiled definitions.
      Previously, there was a bug in TypeScript where synthetic comments added
      in a transform would not be emitted at all, so as a workaround a global
      regex-replace was done in the emit's `writeFile` callback that would add
      the `@nocollapse` annotation to all static Ivy definition fields. This
      approach is no longer possible when ngtsc is running as TypeScript
      plugin, as a plugin cannot control emit behavior.
      The workaround is no longer necessary, as synthetic comments are now
      properly emitted, likely as of which has been
      released with TypeScript 2.8.
      This change is required for running ngtsc as TypeScript plugin in
      Bazel's `ts_library` rule, to move away from the custom `ngc_wrapped`
      Resolves FW-1952
      PR Close #35932
    • Ferdinand Malcher's avatar
      docs(zone.js): fix typos and align formatting (#35907) · a5eb0e56
      Ferdinand Malcher authored
      PR Close #35907
    • Judy Bogart's avatar
      docs: update and edit web-worker page (#36383) · 4d458db1
      Judy Bogart authored
      PR Close #36383
    • Joey Perrott's avatar
      ci: use dev-infra cli from local sources (#36326) · 24a92472
      Joey Perrott authored
      Use dev-infra cli from local sources rather than loading
      from @angular/dev-infra-private builds.
      PR Close #36326
    • Joey Perrott's avatar
      feat(dev-infra): standard CLI commands using yargs (#36326) · 43006bcc
      Joey Perrott authored
      Creates a standard model for CLI commands provided by ng-dev.
      Allows for us to have any of the tools/scripts extend to be
      included in the ng-dev command, or be standalone using the same
      yargs parser.
      PR Close #36326
    • George Kalpakas's avatar
      fix(ngcc): allow ngcc configuration to match pre-release versions of packages (#36370) · 326240eb
      George Kalpakas authored
      Ngcc supports providing a project-level configuration to affect how
      certain dependencies are processed and also has a built-in fallback
      configuration for some unmaintained packages. Each entry in these
      configurations could be scoped to specific versions of a package by
      providing a version range. If no version range is provided for a
      package, it defaults to `*` (with the intention of matching any
      Previously, the installed version of a package was tested against the
      version range using the [semver][1] package's `satisfies()` function
      with the default options. By default, `satisfies()` does not match
      pre-releases (see [here][2] for more details on reasoning). While this
      makes sense when determining what version of a dependency to install
      (trying to avoid unexpected breaking changes), it is not desired in the
      case of ngcc.
      This commit fixes it by explicitly specifying that pre-release versions
      should be matched normally.
      PR Close #36370
    • Alan Agius's avatar
      fix(platform-server): update `xhr2` dependency (#36366) · b59bc0e3
      Alan Agius authored
      Previous versions of xhr2 used the depreciated "new Buffer()".
      Closes #36358
      PR Close #36366
    • Keen Yee Liau's avatar
      fix(compiler): avoid undefined expressions in holey array (#36343) · 55168021
      Keen Yee Liau authored
      From G3 bug ID: 116443331
      The View Engine compiler crashes when it tries to compile a test in JIT mode
      that includes the d3-scale-chromatic library [1]. The d3 package initializes
      some arrays using the following pattern:
      export var scheme = new Array(3).concat(
        // ... more entries
      The stack trace from the crash is as follows:
      TypeError: Cannot read property 'visitExpression' of undefined
          at ../../../third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts:505:39
          at JitEmitterVisitor.AbstractEmitterVisitor.visitAllObjects third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts?l=526
          at JitEmitterVisitor.AbstractEmitterVisitor.visitAllExpressions third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts?l=505
          at JitEmitterVisitor.AbstractEmitterVisitor.visitLiteralArrayExpr third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts?l=484
          at LiteralArrayExpr.visitExpression third_party/javascript/angular2/rc/packages/compiler/src/output/output_ast.ts?l=791
          at ../../../third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts:492:19
          at JitEmitterVisitor.AbstractEmitterVisitor.visitAllObjects third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts?l=526
          at JitEmitterVisitor.AbstractEmitterVisitor.visitLiteralMapExpr third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts?l=490
          at LiteralMapExpr.visitExpression third_party/javascript/angular2/rc/packages/compiler/src/output/output_ast.ts?l=819
          at ../../../third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts:505:39
          at JitEmitterVisitor.AbstractEmitterVisitor.visitAllObjects third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts?l=526
          at JitEmitterVisitor.AbstractEmitterVisitor.visitAllExpressions third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts?l=505
          at JitEmitterVisitor.AbstractEmitterVisitor.visitInvokeFunctionExpr third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_emitter.ts?l=318
          at JitEmitterVisitor.AbstractJsEmitterVisitor.visitInvokeFunctionExpr third_party/javascript/angular2/rc/packages/compiler/src/output/abstract_js_emitter.ts?l=112
          at InvokeFunctionExpr.visitExpression third_party/javascript/angular2/rc/packages/compiler/src/output/output_ast.ts?l=440
      This is because the corresponding output AST for the array is of the form
        // ...
      The output AST is clearly malformed and breaks the type representation of
      `LiteralArrayExpr` in which every entry is expected to be of type `Expression`.
      This commit fixes the bug by using a plain `for` loop to iterate over the
      entire length of the holey array and convert undefined elements to
      PR Close #36343
    • Pete Bacon Darwin's avatar
      fix(ngcc): handle bad path mappings when finding entry-points (#36331) · cc4b813e
      Pete Bacon Darwin authored
      Previously, a bad baseUrl or path mapping passed to an `EntryPointFinder`
      could cause the original `sourceDirectory` to be superceded by a higher
      directory. This could result in none of the sourceDirectory entry-points being
      Now missing basePaths computed from path-mappings are discarded with
      a warning. Further, if the `baseUrl` is the root directory then a warning is
      given as this is most likely an error in the tsconfig.json.
      Resolves #36313
      Resolves #36283
      PR Close #36331
    • Alexey Okhrimenko's avatar
      docs: fix typo in Tests guide (#36330) · 64631063
      Alexey Okhrimenko authored
      Fixing typo in
      PR Close #36330
    • Joey Perrott's avatar
      feat(dev-infra): add support for new global approvers in pullapprove (#36324) · 719224bf
      Joey Perrott authored
      Pullapprove as added a few new features to allow for us to better
      execute our expectation for global approvals. We need to allow for
      an expectation that our global approver groups are not in the list
      of approved groups. Additionally, since approval groups apply to
      all files in the repo, the global approval groups also do not have
      conditions defined for them, which means pullapprove verification
      need to allow for no conditions need to be defined.
      PR Close #36324
    • Ayaz Hafiz's avatar
      fix(language-service): infer type of elements of array-like objects (#36312) · fe2b6923
      Ayaz Hafiz authored
      Currently the language service only provides support for determining the
      type of array-like members when the array-like object is an `Array`.
      However, there are other kinds of array-like objects, including
      `ReadonlyArray`s and `readonly`-property arrays. This commit adds
      support for retrieving the element type of arbitrary array-like objects.
      Closes #36191
      PR Close #36312
    • Pete Bacon Darwin's avatar
      fix(ngcc): handle entry-points within container folders (#36305) · 38ad1d97
      Pete Bacon Darwin authored
      The previous optimizations in #35756 to the
      `DirectoryWalkerEntryPointFinder` were over zealous
      with regard to packages that have entry-points stored
      in "container" directories in the package, where the
      container directory was not an entry-point itself.
      Now we will also walk such "container" folders as long
      as they do not contain `.js` files, which we regard as an
      indicator that the directory will not contain entry-points.
      Fixes #36216
      PR Close #36305
    • Pete Bacon Darwin's avatar
      refactor(ngcc): simplify `DirectoryWalkerEntryPointFinder` (#36305) · 372b9101
      Pete Bacon Darwin authored
      This commit simplifies the `DirectoryWalkerEntryPointFinder` inter-method
      calling to make it easier to follow, and also to support controlling
      walking of a directory based on its children.
      PR Close #36305
    • Pete Bacon Darwin's avatar
      refactor(ngcc): rename INVALID_ENTRY_POINT to INCOMPATIBLE_ENTRY_POINT (#36305) · 7e62aa0c
      Pete Bacon Darwin authored
      This name better reflects its meaning.
      PR Close #36305
    • JiaLiPassion's avatar
      fix(zone.js): UNPATCHED_EVENTS and PASSIVE_EVENTS should be string[] not boolean (#36258) · 36e927a8
      JiaLiPassion authored
      __zone_symbol__UNPATCHED_EVENTS and __zone_symbol__PASSIVE_EVENTS should be string[] type not boolean.
      For example:
      const config = window as ZoneGlobalConfigurations;
      config.__zone_symbol__UNPATCHED_EVENTS = ['scroll'];
      config.__zone_symbol__PASSIVE_EVENTS = ['scroll'];
      PR Close #36258
    • Wagner Maciel's avatar
      fix(benchpress): update dependencies (#36205) · 9d8bb634
      Wagner Maciel authored
      * updated, added, and removed dependencies in package.json
      * added dependencies to BUILD.bazel
      PR Close #36205
    • Joey Perrott's avatar
      build: update to clang 1.4.0 and only run clang format on changed files (#36203) · c5c57f67
      Joey Perrott authored
      Update to [email protected] to gain support for optional changing and nullish
      coalescing.  Because this would trigger a change on >1800 files in the
      repository, also changes our format enforcement to only be run against
      changed files.  This will allow us to incramentally roll out the value
      add of the upgraded clang format.
      PR Close #36203
    • Judy Bogart's avatar
      docs: update and edit web-worker page (#36026) · 51a89c32
      Judy Bogart authored
      PR Close #36026
    • Judy Bogart's avatar
      docs: make page titles and toc task-oriented (#36024) · e1ac2efe
      Judy Bogart authored
      PR Close #36024
    • Judy Bogart's avatar
      docs: change page title and minor edit (#36021) · 702e17cf
      Judy Bogart authored
      PR Close #36021
    • Kara Erickson's avatar
      docs: update ng-conf announcement to remove livestream link (#36382) · 4d1d0fa0
      Kara Erickson authored
      Since the livestream for ng-conf is not public this year,
      (and is only available to ng-conf attendees), we are
      removing the link from the homepage.
      Instead, we are now pointing to the ng-conf homepage for
      more information.
      PR Close #36382
    • Stephen Fluin's avatar
      docs: update end date of survey to middle of April (#36339) · ec8bae1b
      Stephen Fluin authored
      PR Close #36339
  2. 31 Mar, 2020 4 commits
  3. 30 Mar, 2020 7 commits
  4. 29 Mar, 2020 1 commit
  5. 27 Mar, 2020 4 commits
    • George Kalpakas's avatar
      fix(ngcc): do not spawn more processes than intended in parallel mode (#36280) · 5cee7092
      George Kalpakas authored
      When running in parallel mode, ngcc spawns multiple worker processed to
      process the various entry-points. The number of max allowed processes is
      determined by the number of CPU cores available to the OS. There is also
      currently an [upper limit of 8][1]. The number of active workers is in
      turn inferred by the number of [task assignments][2].
      In the past, counting the entries of `ClusterMaster#taskAssignments` was
      enough, because worker processes were spawned eagerly at the beginning
      and corresponding entries were created in `taskAssignments`.
      Since #35719 however, worker processes are spawned lazily on an as
      needed basis. Because there is some delay between
      [spawning a process][3] and [inserting it][4] into `taskAssignments`,
      there is a short period of time when `taskAssignment.size` does not
      actually represent the number of spawned processes. This can result in
      spawning more than `ClusterMaster#workerCount` processes.
      An example of this can be seen in #36278, where the debug logs indicate
      9 worker processes had been spawned (`All 9 workers are currently busy`)
      despite the hard limit of 8.
      This commit fixes this by using `cluster.workers` to compute the number
      of spawned worker processes. `cluster.workers` is updated synchronously
      with `cluster.fork()` and thus reflects the number of spawned workers
      accurately at all times.
      PR Close #36280
    • Misko Hevery's avatar
      docs: update release nots with blog post (#36268) · 2d0847c3
      Misko Hevery authored
      PR Close #36268
    • Pete Bacon Darwin's avatar
      fix(ngcc): correctly identify the package path of secondary entry-points (#36249) · 995cd15a
      Pete Bacon Darwin authored
      Previously we only searched for package paths below the set of `basePaths`
      that were computed from the `basePath` provided to ngcc and the set of
      In some scenarios, such as hoisted packages, the entry-point is not within
      any of the `basePaths` identified above. For example:
              app-lib (depends on lib1)
          lib1 (depends on lib2)
              lib2 (depends on lib3/entry-point)
      When CLI is compiling `app-lib` ngcc will be given
      `project/packages/app/node_modules` as the `basePath.
      If ngcc is asked to target `lib2`, the `targetPath` will be
      Since `lib2` depends upon `lib3/entry-point`, ngcc will need to compute
      the package path for `project/node_modules/lib3/entry-point`.
      Since `project/node_modules/lib3/entry-point` is not contained in the `basePath`
      `project/packages/app/node_modules`, ngcc failed to compute the `packagePath`
      correctly, instead assuming that it was the same as the entry-point path.
      Now we also consider the nearest `node_modules` folder to the entry-point
      path as an additional `basePath`. If one is found then we use the first
      directory directly below that `node_modules` directory as the package path.
      In the case of our example this extra `basePath` would be `project/node_modules`
      which allows us to compute the `packagePath` of `project/node_modules/lib3`.
      Fixes #35747
      PR Close #36249
    • Andrew Kushnir's avatar
      fix(core): run `APP_INITIALIZER`s before accessing `LOCALE_ID` token in Ivy TestBed (#36237) · 16497438
      Andrew Kushnir authored
      Prior to this commit, Ivy TestBed was accessing locale ID before `APP_INITIALIZER` functions were called. This execution order is not consistent with the app bootstrap logic in `application_ref.ts`. This commit updates Ivy TestBed execution order to call initializers first (since they might affect `LOCALE_ID` token value) and accessing and setting locale ID after that.
      Fixes #36230.
      PR Close #36237