21968 Commits

Author SHA1 Message Date
Alex Rickabaugh 8a99ef18b4 release: cut the v12.2.13 release (#44038)
PR Close #44038
12.2.13
2021-11-03 13:19:34 -07:00
JoostK 656f574962 refactor(compiler-cli): extract error documentation base url into separate file (#43965)
Prior refactorings caused unexpected g3 sync issues due to a patch that
changes the error documentation URL. This commit moves the base url into
a separate file to make this more apparent.

PR Close #43965
2021-11-02 16:38:54 -07:00
JoostK 9a89db790f fix(compiler-cli): avoid broken references in .d.ts files due to @internal markers (#43965)
The `ErrorCode` enum in the `error_code.ts` file is governed by public
api guards but the other top-level exports from that file are exempt
from public api documentation and are therefore marked as `@internal`.
However, TypeScript is configured with the `stripInternal` compiler
option such that declarations with `@internal` markers are not emitted
into the `.d.ts` files, but this means that the reexports in the barrel
file end up referring to missing declarations.

The `stripInternal` option is considered internal and its documentation
states to use at your own risk (as per https://github.com/microsoft/TypeScript/issues/45307).
Having the option enabled is desirable for us as it works well for
hiding class fields that are marked `@internal`, which is an effective
way to hide members from the .d.ts file. As a workaround for the issue
with top-level symbols, the declarations with `@internal` markers are
moved to dedicated files for which no public api guard is setup,
therefore allowing their `@internal` markers to be dropped.

Fixes #43097

PR Close #43965
2021-11-02 16:38:54 -07:00
Alan Agius 8d060dd2f2 fix(docs-infra): search box input line-height (#43983)
This fixes an issue on Safari which caused the text to be pushed down when blurring out of the search input field. The root cause of the problem appears to be that previously the computed line height was that of 32px, which caused a shift in content.

Closes #43935

PR Close #43983
2021-10-29 15:47:08 -07:00
Joe Martin (Crowdstaffing) 09ee0af280 docs: update note (#43979)
Update the note for hierarchy of locale identifiers.

PR Close #43979
2021-10-29 15:46:35 -07:00
Joe Martin (Crowdstaffing) 6e89e1d757 docs: remove link (#43979)
Remove redundant link.

PR Close #43979
2021-10-29 15:46:35 -07:00
George Kalpakas 156927de9e refactor(docs-infra): remove obsolete way of disabling DocViewer animations (#43977)
Previously, there were two ways to disable view transition animations in
`DocViewerComponent`: Using a `.no-animations` CSS class on the
`<aio-doc-viewer>` element and setting the static
`DocViewerComponent.animationsEnabled` property to `false`. The latter
was only used to disable animations for testing purposes.

With the recent introduction of `AppComponent.reducedMotion`, there is
now an easy way to disable animations in tests using the
`.no-animations` class (which is applied by `AppComponent` based on the
value of `AppComponent.reducedMotion`). Therefore, it is no longer
necessary to have `DocViewerComponent.animationEnabled`.

This commit removes the now obsolete `animationsEnalbed` property.

PR Close #43977
2021-10-29 15:45:00 -07:00
George Kalpakas 84f71ed723 fix(docs-infra): improve accessibility by respecting prefers-reduced-motion (#43977)
Make the app easier to use for people with motion sensitivities by
disabling several animations (esp. ones involving moving things around)
when the user prefers reduced motion. The user's preference is detected
using the [prefers-reduced-motion][1] CSS media feature.

Disabled animations include:
- View fade in/out transitions.
- Sidenav open/close animations.
- Top-menu color and size changes.
- Contributor cards flip animations.

For more details on using `prefers-reduced-motion` and disabling
Angular animations see:
- [Designing with reduced motion for motion sensitivities][2]
- [Disabling Angular animations at runtime][3]

[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
[2]: https://www.smashingmagazine.com/2020/09/design-reduced-motion-sensitivities/
[3]: https://dev.to/this-is-angular/disabling-angular-animations-at-runtime-9a6

PR Close #43977
2021-10-29 15:45:00 -07:00
George Kalpakas e9c228b76d ci: improve angular.io deployment process for the master branch (#43963)
Previously, the master branch was only deployed to the
`next-angular-io-site` Firebase site, which is connected to the
`next.angular.io` domain. However, if the master major version was
higher than the stable major version (or the RC major version in case
there was an active RC), we also had to manually configure (via the
Firebase console and/or DNS records) the `v<X>.angular.io` domain to
redirect to `next.angular.io`. Then, once `<X>` became the new stable or
RC version, we had to manually remove the redirect (to let
`v<X>.angular.io` be redirected to `angular.io` or `rc.angular.io`).

This commit is part of a new process that reduces the manual steps as
follows (the steps below only apply when the master major version is
higher than the current stable and RC (if applicable)):
- A `v<X>-angular-io-site` Firebase site will be created as soon as the
  version in the `master` branch's `package.json` is updated to a new
  major.
- The `v<X>.angular.io` domain will be connected to that new Firebase
  site.
- When deploying from the master branch, we will deploy to both
  `next-angular-io-site` and `v<X>-angular-io-site`. In addition, the
  deployment to `v<X>-angular-io-site` will update the Firebase config
  file to redirect to `next.angular.io`.
- When the master version becomes the new stable/RC, we will start
  deploying to `v<X>-angular-io-site` from the stable/RC branch, which
  will update the Firebase config to stop redirecting to
  `next.angular.io` and redirect to `(rc.)angular.io` instead (without
  requiring changes in the Firebase console or DNS).

PR Close #43963
2021-10-29 15:05:08 -07:00
George Kalpakas ce1cf929c3 ci: improve angular.io deployment process for the RC branch (#43963)
Previously, (when there was an active RC) the RC branch was only
deployed to the `rc-angular-io-site` Firebase site, which is connected
to the `rc.angular.io` domain. However, if the RC major version was
higher than the stable major version, we also had to manually configure
(via the Firebase console and/or DNS records) the `v<X>.angular.io`
domain to redirect to `rc.angular.io`. Then, once `<X>` became the new
stable version, we had to manually remove the redirect (to let
`v<X>.angular.io` be redirected to `angular.io`).

This commit is part of a new process that reduces the manual steps as
follows (the steps below only apply to RC versions that have a higher
major version than the current stable):
- A `v<X>-angular-io-site` Firebase site will be created for the new RC
  version.
- The `v<X>.angular.io` domain will be connected to that new Firebase
  site.
- When deploying from the RC branch, we will deploy to both
  `rc-angular-io-site` and `v<X>-angular-io-site`. In addition, the
  deployment to `v<X>-angular-io-site` will update the Firebase config
  file to redirect to `rc.angular.io`.
- When the RC version becomes the new stable, we will start deploying to
  `v<X>-angular-io-site` from the stable branch, which will update the
  Firebase config to stop redirecting to `rc.angular.io` and redirect to
  `angular.io` instead (without requiring changes in the Firebase
  console or DNS).

PR Close #43963
2021-10-29 15:05:08 -07:00
George Kalpakas 3295cd5914 ci: improve angular.io deployment process for the stable branch (#43963)
Previously, the stable branch was always deployed to the
`v<X>-angular-io-site` Firebase site, which was connected to the
`angular.io` domain. Whenever a new major version was released (and
became the new stable version), the `angular.io` domain had to be
disconnected from the previous Firebase site and be connected to the new
`v<Y>-angular-io-site` Firebase site. This was a manual process that
involved making changes in the Firebase console and the DNS records.

This commit is part of a new process that reduces the manual steps as
follows:
- A new `stable-angular-io-site` Firebase site is created.
- The `angular.io` domain will be connected to that new Firebase site.
- When deploying from the stable branch, we will deploy to both
  `stable-angular-io-site` and `v<X>-angular-io-site`. In addition, the
  deployment to `v<X>-angular-io-site` will update the Firebase config
  file to redirect to `angular.io`.
- When a new major version is released, we will start deploying from the
  new stable branch to `stable-angular-io-site`, but there will be no
  need to connect/disconnect the `angular.io` domain. Also,
  `v<X>.angular.io` will stop redirecting to `angular.io` by means of
  updating the Firebase config file (without requiring changes in the
  Firebase console or DNS).

PR Close #43963
2021-10-29 15:05:08 -07:00
George Kalpakas 3bb878be00 feat(docs-infra): add post-deploy actions for testing more redirect configs (#43963)
Add `deploy-to-firebase` post-deploy actions to allow testing various
redirect configs.
In a future commit, this will allow testing redirects for the `stable`,
`rc` and `next` deployments via the Firebase config file (without
requiring changes in the Firebase console or DNS).

PR Close #43963
2021-10-29 15:05:08 -07:00
George Kalpakas 30b3af8f15 refactor(docs-infra): make it easier to configure Firebase redirects at deployment (#43963)
Refactor the `deploy-to-firebase` post-deploy actions by extracting
logic to separate helper functions. This makes it easier to create more
functions for testing various redirect configs (in a future commit).

PR Close #43963
2021-10-29 15:05:08 -07:00
George Kalpakas 91f46dd0ac feat(docs-infra): add more granular support for configuring Firebase redirects at deployment (#43963)
Previously, there was a `deploy-to-firebase` pre-deploy action for
configuring Firebase to redirect non-file requests to `angular.io`. This
is used for ensuring that `rc.angular.io` is correctly redirected to
`angular.io`, even when people have previously visited (and have a
ServiceWorker activated on) `rc.angular.io`.

This commit adds pre-deploy actions for configuring Firebase to redirect
a deployment to any of `angular.io`, `rc.angular.io` or
`next.angular.io` and also configure whether all requests or only
non-file requests will be redirected.
In a future commit, this will allow managing redirects for the `stable`,
`rc` and `next` deployments via the Firebase config file (without
requiring changes in the Firebase console or DNS).

PR Close #43963
2021-10-29 15:05:08 -07:00
George Kalpakas c12b64d7f9 feat(docs-infra): create undo functions for all pre-deploy actions (#43963)
Create functions to undo the changes made by any pre-deploy action.
In a future commit, this will allow deploying a build to multiple
projects/sites with different small tweaks for each.

PR Close #43963
2021-10-29 15:05:08 -07:00
George Kalpakas 5f06fea90b test(docs-infra): avoid running expensive operations when focusing/skipping tests (#43963)
Previously, the pre-computation of branch version info for the
`deploy-to-firebase` tests would always take place even when the tests
that used that info were skipped. This pre-computation involves network
access and may add a noticeable delay.

This commit refactors the tests to not do the pre-computation if the
corresponding tests are skipped. This allows for a faster iteration
when focusing on a different set of tests.

PR Close #43963
2021-10-29 15:05:08 -07:00
George Kalpakas d7b25db874 refactor(docs-infra): move deploy-to-firebase post-deploy actions to a separate file (#43963)
Move some functions that are used as post-deploy actions from
`deploy-to-firebase/index.mjs` to a separate file
(`deploy-to-firebase/post-deploy-actions.mjs`) to keep `index.mjs` small
and easier to maintain.

NOTE:
While not strictly necessary atm, `post-deploy-actions.mjs` uses the
same default export pattern for consistency with `utils.mjs`.

PR Close #43963
2021-10-29 15:05:08 -07:00
George Kalpakas 1374b63566 refactor(docs-infra): move deploy-to-firebase pre-deploy actions to a separate file (#43963)
Move some functions that are used as pre-deploy actions from
`deploy-to-firebase/index.mjs` to a separate file
(`deploy-to-firebase/pre-deploy-actions.mjs`) to keep `index.mjs` small
and easier to maintain.

Also, rename the `removeServiceWorker()` function to
`disableServiceWorker()`, which is a little more accurate.

NOTE:
While not strictly necessary atm, `pre-deploy-actions.mjs` uses the same
default export pattern for consistency with `utils.mjs`.

PR Close #43963
2021-10-29 15:05:08 -07:00
George Kalpakas 2d6815b3b1 refactor(docs-infra): move deploy-to-firebase util functions to a separate file (#43963)
Move some util functions from `deploy-to-firebase/index.mjs` to a
separate file (`deploy-to-firebase/utils.mjs`) to keep `index.mjs` small
and easier to maintain.

NOTE:
To make it easier to mock functions in tests, `utils.mjs` uses a default
export (instead of multiple named exports) and references local
functions through the default exported object.

PR Close #43963
2021-10-29 15:05:07 -07:00
George Kalpakas bcec9667a2 refactor(docs-infra): create logSectionHeader() helper in deploy-to-firebase script (#43963)
Create a `logSectionHeader()` helper function to avoid duplicating code.

PR Close #43963
2021-10-29 15:05:07 -07:00
George Kalpakas ee73ba77c0 refactor(docs-infra): convert deploy-to-firebase script to ESM (#43963)
Convert the `deploy-to-firebase` script (and corresponding tests) from
CommonJS format to ESM.

PR Close #43963
2021-10-29 15:05:07 -07:00
George Kalpakas 073cd1c4e8 build(docs-infra): validate computed deployments in deploy-to-firebase script (#43963)
The `deploy-to-firebase` script might have to deploy a single AIO build
to multiple projects/sites (potentially with small tweaks between each).

This commit adds a step to validate the computed deployments to ensure
they are compatible with each other (for example, that there is exactly
one primary deployment that builds the app and sets the theme/mode and
that all secondary deployments are compatible with the primary one).

PR Close #43963
2021-10-29 15:05:07 -07:00
George Kalpakas 6864f0aa6b refactor(docs-infra): add name and type to deployment info (#43963)
This commit adds two new properties, `name` and `type`, to deployment
info data. This will make it easier to differentiate between deployment
targets (e.g. primary vs secondary) and will provide more informative
log messages.

In a subsequent commit, this new data can be used to validate the
computed deployments list.

PR Close #43963
2021-10-29 15:05:07 -07:00
George Kalpakas 326abdfb69 fix(docs-infra): improve an error message in deploy-to-firebase script (#43963)
This commit fixes a typo in an error message thrown in the
`deploy-to-firebase` script (`but it was but it was` --> `but it was`).

It also makes the error clearer when the request was not redirected.

Old error:
> Expected '<original-url>' to be redirected to '<expected-url>', but it
> was but it was redirected to 'undefined'.

New error:
> Expected '<original-url>' to be redirected to '<expected-url>', but it
> was not redirected.

PR Close #43963
2021-10-29 15:05:07 -07:00
George Kalpakas 760e741a47 build(docs-infra): enable linting for deploy-to-firebase scripts (#43963)
This commit enables linting for the scripts in
`aio/scripts/deploy-to-firebase/`. It also makes the necessary changes
to the files to make linting pass.

PR Close #43963
2021-10-29 15:05:07 -07:00
George Kalpakas 491a84d0ad refactor(docs-infra): move deploy-to-firebase.js into a dedicated directory (#43963)
This commit moves the `aio/scripts/deploy-to-firebase.js` script into a
new directory, `aio/scripts/deploy-to-firebase/`. This will make it
easier to break it up into multiple smaller files to better organize the
code (without polluting the `aio/scripts/` directory).

PR Close #43963
2021-10-29 15:05:07 -07:00
Jochen Kraushaar 25959f9e14 docs(common): describe behavior when reference changes (#42863)
PR Close #42863
2021-10-28 11:34:24 -07:00
vthinkxie 8f402c9d06 fix(core): support InjectFlags argument in NodeInjector.get() (#41592)
The `InjectFlags` argument was defined for both `getOrCreateInjectable()` and `Injector`, but was ignored in `NodeInjector`.
This PR adds support for getting parent token via `NodeInjector.get()`.

close #31776

PR Close #41592
2021-10-28 11:20:00 -07:00
Jessica Janiuk 515ba60b6f release: cut the v12.2.12 release (#43966) 12.2.12 2021-10-27 11:19:33 -07:00
Mladen Jakovljević 7af9900c35 fix(docs-infra): fix heritage links (#43956)
Fix incorrect escape of special characters when rendering member heritage docs. Example: DefaultIterableDiffer docs incorrectly renders what this class implements - it does not fully display generic types of implemented interfaces.

PR Close #43956
2021-10-27 16:13:35 +00:00
Virginia Dooley 515949e7e6 docs: review tag added (#43465)
PR Close #43465
2021-10-27 16:13:02 +00:00
Virginia Dooley dec1ebf56d docs: reviewed tag added (#43487)
PR Close #43487
2021-10-26 23:57:44 +00:00
Jessica Janiuk e25ebb6058 Revert "fix(compiler-cli): avoid broken references in .d.ts files due to @internal markers" (#43961)
This reverts commit 69821fcef6.

PR Close #43961
2021-10-26 23:51:22 +00:00
Jessica Janiuk 728926412d Revert "refactor(compiler-cli): extract error documentation base url into separate file" (#43961)
This reverts commit bd5acf60f2.

PR Close #43961
2021-10-26 23:51:22 +00:00
Jessica Janiuk 2d9d270ed8 Revert "fixup! refactor(compiler-cli): extract error documentation base url into separate file" (#43961)
This reverts commit 3d82d566d2.

PR Close #43961
2021-10-26 23:51:21 +00:00
Virginia Dooley 52c37eab9b docs: reviewed tag added (#43488)
PR Close #43488
2021-10-26 22:57:20 +00:00
Joey Perrott 8fcfd87d99 ci: update commit-message-based-labels job to be called labels (#43944)
Using the job name labels results in a more readable and better looking Github status.

PR Close #43944
2021-10-26 20:20:04 +00:00
Joey Perrott ea6667cadc build: create issue selector configuration (#43923)
Create a configuration file to set up the new issue selector page.

PR Close #43923
2021-10-26 20:19:06 +00:00
JoostK bf59401473 refactor(compiler-cli): extract error documentation base url into separate file (#43527)
Prior refactorings caused unexpected g3 sync issues due to a patch that
changes the error documentation URL. This commit moves the base url into
a separate file to make this more apparent.

PR Close #43527
2021-10-26 18:22:33 +00:00
JoostK 112557497c fix(compiler-cli): avoid broken references in .d.ts files due to @internal markers (#43527)
The `ErrorCode` enum in the `error_code.ts` file is governed by public
api guards but the other top-level exports from that file are exempt
from public api documentation and are therefore marked as `@internal`.
However, TypeScript is configured with the `stripInternal` compiler
option such that declarations with `@internal` markers are not emitted
into the `.d.ts` files, but this means that the reexports in the barrel
file end up referring to missing declarations.

The `stripInternal` option is considered internal and its documentation
states to use at your own risk (as per https://github.com/microsoft/TypeScript/issues/45307).
Having the option enabled is desirable for us as it works well for
hiding class fields that are marked `@internal`, which is an effective
way to hide members from the .d.ts file. As a workaround for the issue
with top-level symbols, the declarations with `@internal` markers are
moved to dedicated files for which no public api guard is setup,
therefore allowing their `@internal` markers to be dropped.

Fixes #43097

PR Close #43527
2021-10-26 18:22:33 +00:00
dirk diebel 5f32863a74 docs(docs-infra): change deprecated keyboardEvent.keyCode example to use keyboardEvent.code (#43934)
PR Close #43934
2021-10-26 00:05:23 +00:00
amayer42 5e482c4f0c docs(localize): fix spelling of documentation link (#43941)
Fixes the spelling of 'i18n' in a documentation link.
PR Close #43941
2021-10-25 22:05:17 +00:00
Andrew Kushnir c831c67c00 test(platform-browser): complete component bootstrap before switching to the next test (#43933)
The bootstrap tests that reused the same component (the `HelloRootCmp` one) were randomly failing due to the incomplete cleanup between tests. This commit ensures that the component bootstrap is fully cimpleted and there are no pending async actions before going to the next test.

PR Close #43933
2021-10-25 17:58:26 +00:00
George Kalpakas 067ae54d46 fix(ngcc): support alternate UMD layout when adding new imports (#43931)
In #43879, `UmdReflectionHost` was updated to deal with the new UMD
format used by Rollup, where the parenthesis is around the wrapper
function and not the wrapper function call.
For reference, this caused failures in the `ngcc-validation` repo
([example 1][1], [example 2][2]).

This commit updates `UmdRenderingFormatter` to also handle both UMD
formats. In order to validate the change, this commit also updates the
`UmdRenderingFormatter` tests to run against both UMD formats.

[1]: https://circleci.com/gh/angular/ngcc-validation/65916
[2]: https://circleci.com/gh/angular/ngcc-validation/65758

PR Close #43931
2021-10-25 17:56:27 +00:00
ericcheng2005 7817892684 refactor(core): made comment structure consistent in index.ts (#43684)
changed second big block of comments to use multi-line comment structure instead of multiple single-line comments

PR Close #43684
2021-10-21 18:39:59 +00:00
ericcheng2005 9a12530685 docs: added commas to sentences in .vscode/README.md (#43684)
PR Close #43684
2021-10-21 18:39:59 +00:00
ericcheng2005 78d94c1fb5 docs: fixed minor grammar mistakes in CONTRIBUTING (#43684)
PR Close #43684
2021-10-21 18:39:59 +00:00
Alan Agius cef01b804a ci: update angular/dev-infra/github-actions sha (#43904)
Consume latest version of `angular/dev-infra/github-actions`.

PR Close #43904
2021-10-21 16:26:35 +00:00
Alan Agius 718814c6ae ci: replace breaking-changes-label with commit-message-based-labels (#43904)
See: https://github.com/angular/dev-infra/pull/269 for more context

PR Close #43904
2021-10-21 16:26:35 +00:00
George Kalpakas e09556fe2b refactor(service-worker): avoid unnecessary writes to cache when version fails (#43680)
When an app version is detected as broken, the SW calls the
`Driver#versionFailed()` method. Previously, this method would in turn
call the `Driver#sync()` method, which writes some metadata about the
SW's state to the `ngsw:/:db:contol` cache. More specifically,
`Driver#sync()` persists info about all known app versions, which one is
the latest and also what version each client is assigned to.

However, no relevant info is changed inside `Driver#versionFailed()`, so
the call to `Driver#sync()` is redundant (since there are no changes
that need to be synced with the cache). This is a left-over from
before #43518, when `Driver#versionFailed()` used to update version
assignments and thus did require synchronization with the cache.

This commit removes the redundant `Driver#sync()` call to avoid an
unnecessary write to the cache.

PR Close #43680
2021-10-21 14:20:51 +00:00