Skip to content

Commit

Permalink
Merge pull request #213 from microsoft/octogonz/rush-stack-schemas
Browse files Browse the repository at this point in the history
Update the Rush Stack schemas
  • Loading branch information
iclanton authored May 29, 2024
2 parents b9d7792 + c742847 commit 26c140c
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 24 deletions.
15 changes: 12 additions & 3 deletions api-extractor/v7/api-extractor.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},

"bundledPackages": {
"description": "A list of NPM package names whose exports should be treated as part of this package.",
"description": "A list of NPM package names whose exports should be treated as part of this package. Also supports glob patterns.",
"type": "array",
"items": {
"type": "string"
Expand Down Expand Up @@ -68,8 +68,17 @@
},

"reportFileName": {
"description": "The filename for the API report files. It will be combined with \"reportFolder\" or \"reportTempFolder\" to produce a full file path. The file extension should be \".api.md\", and the string should not contain a path separator such as \"\\\" or \"/\".",
"type": "string"
"description": "The base filename for the API report files. It will be combined with \"reportFolder\" or \"reportTempFolder\" to produce a full file path. It should not contain a file extension, nor a path separator such as \"\\\" or \"/\". The resulting file with have the extension \"api.md\". The \"complete\" report variant uses this base filename directly; other variants insert a name such as \"my-report.alpha.api.md\" or \"my-report.beta.api.md\" for alpha and beta variants.",
"type": ["string"]
},

"reportVariants": {
"description": "To support different approval requirements for different API levels, multiple variants of the API report can be generated. The \"reportVariants\" setting specifies a list of variants to be generated. If omitted, by default only the \"complete\" variant will be generated, which includes all @alpha, @beta, and @public items. Other possible variants are \"alpha\" (@alpha + @beta + @public), \"beta\" (@beta + @public), and \"public\" (@public only). If you are leveraging API-Extractor's trimmed roll-ups feature, these reports will match the contents of each corresponding roll-up.",
"type": "array",
"items": {
"type": "string",
"enum": ["public", "beta", "alpha", "complete"]
}
},

"reportFolder": {
Expand Down
5 changes: 1 addition & 4 deletions heft/v0/run-script-options.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
"title": "Script Path",
"type": "string",
"description": "Path to the script that will be run, relative to the project root.",
"items": {
"type": "string",
"pattern": "[^\\\\]"
}
"pattern": "[^\\\\]"
},

"scriptOptions": {
Expand Down
19 changes: 19 additions & 0 deletions heft/v0/set-environment-variables-plugin.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "CopyFiles Heft Task Event Options",
"description": "Defines configuration used by the \"copyFiles\" Heft task event.",
"type": "object",

"additionalProperties": false,
"required": ["environmentVariablesToSet"],

"properties": {
"environmentVariablesToSet": {
"type": "object",
"additionalProperties": {
"type": "string",
"pattern": ".+"
}
}
}
}
5 changes: 5 additions & 0 deletions heft/v0/storybook.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
"title": "Specifies an NPM dependency name that is used as the CWD target for the storybook commands",
"description": "By default the plugin executes the storybook commands in the local package context, but for distribution purposes it can be useful to split the TS library and storybook exports into two packages. For example, If you create a storybook 'app' project \"my-ui-storybook-library-app\" for the storybook preview distribution, and your main UI component `library` is my-ui-storybook-library. Your 'app' project is able to compile the 'library' storybook app using the CWD target: `\"cwdPackageName\": \"my-ui-storybook-library\"`",
"type": "string"
},
"captureWebpackStats": {
"title": "Specifies whether to capture the webpack stats for storybook build.",
"description": "If this is true, then it will capture the webpack stats for storybook build. Defaults to false.",
"type": "boolean"
}
}
}
2 changes: 1 addition & 1 deletion rush/v5/build-cache.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"cacheEntryNamePattern": {
"type": "string",
"description": "Setting this property overrides the cache entry ID. If this property is set, it must contain a [hash] token. It may also contain a [projectName] or a [projectName:normalize] token."
"description": "Setting this property overrides the cache entry ID. If this property is set, it must contain a [hash] token. It may also contain one of the following tokens: [projectName], [projectName:normalize], [phaseName], [phaseName:normalize], [phaseName:trimPrefix], [os], and [arch]."
},
"azureBlobStorageConfiguration": {
"type": "object",
Expand Down
12 changes: 12 additions & 0 deletions rush/v5/experiments.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@
"forbidPhantomResolvableNodeModulesFolders": {
"description": "If true, Rush will not allow node_modules in the repo folder or in parent folders.",
"type": "boolean"
},
"usePnpmSyncForInjectedDependencies": {
"description": "(UNDER DEVELOPMENT) For certain installation problems involving peer dependencies, PNPM cannot correctly satisfy versioning requirements without installing duplicate copies of a package inside the node_modules folder. This poses a problem for 'workspace:*' dependencies, as they are normally installed by making a symlink to the local project source folder. PNPM's 'injected dependencies' feature provides a model for copying the local project folder into node_modules, however copying must occur AFTER the dependency project is built and BEFORE the consuming project starts to build. The 'pnpm-sync' tool manages this operation; see its documentation for details. Enable this experiment if you want 'rush' and 'rushx' commands to resync injected dependencies by invoking 'pnpm-sync' during the build.",
"type": "boolean"
},
"generateProjectImpactGraphDuringRushUpdate": {
"description": "If set to true, Rush will generate a `project-impact-graph.yaml` file in the repository root during `rush update`.",
"type": "boolean"
},
"useIPCScriptsInWatchMode": {
"description": "If true, when running in watch mode, Rush will check for phase scripts named `_phase:<name>:ipc` and run them instead of `_phase:<name>` if they exist. The created child process will be provided with an IPC channel and expected to persist across invocations.",
"type": "boolean"
}
},
"additionalProperties": false
Expand Down
39 changes: 39 additions & 0 deletions rush/v5/pnpm-config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
"type": "boolean"
},

