Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush-lib",
"comment": "Move the IExperimentsJson interface declaration to the new @rushstack/rush-schemas package. rush-lib re-exports the interface so existing imports remain stable.",
"type": "none"
}
],
"packageName": "@microsoft/rush-lib"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/heft-zod-schema-plugin",
"comment": "Initial release. A Heft task plugin that converts zod validators into *.schema.json build outputs using zod 4's built-in z.toJSONSchema(). Includes a withSchemaMeta() helper for attaching $schema/title/description/x-tsdoc-release-tag metadata to a zod schema.",
"type": "minor"
}
],
"packageName": "@rushstack/heft-zod-schema-plugin"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/rush-schemas",
"comment": "Initial release. Pilots a dedicated home for zod-authored Rush configuration schemas (experiments, cobuild, repo-state, build-cache) that emits both runtime validators and *.schema.json artifacts.",
"type": "none"
}
],
"packageName": "@rushstack/rush-schemas"
}
8 changes: 8 additions & 0 deletions common/config/rush/browser-approved-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,18 @@
"name": "@reduxjs/toolkit",
"allowedCategories": [ "libraries", "vscode-extensions" ]
},
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot - these should go in nonbrowser-approved-packages.json

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved both @rushstack/heft-zod-schema-plugin and @rushstack/rush-schemas into nonbrowser-approved-packages.json in 60d69b0.

"name": "@rushstack/heft-zod-schema-plugin",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/problem-matcher",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/rush-schemas",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/rush-themed-ui",
"allowedCategories": [ "libraries" ]
Expand Down
49 changes: 41 additions & 8 deletions common/config/subspaces/build-tests-subspace/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
{
"pnpmShrinkwrapHash": "1266218fdf9ed4d67e625f96e8c1cc4bae29dc68",
"pnpmShrinkwrapHash": "0d3fa0f98a02504bf1f36a2cea15fadf76e1f0b9",
"preferredVersionsHash": "550b4cee0bef4e97db6c6aad726df5149d20e7d9",
"packageJsonInjectedDependenciesHash": "9c068bf4931bd84aa82934f391073bf027e52b69"
"packageJsonInjectedDependenciesHash": "c4fba4181349178d4b8b8aa1fee6cfe76e3639c0"
}
6 changes: 6 additions & 0 deletions common/config/subspaces/default/common-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@
"2.2.1",
"1.1.3" // heft plugin is using an older version of tapable
],
"zod": [
// rush-mcp-server pins to zod 3 to remain compatible with @modelcontextprotocol/sdk;
// heft-zod-schema-plugin and the rush-lib pilot use zod 4 for its built-in
// z.toJSONSchema() API.
"~3.25.76"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot - can we upgrade @modelcontextprotocol/sdk to pull in v4 of zod in the project that currently needs v3?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest @modelcontextprotocol/sdk (1.25+/1.29) does support zod ^3.25 || ^4.0, so in principle yes. I tried the upgrade locally and it surfaces two unrelated breaks that need real source changes in rush-mcp-server:

  1. apps/rush-mcp-server/src/tools/base.tool.ts uses z.objectOutputType<...> — that's a zod-3 internal type that was removed in zod 4; the BaseTool generic plumbing needs to be re-expressed.
  2. The newer SDK pulls in a transitive transport.d.ts that references the DOM HeadersInit global, which doesn't resolve under the current @types/node / lib settings.

Neither is conceptually hard, but both are out-of-scope for this PR (which is the schemas package pivot) and want their own validation. Reverted the speculative upgrade in this branch and left a follow-up task in the PR description so the zod-3 alternative version stays scoped to rush-mcp-server for now.

],
// --- For Webpack 4 projects ----
"css-loader": ["~5.2.7"],
"html-webpack-plugin": ["~4.5.2"],
Expand Down
52 changes: 52 additions & 0 deletions common/config/subspaces/default/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/config/subspaces/default/repo-state.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
{
"pnpmShrinkwrapHash": "b649b4390090c37d5feb374b0c04bf100edc8047",
"pnpmShrinkwrapHash": "a2c8f7f19f774ed72d75aa83c6639ac8e034c8ba",
"preferredVersionsHash": "029c99bd6e65c5e1f25e2848340509811ff9753c"
}
24 changes: 2 additions & 22 deletions common/reviews/api/rush-lib.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { CredentialCache } from '@rushstack/credential-cache';
import { HookMap } from 'tapable';
import { ICredentialCacheEntry } from '@rushstack/credential-cache';
import { ICredentialCacheOptions } from '@rushstack/credential-cache';
import type { IExperimentsJson } from '@rushstack/rush-schemas/lib/experiments.zod';
import { IFileDiffStatus } from '@rushstack/package-deps-hash';
import { IPackageJson } from '@rushstack/node-core-library';
import { IPrefixMatch } from '@rushstack/lookup-by-path';
Expand Down Expand Up @@ -466,28 +467,7 @@ export interface IExecutionResult {
readonly status: OperationStatus;
}

// @beta
export interface IExperimentsJson {
allowCobuildWithoutCache?: boolean;
buildCacheWithAllowWarningsInSuccessfulBuild?: boolean;
buildSkipWithAllowWarningsInSuccessfulBuild?: boolean;
cleanInstallAfterNpmrcChanges?: boolean;
enableSubpathScan?: boolean;
exemptDecoupledDependenciesBetweenSubspaces?: boolean;
forbidPhantomResolvableNodeModulesFolders?: boolean;
generateProjectImpactGraphDuringRushUpdate?: boolean;
noChmodFieldInTarHeaderNormalization?: boolean;
omitAppleDoubleFilesFromBuildCache?: boolean;
omitImportersFromPreventManualShrinkwrapChanges?: boolean;
printEventHooksOutputToConsole?: boolean;
rushAlerts?: boolean;
strictChangefileValidation?: boolean;
useIPCScriptsInWatchMode?: boolean;
usePnpmFrozenLockfileForRushInstall?: boolean;
usePnpmLockfileOnlyThenFrozenLockfileForRushUpdate?: boolean;
usePnpmPreferFrozenLockfileForRushUpdate?: boolean;
usePnpmSyncForInjectedDependencies?: boolean;
}
export { IExperimentsJson }

// @beta
export interface IFileSystemBuildCacheProviderOptions {
Expand Down
4 changes: 4 additions & 0 deletions heft-plugins/heft-zod-schema-plugin/CHANGELOG.json
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot - delete this file (and CHANGELOG.md). They will be autogenerated during publish.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted CHANGELOG.json and CHANGELOG.md in 60d69b0.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@rushstack/heft-zod-schema-plugin",
"entries": []
}
3 changes: 3 additions & 0 deletions heft-plugins/heft-zod-schema-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Change Log - @rushstack/heft-zod-schema-plugin

This log was last generated on Sat, 19 Apr 2026 00:00:00 GMT and should not be manually modified.
24 changes: 24 additions & 0 deletions heft-plugins/heft-zod-schema-plugin/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@rushstack/heft-zod-schema-plugin

Copyright (c) Microsoft Corporation. All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading
Loading