Skip to content

Commit f313f4f

Browse files
alan-agius4clydin
authored andcommitted
refactor(@angular/cli): remove leftover schematics path handling
Remove interim handling of `"format": "path"`. workingDirectory smart default provider should be used instead.
1 parent f79f8b1 commit f313f4f

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

packages/angular/cli/src/command-builder/schematics-command-module.ts

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { normalize as devkitNormalize, isJsonObject, schema, tags } from '@angular-devkit/core';
9+
import { normalize as devkitNormalize, schema, tags } from '@angular-devkit/core';
1010
import { Collection, UnsuccessfulWorkflowExecution, formats } from '@angular-devkit/schematics';
1111
import {
1212
FileSystemCollectionDescription,
@@ -143,7 +143,6 @@ export abstract class SchematicsCommandModule
143143
);
144144

145145
let shouldReportAnalytics = true;
146-
147146
workflow.engineHost.registerOptionsTransform(async (schematic, options) => {
148147
if (shouldReportAnalytics) {
149148
shouldReportAnalytics = false;
@@ -156,27 +155,6 @@ export abstract class SchematicsCommandModule
156155
);
157156
}
158157

159-
// TODO: The below should be removed in version 15 when we change 1P schematics to use the `workingDirectory smart default`.
160-
// Handle `"format": "path"` options.
161-
const schema = schematic?.schemaJson;
162-
if (!options || !schema || !isJsonObject(schema)) {
163-
return options;
164-
}
165-
166-
if (!('path' in options && (options as Record<string, unknown>)['path'] === undefined)) {
167-
return options;
168-
}
169-
170-
const properties = schema?.['properties'];
171-
if (!properties || !isJsonObject(properties)) {
172-
return options;
173-
}
174-
175-
const property = properties['path'];
176-
if (!property || !isJsonObject(property)) {
177-
return options;
178-
}
179-
180158
return options;
181159
});
182160

0 commit comments

Comments
 (0)