From 512eee02f46839abfa50fa9141e3d421fc3ca039 Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Mon, 25 Mar 2019 20:04:35 -0700 Subject: [PATCH] Update JSON schemas based on Rush 5.6.3 --- rush/v5/rush.schema.json | 19 +++++- rush/v5/version-policies.schema.json | 87 +++++++++++++++++++++------- 2 files changed, 84 insertions(+), 22 deletions(-) diff --git a/rush/v5/rush.schema.json b/rush/v5/rush.schema.json index 234d12c..714969a 100644 --- a/rush/v5/rush.schema.json +++ b/rush/v5/rush.schema.json @@ -60,6 +60,17 @@ }, "additionalProperties": false }, + "yarnOptions": { + "description": "Options that are only used when the Yarn pacakge manager is selected.", + "type": "object", + "properties": { + "ignoreEngines": { + "description": "If true, then Rush will add the \"--ignore-engines\" option when invoking Yarn. * This allows \"rush install\" to succeed if there are dependencies with engines defined in package.json which do not match the current environment. The default value is false.", + "type": "boolean" + } + }, + "additionalProperties": false + }, "projectFolderMaxDepth": { "description": "The maximum folder depth for the projectFolder field. The default value is 2, i.e. a single slash in the path name.", "type": "number" @@ -100,6 +111,10 @@ "sampleEmail": { "description": "An example valid e-mail address for \"Mr. Example\" that conforms to one of the allowedEmailRegExps. Example: \"mr-example@contoso\\.com\"", "type": "string" + }, + "versionBumpCommitMessage": { + "description": "The commit message to use when committing changes during \"rush publish\". Defaults to \"Applying package updates.\"", + "type": "string" } }, "additionalProperties": false @@ -121,7 +136,7 @@ }, "required": [ "variantName", - "description" + "description" ] } }, @@ -130,7 +145,7 @@ "type": "object", "properties": { "url": { - "description": "The remote url of the repository. If a value is provided, \"Rush change\" will use it to find the right remote to compare against.", + "description": "The remote url of the repository. If a value is provided, \"rush change\" will use it to find the right remote to compare against.", "type": "string" } }, diff --git a/rush/v5/version-policies.schema.json b/rush/v5/version-policies.schema.json index 18ee540..eb57d9a 100644 --- a/rush/v5/version-policies.schema.json +++ b/rush/v5/version-policies.schema.json @@ -6,25 +6,71 @@ "type": "array", "items": { "type": "object", - "oneOf": [ - { "$ref": "#/definitions/lockStepVersion" }, - { "$ref": "#/definitions/individualVersion" } - ] + "allOf": [ + { + "oneOf": [ + { "$ref": "#/definitions/lockStepVersion" }, + { "$ref": "#/definitions/individualVersion" } + ] + }, + { + "type": "object", + "properties": { + "policyName": { + "description": "The name of the version policy", + "type": "string" + }, + "dependencies": { + "type": "object", + "description": "Behavior when handling package dependencies during version bumps and publishing", + "properties": { + "versionFormatForPublish": { + "description": "The version to use for dependencies when publishing", + "type": "string", + "enum": ["original", "exact"] + }, + "versionFormatForCommit": { + "description": "The version to use for dependencies when committing to source", + "type": "string", + "enum": ["original", "wildcard"] + } + }, + "required": ["versionFormatForPublish", "versionFormatForCommit"], + "additionalProperties": false + } + } + } + ] }, + "definitions": { + "any-value": { + "type": [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ], + "items": { + "$ref": "#/definitions/any-value" + } + }, + "lockStepVersion": { - "type":"object", + "type": "object", "description": "Lockstep version policy", "properties": { - "policyName": { - "description": "The name of the version policy", - "type": "string" - }, + "policyName": { "$ref": "#/definitions/any-value" }, + "dependencies": { "$ref": "#/definitions/any-value" }, + "definitionName": { "description": "The name of version policy definition", "type": "string", - "enum": [ "lockStepVersion" ] + "enum": ["lockStepVersion"] }, + "version": { "description": "Current version for projects with lockStepVersion policy", "type": "string", @@ -32,36 +78,37 @@ }, "nextBump": { "description": "Type of next version bump", - "enum": [ "prerelease", "release", "minor", "patch", "major" ] + "enum": ["prerelease", "release", "minor", "patch", "major"] }, "mainProject": { "description": "The main project for this version policy", "type": "string" } }, - "required": [ "policyName", "definitionName", "version", "nextBump" ], + "required": ["policyName", "definitionName", "version", "nextBump"], "additionalProperties": false }, + "individualVersion": { - "type":"object", + "type": "object", "description": "Lockstep version policy", "properties": { - "policyName": { - "description": "The name of the version policy", - "type": "string" - }, + "policyName": { "$ref": "#/definitions/any-value" }, + "dependencies": { "$ref": "#/definitions/any-value" }, + "definitionName": { "description": "The name of version policy definition", "type": "string", - "enum": [ "individualVersion" ] + "enum": ["individualVersion"] }, + "lockedMajor": { "description": "The locked major version", "type": "number" } }, - "required": [ "policyName", "definitionName" ], + "required": ["policyName", "definitionName"], "additionalProperties": false } } -} \ No newline at end of file +}