9 Commits

Author SHA1 Message Date
Charles Lyding
4a5ca162c3 fix(@angular/cli): avoid redirecting @angular/core in Angular migrations
Files should not redirect `@angular/core` and instead use the direct dependency of the `@schematics/angular` package. This allows old major version migrations to continue to function even though the latest major version may have breaking changes in `@angular/core`.
2021-11-08 09:30:22 -05:00
Charles Lyding
0ba837b2e4 refactor(@angular/cli): use custom scoped require instead of global
To support the eventual conversion of the `@angular/cli` package to ESM, the usage of the global require function must be removed as it is not supported in ESM code. Node.js does have the facility to create custom require functions that can be used when the need to synchronously load a file at runtime is required. Such cases have now been converted to use custom require functions where appropriate.
2021-08-25 11:40:51 +01:00
Charles Lyding
51f89d633f test: enable no-useless-escape lint rule
The `no-useless-escape` eslint rule has now been enabled which removes unneeded characters and complexity from string literals and regular expressions. All files that were in violation of this rule have also been corrected.
2021-08-24 10:51:14 +01:00
Charles Lyding
9afe185fc6 build: enable noImplicitOverride TypeScript option
The `noImplicitOverride` TypeScript option improves code quality by ensuring that properties from base classes are not accidentally overriden.
Reference: https://www.typescriptlang.org/tsconfig#noImplicitOverride
2021-07-02 06:40:36 -04:00
Charles Lyding
31694939aa refactor(@angular/cli): convert Node.js module builtin require to import statement
Now that the TypeScript `esModuleInterop` option is enabled, the Node.js `module` builtin can be used with an import statement.
2021-06-22 17:39:38 +01:00
Alan Agius
cf3b22de58 fix(@angular/cli): correctly redirect nested Angular schematic dependency requests
Closes #21075
2021-06-08 18:29:08 +02:00
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Charles Lyding
e84fa72751 fix(@angular/cli): ensure update migrations are fully executed
With the move to refactor and centralize the update logic, the schematics wrapper context needs to be updated to create an exception for the new location of the update schematic.
2021-04-02 08:09:16 +02:00
Charles Lyding
86d69e22fb fix(@angular/cli): redirect Angular schematic dependency requests to known versions
This change adds logic to redirect module resolution requests for Angular schematics to ensure that the correct versions of core schematic related packages are used.  This also ensures that the runtime version of the schematics package matches the version used inside the schematic and that object instances passed into the schematic are compatible.
The current set of core schematic related packages are `@angular-devkit/*` and `@schematics/angular`.  Only first-party Angular schematics are currently affected by this change.
2021-01-28 12:44:34 +01:00