Skip to content

Commit

Permalink
fix(@schematics/angular): keep deployUrl option when migrating to app…
Browse files Browse the repository at this point in the history
…lication builder

The `deployUrl` option is now supported with the new build system
when using the `application` builder. The migration schematic
no longer needs to remove the option if present.
  • Loading branch information
clydin committed Apr 24, 2024
1 parent 0b03829 commit 23cc337
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ function* updateBuildTarget(
buildTarget.builder = Builders.Application;

for (const [, options] of allTargetOptions(buildTarget, false)) {
// Show warnings for using no longer supported options
if (usesNoLongerSupportedOptions(options, context, projectName)) {
continue;
}

if (options['index'] === '') {
options['index'] = false;
}
Expand Down Expand Up @@ -82,7 +77,6 @@ function* updateBuildTarget(
}

// Delete removed options
delete options['deployUrl'];
delete options['vendorChunk'];
delete options['commonChunk'];
delete options['resourcesOutputPath'];
Expand Down Expand Up @@ -347,19 +341,3 @@ export default function (): Rule {
}),
]);
}

function usesNoLongerSupportedOptions(
{ deployUrl }: Record<string, unknown>,
context: SchematicContext,
projectName: string,
): boolean {
let hasUsage = false;
if (typeof deployUrl === 'string') {
hasUsage = true;
context.logger.warn(
`Skipping migration for project "${projectName}". "deployUrl" option is not available in the application builder.`,
);
}

return hasUsage;
}

0 comments on commit 23cc337

Please sign in to comment.