* docs: fix character code in expression example
Add '\' prefix so character code is rendered literally,
not as the character it represents.
* docs: format readme.md
Run `ng-dev format files` on readme.md.
This came up while fixing an issue in a Framework migration (https://github.com/angular/angular/pull/43776/files#diff-365738677fa9dfb9fb2c4fac7c75addb58e5a35182603e722e736cc3f24bbf5bR55). The `UpdateBuffer` stops recording changes if a removal with a zero length occurs. This doesn't appear to be an issue with `UpdateBuffer2`, but considering that the former is still being used and that the fix is trivial, I decided to proceed with it.
I've also aligned the behavior between `UpdateBuffer` and `UpdateBuffer2` when dealing with negative removals.
rules_nodejs 4 requires that a package_name property be specified within a ts_library rule for the output to be linked into the package repository. Failing to add the property can cause test failures due to unresolved packages.
This PR adds UpdateBuffer2 which should eventually
replace UpdateBuffer. UpdateBuffer2 internally uses
the magic-string library.
UpdateBuffer and related symbols have been marked
as deprecated.
Closes#21110
BREAKING CHANGE:
With this change we remove the following deprecated APIs
- `TslintFixTask`
- `TslintFixTaskOptions`
**Note:** this only effects schematics developers.
The dev-infra tooling now directly provides public API change testing capabilities that leverage the `api-extractor` utility. These new testing capabilities are shared with framework and components.
`ts-api-guardian` has been removed as a dependency as a result.
The new public API tooling searches for nested package.json files to determine the location of secondary entrypoints. All secondary entrypoints for the CLI related packages now contain a secondary entrypoint package.json file.
The internal monorepo package discovery script was also updated to support the presence of the nested package.json files.
The `esModuleInterop` option is recommended to be enable by TypeScript and corrects several assumptions TypeScript would otherwise make when importing CommonJS files.
This option change helps ensure compatibility as packages move towards ESM.
Reference: https://www.typescriptlang.org/tsconfig#esModuleInterop
With this change we fix an issue which caused a file not found error when trying to modify the file after it was renamed.
Closes#14255 and closes#21083
This change allows consumers of the `NodeWorkflow` to configure the package installation task to use a package manager's `--force` option. This will be used by the `@angular/cli` update command when the update command's force option is used. This change is not intended to enable a schematic to adjust the force option.
All TypeScript files have been updated to pass the new eslint-based linting checks. eslint compatible disabling comments have also been added in place of the previous tslint comments.
With this change we update ajv to version 8
BREAKING CHANGE: support for JSON Schema draft-04 and draft-06 is removed. If you have schemas using the `id` keyword replace them with `$id`. For an interim period we will auto rename any top level `id` keyword to `$id`.
**NB**: This change only effects schematics and builders authors.
When an `externalSchematic` rule was used, the input tree was branched but never merged back into the input tree. This resulted in a different tree instance being returned from the rule. The `externalSchematic` rule now behaves like the `schematic` rule which merges the trees.
This change ensures correct merge behavior when a `HostTree` is wrapped in a `ScopedTree` or `DelegateTree`. Previously the ancestry of the HostTree was not available to the merge.
In this context this is not a breaking change for two reasons.
- `NodePackageInstallTaskOptions` is not exported.
- `NodePackageInstallTask` is using `NodePackageInstallTaskOptions` with `Partial` type which would cause the Class to become an object literal. This can be seen here: efb97c87f0/packages/schematics/angular/ng-new/index.ts (L81-L84)
This change allows option transforms to be directly provided to the NodeWorkflow instead of needing to access the engine host inside the workflow after creation. This also allows option transforms to affect the options prior to schema validation (if enabled).
The manager that is being used to perform the package installation will now be shown during the installation. This provides more insight to the user as well as providing additional troubleshooting information in the event of a failure.
This change provides an additional NodeWorkflow option `schemaValidation`. When enabled, this new option will setup schema-based validation of a schematics options prior to schematic execution. The schema registry provided with the NodeWorkflow is used to perform the validation. This new option removes the need to manually configure validation of schematic options when initializing a schematic runtime.
This change allows the creation of a NodeWorkflow class with a path string instead of requiring a fully configured filesystem host object. This reduces the amount of code necessary to setup a schematics runtime for common cases.
This change first attempts to resolve a schematic referenced via the external schematic rule from the requesting schematic collection. This allows schematic packages that are direct dependencies of another schematic package to be used with the external schematic rule without manual package resolution code within the schematic.
Closes#18098Closes#11026