23011 Commits

Author SHA1 Message Date
dario-piotrowicz 9a82067c03 fix(docs-infra): remove redundant main roles (#45209)
remove redundant main role as pages should always have a
single element with a main role (also remove the role assigne
to the main tag as that is implied)

PR Close #45209
2022-03-29 09:23:14 -07:00
dario-piotrowicz 14cabb00d2 fix(docs-infra): wrap the main aio mat-toolbar in a header (#45209)
wrap the main aio mat-toolbar in a header element to provide better
accessibility

resolves #16938 (the first point)

PR Close #45209
2022-03-29 09:23:14 -07:00
dario-piotrowicz a1d9ce80f6 fix(docs-infra): remove navigation role to aio-top-menu ul (#45209)
currently the navigation ul used in aio-top-menu has a role of
navigation, but listitems should be owned by list parents
(see more: https://www.w3.org/TR/wai-aria-1.1/#listitem)
so wrap the ul in a nav and remove the role="navigation" from the
ul element to fix such issue

resolves #44562
resolves #16938 (the second point)

PR Close #45209
2022-03-29 09:23:14 -07:00
Andrew Kushnir 52e036a193 docs: add image directive to public roadmap (#45448)
PR Close #45448
2022-03-28 10:30:26 -07:00
JiaLiPassion c08705899f fix(zone.js): should ignore multiple resolve call (#45283)
Close #44913

The following case is not handled correctly by `zone.js`.
```
const delayedPromise = new Promise((resolve) => {
  setTimeout(resolve, 1, 'timeout');
});

new Promise((resolve) => {
  resolve(delayedPromise);
  resolve('second call');
}).then(console.log);
```

It should output `timeout`, since the promise is resolved by the
1st resolve, the `second call` should be ignored.

So this is a bug that the original implementation not ensure the
`resolve` is only called once.

PR Close #45283
2022-03-25 17:31:04 -07:00
Paul Gschwendtner 0c28997739 build: disable payload size uploading within bazel (#45446)
Uploading payload size is unreliable from within Bazel. This is
because tests might not run for every commit, tests might have
been cached from a pull request RBE-build (causing payload uploading
to be skipped most of the time as every change comes from a PR)

We should disable the uploading as this is a fundamental problem
(good thing to note now) that we can solve with better payload
size tracking that we want to establish as part of dev-infra.

PR Close #45446
2022-03-25 16:50:10 -07:00
arturovt 0dd532bcd6 fix(zone.js): swallow the error when the element callback is not patchable (#45400)
The `patchCallbacks` is used for patching the `document.registerElement` and
`customElements.define`. We explicitly wrap the patching code into try-catch since
callbacks may be already patched by other web components frameworks (e.g. LWC), and they
make those properties non-writable. This means that patching callback will throw an error
`cannot assign to read-only property`. See this code as an example:
https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186
We don't want to stop the application rendering if we couldn't patch some
callback, e.g. `attributeChangedCallback`.

PR Close #42546

PR Close #45400
2022-03-25 16:31:10 -07:00
Paul Gschwendtner 8d7fd91a67 ci: make payload size tracking script work with CircleCI and Bazel limitation (#45444)
For quite some time now, since we started to use Bazel for integration tests, we
relied on some size tracking logic that did not actually fully work under Bazel.

It was thought that all the necessary CI push/PR information is available to the
Bazel test, but that was not the case. This was now fixed with the recent Rules NodeJS
v5 update where I made sure the `env.sh` variables are actually available before we
write them to the temporary file for the Bazel-access.

This now will unveil an issue because payload size goldens would start being based
on their branch name. e.g. the golden key in `13.3.x` should not be `master` but
`13.3.x`. This makes more sense than `master` as key, but makes things more
cumbersome and ideally we would not store the branch name at all (this is a larger
change though -- not worth now since we might refactor this anyway). For now we will
update the size tracking logic to always use `master` as golden key (like it worked
in the past year(s))

With the environment fix we now (again) start uploading payload size results to Firebase.
This did not work by accident either. The uploading logic is reliant on the CircleCI
commit range which is not working/reliable in upstream branches. This commit
removes this reliance on `COMMIT_RANGE` since it's not strictly necessary and
currently breaking renovate PRs. We can re-enable this when we have a solution with
CircleCI, or a workaround/resolution logic provided in e.g. `ng-dev ci determine-commit-range`.

PR Close #45444
2022-03-25 14:25:04 -07:00
Paul Gschwendtner 88dbeda931 build: shorten partial compilation test case target names for windows (#45443)
Shortens the partial compilation test case target names as the paths/
manifest paths in Bazel became too large, exceeding some Windows path
length limits.

Relevant context/resources:
* https://angular-team.slack.com/archives/C02PARQNMC1/p1648137933069659 (internal)
* https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd
* https://github.com/bazelbuild/rules_nodejs/pull/3215/files#r782271592

PR Close #45443
2022-03-25 13:45:08 -07:00
Paul Gschwendtner a15c7e8f98 ci: improve stability of windows bazel CI job (#45443)
Improves stability of the Windows Bazel CI job by
installing Bazelisk globally.

Also makes the environment helpers more convenient by
evaluating the variable assignments directly, simplifying
some Bash logic.

PR Close #45443
2022-03-25 13:45:08 -07:00
Paul Gschwendtner 5ab0ca53b6 ci: dedupe top-level yarn install in circleci config (#45443)
Dedupes the Yarn run steps, avoiding the need to manually keep
this step in sync (e.g. with the timeout -- which is currently missing
for the windows job)

PR Close #45443
2022-03-25 13:45:07 -07:00
Paul Gschwendtner c24ea4b4f5 test: refactor compiler-cli compliance test to work on windows (#45443)
Recent changes in `rules_nodejs` caused the test case copy file actions
to be transitioned into the `exec` configuration, resulting in much larger
file paths. These paths break on Windows with the shell argument limit, and
with the path limit, causing errors like:

```
ERROR: C:/users/circleci/ng/packages/compiler-cli/test/compliance/test_cases/BUILD.bazel:9:12: Copying file packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/value_composition/structural_directives_if_directive_def.js failed: (Exit 1): cmd.exe failed: error executing command
  cd /d C:/users/circleci/_bazel_circleci/u4uoan2j/execroot/angular
  SET PATH=C:\Program Files\Git\usr\bin;C:\Program Files\Git\bin;C:\Windows;C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0
    SET RUNFILES_MANIFEST_ONLY=1
  cmd.exe /C bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\packages\compiler-cli\test\compliance\test_cases\test_cases--1973427149-cmd.bat
The system cannot find the path specified
```

https://app.circleci.com/pipelines/github/angular/angular/44038/workflows/4b530cb2-f232-4e1d-b35a-e6e085151d08/jobs/1140017

PR Close #45443
2022-03-25 13:45:07 -07:00
Paul Gschwendtner c3b3b73e56 ci: make windows circleci job more robust and use git bash (#45443)
It is totally fine, and expected to use Git Bash for running Bazel
on Windows. In fact this is the most common setup for Bazel on Windows
and it's unrealistic to run without it.

This allows us to remove the old/legacy Powershell setup from CI
which is also quite flaky sometimes and does not reproduce how
Bazel is used on windows-users dev machines.

PR Close #45443
2022-03-25 13:45:07 -07:00
Paul Gschwendtner b73d5aebe0 ci: temporarily disable components-repo-unit-tests job for Bazel NodeJS v5 update (#45443)
The Angular components repository can only start using Bazel Rules NodeJS v5
when `@angular/bazel` is published with support for it. To work around this
cycle we temporarily disable the unit tests job until we migrated the COMP
repo as well.

PR Close #45443
2022-03-25 13:45:07 -07:00
Paul Gschwendtner 3f5e685ca9 refactor: remove unused variables in starlark code to satisfy buildifier (#45443)
We updated buildifier and a few warnings became errors now. This commit
cleans up the failing unused variable instances, making the linter happy.

Additionally for the API extractor BUILD file, the package defaults
need to move to satisfy buildifier.

PR Close #45443
2022-03-25 13:45:07 -07:00
Paul Gschwendtner 69e4c9813e build: migrate more usages from @bazel/typescript to @bazel/concatjs (#45443)
As mentioned in previous commits (check them for more details), `@bazel/typescript`
no longer contains `ts_library`-specific code, so we no longer need that dependency.

PR Close #45443
2022-03-25 13:45:07 -07:00
Paul Gschwendtner 1eaaa5d1cc refactor(bazel): update api-extractor to account for @bazel/typescript change (#45443)
`@bazel/typescript` code moved to `@bazel/concatjs` for the tsc-wrapped code.

Note that this code is likely going to be removed anyway soon when we
move dts bundling from `ng_module` to `ng_package`.

PR Close #45443
2022-03-25 13:45:07 -07:00
Paul Gschwendtner 97e3b00e5b build: add temporary patch to make tsec compatible with rules_nodejs v5 (#45443)
Adds a temporary patch to make `tsec` compatible with `rules_nodejs` v5
until https://github.com/google/tsec/pull/25 is available/released.

PR Close #45443
2022-03-25 13:45:07 -07:00
Paul Gschwendtner 1a149bb50d refactor(bazel): update ngc-wrapped to account for tsc-wrapped move to @bazel/concatjs (#45443)
Previously `tsc-wrapped` which is the foundation for `ngc-wrapped`, resided
in `@bazel/typescript`. It has been moved to `@bazel/concatjs` in rules_nodejs
so we need to account for that as part of our rules_nodejs v5 update.

PR Close #45443
2022-03-25 13:45:07 -07:00
Renovate Bot 29d4b78ada build: update bazel (#45443)
Update `@bazel` packages to the latest 5.x version.

Some of the changes here are modeled after
angular/dev-infra@40c0ac8559.

Co-Authored-By: George Kalpakas <kalpakas.g@gmail.com>

PR Close #45443
2022-03-25 13:45:06 -07:00
Renovate Bot 2e79d09d85 build: update angular to 5a82e60 (#45443)
Update the `@angular/dev-infra-private` package to the latest commit.

PR Close #45443
2022-03-25 13:45:06 -07:00
arturovt dbd6be829f fix(zone.js): read Symbol.species safely (#45369)
We must read `Symbol.species` safely because `this` may be anything. For instance, `this`
may be an object without a prototype (created through `Object.create(null)`); thus
`this.constructor` will be undefined. One of the use cases is SystemJS creating
prototype-less objects (modules) via `Object.create(null)`. The SystemJS creates an empty
object and copies promise properties into that object (within the `getOrCreateLoad`
function). The zone.js then checks if the resolved value has the `then` method and invokes
it with the `value` context. Otherwise, this will throw an error: `TypeError: Cannot read
properties of undefined (reading 'Symbol(Symbol.species)')`.

PR Close #45369
2022-03-24 18:56:37 -07:00
khai f869b9146a docs: update for 2022 angular events (#45386)
PR Close #45386
2022-03-24 14:29:50 -07:00
George Kalpakas 1a05e2dc48 build(docs-infra): upgrade cli command docs sources to 15ff62d4d (#45348)
Updating [angular#13.3.x](https://github.com/angular/angular/tree/13.3.x) from
[cli-builds#13.3.x](https://github.com/angular/cli-builds/tree/13.3.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/0f51d5c70...15ff62d4d):

**Modified**
- help/build.json
- help/generate.json
- help/serve.json
- help/test.json

PR Close #45348
2022-03-24 14:24:09 -07:00
mgechev aa29fc7b5c docs: update the public roadmap (#45415)
Change status of existing projects and add new projects we're working
on.

PR Close #45415
2022-03-24 11:29:30 -07:00
George Kalpakas b481eab39d fix(docs-infra): update (and unpin) dependency versions for preview server (#45390)
Update the `Dockerfile` used to create the preview server to use the
latest stable version of Debian (`bullseye`) and also update package
versions to latest versions.

Also, unpin the versions of installed packages (except for Node.js
related ones) as pinning proved problematic due to many packages
removing old versions from the official repositories.

NOTE:
This change will allow the preview server to be updated on the VM and
take advantage of recent fixes, such as #45349. Currently, the update
fails with the error:
```
E: Version '7.64.0-4+deb10u1' for 'curl' was not found
The command '/bin/sh -c apt-get update -y && apt-get install -y curl=7.64.0-4+deb10u1' returned a non-zero code: 100
```

PR Close #45390
2022-03-24 10:53:59 -07:00
arturovt 2b0da62937 fix(zone.js): check if process is defined when patching the GlobalErrors.install (#45392)
Jasmine checks internally if `process` and `process.on` is defined. Otherwise,
it installs the browser rejection handler through the `global.addEventListener`.
This code may be run in the browser environment where `process` is not defined, and
this will lead to a runtime exception since Webpack 5 removed automatic Node.js polyfills.

PR Close #42260

PR Close #45392
2022-03-24 10:52:35 -07:00
Paul Gschwendtner 960e42b2ac fix(bazel): ng module compilation workers are subject to linker race-conditions (#45393)
The Bazel NodeJS rules provide two ways of accessing node modules:

* A linker which creates a `node_modules` directory in the execroot/or in the runfiles.
* A patched module resolution where no node modules directory necessarily needs to exist.

The first is the default in `rules_nodejs` and the second is technically the most idiomatic
resolution mechanism in Bazel (as it matches with a runfile resolution library).

The linker is prone to race conditions in persistent workers, or non-sandbox environments (like
windows). This is because the linker for all workers will operate on a shared `execroot` directory
and the same `node_modules` directory is modified all the time / potentially conflicting with other
linker processes from other concurrently-running workers.

We rely on the patched module resolution anyway, but just need to disable the unused linker to avoid
issues like the following:

```
---8<---8<--- Start of log, file at /private/var/tmp/_bazel_splaktar/280f06d55552a0d01f89f0955b5acd78/bazel-workers/worker-8-TypeScriptCompile.log ---8<---8<---
[link_node_modules.js] An error has been reported: [Error: ENOENT: no such file or directory, unlink 'node_modules'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'unlink',
  path: 'node_modules'
} Error: ENOENT: no such file or directory, unlink 'node_modules'
---8<---8<--- End of log ---8<---8<---
INFO: Elapsed time: 12.796s, Critical Path: 5.39s
INFO: 645 processes: 477 internal, 12 darwin-sandbox, 156 worker.
```

PR Close #45393
2022-03-24 10:52:13 -07:00
Mike cc90fd55b2 docs(router): Fix typo on segments (#45411)
PR Close #45411
2022-03-24 10:49:36 -07:00
Joey Perrott 1734d1e07e fix(docs-infra): prevent framing of AIO with X-Frame-Options (#45419)
Prevent the docs site from being place in an iframe.

PR Close #45419
2022-03-23 12:20:49 -07:00
Ben Brook ee20410a98 docs(docs-infra): fix TypeScript casing (#45307)
PR Close #45307
2022-03-21 16:57:12 -07:00
Paul Gschwendtner 4321e4cdec build: update to bazel v5 for new runfiles API used in dev-infra (#45407)
https://blog.bazel.build/2022/01/19/bazel-5.0.html#starlark-build-language

PR Close #45407
2022-03-21 16:55:37 -07:00
JoostK 3714305f84 fix(compiler): scope css rules within @layer blocks (#45396)
This commit starts scoping CSS rules nested within `@layer` blocks.

Fixes #45389

PR Close #45396
2022-03-21 14:51:46 -07:00
Joey Perrott e5300d6d75 build(docs-infra): move to circleci v2 api for aio-builds (#45349)
Move to the CircleCI v2 api as the authentication fails for downloading artifacts using the v1 methods.

CircleCI v2 api now requires authentication to occur view the headers instead of being done in a
query parameter, all of the CircleCI interactions are now performed through one fetchFromCircleCi method
which ensures the token is provided in the headers as expected.

PR Close #45349
2022-03-17 14:03:27 -07:00
Andrew Scott 3700323e1c docs: changelog for v13.3.0 release (#45367)
PR Close #45367
2022-03-16 12:54:47 -07:00
Andrew Scott 1398acd90c docs: Revert changelog changes from "release: cut the v13.3.0 release (#45365)" (#45367)
This reverts commit CHANGELOG changes from f00f8c4863.

PR Close #45367
2022-03-16 12:54:47 -07:00
Andrew Scott f00f8c4863 release: cut the v13.3.0 release (#45365) 13.3.0 2022-03-16 12:07:42 -07:00
why520crazy 3148ab93a9 docs: add ngx-gantt to "EXPLORE ANGULAR RESOURCES" page (#45351)
PR Close #45351
2022-03-15 16:29:24 -07:00
Amer Yousuf 7ff4c0bf39 fix(forms): improve error message for invalid value accessors (#45192)
improve error message for invalid value accessors when accessor is not provided as array

PR Close #45192
2022-03-15 13:26:04 -07:00
Lee Cooper 2d51587f36 fix(docs-infra): fix tour of heroes global styles (#45329)
fix button styles in src/styles.css that are missing from code snippets

PR Close #45329
2022-03-15 13:24:53 -07:00
alirezaghey bb9b33053c docs: fix small English typo (#45340)
PR Close #45340
2022-03-14 13:10:20 -07:00
Andrew Scott 7eddf582a1 docs: Fix typo in issue template (#45327)
PR Close #45327
2022-03-14 09:31:02 -07:00
Paul Gschwendtner 2a437616bb ci: update payload size goldens to reflect zone.js update (#45298)
ZoneJS has been updated as part of the lock file refresh by Renovate. The
polyfills bundle reduced in size by around 4k which is due to some code
simplication in ZoneJS being finally released. This is the commit responsible
for the major reduction (also mentioning the reduction):

https://github.com/angular/angular/commit/0f298a13dbd141e5440d1388b124d03384641efe

PR Close #45298
2022-03-14 09:29:12 -07:00
Renovate Bot 956b022254 build: lock file maintenance (#45298)
Refreshes the lock file through Renovate.

PR Close #45298
2022-03-14 09:29:12 -07:00
Jessica Janiuk b839aeb2c1 refactor(core): Switch over to new closure LOCALE vs getLocale() (#45302)
This is a change requested via an LSC due to a deprecation.

PR Close #45302
2022-03-10 12:48:30 -08:00
Andrew Scott 0f8e748b07 release: cut the v13.3.0-rc.0 release (#45321) 13.3.0-rc.0 2022-03-10 11:14:48 -08:00
Kristiyan Kostadinov 895c5417e3 Set up 13.3.0 release for TypeScript 4.6 support (#45319)
* feat(core): support TypeScript 4.6 (#45190)

Adds support for TypeScript 4.6.

PR Close #45190

* build: update version to 13.3.0

Bumps up the version to 13.3.0-next.0 so the tooling can pick it up.
2022-03-10 10:33:21 -08:00
Andrew Scott 6336b8e5b3 refactor(router): Make a few adjustments to createUrlTree for clarity (#45306)
* `tree` function now accepts the old root rather than the old
  `UrlTree`. The `urlTree` argument was only used to get the `root`.
  This change makes it more clear what that pararmeter is used for and
  what's actually being used
* Move the `oldRoot` (previously `urlTree`) to be the first argument of `tree`.
  This change now mirrors the argument order for `replaceSegment` and
  can be read from left to right more easily "in this root,
  replace this old segment group with this new segment group".
* Extract `newRoot` to a variable. This just makes it more clear what's
  going on at the end rather than combining a bunch of operations into
  one.

These changes are being made so that hopefully a future refactor can be
done which does not rely on the `urlTree` argument at all in the
`createUrlTree` function. These refactorings will make it easier to see
1:1 functionlity in these various places.

PR Close #45306
2022-03-09 13:52:38 -08:00
Alistair Kane 10de52887b docs: update <div> to <p> in lifecycle-hooks.md (#45063)
Changes <div> to <p> in description to match the elements in the screenshot.

Update lifecycle-hooks.md

Changes <div> to <p> in description to match the elements in the screenshot.

PR Close #45063
2022-03-09 13:52:16 -08:00
Andrew Kushnir 6f1c941dfe release: cut the v13.2.6 release (#45299) 13.2.6 13.3.0-next.0 2022-03-09 08:53:23 -08:00