Skip to content

Commit

Permalink
fix(@angular/cli): disallow additional properties in builders sections
Browse files Browse the repository at this point in the history
With this change we disallow add additional properties to the `target` object.

(cherry picked from commit 6e6517b)
  • Loading branch information
alan-agius4 authored and filipesilva committed May 10, 2021
1 parent c0efbe7 commit 8524d20
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/angular/cli/lib/config/workspace-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,12 @@
}
}
},
"additionalProperties": false,
"required": ["builder"]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"builder": {
"const": "@angular-devkit/build-angular:app-shell"
Expand All @@ -349,6 +351,7 @@
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"builder": {
"const": "@angular-devkit/build-angular:browser"
Expand All @@ -370,6 +373,7 @@
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"builder": {
"const": "@angular-devkit/build-angular:dev-server"
Expand All @@ -391,6 +395,7 @@
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"builder": {
"const": "@angular-devkit/build-angular:extract-i18n"
Expand All @@ -412,6 +417,7 @@
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"builder": {
"const": "@angular-devkit/build-angular:karma"
Expand All @@ -433,6 +439,7 @@
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"builder": {
"const": "@angular-devkit/build-angular:protractor"
Expand All @@ -454,6 +461,7 @@
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"builder": {
"const": "@angular-devkit/build-angular:server"
Expand All @@ -475,6 +483,7 @@
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"builder": {
"const": "@angular-devkit/build-angular:tslint"
Expand All @@ -496,10 +505,15 @@
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"builder": {
"const": "@angular-devkit/build-angular:ng-packagr"
},
"defaultConfiguration": {
"type": "string",
"description": "A default named configuration to use when a target configuration is not provided."
},
"options": {
"$ref": "../../../../angular_devkit/build_angular/src/ng-packagr/schema.json"
},
Expand Down

0 comments on commit 8524d20

Please sign in to comment.