"alwaysInjectDependenciesFromOtherSubspaces": {
"description": "When a project uses `workspace:` to depend on another Rush project, PNPM normally installs it by creating a symlink under `node_modules`. This generally works well, but in certain cases such as differing `peerDependencies` versions, symlinking may cause trouble such as incorrectly satisfied versions. For such cases, the dependency can be declared as \"injected\", causing PNPM to copy its built output into `node_modules` like a real install from a registry. Details here: https://rushjs.io/pages/advanced/injected_deps/\n\nWhen using Rush subspaces, these sorts of versioning problems are much more likely if `workspace:` refers to a project from a different subspace. This is because the symlink would point to a separate `node_modules` tree installed by a different PNPM lockfile. A comprehensive solution is to enable `alwaysInjectDependenciesFromOtherSubspaces`, which automatically treats all projects from other subspaces as injected dependencies without having to manually configure them.\n\nNOTE: Use carefully -- excessive file copying can slow down the `rush install` and `pnpm-sync` operations if too many dependencies become injected.\n\nThe default value is false.",
"type": "boolean"
},

"globalOverrides": {
"description": "The \"globalOverrides\" setting provides a simple mechanism for overriding version selections for all dependencies of all projects in the monorepo workspace. The settings are copied into the `pnpm.overrides` field of the `common/temp/package.json` file that is generated by Rush during installation.\n\nOrder of precedence: `.pnpmfile.cjs` has the highest precedence, followed by `unsupportedPackageJsonSettings`, `globalPeerDependencyRules`, `globalPackageExtensions`, and `globalOverrides` has lowest precedence.\n\nPNPM documentation: https://pnpm.io/package_json#pnpmoverrides",
"type": "object",
Expand Down Expand Up @@ -170,6 +175,40 @@
"autoInstallPeers": {
"description": "This setting determines whether PNPM will automatically install (non-optional) missing peer dependencies instead of reporting an error. With Rush, the default value is always false.\n\nPNPM documentation: https://pnpm.io/npmrc#auto-install-peers",
"type": "boolean"
},

"alwaysFullInstall": {
"description": "(EXPERIMENTAL) If 'true', then filtered installs ('rush install --to my-project') * will be disregarded, instead always performing a full installation of the lockfile.",
"type": "boolean"
},

"pnpmLockfilePolicies": {
"description": "This setting defines the policies that govern the `pnpm-lock.yaml` file.",
"type": "object",
"additionalProperties": false,
"properties": {
"disallowInsecureSha1": {
"type": "object",
"description": "Forbid sha1 hashes in `pnpm-lock.yaml`.",
"properties": {
"enabled": {
"type": "boolean"
},
"exemptPackageVersions": {
"description": "A list of specific package versions to be exempted from the \"disallowInsecureSha1\" policy",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of exempted versions for this package."
}
}
},
"required": ["enabled", "exemptPackageVersions"]
}
}
}
}
}
36 changes: 36 additions & 0 deletions rush/v5/rush-project.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,42 @@
"disableBuildCacheForOperation": {
"description": "Disable caching for this operation. The operation will never be restored from cache. This may be useful if this operation affects state outside of its folder.",
"type": "boolean"
},
"sharding": {
"type": "object",
"description": "If specified, the operation will be a 'sharded' operation. This means that the operation will be run multiple times in parallel.",
"additionalProperties": false,
"required": ["count"],
"properties": {
"count": {
"type": "integer",
"description": "The number of shards to run. This must be a positive integer."
},
"shardArgumentFormat": {
"type": "string",
"description": "A template string that specifies the command-line argument to pass to the operation for each shard. The string may contain the following placeholders: {shardIndex} {shardCount}. Defaults to --shard=\"{shardIndex}/{shardCount}\""
},
"outputFolderArgumentFormat": {
"type": "string",
"description": "The command-line argument to pass to the operation to specify the output folder. The string may contain the following placeholders: {phaseName} {shardIndex}. Must end with {shardIndex}. Defaults to --shard-output-folder=\".rush/operations/{phaseName}/shards/{shardIndex}\""
},
"shardOperationSettings": {
"type": "object",
"additionalProperties": false,
"properties": {
"weight": {
"description": "The number of concurrency units that this operation should take up. The maximum concurrency units is determined by the -p flag.",
"type": "integer",
"minimum": 0
}
}
}
}
},
"weight": {
"description": "The number of concurrency units that this operation should take up. The maximum concurrency units is determined by the -p flag.",
"type": "integer",
"minimum": 0
}
}
}
Expand Down
18 changes: 2 additions & 16 deletions rush/v5/rush.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,22 +197,8 @@
"additionalProperties": false
},
"variants": {
"description": "Defines the list of installation variants for this repository. For more details about this feature, see this article: https://rushjs.io/pages/advanced/installation_variants/",
"type": "array",
"items": {
"type": "object",
"properties": {
"variantName": {
"description": "The name of the variant. Maps to common/rush/variants/{name} under the repository root.",
"type": "string"
},
"description": {
"description": "",
"type": "string"
}
},
"required": ["variantName", "description"]
}
"description": "DEPRECATED",
"type": "array"
},
"repository": {
"description": "The repository location",
Expand Down

0 comments on commit 26c140c

Please sign in to comment.