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
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
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
- 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
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
`@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
These docs were linking directly to docs that have ambiguous paths.
These changes ensure that these links are not affected by the
disambiguation processing of those docs.
PR Close#41788
When two documents have the same `outputPath`, only differing by
letter casing, there can be problems on case-insensitive file-systems:
Only one of each of the docs would end up being written.
Moreover, the Webpack 5 bundler will error if it comes across files
that have this kind of ambiguous paths.
This commit adds a new docType: `disambiguator`, which will display
a list of the docs that match an ambiguous path. Each of the ambiguous
docs is then given a unique path and outputPath to ensure there are no
collisions.
PR Close#41788
Previously, the fallback key used for the CircleCI cache could match a
cache indefinitely (as long as `.bazelversion` didn't change). This
would allow the cache to grow quite large, which in turn would lead to
slow-down in CI jobs. See, also, angular/angular-cli#17533 for more
details of the impact of a growing CircleCI cache.
Unfortunately, using something like the lockfile checksum in the
fallback cache key would cause too many cache misses (esp. with
automatic updates via Renovate), again slowing CI down.
(The problem was originally discussed [here][2].)
This commit uses the technique described in [this blogpost][1] to
invalidate the cache monthly. This keeps the extra cache misses low
(essentially once per month per fork), while also preventing the cache
from growing indefinitely.
[1]: https://support.circleci.com/hc/en-us/articles/360012618473-Creating-a-daily-cache
[2]: https://github.com/angular/angular/pull/41467#discussion_r607818494
PR Close#41814
Previously, the `autoLinkCode` Dgeni post-processor would not apply the
custom filters when matching the whole contents of a `<code>` element.
This meant that custom filters would not be applied to single-word
`<code>` elements.
You can see occurrences of this issue in the following sections of the
"Reactive forms" guide:
- [Creating nested form groups][1]
(look for `street, city, state, and zip controls`)
- [Using the FormBuilder service to generate controls][2]
(look for `group method`)
This commit fixes this by also applying the custom filters when
processing the whole contents of a `<code>` element.
This commit also updates the `filterPipes` custom filter to allow
matching a pipe's name in a single-word `<code>` element (where there is
no preceeding `|` character).
[1]: https://v10.angular.io/guide/reactive-forms#creating-nested-form-groups
[2]: https://v10.angular.io/guide/reactive-forms#using-the-formbuilder-service-to-generate-controls
PR Close#41709
While generating the docs, when a `<code>` element is inspected for
auto-linking, the `autoLinkCode` Dgeni post-processor will break its
contents up into words and generate text nodes for those words that
should not be auto-linked.
Previously, our text node visitor would visit these generated text nodes
and try to auto-link them too. As a result, it would unnecessarily
process nodes that had already been checked (and could potentially
generate links that would otherwise be ignored).
You can see an occurrence of this issue in the
[Create the product list][1] section of the
"Getting started with Angular" tutorial (look for `<a>`).
This commit fixes this by ensuring the visitor will skip the current
node and any nodes generated by `autoLinkCode`.
[1]: https://v11.angular.io/start#create-the-product-list
PR Close#41709
Currently we save a reference to an `LView` on most DOM nodes created by Angular either by saving
the `LView` directly in the `__ngContext__` or by saving the `LContext` which has a reference to
the `LView`. This can be a problem if the DOM node is retained in memory, because the `LView` has
references to all of the child nodes of the view, as well as other internal data structures.
Previously we tried to resolve the issue by clearing the `__ngContext__` when a node is removed
(see https://github.com/angular/angular/pull/36011), but we decided not to proceeed, because it can
slow down destruction due to a megamorphic write.
These changes aim to address the issue while reducing the performance impact by assigning a unique
ID when an `LView` is created and adding it to `__ngContext__`. All active views are tracked in
a map where their unique ID is used as the key. We don't need to worry about leaks within that map,
because `LView`s are an internal data structure and we have complete control over when they are
created and destroyed.
Fixes#41047.
PR Close#41358
`global` property is not available in the browser, previously this was polyfilled through `core-js`. This now fails with `global is not defined`, since global cannot be accessed when not defined.
PR Close#41739
`global` property is not available in the browser, previously this was polyfilled through core-js.
(cherry picked from commit 827cf41386dcd7e496e107d6b32c54281bc935f1)
PR Close#41739
`core-js` is a CJS package which cannot be used directly in the browser. `core-js-bundle` is the bundled version of the package which can be used in directly in the browser.
PR Close#41739
This commits makes the SystemJS-based docs examples more self-contained
by ensuring the necessary WebDrivers are fetched before running the e2e
tests.
This is a follow-up to #41689. (See there for more discussion.)
PR Close#41796