Due to an oversight, the `systemjs` package was previously not included
as a dependency in the boilerplate `package.json` file for
SystemJS-based docs examples, despite it being required by the app.
PR Close#43868
Includes the following fixes:
- Remove unused `format` attribute from `<code-example>` elements
- Explicitly mention that the starting point for the "Phonecat Upgrade
Tutorial" is the 1.5.x version of the original Phonecat tutorial
(since the original tutorial has since been updated to use AngularJS
v1.8.x and use npm instead of bower).
PR Close#43868
Making the typing filtering more explicit allows typescript to properly recognize the presence of the
`prototype` property on the provider within the `registerDestroyHooksIfSupported` method.
PR Close#44087
Remove the truthy check for the classes getter as both paths from the check assume className was not
undefined. This allows for typescript to properly determine the type of `className` in the falsy path
from the truthy check.
PR Close#44087
Modified minlength and maxlength validator to inherit abstractValidator
For every validator type different PR will be raised as discussed in #42378.
Closes#42267
PR Close#43998
Remove BrowserStack from statement about CI tests using the service as Angular now only uses Saucelabs for
our platform specific browser testing.
PR Close#43858
Use the cross-platform `copyfiles` package instead of using `cp` which fails on Windows machines when copying files in the `postbuild` script of the "schematics-for-libraries" example.
PR Close#30966
The Angular v12 alias packages should not be accidentally updated to
v13 by Renovate. These packages are still used by tests for e.g. Ngcc
and should continue to provide the APF v12 View Engine output.
PR Close#44054
The `integration/bazel` folder cannot be excluded within the
`.bazelignore` file. This is necessary so that the integration test
rule can glob for all files within the integration test.
The downside is that the `integration/bazel/<..>` folder is being
discovered by the `//...` target query, causing Starlark files to
be interpreted/validated. e.g.
https://app.circleci.com/pipelines/github/angular/angular/39255/workflows/c6c448ed-9a44-49b3-a0c2-2c7328ce2855/jobs/1079169
Previously such errors did not appear because no Starlark `.bzl` files
within the test imported other files using the `//` absolute resolution.
Explicitly excluding the nested packages using the `--deleted_packages`
option is the most idiomatic way of achieving this currently (similarly
done by `rules_nodejs`). More information on why this is so verbose
currently:
https://github.com/bazelbuild/bazel/issues/12034
PR Close#44061
Re-enables the Bazel integration test that we have disabled
as part of the APF v13 changes. Since there are no UMD files
anymore, the Karma tests no longer worked. Similarly, the Angular
linker had to run for building the production bundle.
PR Close#44061
Re-enables the platform-server integration test that we had
to disable when we landed the APF v13 changes.
We can re-enable it by setting up the `fullySpecified` option
similar to how the CLI does it.
PR Close#44055
This commit updates the necessary config settings to allow `.mjs` files to be able to be parsed by the region parser. We configure the parser to use `inline-c-only` so that comments are generated in like the below
```
// #docregion
```
rather than
```
/* #docregion */
```
PR Close#44027
Updates the `ng-update` migration integration test to run against
v13 migrations. We have removed all older migrations so this integration
test needs to be updated.
PR Close#44016
Re-enables the ng-update migration integration test as all the ESM/CJS
interop changes have landed in the `@angular/core` schematics folder.
PR Close#44016
The schematic code in `@angular/localize` is currently still emitted
as CommonJS, while the rest of `@angular/localize` is strict ESM (which
is also denoted through `type: module` in the package.json file).
The schematic code is currently imported as CJS from the CLI so it
is not a problem right now. Still, it is safer to ensure the code
for schematics is properly picked up as CJS through a local
`package.json` file resetting `type: module` to `type: commonjs`.
PR Close#44016
Sets up a minimal CLI project for testing that `ng add @angular/localize`
works as expected. Schematic sub-packages are prone to CJS/ESM issues
due the overall framework packages being denoted as strict ESM.
This may not be an issue in the concrete scenario of `@angular/localize`
right now, but it is still good to have an integration test similar to
the tests we have for `@angular/core` schematics.
PR Close#44016
This commit extends the logic of the `downgradeModule` function to support NgModule class as an argument. This is needed to simplify the API surface to avoid the need to resolve NgModule factory before invoking the `downgradeModule` method.
PR Close#43973
At present, the get() method provided by HttpContext will never return null. Sometimes we need to check whether an http token is included, so add the has() method to HttpContext.
PR Close#43887
Set up exporting the migration rules from the google3 directly from the internal
@angular/migrations package. This package is an internal only package to be
exposed for loading TSLint rules.
PR Close#43980
This commit changes the Stackblitz live examples to create "webcontainer" projects on Stackblitz.
This approach supports the new Angular v13 packaging formats but webcontainers are not supported on some browers. So this is a temporary solution.
PR Close#44041
The `NgComponentTemplateVisitor` helper was always referring back to the original source file on disk
rather than the virtual file in the migration. This meant that some template migrations could attempt
to modify the template multiple times resulting in invalid output.
As an example the `migration-v13-router-link-empty-expression` migrates the following template:
```
<div [routerLink]></div>
```
to
```
<div [routerLink]="[]"></div>
```
But if the template was referenced multiple times in the program, such as when the component was
referenced in the source and test entry-points, the migration would result in things like:
```
<div [routerLink]="[]"="[]"></div>
```
Fixes#44005.
PR Close#44013
Previously, when parsing code for templates to migrate, CRLF characters were converted to just LF.
This meant that the source-spans being used to overwrite the template strings in the original source code were out of sync with the positions identified in the parsed templates.
This commit fixes this by parsing the raw text of the template taken from the source code instead of processed string contents.
Fixes#44005
PR Close#44013