Commit Graph

20826 Commits

Author SHA1 Message Date
Wojciech Okoński ea89617880 docs(docs-infra): fix handling of client-side errors in networking (#36608)
Previously example for handling client-side errors in networking didn't work when there was no Internet connection.
Caught error is ProgressEvent in such case, not ErrorEvent and error.error.message is undefined.

PR Close #36608
2021-04-29 13:51:42 -07:00
Kristiyan Kostadinov 36c7bebe40 test(core): make tests more resilient to header offset changes (#41883)
Updates some tests where values related to the `HEADER_OFFSET` are hardcoded, causing them to break when the offset is updated. This comes up once in a while during refactorings and these changes should save us some time in the future.

PR Close #41883
2021-04-29 13:51:07 -07:00
Alan Agius 77d920e461 ci: replace `matchCurrentVersion` RegExp negate with semver version (#41886)
While RegExp negation should work as per documentation https://docs.renovatebot.com/configuration-options/#matchcurrentversion it appears that in this case it is not working. See the following commit 076f13da86, therefore we work around this by using a semver version that excludes anything which doesn't match `>= 1`.

PR Close #41886
2021-04-29 13:50:25 -07:00
Andrew Kushnir e53c80c7ca ci: changes to `packages/common/http` should not require `fw-common` approval (#41887)
Currently when the change is made to the code inside the `packages/common/http` folder, both `fw-http` and `fw-common` group members are assigned for review. However only `fw-http` is required and should be sufficient. This commit updates the PullApprove config to exclude `packages/common/http` path from the list of folders that `fw-common` "owns".

PR Close #41887
2021-04-29 13:49:37 -07:00
Alan Agius ca0fcd6c08 ci: only run `publish_snapshot` when not PR (#41877)
Currently, the non forked PRs such as Renovate will run `publish_snapshot` because `CIRCLE_PR_NUMBER` is not defined for PRs which are opened from non forked repos. Instead we add a filter to only run `publish_snapshot` on releasable branches.

Example of run were the mentioned variable is not defined https://app.circleci.com/pipelines/github/angular/angular/32093/workflows/7c8c4cfc-e6f6-44fc-a6dc-a82a6ac862db/jobs/976611

PR Close #41877
2021-04-29 10:16:03 -07:00
George Kalpakas f3331a8350 build(docs-infra): upgrade cli command docs sources to ac6fc449e (#41878)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](2310e277b...ac6fc449e):

**Modified**
- help/add.json
- help/analytics.json
- help/deploy.json
- help/e2e.json
- help/help.json
- help/lint.json
- help/new.json
- help/run.json
- help/test.json

PR Close #41878
2021-04-29 10:09:09 -07:00
cexbrayat 79e82f22a5 docs: remove ts-node form dev deps (#41873)
Follow-up to #41826

The CLI now no longer installs `ts-node` since Protractor has been removed.
See https://github.com/angular/angular-cli/pull/20601 for the relevant PR in angular-cli.
This change has been released in the CLI v12.0.0-rc.1

PR Close #41873
2021-04-29 10:08:14 -07:00
Alan Agius 05209fa397 ci: exclude packages which don't have a major from being batched (#41865)
With this change we exclude packages that are not stable yet from being batched in the `all non-major dependencies`. The reason behind this is that these package can contain breaking changes in minor versions, hence they should be treated as breaking and a PR should be opened separately.
PR Close #41865
2021-04-29 10:07:27 -07:00
Alan Agius 9eea39fb2f ci: enable Renovate for remark packages (#41865)
Automatic updates of these packages is now possible as AIO tooling has been updated to use the latest version.

See: https://github.com/angular/angular/pull/41721
PR Close #41865
2021-04-29 10:07:26 -07:00
Sam Severance d80ad951c6 docs: correct toh router tutorial (#41859)
* `SelectivePreloadingStrategyService` is already provided in the root
   module, so it should not be added to `AppRoutingModule` providers
   array

PR Close #41859
2021-04-29 10:05:30 -07:00
Renovate Bot 595a75cda4 build: update dependency karma to v6 (#41696)
PR Close #41696
2021-04-29 10:04:24 -07:00
Teri Glover 55d9713664 docs: Edits to remove jargon (#41536)
PR Close #41536
2021-04-28 15:11:32 -07:00
Keen Yee Liau c31d6ea24e docs: remove tslint, codelyzer & protractor from dev deps (#41826)
TSLint and Codelyzer were deprecated in v11.
Protractor is no longer installed by default in new projects in v12.

PR Close #41826
2021-04-28 14:33:11 -07:00
Kapunahele Wong 695b72a972 docs: imrpove accessibility of lifecycle hooks example (#41071)
PR Close #41071
2021-04-28 14:26:34 -07:00
Kapunahele Wong 3ccad85b01 docs: add error page for NG6999 (#41708)
Adds page for NG6999 error for VE builds that attempt
to consume an Ivy-compiled library.
Will go here: https://angular.io/errors/NG6999

PR Close #41708
2021-04-28 14:22:46 -07:00
Cosmin Ababei 42a64f8676 docs: remove mention of scheduleTick in markForCheck (#41845)
markForCheck doesn't call scheduleTick, thus I removed the comment which mentioned this.
PR Close #41845
2021-04-28 12:34:49 -07:00
Pete Bacon Darwin 76c824b6da build(docs-infra): update to latest puppeteer (#41764)
The updates to WebDriver required an update to puppeteer to ensure
that the correct Chromium was downloaded.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 4f20cd16b4 build(docs-infra): add `assert` polyfill (#41764)
With this change we add the `assert` polyfill which is required because `timezone-mock` is a Node.JS library which is being used in Browser.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius bdb8deaa51 build(docs-infra): remove `src/generated` from `ng test` configuration (#41764)
Assets are stored in memory during `ng test` hence since `src/generated` are unused we shouldn't include them.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 17ffb7480f build(docs-infra): update angular packages to `12.0.0-rc.0` (#41764)
Update Angular packages to `12.0.0-rc.0`

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 754e5ba839 build: update angular package to `12.0.0-rc.0` (#41764)
Update Angular packages to `12.0.0-rc.0`

PR Close #41764
2021-04-28 12:33:20 -07:00
Jessica Janiuk bbda73e55a docs: release notes for the v12.0.0-rc.1 release 2021-04-28 12:09:20 -07:00
Jessica Janiuk 444775c352 docs: release notes for the v11.2.12 release 2021-04-28 11:33:23 -07:00
George Kalpakas 641fa6944f ci: re-enable the `@angular/components` unit tests (#41816)
Previously, the `components-repo-unit-tests` CI job was temporarily
disabled due to a version mismatch between the `rules_nodejs`
dependency version on the two repos (angular/angular and
angular/components).

Now that both repos have been updated to a `rules_nodejs` version
>=2.0.0, we can re-enable the job and have `@angular/components` unit
tests run on every build.

PR Close #41816
2021-04-28 09:57:48 -07:00
George Kalpakas 044b380e5a build: update remark packages (#41721)
This commit updates the `remark` packages to v12 instead of the latest
(v13), because v13 is a major breaking change that requires more
investigation and work.

More specifically, v13 replaces the internals of `remark` with a new
CommonMark-compliant parser. (See their [release notes][1] for more
info.)

This change causes our old `remark` plugins (in [renderMarkdown.js][2])
to stop working.

[1]: https://github.com/remarkjs/remark/releases/tag/13.0.0
[2]: d42019d412/aio/tools/transforms/remark-package/services/renderMarkdown.js (L17-L24)

PR Close #41721
2021-04-28 09:27:23 -07:00
Alan Agius 1aed2f3234 fix(dev-infra): replace `chalk` require with namespace import (#41847)
Since we now use version 4 we can use namespace imports and leverage in build types.

PR Close #41847
2021-04-28 09:22:31 -07:00
Renovate Bot 876ca8edba build: update dependency chalk to v4 (#41847)
PR Close #41847
2021-04-28 09:22:31 -07:00
George Kalpakas fff2ca540f fix(dev-infra): correctly detect prettier config (#41860)
This commit uses the correct property name (`prettier` vs `pretter`) to
check whether prettier is enabled via the config.

(It also fixes some typos in `dev-infra`.)

PR Close #41860
2021-04-28 09:21:09 -07:00
George Kalpakas 3b7d4ebbd6 fix(docs-infra): do not redirect disambiguated URLs (#41842)
In #41788, logic was added to disambiguate case-insensitively equal docs
paths/URLs. This process includes appending a `-\d+` suffix to some
paths/URLs (for example, `/.../inject-1`). Unfortunately, some of the
Firebase redirects configured in `firebase.json` would match these URLs
and redirect them to non-existing paths.
Example failures: [stable][1], [next][2]

NOTE:
This was not picked up in the regular CI tests run for PRs, because the
local devserver and the preview server used to test PRs do not support
Firebase-like redirects.

This commit fixes this by ensuring these disambiguated paths/URLs are
not matched by the redirect rules by checking whether the part of the
suffix after the `-` contains any numeric digits. While this check is
not ideal, it should be good enough for our purpose, since the legacy
URLs that we do want to redirect contain suffixes such as `-class`,
`-function` and thus no numeric digits.

[1]: https://circleci.com/gh/angular/angular/974345
[2]: https://circleci.com/gh/angular/angular/974346

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas 2076bde100 build(docs-infra): take disambiguated doc paths into account when generating the sitemap (#41842)
In ##41788, the `disambiguateDocsPathsProcessor` was introduced to fix
an issue with case-insensitively equal paths. This processor may alter
the paths of some docs and thus their final URL in the app.

Previously, both the `disambiguateDocPathsProcessor` and the
`createSitemap` processor (which relies on the docs' computed paths to
generate the sitemap file) were configured to run before the
"rendering-docs" phase. However, this resulted in the
`disambiguateDocPathsProcessor`'s running after `createSitemap`, which
meant that the sitemap did not include the updated doc paths.

This commit fixes it by ensuring that the
`disambiguateDocPathsProcessor` is explicitly run before the
`createSitemap` processor, so that the latter will be able to take into
account any changes made by the former.

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas 1aee5a79c6 test(docs-infra): make it easier to identify the failing URL in `testFirebaseRedirection.spec.ts` (#41842)
This commit includes the URL under test in the test description in
`testFirebaseRedirection.spec.ts` to make it easier to identify the
affected URL when a test fails.

It also avoids unnecessarily creating multiple `FirebaseRedirector`
instances by sharing instances between tests.

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas d1f5a9e44b test(docs-infra): update `firebase-test-utils` to support regex-based redirects (#41842)
This commit updates the utilities in `firebase-test-utils/` to also
support testing Firebase redirects that are configured using regular
expressions (via the `regex` property).
See the [Firebase docs][1] for more details.

[1]: https://firebase.google.com/docs/hosting/full-config#redirects

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas ae1ce5f9c7 refactor(docs-infra): prepare `firebase-test-utils` for accepting regex-based redirects (#41842)
Currently, the utilities for testing Firebase redirects assume that the
redirects are configured using the glob-based `source` property.
However, Firebase also supports configuring redirects using regular
expressions (via the `regex` property).
See the [Firebase docs][1] for more details.

This commit refactors the utilities in `firebase-test-utils/` to make it
easy to add support for such regex-based redirect configurations.

[1]: https://firebase.google.com/docs/hosting/full-config#redirects

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas 36e10e7932 test(docs-infra): fix `create-example` tests on Windows (#41842)
Previously, the tests in `create-example.spec.ts` made assertions using
some hard-coded absolute paths (something like `/foo/bar`). This caused
the tests to fail on Windows, where the absolute paths are prefixed with
the drive letter (something like `C:/foo/bar`).

This commit uses `path.resolve()` to ensure paths are converted to the
format used on the current OS.

PR Close #41842
2021-04-27 14:05:23 -07:00
Alan Agius d580b27195 ci: several updates to renovate configuration (#41834)
- Since the PRs needs to get reviewed we replace label `action: merge` with `action: review`.
- Add `remark` and `remark-html` to `ignoreDeps` since they require some work to bump.
- Remove `commitMessage`, Renovate now creates better commit messages.
- Group all non-major dependencies into a single group and schedule the updates for every Thursday

PR Close #41834
2021-04-27 13:26:04 -07:00
Joey Perrott 0140d04ced feat(dev-infra): create the prettier formatter for ng-dev format tooling (#41824)
Add support to use prettier for formatting using `ng-dev format`.

PR Close #41824
2021-04-27 12:23:05 -07:00
Zach Arend cd004d4a23 ci: add Zach Arend to pullapprove groups (#41839)
Add Zach Arend to the pullapprove groups for public api, size tracking,
and circular deps.

PR Close #41839
2021-04-27 11:35:03 -07:00
Joey Perrott b1ae31c712 fix(dev-infra): add github token requirement for discover-new-conflicts (#41825)
Add the github token option/requirement for the pr discover-new-conflicts
command.

PR Close #41825
2021-04-27 10:23:16 -07:00
Amadou Sall 3783976543 docs: remove the section "Using components vs services from other modules" (#41835)
This section states that "Importing a module with services means that you will have a new instance of that service". This is only true for lazy-loaded `NgModules`. For non-lazy-loaded modules, my understanding is that the providers arrays are flattened into the root injector meaning that importing a module with a service doesn't create a new instance of that service.

PR Close #41835
2021-04-27 10:16:49 -07:00
Pete Bacon Darwin 01d1c46b16 build(docs-infra): update dgeni-packages to fix version list (#41832)
The current version was not being computed correctly for
next and rc deployments of the angular.io website.

Fixes #41829

PR Close #41832
2021-04-27 10:15:29 -07:00
Renovate Bot f978976970 build: update @types/jasmine to version 3.6.10 (#41830)
PR Close #41830
2021-04-27 10:14:09 -07:00
Pete Bacon Darwin da6ed1562e fix(compiler): strip scoped selectors from `@font-face` rules (#41815)
`@font-face` rules cannot contain nested selectors. Nor can they be
nested under a selector. Normally this would be a syntax error by the
author of the styles. But in some rare cases, such as importing styles
from a library, and applying `:host ::ng-deep` to the imported styles,
we can end up with broken css if the imported styles happen to contain
`@font-face` rules.

This commit works around this problem by sanitizing such cases (erasing
any scoping selectors) during emulated ShadowDOM encapsulation style
processing.

Fixes #41751

PR Close #41815
2021-04-27 09:12:28 -07:00
Joey Perrott af12d8deaa fix(core): update supported range of node versions to only include LTS versions (#41822)
Update the supported range of node versions for Angular to only include supported LTS versions.

PR Close #41822
2021-04-26 15:21:14 -07:00
Joey Perrott 7a4414401a fix(upgrade): update supported range of node versions to only include LTS versions (#41822)
Update the supported range of node versions for Angular to only include supported LTS versions.

PR Close #41822
2021-04-26 15:21:13 -07:00
Joey Perrott f3c2abec6c fix(service-worker): update supported range of node versions to only include LTS versions (#41822)
Update the supported range of node versions for Angular to only include supported LTS versions.

PR Close #41822
2021-04-26 15:21:13 -07:00
Joey Perrott 961296adf5 fix(router): update supported range of node versions to only include LTS versions (#41822)
Update the supported range of node versions for Angular to only include supported LTS versions.

PR Close #41822
2021-04-26 15:21:13 -07:00
Joey Perrott 1224726c42 fix(platform-server): update supported range of node versions to only include LTS versions (#41822)
Update the supported range of node versions for Angular to only include supported LTS versions.

PR Close #41822
2021-04-26 15:21:13 -07:00
Joey Perrott 8dd382eda5 fix(platform-browser): update supported range of node versions to only include LTS versions (#41822)
Update the supported range of node versions for Angular to only include supported LTS versions.

PR Close #41822
2021-04-26 15:21:13 -07:00
Joey Perrott f259c246a6 fix(platform-browser-dynamic): update supported range of node versions to only include LTS versions (#41822)
Update the supported range of node versions for Angular to only include supported LTS versions.

PR Close #41822
2021-04-26 15:21:13 -07:00
Joey Perrott 08ca922a68 fix(localize): update supported range of node versions to only include LTS versions (#41822)
Update the supported range of node versions for Angular to only include supported LTS versions.

PR Close #41822
2021-04-26 15:21:13 -07:00