mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-19 04:26:01 +08:00
With this change we retain the order of types are declared in the schema. Ex: ```json "oneOf": [ { "type": "boolean" }, { "type": "string", "description": "The name of the migration to run." } ] ``` Currently this will result in: ```js { type: "string", types: ["string", "boolean"] } ``` This is because we use the order of types from the `allTypes` contant variable.a3a657f7e7/packages/angular_devkit/core/src/json/schema/utility.ts (L12)
Now this will result in: ```js { type: "boolean", types: ["boolean", "string"] }; ``` The CLI parser will iterate over each type and will set a value of true if `--migrate-only` option is provided. Related test in the CLL parser1d105eb569/packages/angular/cli/models/parser_spec.ts (L34)
1d105eb569/packages/angular/cli/models/parser_spec.ts (L132-L138)