Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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/nonbrowser-approved-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@
"name": "@rushstack/heft-webpack5-plugin",
"allowedCategories": [ "libraries", "tests", "vscode-extensions" ]
},
{
"name": "@rushstack/heft-zod-schema-plugin",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/localization-utilities",
"allowedCategories": [ "libraries" ]
Expand Down Expand Up @@ -378,6 +382,10 @@
"name": "@rushstack/rush-resolver-cache-plugin",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/rush-schemas",
"allowedCategories": [ "libraries" ]
},
{
"name": "@rushstack/rush-sdk",
"allowedCategories": [ "libraries", "tests", "vscode-extensions" ]
Expand Down
55 changes: 45 additions & 10 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": "560bb998f1afda8ac0aa2d2087111c88f23bc845",
"preferredVersionsHash": "550b4cee0bef4e97db6c6aad726df5149d20e7d9",
"packageJsonInjectedDependenciesHash": "9c068bf4931bd84aa82934f391073bf027e52b69"
"packageJsonInjectedDependenciesHash": "3f7b5f1960e61c2a3d039187d38b51c9211f6b17"
}
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
55 changes: 55 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"
}
7 changes: 7 additions & 0 deletions common/reviews/api/node-core-library.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,11 @@ export interface IJsonFileStringifyOptions extends IJsonFileParseOptions {
prettyFormatting?: boolean;
}

// @public
export interface IJsonFileTypeValidator<T> {
parse(input: unknown): T;
}

// @public
export interface IJsonSchemaCustomFormat<T extends string | number> {
type: T extends string ? 'string' : T extends number ? 'number' : never;
Expand Down Expand Up @@ -732,6 +737,8 @@ export class JsonFile {
// @internal (undocumented)
static _formatPathForError: (path: string) => string;
static load(jsonFilename: string, options?: IJsonFileParseOptions): JsonObject;
static loadAndParse<T>(jsonFilename: string, validator: IJsonFileTypeValidator<T>, options?: IJsonFileParseOptions): T;
static loadAndParseAsync<T>(jsonFilename: string, validator: IJsonFileTypeValidator<T>, options?: IJsonFileParseOptions): Promise<T>;
static loadAndValidate(jsonFilename: string, jsonSchema: JsonSchema, options?: IJsonFileLoadAndValidateOptions): JsonObject;
static loadAndValidateAsync(jsonFilename: string, jsonSchema: JsonSchema, options?: IJsonFileLoadAndValidateOptions): Promise<JsonObject>;
static loadAndValidateWithCallback(jsonFilename: string, jsonSchema: JsonSchema, errorCallback: (errorInfo: IJsonSchemaErrorInfo) => void, options?: IJsonFileLoadAndValidateOptions): JsonObject;
Expand Down
Loading
Loading