"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/schematics/angular/migrations/update-12/update-angular-config.ts" between
angular-cli-12.0.3.tar.gz and angular-cli-12.0.4.tar.gz

About: Angular CLI is a command line interface for Angular.

update-angular-config.ts  (angular-cli-12.0.3):update-angular-config.ts  (angular-cli-12.0.4)
skipping to change at line 62 skipping to change at line 62
delete options.forkTypeChecker; delete options.forkTypeChecker;
} }
} }
}); });
} }
function updateOptions( function updateOptions(
target: workspaces.TargetDefinition, target: workspaces.TargetDefinition,
optionsToUpdate: typeof ServerBuilderOptions | typeof BrowserBuilderOptions, optionsToUpdate: typeof ServerBuilderOptions | typeof BrowserBuilderOptions,
): void { ): void {
// This is a hacky way to make this migration idempotent.
// `defaultConfiguration` was only introduced in v12 projects and hence v11 pr
ojects do not have this property.
// Setting it as an empty string will not cause any side-effect.
if (typeof target.defaultConfiguration === 'string') {
return;
}
target.defaultConfiguration = '';
if (!target.options) { if (!target.options) {
target.options = {}; target.options = {};
} }
const configurationOptions = target.configurations && Object.values(target.con figurations); const configurationOptions = target.configurations && Object.values(target.con figurations);
for (const [optionName, oldDefault, newDefault] of optionsToUpdate) { for (const [optionName, oldDefault, newDefault] of optionsToUpdate) {
let value = target.options[optionName]; let value = target.options[optionName];
if (value === newDefault) { if (value === newDefault) {
// Value is same as new default // Value is same as new default
 End of changes. 1 change blocks. 
0 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)