19 Commits

Author SHA1 Message Date
Alan Agius
ace34b7af3 docs: remove default project from schematic description
The default project is deprecated.
2023-01-03 14:49:19 +00:00
Alan Agius
207358afb8 feat(@angular-devkit/schematics): add runSchematic and runExternalSchematic methods
These async methods are a replacement for the Observable based `runSchematicAsync` and `runExternalSchematicAsync` methods.

DEPRECATED:
The Observable based `SchematicTestRunner.runSchematicAsync` and `SchematicTestRunner.runExternalSchematicAsync` method have been deprecated in favor of the Promise based `SchematicTestRunner.runSchematic` and `SchematicTestRunner.runExternalSchematic`.
2022-12-08 14:49:43 -08:00
ced
49b313f27a fix(@schematics/angular): add missing import for functional interceptor spec 2022-12-02 09:04:50 +00:00
ced
2f92fe7e58 fix(@schematics/angular): add missing semicolon in functional guard/resolver/interceptor 2022-12-02 09:04:22 +00:00
ced
9299dea649 feat(@schematics/angular): generate functional interceptors
Adds a `--functional` flag to the interceptor schematic to generate a functional interceptor (as we can now do for guards and resolvers)
2022-11-28 13:16:36 +00:00
Alan Agius
639a3071c3 refactor: migrate analytics collector to use GA4
This change updates the analytics collector collector to use GA4 instead of UA. The motivation behind this change is that UA will stop collecting data in 2023.

BREAKING CHANGE:

`analyticsSharing` option in the global angular configuration has been
removed without replacement. This option was used to configure the Angular CLI to  access to your own users' CLI usage data.

If this option is used, it can be removed using `ng config --global cli.analyticsSharing undefined`.
2022-10-11 18:52:30 +02:00
Alan Agius
57d93fb7d9 fix(@schematics/angular): mark project as required option
While this option is always required it was not marked as such

Closes #23848
2022-09-02 12:24:51 -04:00
Alan Agius
e751464ea3 fix(@angular/cli): populate path with working directory in nested schematics
With this change we change the how we handle `"format": "path"` schematic property option. We replace the formatter in favour of a `SmartDefaultProvider`, which ensures that nested schematics can access the `workingDirectory`.
2022-05-24 10:19:30 -07:00
Alan Agius
5986befcdc feat(@schematics/angular): remove deprecated options
With this change we removed several deprecated `@schematics/angular` deprecated options.

BREAKING CHANGE:

We removed several deprecated `@schematics/angular` deprecated options.
- `lintFix` have been removed from all schematics. `ng lint --fix` should be used instead.
- `legacyBrowsers` have been removed from the `application` schematics since IE 11 is no longer supported.
- `configuration` has been removed from the `web-worker` as it was unused.
- `target` has been removed from the `service-worker` as it was unused.
2021-07-30 14:26:53 +01:00
Charles Lyding
2b14ac6924 refactor(@schematics/angular): use a helper function for basic generation schematics
An internal schematics helper rule has been introduced for Angular schematics that only generate a set of project files from a set of templated files. Multiple current generation schematics contained essentially the same code which increased the sustainment burden and made refactoring and improvements more complicated.
2021-07-15 12:54:34 +02: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
Alan Agius
076ab0f11f refactor: add correct schema keys
With this change
- We replace `id` with `$id`,  this no longer valid in draft-07.
- Replace all `$schemas` to `http://json-schema.org/draft-07/schema`, this is needed to "pin" the schema to `draft-07`.

More information about `draft-07` can be found https://json-schema.org/draft-07/json-schema-release-notes.html
2021-04-13 10:51:12 -04:00
Alan Agius
ba6f546a02 fix(@schematics/angular): add additionalProperties to all schemas 2021-03-10 08:17:50 -06:00
Alan Agius
c99cef7ed6 docs: remove when true, when false from argument descriptions
It's confusing and redundant to use `When true` and `when false` in descriptions for a CLI arguments because specifying false/true is redundant in a command line argument flag and in most cases users will not do it.

Example:
`--foo=true` is the same as `--foo`
`--foo=false` is the same as `--no-foo`
2020-12-08 14:39:23 -05:00
Alan Agius
affaabe6d3 fix(@schematics/angular): remove lint fix default value
Since will remove lintFix usage warnings when the option is set by a default of another schematic.

Example when executing
```
ng generate module customers --route customers --module app.module
```

The lintFix default of the module schematic will be passed down to the component schematic which would cause a warning to be shown.

Closes #19169
2020-10-22 15:48:30 +02:00
Alan Agius
57b63b3a93 refactor(@schematics/angular): deprecate lintFix option
As part of tslint deprecation we are also deprecated the lintFIx option. Users should use `ng lint --fix` directly instead
2020-10-07 11:12:58 -04:00
Charles Lyding
2bac4a5d50 refactor(@schematics/angular): replace deprecated schematic test call 2020-05-05 10:50:57 -07:00
FG-33
9de282ca32 feat(@schematics/angular): add generator for interceptor
Rework.
2019-09-26 09:58:00 -07:00