21 Commits

Author SHA1 Message Date
Daniil Dubrava
464cf330a1 feat(@angular-devkit/schematics): support null for options parameter from OptionTransform type 2022-04-18 09:38:31 +02:00
Alan Agius
053b7d66c2 feat(@angular-devkit/schematics): remove deprecated tslint APIs
BREAKING CHANGE:

With this change we remove the following deprecated APIs
- `TslintFixTask`
- `TslintFixTaskOptions`

**Note:** this only effects schematics developers.
2021-08-02 16:57:56 +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
f7dc97f40e refactor(@angular-devkit/schematics): allow use of a package manager's force option
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.
2021-05-10 16:21:25 +01:00
Charles Lyding
c1512e4274 build: update files to be eslint compliant
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.
2021-05-03 07:31:02 -04:00
Charles Lyding
37a06a7c37 build: format all files
All files are now formatted using the ng-dev tools via prettier.
2021-04-28 16:05:49 -07: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
76915409df refactor(@angular-devkit/schematics): allow customization of node workflow engine host
This adds an option to the NodeWorkflow to allow a custom NodeModulesEngineHost to be used with the workflow.
2021-01-28 12:44:34 +01:00
Charles Lyding
9280d87650 refactor(@angular-devkit/schematics): allow direct workflow option transforms
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).
2020-11-16 13:14:24 -05:00
Charles Lyding
34f769fcde refactor(@angular-devkit/schematics): use interface for NodeWorkflow options
This change removes the previously repeated type definitions for the options of the NodeWorkflow class.
2020-10-02 06:30:18 -04:00
Charles Lyding
5bc3616f30 feat(@angular-devkit/schematics): support schema validation in NodeWorkflow
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.
2020-10-02 06:30:18 -04:00
Charles Lyding
017581cacb feat(@angular-devkit/schematics): allow using a root path with NodeWorkflow
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.
2020-10-02 06:30:18 -04:00
Charles Lyding
33656f7aa8 fix(@angular-devkit/schematics): allow custom registry for node package task 2020-02-10 16:02:05 -08:00
Charles Lyding
5df776780d fix(@angular-devkit/schematics): use NodeWorkflow root to resolve collections 2019-10-28 17:48:08 -07:00
Alan Agius
15ef15e94a style: remove redundant max-line-length disables and fix other lint issues 2019-07-24 19:06:21 -07:00
Minko Gechev
d274add7b4
fix(@angular/cli): use correct schematic defaults considering workspace (#15041)
Fix #14986

This PR includes some refactoring to simplify the interaction
of the `NodeWorkflow` and the `BaseWorkflow` with the registry.

We were registering redundant `addPostTransform`s. Some of them in
the constructor of the `BaseWorkflow`, which did not allow us to
intercept `addUndefinedDefaults`.

Additionally, we were setting the `validateOptionsWithSchema` transform
multiple times unnecessarily.

An issue left to fix is support for the `--project` option in
schematic commands. Currently, `getProjectName` does not know about
this option, since `createWorkflow` does not know how to parse the
command line arguments. The parsing logic is implemented partially
by the concrete implementation of the `SchematicCommand` template
method.
2019-07-16 09:58:01 -07:00
Hans Larsen
15032aa2e8 feat(@angular-devkit/schematics): add support for analytics
Schematics context now have an (optional) analytics field that, if set,
should be used to report usage. This can be set even in some cases where
analytics is disabled (to a noop analytics).
2019-03-20 15:08:07 -07:00
Hans
0070ea46e6 fix(@angular-devkit/schematics): fix task executor on Windows
Before we did not denormalize the paths, but were expecting to get paths as options.
2018-09-06 07:37:48 -07:00
Hans
9517677158 feat(@angular-devkit/core): remove addUndefinedDefaults as default post transform
And various bug fixes.
2018-09-06 07:37:48 -07:00
Hans Larsen
2ba1f16295 refactor(@angular-devkit/schematics): add a BaseWorkflow which implements logic
And receives in its constructor the enginehost and registry. This simplifies the creation
of the NodeWorkflow, or later on the Google3Workflow etc, since all the duplicate logic
is now in a single base class.

This is yak shaving for internal stuff.
2018-08-01 11:41:49 -04:00
Hans Larsen
44086c60ff build: move devkit repo back to angular-cli 2018-06-05 18:50:06 -07:00