diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab0d9ab1111..f7cfeeb2c71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,16 +9,20 @@ on: jobs: build: strategy: + fail-fast: false matrix: include: - - NodeVersion: 18.18.x + - NodeVersion: 18.20.x NodeVersionDisplayName: 18 OS: ubuntu-latest - - NodeVersion: 20.9.x + - NodeVersion: 20.18.x NodeVersionDisplayName: 20 OS: ubuntu-latest - - NodeVersion: 18.18.x - NodeVersionDisplayName: 18 + - NodeVersion: 22.12.x + NodeVersionDisplayName: 22 + OS: ubuntu-latest + - NodeVersion: 22.12.x + NodeVersionDisplayName: 22 OS: windows-latest name: Node.js v${{ matrix.NodeVersionDisplayName }} (${{ matrix.OS }}) runs-on: ${{ matrix.OS }} diff --git a/.vscode/launch.json b/.vscode/launch.json index ba209eeed00..2ca13c319af 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -68,7 +68,8 @@ "name": "Attach", "type": "node", "request": "attach", - "port": 9229 + "port": 9229, + "outFiles": [], }, { "name": "Launch Rush Extension", diff --git a/apps/api-documenter/CHANGELOG.json b/apps/api-documenter/CHANGELOG.json index 190de6c7757..c54f142f91a 100644 --- a/apps/api-documenter/CHANGELOG.json +++ b/apps/api-documenter/CHANGELOG.json @@ -1,6 +1,221 @@ { "name": "@microsoft/api-documenter", "entries": [ + { + "version": "7.26.7", + "tag": "@microsoft/api-documenter_v7.26.7", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "7.26.6", + "tag": "@microsoft/api-documenter_v7.26.6", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.30.3`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "7.26.5", + "tag": "@microsoft/api-documenter_v7.26.5", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.30.2`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "7.26.4", + "tag": "@microsoft/api-documenter_v7.26.4", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "7.26.3", + "tag": "@microsoft/api-documenter_v7.26.3", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.30.1`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "7.26.2", + "tag": "@microsoft/api-documenter_v7.26.2", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "7.26.1", + "tag": "@microsoft/api-documenter_v7.26.1", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "7.26.0", + "tag": "@microsoft/api-documenter_v7.26.0", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "minor": [ + { + "comment": "Update TSDoc dependencies." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.30.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "7.25.22", + "tag": "@microsoft/api-documenter_v7.25.22", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.29.9`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "7.25.21", + "tag": "@microsoft/api-documenter_v7.25.21", + "date": "Thu, 24 Oct 2024 00:15:47 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "7.25.20", + "tag": "@microsoft/api-documenter_v7.25.20", + "date": "Mon, 21 Oct 2024 18:50:09 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "7.25.19", + "tag": "@microsoft/api-documenter_v7.25.19", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "7.25.18", + "tag": "@microsoft/api-documenter_v7.25.18", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "7.25.17", "tag": "@microsoft/api-documenter_v7.25.17", diff --git a/apps/api-documenter/CHANGELOG.md b/apps/api-documenter/CHANGELOG.md index 9ea8d297ea5..9c78a407511 100644 --- a/apps/api-documenter/CHANGELOG.md +++ b/apps/api-documenter/CHANGELOG.md @@ -1,6 +1,73 @@ # Change Log - @microsoft/api-documenter -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 7.26.7 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 7.26.6 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 7.26.5 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 7.26.4 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 7.26.3 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 7.26.2 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 7.26.1 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 7.26.0 +Sat, 23 Nov 2024 01:18:55 GMT + +### Minor changes + +- Update TSDoc dependencies. + +## 7.25.22 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 7.25.21 +Thu, 24 Oct 2024 00:15:47 GMT + +_Version update only_ + +## 7.25.20 +Mon, 21 Oct 2024 18:50:09 GMT + +_Version update only_ + +## 7.25.19 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 7.25.18 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 7.25.17 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/apps/api-documenter/package.json b/apps/api-documenter/package.json index de656e1ed24..0ecd2cb415d 100644 --- a/apps/api-documenter/package.json +++ b/apps/api-documenter/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/api-documenter", - "version": "7.25.17", + "version": "7.26.7", "description": "Read JSON files from api-extractor, generate documentation pages", "repository": { "type": "git", @@ -21,7 +21,7 @@ "typings": "dist/rollup.d.ts", "dependencies": { "@microsoft/api-extractor-model": "workspace:*", - "@microsoft/tsdoc": "~0.15.0", + "@microsoft/tsdoc": "~0.15.1", "@rushstack/node-core-library": "workspace:*", "@rushstack/terminal": "workspace:*", "@rushstack/ts-command-line": "workspace:*", diff --git a/apps/api-extractor/CHANGELOG.json b/apps/api-extractor/CHANGELOG.json index 49b6dc3faad..99ea1ab4648 100644 --- a/apps/api-extractor/CHANGELOG.json +++ b/apps/api-extractor/CHANGELOG.json @@ -1,6 +1,143 @@ { "name": "@microsoft/api-extractor", "entries": [ + { + "version": "7.49.2", + "tag": "@microsoft/api-extractor_v7.49.2", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.30.3`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.4`" + } + ] + } + }, + { + "version": "7.49.1", + "tag": "@microsoft/api-extractor_v7.49.1", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.30.2`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.3`" + } + ] + } + }, + { + "version": "7.49.0", + "tag": "@microsoft/api-extractor_v7.49.0", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade the bundled compiler engine to TypeScript 5.7.2" + } + ] + } + }, + { + "version": "7.48.1", + "tag": "@microsoft/api-extractor_v7.48.1", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.30.1`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.2`" + } + ] + } + }, + { + "version": "7.48.0", + "tag": "@microsoft/api-extractor_v7.48.0", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "minor": [ + { + "comment": "Update TSDoc dependencies." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.30.0`" + } + ] + } + }, + { + "version": "7.47.12", + "tag": "@microsoft/api-extractor_v7.47.12", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.29.9`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.1`" + } + ] + } + }, + { + "version": "7.47.11", + "tag": "@microsoft/api-extractor_v7.47.11", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.0`" + } + ] + } + }, + { + "version": "7.47.10", + "tag": "@microsoft/api-extractor_v7.47.10", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "patch": [ + { + "comment": "Fix a compatibility issue with usage of `getModeForUsageLocation` in TypeScript 5.6" + } + ] + } + }, { "version": "7.47.9", "tag": "@microsoft/api-extractor_v7.47.9", diff --git a/apps/api-extractor/CHANGELOG.md b/apps/api-extractor/CHANGELOG.md index b8eb5ba91ee..31374e24faf 100644 --- a/apps/api-extractor/CHANGELOG.md +++ b/apps/api-extractor/CHANGELOG.md @@ -1,6 +1,52 @@ # Change Log - @microsoft/api-extractor -This log was last generated on Fri, 13 Sep 2024 00:11:42 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 01:11:42 GMT and should not be manually modified. + +## 7.49.2 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 7.49.1 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 7.49.0 +Tue, 07 Jan 2025 22:17:32 GMT + +### Minor changes + +- Upgrade the bundled compiler engine to TypeScript 5.7.2 + +## 7.48.1 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 7.48.0 +Sat, 23 Nov 2024 01:18:55 GMT + +### Minor changes + +- Update TSDoc dependencies. + +## 7.47.12 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 7.47.11 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 7.47.10 +Tue, 15 Oct 2024 00:12:31 GMT + +### Patches + +- Fix a compatibility issue with usage of `getModeForUsageLocation` in TypeScript 5.6 ## 7.47.9 Fri, 13 Sep 2024 00:11:42 GMT diff --git a/apps/api-extractor/package.json b/apps/api-extractor/package.json index 86b170d252d..75b83587177 100644 --- a/apps/api-extractor/package.json +++ b/apps/api-extractor/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/api-extractor", - "version": "7.47.9", + "version": "7.49.2", "description": "Analyze the exported API for a TypeScript library and generate reviews, documentation, and .d.ts rollups", "keywords": [ "typescript", @@ -38,8 +38,8 @@ }, "dependencies": { "@microsoft/api-extractor-model": "workspace:*", - "@microsoft/tsdoc-config": "~0.17.0", - "@microsoft/tsdoc": "~0.15.0", + "@microsoft/tsdoc-config": "~0.17.1", + "@microsoft/tsdoc": "~0.15.1", "@rushstack/node-core-library": "workspace:*", "@rushstack/rig-package": "workspace:*", "@rushstack/terminal": "workspace:*", @@ -49,11 +49,11 @@ "resolve": "~1.22.1", "semver": "~7.5.4", "source-map": "~0.6.1", - "typescript": "5.4.2" + "typescript": "5.7.2" }, "devDependencies": { - "@rushstack/heft-node-rig": "2.6.31", - "@rushstack/heft": "0.67.2", + "@rushstack/heft-node-rig": "2.6.48", + "@rushstack/heft": "0.68.12", "@types/heft-jest": "1.0.1", "@types/lodash": "4.14.116", "@types/minimatch": "3.0.5", diff --git a/apps/api-extractor/src/analyzer/ExportAnalyzer.ts b/apps/api-extractor/src/analyzer/ExportAnalyzer.ts index 5268cc8eb16..f90db96bf45 100644 --- a/apps/api-extractor/src/analyzer/ExportAnalyzer.ts +++ b/apps/api-extractor/src/analyzer/ExportAnalyzer.ts @@ -265,7 +265,11 @@ export class ExportAnalyzer { : importOrExportDeclaration.moduleSpecifier; const mode: ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined = specifier && ts.isStringLiteralLike(specifier) - ? TypeScriptInternals.getModeForUsageLocation(importOrExportDeclaration.getSourceFile(), specifier) + ? TypeScriptInternals.getModeForUsageLocation( + importOrExportDeclaration.getSourceFile(), + specifier, + this._program.getCompilerOptions() + ) : undefined; const resolvedModule: ts.ResolvedModuleFull | undefined = TypeScriptInternals.getResolvedModule( @@ -905,7 +909,8 @@ export class ExportAnalyzer { ts.isStringLiteralLike(importOrExportDeclaration.moduleSpecifier) ? TypeScriptInternals.getModeForUsageLocation( importOrExportDeclaration.getSourceFile(), - importOrExportDeclaration.moduleSpecifier + importOrExportDeclaration.moduleSpecifier, + this._program.getCompilerOptions() ) : undefined; const resolvedModule: ts.ResolvedModuleFull | undefined = TypeScriptInternals.getResolvedModule( diff --git a/apps/api-extractor/src/analyzer/TypeScriptInternals.ts b/apps/api-extractor/src/analyzer/TypeScriptInternals.ts index eeb8e1b4df0..901dc641d38 100644 --- a/apps/api-extractor/src/analyzer/TypeScriptInternals.ts +++ b/apps/api-extractor/src/analyzer/TypeScriptInternals.ts @@ -101,13 +101,14 @@ export class TypeScriptInternals { * Gets the mode required for module resolution required with the addition of Node16/nodenext */ public static getModeForUsageLocation( - file: { impliedNodeFormat?: ts.SourceFile['impliedNodeFormat'] }, - usage: ts.StringLiteralLike | undefined + file: ts.SourceFile, + usage: ts.StringLiteralLike, + compilerOptions: ts.CompilerOptions ): ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined { // Compiler internal: - // https://github.com/microsoft/TypeScript/blob/v4.7.2/src/compiler/program.ts#L568 + // https://github.com/microsoft/TypeScript/blob/v5.7.2/src/compiler/program.ts#L940 - return (ts as any).getModeForUsageLocation?.(file, usage); + return ts.getModeForUsageLocation?.(file, usage, compilerOptions); } /** diff --git a/apps/api-extractor/src/generators/ApiModelGenerator.ts b/apps/api-extractor/src/generators/ApiModelGenerator.ts index 9dec797310b..e56f385b98f 100644 --- a/apps/api-extractor/src/generators/ApiModelGenerator.ts +++ b/apps/api-extractor/src/generators/ApiModelGenerator.ts @@ -266,7 +266,7 @@ export class ApiModelGenerator { } private _tryFindFunctionDeclaration(astDeclaration: AstDeclaration): ts.FunctionDeclaration | undefined { - const children: ts.Node[] = astDeclaration.declaration.getChildren( + const children: readonly ts.Node[] = astDeclaration.declaration.getChildren( astDeclaration.declaration.getSourceFile() ); return children.find(ts.isFunctionTypeNode) as ts.FunctionDeclaration | undefined; diff --git a/apps/heft/CHANGELOG.json b/apps/heft/CHANGELOG.json index 774ab42c1e4..6122e40b80e 100644 --- a/apps/heft/CHANGELOG.json +++ b/apps/heft/CHANGELOG.json @@ -1,6 +1,225 @@ { "name": "@rushstack/heft", "entries": [ + { + "version": "0.68.15", + "tag": "@rushstack/heft_v0.68.15", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "patch": [ + { + "comment": "Prefer `os.availableParallelism()` to `os.cpus().length`." + } + ] + } + }, + { + "version": "0.68.14", + "tag": "@rushstack/heft_v0.68.14", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.4`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/operation-graph\" to `0.2.37`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.4`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.2`" + } + ] + } + }, + { + "version": "0.68.13", + "tag": "@rushstack/heft_v0.68.13", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.3`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/operation-graph\" to `0.2.36`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.3`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.1`" + } + ] + } + }, + { + "version": "0.68.12", + "tag": "@rushstack/heft_v0.68.12", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.0`" + } + ] + } + }, + { + "version": "0.68.11", + "tag": "@rushstack/heft_v0.68.11", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.2`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/operation-graph\" to `0.2.35`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.2`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.1`" + } + ] + } + }, + { + "version": "0.68.10", + "tag": "@rushstack/heft_v0.68.10", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.1`" + } + ] + } + }, + { + "version": "0.68.9", + "tag": "@rushstack/heft_v0.68.9", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.0`" + } + ] + } + }, + { + "version": "0.68.8", + "tag": "@rushstack/heft_v0.68.8", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.0`" + } + ] + } + }, + { + "version": "0.68.7", + "tag": "@rushstack/heft_v0.68.7", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.15.9`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/operation-graph\" to `0.2.34`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.1`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.12`" + } + ] + } + }, + { + "version": "0.68.6", + "tag": "@rushstack/heft_v0.68.6", + "date": "Thu, 24 Oct 2024 00:15:47 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.15.8`" + } + ] + } + }, + { + "version": "0.68.5", + "tag": "@rushstack/heft_v0.68.5", + "date": "Mon, 21 Oct 2024 18:50:09 GMT", + "comments": { + "patch": [ + { + "comment": "Remove usage of true-case-path in favor of manually adjusting the drive letter casing to avoid confusing file system tracing tools with unnecessary directory enumerations." + } + ] + } + }, + { + "version": "0.68.4", + "tag": "@rushstack/heft_v0.68.4", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.0`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.11`" + } + ] + } + }, + { + "version": "0.68.3", + "tag": "@rushstack/heft_v0.68.3", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.10`" + } + ] + } + }, { "version": "0.68.2", "tag": "@rushstack/heft_v0.68.2", diff --git a/apps/heft/CHANGELOG.md b/apps/heft/CHANGELOG.md index 0bb40ba4262..b7178041402 100644 --- a/apps/heft/CHANGELOG.md +++ b/apps/heft/CHANGELOG.md @@ -1,6 +1,75 @@ # Change Log - @rushstack/heft -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.68.15 +Thu, 30 Jan 2025 16:10:36 GMT + +### Patches + +- Prefer `os.availableParallelism()` to `os.cpus().length`. + +## 0.68.14 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.68.13 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.68.12 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.68.11 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.68.10 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.68.9 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 0.68.8 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.68.7 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.68.6 +Thu, 24 Oct 2024 00:15:47 GMT + +_Version update only_ + +## 0.68.5 +Mon, 21 Oct 2024 18:50:09 GMT + +### Patches + +- Remove usage of true-case-path in favor of manually adjusting the drive letter casing to avoid confusing file system tracing tools with unnecessary directory enumerations. + +## 0.68.4 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.68.3 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.68.2 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/apps/heft/package.json b/apps/heft/package.json index fec0d462f0e..ba50597cadf 100644 --- a/apps/heft/package.json +++ b/apps/heft/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft", - "version": "0.68.2", + "version": "0.68.15", "description": "Build all your JavaScript projects the same way: A way that works.", "keywords": [ "toolchain", @@ -45,14 +45,13 @@ "git-repo-info": "~2.1.0", "ignore": "~5.1.6", "tapable": "1.1.3", - "true-case-path": "~2.2.1", "watchpack": "2.4.0" }, "devDependencies": { "@microsoft/api-extractor": "workspace:*", "local-eslint-config": "workspace:*", - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15", "@types/watchpack": "2.4.0", diff --git a/apps/heft/src/cli/HeftActionRunner.ts b/apps/heft/src/cli/HeftActionRunner.ts index d0cb2e60765..876d9ddf97f 100644 --- a/apps/heft/src/cli/HeftActionRunner.ts +++ b/apps/heft/src/cli/HeftActionRunner.ts @@ -195,7 +195,7 @@ export class HeftActionRunner { this._terminal = options.terminal; this._metricsCollector = options.metricsCollector; - const numberOfCores: number = os.cpus().length; + const numberOfCores: number = os.availableParallelism?.() ?? os.cpus().length; // If an explicit parallelism number wasn't provided, then choose a sensible // default. diff --git a/apps/heft/src/configuration/HeftConfiguration.ts b/apps/heft/src/configuration/HeftConfiguration.ts index 7d88d982e54..02388a34c5a 100644 --- a/apps/heft/src/configuration/HeftConfiguration.ts +++ b/apps/heft/src/configuration/HeftConfiguration.ts @@ -4,7 +4,6 @@ import * as path from 'path'; import { type IPackageJson, PackageJsonLookup, InternalError, Path } from '@rushstack/node-core-library'; import { Terminal, type ITerminalProvider, type ITerminal } from '@rushstack/terminal'; -import { trueCasePathSync } from 'true-case-path'; import { type IRigConfig, RigConfig } from '@rushstack/rig-package'; import { Constants } from '../utilities/Constants'; @@ -161,11 +160,12 @@ export class HeftConfiguration { ); if (packageJsonPath) { let buildFolderPath: string = path.dirname(packageJsonPath); - // The CWD path's casing may be incorrect on a case-insensitive filesystem. Some tools, like Jest - // expect the casing of the project path to be correct and produce unexpected behavior when the casing - // isn't correct. - // This ensures the casing of the project folder is correct. - buildFolderPath = trueCasePathSync(buildFolderPath); + // On Windows it is possible for the drive letter in the CWD to be lowercase, but the normalized naming is uppercase + // Force it to always be uppercase for consistency. + buildFolderPath = + process.platform === 'win32' + ? buildFolderPath.charAt(0).toUpperCase() + buildFolderPath.slice(1) + : buildFolderPath; configuration._buildFolderPath = buildFolderPath; } else { throw new Error('No package.json file found. Are you in a project folder?'); diff --git a/apps/heft/src/metrics/MetricsCollector.ts b/apps/heft/src/metrics/MetricsCollector.ts index 539a4428b10..82b70abf685 100644 --- a/apps/heft/src/metrics/MetricsCollector.ts +++ b/apps/heft/src/metrics/MetricsCollector.ts @@ -143,6 +143,8 @@ export class MetricsCollector { const { taskTotalExecutionMs } = filledPerformanceData; + const cpus: os.CpuInfo[] = os.cpus(); + const metricData: IMetricsData = { command: command, encounteredError: filledPerformanceData.encounteredError, @@ -151,8 +153,10 @@ export class MetricsCollector { totalUptimeMs: process.uptime() * 1000, machineOs: process.platform, machineArch: process.arch, - machineCores: os.cpus().length, - machineProcessor: os.cpus()[0].model, + machineCores: cpus.length, + // The Node.js model is sometimes padded, for example: + // "AMD Ryzen 7 3700X 8-Core Processor + machineProcessor: cpus[0].model.trim(), machineTotalMemoryMB: os.totalmem(), commandParameters: parameters || {} }; diff --git a/apps/heft/src/utilities/CoreConfigFiles.ts b/apps/heft/src/utilities/CoreConfigFiles.ts index a593353bfce..8ca28874cae 100644 --- a/apps/heft/src/utilities/CoreConfigFiles.ts +++ b/apps/heft/src/utilities/CoreConfigFiles.ts @@ -3,7 +3,7 @@ import * as path from 'path'; import { - ConfigurationFile, + ProjectConfigurationFile, InheritanceType, PathResolutionMethod, type IJsonPathMetadataResolverOptions @@ -59,9 +59,9 @@ export interface IHeftConfigurationJson { } export class CoreConfigFiles { - private static _heftConfigFileLoader: ConfigurationFile | undefined; + private static _heftConfigFileLoader: ProjectConfigurationFile | undefined; private static _nodeServiceConfigurationLoader: - | ConfigurationFile + | ProjectConfigurationFile | undefined; public static heftConfigurationProjectRelativeFilePath: string = `${Constants.projectConfigFolderName}/${Constants.heftConfigurationFilename}`; @@ -110,7 +110,7 @@ export class CoreConfigFiles { }; const schemaObject: object = await import('../schemas/heft.schema.json'); - CoreConfigFiles._heftConfigFileLoader = new ConfigurationFile({ + CoreConfigFiles._heftConfigFileLoader = new ProjectConfigurationFile({ projectRelativeFilePath: CoreConfigFiles.heftConfigurationProjectRelativeFilePath, jsonSchemaObject: schemaObject, propertyInheritanceDefaults: { @@ -134,7 +134,7 @@ export class CoreConfigFiles { }); } - const heftConfigFileLoader: ConfigurationFile = + const heftConfigFileLoader: ProjectConfigurationFile = CoreConfigFiles._heftConfigFileLoader; let configurationFile: IHeftConfigurationJson; @@ -158,10 +158,11 @@ export class CoreConfigFiles { // want to see if it parses. We will use the ConfigurationFile class to load it to ensure // that we follow the "extends" chain for the entire config file. const legacySchemaObject: object = await import('../schemas/heft-legacy.schema.json'); - const legacyConfigFileLoader: ConfigurationFile = new ConfigurationFile({ - projectRelativeFilePath: CoreConfigFiles.heftConfigurationProjectRelativeFilePath, - jsonSchemaObject: legacySchemaObject - }); + const legacyConfigFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ + projectRelativeFilePath: CoreConfigFiles.heftConfigurationProjectRelativeFilePath, + jsonSchemaObject: legacySchemaObject + }); await legacyConfigFileLoader.loadConfigurationFileForProjectAsync(terminal, projectPath, rigConfig); } catch (e2) { // It doesn't match the legacy schema either. Throw the original error. @@ -232,7 +233,7 @@ export class CoreConfigFiles { if (!CoreConfigFiles._nodeServiceConfigurationLoader) { const schemaObject: object = await import('../schemas/node-service.schema.json'); CoreConfigFiles._nodeServiceConfigurationLoader = - new ConfigurationFile({ + new ProjectConfigurationFile({ projectRelativeFilePath: CoreConfigFiles.nodeServiceConfigurationProjectRelativeFilePath, jsonSchemaObject: schemaObject }); diff --git a/apps/lockfile-explorer/CHANGELOG.json b/apps/lockfile-explorer/CHANGELOG.json index d790505beb6..196def3ffe7 100644 --- a/apps/lockfile-explorer/CHANGELOG.json +++ b/apps/lockfile-explorer/CHANGELOG.json @@ -1,6 +1,201 @@ { "name": "@rushstack/lockfile-explorer", "entries": [ + { + "version": "1.7.16", + "tag": "@rushstack/lockfile-explorer_v1.7.16", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "1.7.15", + "tag": "@rushstack/lockfile-explorer_v1.7.15", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "1.7.14", + "tag": "@rushstack/lockfile-explorer_v1.7.14", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "1.7.13", + "tag": "@rushstack/lockfile-explorer_v1.7.13", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "1.7.12", + "tag": "@rushstack/lockfile-explorer_v1.7.12", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "1.7.11", + "tag": "@rushstack/lockfile-explorer_v1.7.11", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "1.7.10", + "tag": "@rushstack/lockfile-explorer_v1.7.10", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "1.7.9", + "tag": "@rushstack/lockfile-explorer_v1.7.9", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "1.7.8", + "tag": "@rushstack/lockfile-explorer_v1.7.8", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "1.7.7", + "tag": "@rushstack/lockfile-explorer_v1.7.7", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "1.7.6", + "tag": "@rushstack/lockfile-explorer_v1.7.6", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "1.7.5", + "tag": "@rushstack/lockfile-explorer_v1.7.5", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "1.7.4", + "tag": "@rushstack/lockfile-explorer_v1.7.4", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "1.7.3", "tag": "@rushstack/lockfile-explorer_v1.7.3", diff --git a/apps/lockfile-explorer/CHANGELOG.md b/apps/lockfile-explorer/CHANGELOG.md index de9869c3c25..8f9997b12f1 100644 --- a/apps/lockfile-explorer/CHANGELOG.md +++ b/apps/lockfile-explorer/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/lockfile-explorer -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 1.7.16 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 1.7.15 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 1.7.14 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 1.7.13 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 1.7.12 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 1.7.11 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 1.7.10 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 1.7.9 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 1.7.8 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 1.7.7 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 1.7.6 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 1.7.5 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 1.7.4 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 1.7.3 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/apps/lockfile-explorer/package.json b/apps/lockfile-explorer/package.json index 6602b33ba9c..6555bb83b67 100644 --- a/apps/lockfile-explorer/package.json +++ b/apps/lockfile-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/lockfile-explorer", - "version": "1.7.3", + "version": "1.7.16", "description": "Rush Lockfile Explorer: The UI for solving version conflicts quickly in a large monorepo", "keywords": [ "conflict", @@ -66,7 +66,7 @@ "js-yaml": "~3.13.1", "open": "~8.4.0", "update-notifier": "~5.1.0", - "@pnpm/dependency-path": "~2.1.2", + "@pnpm/dependency-path-lockfile-pre-v9": "npm:@pnpm/dependency-path@~2.1.2", "semver": "~7.5.4", "@rushstack/rush-sdk": "workspace:*", "@rushstack/ts-command-line": "workspace:*" diff --git a/apps/lockfile-explorer/src/utils/shrinkwrap.ts b/apps/lockfile-explorer/src/utils/shrinkwrap.ts index 3d96e44b4e2..8cb289fc1e6 100644 --- a/apps/lockfile-explorer/src/utils/shrinkwrap.ts +++ b/apps/lockfile-explorer/src/utils/shrinkwrap.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import * as dp from '@pnpm/dependency-path'; +import * as dependencyPathLockfilePreV9 from '@pnpm/dependency-path-lockfile-pre-v9'; interface IPackageInfo { name: string; @@ -12,7 +12,7 @@ interface IPackageInfo { export function convertLockfileV6DepPathToV5DepPath(newDepPath: string): string { if (!newDepPath.includes('@', 2) || newDepPath.startsWith('file:')) return newDepPath; const index = newDepPath.indexOf('@', newDepPath.indexOf('/@') + 2); - if (newDepPath.includes('(') && index > dp.indexOfPeersSuffix(newDepPath)) return newDepPath; + if (newDepPath.includes('(') && index > dependencyPathLockfilePreV9.indexOfPeersSuffix(newDepPath)) return newDepPath; return `${newDepPath.substring(0, index)}/${newDepPath.substring(index + 1)}`; } @@ -21,7 +21,7 @@ export function parseDependencyPath(shrinkwrapFileMajorVersion: number, newDepPa if (shrinkwrapFileMajorVersion === 6) { dependencyPath = convertLockfileV6DepPathToV5DepPath(newDepPath); } - const packageInfo = dp.parse(dependencyPath); + const packageInfo = dependencyPathLockfilePreV9.parse(dependencyPath); return { name: packageInfo.name as string, peersSuffix: packageInfo.peersSuffix, diff --git a/apps/rundown/CHANGELOG.json b/apps/rundown/CHANGELOG.json index 23b019b02d8..b601d1fdcb3 100644 --- a/apps/rundown/CHANGELOG.json +++ b/apps/rundown/CHANGELOG.json @@ -1,6 +1,189 @@ { "name": "@rushstack/rundown", "entries": [ + { + "version": "1.1.82", + "tag": "@rushstack/rundown_v1.1.82", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "1.1.81", + "tag": "@rushstack/rundown_v1.1.81", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "1.1.80", + "tag": "@rushstack/rundown_v1.1.80", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "1.1.79", + "tag": "@rushstack/rundown_v1.1.79", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "1.1.78", + "tag": "@rushstack/rundown_v1.1.78", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "1.1.77", + "tag": "@rushstack/rundown_v1.1.77", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "1.1.76", + "tag": "@rushstack/rundown_v1.1.76", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "1.1.75", + "tag": "@rushstack/rundown_v1.1.75", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "1.1.74", + "tag": "@rushstack/rundown_v1.1.74", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "1.1.73", + "tag": "@rushstack/rundown_v1.1.73", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "1.1.72", + "tag": "@rushstack/rundown_v1.1.72", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "1.1.71", + "tag": "@rushstack/rundown_v1.1.71", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "1.1.70", + "tag": "@rushstack/rundown_v1.1.70", + "date": "Tue, 15 Oct 2024 00:12:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "1.1.69", "tag": "@rushstack/rundown_v1.1.69", diff --git a/apps/rundown/CHANGELOG.md b/apps/rundown/CHANGELOG.md index 3aeb2bc4b7a..2e6bdf3c51c 100644 --- a/apps/rundown/CHANGELOG.md +++ b/apps/rundown/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/rundown -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 1.1.82 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 1.1.81 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 1.1.80 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 1.1.79 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 1.1.78 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 1.1.77 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 1.1.76 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 1.1.75 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 1.1.74 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 1.1.73 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 1.1.72 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 1.1.71 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 1.1.70 +Tue, 15 Oct 2024 00:12:32 GMT + +_Version update only_ ## 1.1.69 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/apps/rundown/package.json b/apps/rundown/package.json index e5a31b28b55..2c43eca571d 100644 --- a/apps/rundown/package.json +++ b/apps/rundown/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rundown", - "version": "1.1.69", + "version": "1.1.82", "description": "Detect load time regressions by running an app, tracing require() calls, and generating a deterministic report", "repository": { "type": "git", diff --git a/apps/rush/CHANGELOG.json b/apps/rush/CHANGELOG.json index 62404f4d3bf..a9fddc06169 100644 --- a/apps/rush/CHANGELOG.json +++ b/apps/rush/CHANGELOG.json @@ -1,6 +1,291 @@ { "name": "@microsoft/rush", "entries": [ + { + "version": "5.148.0", + "tag": "@microsoft/rush_v5.148.0", + "date": "Fri, 10 Jan 2025 02:36:20 GMT", + "comments": { + "none": [ + { + "comment": "Add a configuration option to avoid manually configuring decoupledLocalDependencies across subspaces." + }, + { + "comment": "Improve some `rush-sdk` APIs to support future work on GitHub issue #3994" + }, + { + "comment": "Fix an issue where MaxListenersExceeded would get thrown when using the HTTP build cache plugin" + } + ] + } + }, + { + "version": "5.147.2", + "tag": "@microsoft/rush_v5.147.2", + "date": "Mon, 06 Jan 2025 21:48:43 GMT", + "comments": { + "none": [ + { + "comment": "Fix an issue with evaluation of `shouldEnsureConsistentVersions` when the value is not constant across subspaces or variants." + }, + { + "comment": "Fix an issue where the lockfile object has a nullish value causing yaml.dump to report an error." + } + ] + } + }, + { + "version": "5.147.1", + "tag": "@microsoft/rush_v5.147.1", + "date": "Thu, 26 Dec 2024 23:35:27 GMT", + "comments": { + "none": [ + { + "comment": "Fix an issue with the `enableSubpathScan` experiment where the set of returned hashes would result in incorrect build cache identifiers when using `--only`." + }, + { + "comment": "When a no-op operation is not in scope, reflect its result as no-op instead of skipped, so that downstream operations can still write to the build cache." + }, + { + "comment": "Allow injected dependencies without enabling subspaces." + } + ] + } + }, + { + "version": "5.147.0", + "tag": "@microsoft/rush_v5.147.0", + "date": "Thu, 12 Dec 2024 01:37:25 GMT", + "comments": { + "none": [ + { + "comment": "Add a new experiment flag `enableSubpathScan` that, when invoking phased script commands with project selection parameters, such as `--to` or `--from`, only hashes files that are needed to compute the cache ids for the selected projects." + } + ] + } + }, + { + "version": "5.146.0", + "tag": "@microsoft/rush_v5.146.0", + "date": "Tue, 10 Dec 2024 21:23:18 GMT", + "comments": { + "none": [ + { + "comment": "Support fallback syntax in `.npmrc` files if the package manager is PNPM. See https://pnpm.io/npmrc" + }, + { + "comment": "Add an `.isPnpm` property to `RushConfiguration` that is set to true if the package manager for the Rush repo is PNPM." + }, + { + "comment": "Support pnpm lockfile v9, which is used by default starting in pnpm v9." + } + ] + } + }, + { + "version": "5.145.0", + "tag": "@microsoft/rush_v5.145.0", + "date": "Tue, 10 Dec 2024 05:14:11 GMT", + "comments": { + "none": [ + { + "comment": "Upgrade `@azure/identity` and `@azure/storage-blob`." + }, + { + "comment": "Add support for Node 22." + }, + { + "comment": "Remove the dependency on node-fetch." + } + ] + } + }, + { + "version": "5.144.1", + "tag": "@microsoft/rush_v5.144.1", + "date": "Mon, 09 Dec 2024 20:32:01 GMT", + "comments": { + "none": [ + { + "comment": "Bump `jsonpath-plus` to `~10.2.0`." + } + ] + } + }, + { + "version": "5.144.0", + "tag": "@microsoft/rush_v5.144.0", + "date": "Wed, 04 Dec 2024 19:32:23 GMT", + "comments": { + "none": [ + { + "comment": "Remove the `node-fetch` dependency from `@rushstack/rush-http-build-cache-plugin`." + } + ] + } + }, + { + "version": "5.143.0", + "tag": "@microsoft/rush_v5.143.0", + "date": "Wed, 04 Dec 2024 03:07:08 GMT", + "comments": { + "none": [ + { + "comment": "Remove the `node-fetch` dependency from @rushstack/rush-amazon-s3-build-cache-plugin." + }, + { + "comment": "(BREAKING API CHANGE) Remove the exported `WebClient` API from @rushstack/rush-amazon-s3-build-cache-plugin." + } + ] + } + }, + { + "version": "5.142.0", + "tag": "@microsoft/rush_v5.142.0", + "date": "Tue, 03 Dec 2024 23:42:22 GMT", + "comments": { + "none": [ + { + "comment": "Fix an issue where the ability to skip `rush install` may be incorrectly calculated when using the variants feature." + }, + { + "comment": "Add support for an `\"extends\"` property in the `common/config/rush/pnpm-config.json` and `common/config/subspace/*/pnpm-config.json` files." + }, + { + "comment": "Add warning when the `globalIgnoredOptionalDependencies` property is specified in `common/config/rush/pnpm-config.json` and the repo is configured to use pnpm <9.0.0." + } + ] + } + }, + { + "version": "5.141.4", + "tag": "@microsoft/rush_v5.141.4", + "date": "Mon, 02 Dec 2024 20:40:41 GMT", + "comments": { + "none": [ + { + "comment": "Fix an issue where Rush sometimes incorrectly reported \"fatal: could not open 'packages/xxx/.rush/temp/shrinkwrap-deps.json' for reading: No such file or directory\" when using subspaces" + } + ] + } + }, + { + "version": "5.141.3", + "tag": "@microsoft/rush_v5.141.3", + "date": "Wed, 27 Nov 2024 07:16:50 GMT", + "comments": { + "none": [ + { + "comment": "Fix an issue where Rush sometimes incorrectly reported \"The overrides settings doesn't match the current shrinkwrap\" when using subspaces" + }, + { + "comment": "Fix an issue where Rush sometimes incorrectly reported \"The package extension hash doesn't match the current shrinkwrap.\" when using subspaces" + } + ] + } + }, + { + "version": "5.141.2", + "tag": "@microsoft/rush_v5.141.2", + "date": "Wed, 27 Nov 2024 03:27:26 GMT", + "comments": { + "none": [ + { + "comment": "Fix an issue where filtered installs neglected to install dependencies from other subspaces" + } + ] + } + }, + { + "version": "5.141.1", + "tag": "@microsoft/rush_v5.141.1", + "date": "Wed, 20 Nov 2024 00:24:34 GMT", + "comments": { + "none": [ + { + "comment": "Update schema for build-cache.json to include recent updates to the @rushstack/rush-azure-storage-build-cache-plugin." + } + ] + } + }, + { + "version": "5.141.0", + "tag": "@microsoft/rush_v5.141.0", + "date": "Tue, 19 Nov 2024 06:38:33 GMT", + "comments": { + "none": [ + { + "comment": "Adds two new properties to the configuration for `rush-azure-storage-build-cache-plugin`: `loginFlow` selects the flow to use for interactive authentication to Entra ID, and `readRequiresAuthentication` specifies that a SAS token is required for read and therefore expired authentication is always fatal." + }, + { + "comment": "Adds a new `wasExecutedOnThisMachine` property to operation telemetry events, to simplify reporting about cobuilt operations." + }, + { + "comment": "Fix an issue where empty error logs were created for operations that did not write to standard error." + }, + { + "comment": "Fix an issue where incremental building (with LegacySkipPlugin) would not work when no-op operations were present in the process" + }, + { + "comment": "Fix lack of \"local-only\" option for cacheProvider in build-cache.schema.json" + }, + { + "comment": "Fix an issue where if an Operation wrote all logs to stdout, then exited with a non-zero exit code, only the non-zero exit code would show up in the summary." + } + ] + } + }, + { + "version": "5.140.1", + "tag": "@microsoft/rush_v5.140.1", + "date": "Wed, 30 Oct 2024 21:50:51 GMT", + "comments": { + "none": [ + { + "comment": "Update the `jsonpath-plus` indirect dependency to mitigate CVE-2024-21534." + } + ] + } + }, + { + "version": "5.140.0", + "tag": "@microsoft/rush_v5.140.0", + "date": "Tue, 22 Oct 2024 23:59:54 GMT", + "comments": { + "none": [ + { + "comment": "Fix an issue when using `rush deploy` where the `node_modules/.bin` folder symlinks were not created for deployed packages when using the \"default\" link creation mode" + }, + { + "comment": "Add support for the `globalIgnoredOptionalDependencies` field in the `common/config/rush/pnpm-config.json` file to allow specifying optional dependencies that should be ignored by PNPM" + } + ] + } + }, + { + "version": "5.139.0", + "tag": "@microsoft/rush_v5.139.0", + "date": "Thu, 17 Oct 2024 20:37:39 GMT", + "comments": { + "none": [ + { + "comment": "Allow rush plugins to extend build cache entries by writing additional files to the metadata folder. Expose the metadata folder path to plugins." + }, + { + "comment": "[CACHE BREAK] Alter the computation of build cache IDs to depend on the graph of operations in the build and therefore account for multiple phases, rather than only the declared dependencies. Ensure that `dependsOnEnvVars` and command line parameters that affect upstream phases impact the cache IDs of downstream operations." + }, + { + "comment": "(BREAKING CHANGE) Replace use of `ProjectChangeAnalyzer` in phased command hooks with a new `InputsSnapshot` data structure that is completely synchronous and does not perform any disk operations. Perform all disk operations and state computation prior to executing the build graph." + }, + { + "comment": "Add a new property `enabled` to `Operation` that when set to false, will cause the execution engine to immediately return `OperationStatus.Skipped` instead of invoking the runner. Use this property to disable operations that are not intended to be executed in the current pass, e.g. those that did not contain changes in the most recent watch iteration, or those excluded by `--only`." + }, + { + "comment": "Add an optional property `cacheHashSalt` to `build-cache.json` to allow repository maintainers to globally force a hash change in build cache entries." + } + ] + } + }, { "version": "5.138.0", "tag": "@microsoft/rush_v5.138.0", diff --git a/apps/rush/CHANGELOG.md b/apps/rush/CHANGELOG.md index a4fbb249ccb..b9aed3337b6 100644 --- a/apps/rush/CHANGELOG.md +++ b/apps/rush/CHANGELOG.md @@ -1,6 +1,155 @@ # Change Log - @microsoft/rush -This log was last generated on Thu, 03 Oct 2024 22:31:07 GMT and should not be manually modified. +This log was last generated on Fri, 10 Jan 2025 02:36:20 GMT and should not be manually modified. + +## 5.148.0 +Fri, 10 Jan 2025 02:36:20 GMT + +### Updates + +- Add a configuration option to avoid manually configuring decoupledLocalDependencies across subspaces. +- Improve some `rush-sdk` APIs to support future work on GitHub issue #3994 +- Fix an issue where MaxListenersExceeded would get thrown when using the HTTP build cache plugin + +## 5.147.2 +Mon, 06 Jan 2025 21:48:43 GMT + +### Updates + +- Fix an issue with evaluation of `shouldEnsureConsistentVersions` when the value is not constant across subspaces or variants. +- Fix an issue where the lockfile object has a nullish value causing yaml.dump to report an error. + +## 5.147.1 +Thu, 26 Dec 2024 23:35:27 GMT + +### Updates + +- Fix an issue with the `enableSubpathScan` experiment where the set of returned hashes would result in incorrect build cache identifiers when using `--only`. +- When a no-op operation is not in scope, reflect its result as no-op instead of skipped, so that downstream operations can still write to the build cache. +- Allow injected dependencies without enabling subspaces. + +## 5.147.0 +Thu, 12 Dec 2024 01:37:25 GMT + +### Updates + +- Add a new experiment flag `enableSubpathScan` that, when invoking phased script commands with project selection parameters, such as `--to` or `--from`, only hashes files that are needed to compute the cache ids for the selected projects. + +## 5.146.0 +Tue, 10 Dec 2024 21:23:18 GMT + +### Updates + +- Support fallback syntax in `.npmrc` files if the package manager is PNPM. See https://pnpm.io/npmrc +- Add an `.isPnpm` property to `RushConfiguration` that is set to true if the package manager for the Rush repo is PNPM. +- Support pnpm lockfile v9, which is used by default starting in pnpm v9. + +## 5.145.0 +Tue, 10 Dec 2024 05:14:11 GMT + +### Updates + +- Upgrade `@azure/identity` and `@azure/storage-blob`. +- Add support for Node 22. +- Remove the dependency on node-fetch. + +## 5.144.1 +Mon, 09 Dec 2024 20:32:01 GMT + +### Updates + +- Bump `jsonpath-plus` to `~10.2.0`. + +## 5.144.0 +Wed, 04 Dec 2024 19:32:23 GMT + +### Updates + +- Remove the `node-fetch` dependency from `@rushstack/rush-http-build-cache-plugin`. + +## 5.143.0 +Wed, 04 Dec 2024 03:07:08 GMT + +### Updates + +- Remove the `node-fetch` dependency from @rushstack/rush-amazon-s3-build-cache-plugin. +- (BREAKING API CHANGE) Remove the exported `WebClient` API from @rushstack/rush-amazon-s3-build-cache-plugin. + +## 5.142.0 +Tue, 03 Dec 2024 23:42:22 GMT + +### Updates + +- Fix an issue where the ability to skip `rush install` may be incorrectly calculated when using the variants feature. +- Add support for an `"extends"` property in the `common/config/rush/pnpm-config.json` and `common/config/subspace/*/pnpm-config.json` files. +- Add warning when the `globalIgnoredOptionalDependencies` property is specified in `common/config/rush/pnpm-config.json` and the repo is configured to use pnpm <9.0.0. + +## 5.141.4 +Mon, 02 Dec 2024 20:40:41 GMT + +### Updates + +- Fix an issue where Rush sometimes incorrectly reported "fatal: could not open 'packages/xxx/.rush/temp/shrinkwrap-deps.json' for reading: No such file or directory" when using subspaces + +## 5.141.3 +Wed, 27 Nov 2024 07:16:50 GMT + +### Updates + +- Fix an issue where Rush sometimes incorrectly reported "The overrides settings doesn't match the current shrinkwrap" when using subspaces +- Fix an issue where Rush sometimes incorrectly reported "The package extension hash doesn't match the current shrinkwrap." when using subspaces + +## 5.141.2 +Wed, 27 Nov 2024 03:27:26 GMT + +### Updates + +- Fix an issue where filtered installs neglected to install dependencies from other subspaces + +## 5.141.1 +Wed, 20 Nov 2024 00:24:34 GMT + +### Updates + +- Update schema for build-cache.json to include recent updates to the @rushstack/rush-azure-storage-build-cache-plugin. + +## 5.141.0 +Tue, 19 Nov 2024 06:38:33 GMT + +### Updates + +- Adds two new properties to the configuration for `rush-azure-storage-build-cache-plugin`: `loginFlow` selects the flow to use for interactive authentication to Entra ID, and `readRequiresAuthentication` specifies that a SAS token is required for read and therefore expired authentication is always fatal. +- Adds a new `wasExecutedOnThisMachine` property to operation telemetry events, to simplify reporting about cobuilt operations. +- Fix an issue where empty error logs were created for operations that did not write to standard error. +- Fix an issue where incremental building (with LegacySkipPlugin) would not work when no-op operations were present in the process +- Fix lack of "local-only" option for cacheProvider in build-cache.schema.json +- Fix an issue where if an Operation wrote all logs to stdout, then exited with a non-zero exit code, only the non-zero exit code would show up in the summary. + +## 5.140.1 +Wed, 30 Oct 2024 21:50:51 GMT + +### Updates + +- Update the `jsonpath-plus` indirect dependency to mitigate CVE-2024-21534. + +## 5.140.0 +Tue, 22 Oct 2024 23:59:54 GMT + +### Updates + +- Fix an issue when using `rush deploy` where the `node_modules/.bin` folder symlinks were not created for deployed packages when using the "default" link creation mode +- Add support for the `globalIgnoredOptionalDependencies` field in the `common/config/rush/pnpm-config.json` file to allow specifying optional dependencies that should be ignored by PNPM + +## 5.139.0 +Thu, 17 Oct 2024 20:37:39 GMT + +### Updates + +- Allow rush plugins to extend build cache entries by writing additional files to the metadata folder. Expose the metadata folder path to plugins. +- [CACHE BREAK] Alter the computation of build cache IDs to depend on the graph of operations in the build and therefore account for multiple phases, rather than only the declared dependencies. Ensure that `dependsOnEnvVars` and command line parameters that affect upstream phases impact the cache IDs of downstream operations. +- (BREAKING CHANGE) Replace use of `ProjectChangeAnalyzer` in phased command hooks with a new `InputsSnapshot` data structure that is completely synchronous and does not perform any disk operations. Perform all disk operations and state computation prior to executing the build graph. +- Add a new property `enabled` to `Operation` that when set to false, will cause the execution engine to immediately return `OperationStatus.Skipped` instead of invoking the runner. Use this property to disable operations that are not intended to be executed in the current pass, e.g. those that did not contain changes in the most recent watch iteration, or those excluded by `--only`. +- Add an optional property `cacheHashSalt` to `build-cache.json` to allow repository maintainers to globally force a hash change in build cache entries. ## 5.138.0 Thu, 03 Oct 2024 22:31:07 GMT diff --git a/apps/rush/package.json b/apps/rush/package.json index 86263e19cae..eb773d8c876 100644 --- a/apps/rush/package.json +++ b/apps/rush/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/rush", - "version": "5.138.0", + "version": "5.148.0", "description": "A professional solution for consolidating all your JavaScript projects in one Git repo", "keywords": [ "install", diff --git a/apps/trace-import/CHANGELOG.json b/apps/trace-import/CHANGELOG.json index 59ccf58f538..ee7d99a1311 100644 --- a/apps/trace-import/CHANGELOG.json +++ b/apps/trace-import/CHANGELOG.json @@ -1,6 +1,201 @@ { "name": "@rushstack/trace-import", "entries": [ + { + "version": "0.3.82", + "tag": "@rushstack/trace-import_v0.3.82", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.3.81", + "tag": "@rushstack/trace-import_v0.3.81", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.3.80", + "tag": "@rushstack/trace-import_v0.3.80", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.3.79", + "tag": "@rushstack/trace-import_v0.3.79", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.3.78", + "tag": "@rushstack/trace-import_v0.3.78", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.3.77", + "tag": "@rushstack/trace-import_v0.3.77", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.3.76", + "tag": "@rushstack/trace-import_v0.3.76", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.3.75", + "tag": "@rushstack/trace-import_v0.3.75", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.3.74", + "tag": "@rushstack/trace-import_v0.3.74", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.3.73", + "tag": "@rushstack/trace-import_v0.3.73", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.3.72", + "tag": "@rushstack/trace-import_v0.3.72", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.3.71", + "tag": "@rushstack/trace-import_v0.3.71", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.3.70", + "tag": "@rushstack/trace-import_v0.3.70", + "date": "Tue, 15 Oct 2024 00:12:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.3.69", "tag": "@rushstack/trace-import_v0.3.69", diff --git a/apps/trace-import/CHANGELOG.md b/apps/trace-import/CHANGELOG.md index 4b252a29645..bdf792f1a9f 100644 --- a/apps/trace-import/CHANGELOG.md +++ b/apps/trace-import/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/trace-import -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.3.82 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.3.81 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.3.80 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.3.79 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.3.78 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.3.77 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.3.76 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.3.75 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.3.74 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.3.73 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.3.72 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.3.71 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.3.70 +Tue, 15 Oct 2024 00:12:32 GMT + +_Version update only_ ## 0.3.69 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/apps/trace-import/package.json b/apps/trace-import/package.json index 0b83515c736..2f564f5f722 100644 --- a/apps/trace-import/package.json +++ b/apps/trace-import/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/trace-import", - "version": "0.3.69", + "version": "0.3.82", "description": "CLI tool for understanding how require() and \"import\" statements get resolved", "repository": { "type": "git", diff --git a/build-tests/api-documenter-scenarios/package.json b/build-tests/api-documenter-scenarios/package.json index edbb45aa36b..be92c809597 100644 --- a/build-tests/api-documenter-scenarios/package.json +++ b/build-tests/api-documenter-scenarios/package.json @@ -15,7 +15,7 @@ "@rushstack/node-core-library": "workspace:*", "@types/jest": "29.2.5", "@types/node": "18.17.15", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-documenter-scenarios/tsconfig.json b/build-tests/api-documenter-scenarios/tsconfig.json index 748d07a6ea4..f3f4197e121 100644 --- a/build-tests/api-documenter-scenarios/tsconfig.json +++ b/build-tests/api-documenter-scenarios/tsconfig.json @@ -9,7 +9,7 @@ "experimentalDecorators": true, "strictNullChecks": true, "types": ["node", "jest"], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts"] diff --git a/build-tests/api-extractor-d-cts-test/package.json b/build-tests/api-extractor-d-cts-test/package.json index 26f581fe0c5..33f8e7e2f2d 100644 --- a/build-tests/api-extractor-d-cts-test/package.json +++ b/build-tests/api-extractor-d-cts-test/package.json @@ -13,7 +13,7 @@ "@microsoft/api-extractor": "workspace:*", "@types/jest": "29.2.5", "@types/node": "18.17.15", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-extractor-d-cts-test/tsconfig.json b/build-tests/api-extractor-d-cts-test/tsconfig.json index 7dec6f5f99d..cd6919ab432 100644 --- a/build-tests/api-extractor-d-cts-test/tsconfig.json +++ b/build-tests/api-extractor-d-cts-test/tsconfig.json @@ -9,7 +9,7 @@ "experimentalDecorators": true, "strictNullChecks": true, "types": ["node", "jest"], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.cts", "typings/tsd.d.ts"] diff --git a/build-tests/api-extractor-d-mts-test/package.json b/build-tests/api-extractor-d-mts-test/package.json index 1ed0f2feabe..3680ff79d6d 100644 --- a/build-tests/api-extractor-d-mts-test/package.json +++ b/build-tests/api-extractor-d-mts-test/package.json @@ -14,7 +14,7 @@ "@microsoft/api-extractor": "workspace:*", "@types/jest": "29.2.5", "@types/node": "18.17.15", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-extractor-d-mts-test/tsconfig.json b/build-tests/api-extractor-d-mts-test/tsconfig.json index 5b46f57a170..24ec663df67 100644 --- a/build-tests/api-extractor-d-mts-test/tsconfig.json +++ b/build-tests/api-extractor-d-mts-test/tsconfig.json @@ -9,7 +9,7 @@ "experimentalDecorators": true, "strictNullChecks": true, "types": ["node", "jest"], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.mts", "typings/tsd.d.ts"] diff --git a/build-tests/api-extractor-lib1-test/package.json b/build-tests/api-extractor-lib1-test/package.json index 7c3be140959..8489cb4b18d 100644 --- a/build-tests/api-extractor-lib1-test/package.json +++ b/build-tests/api-extractor-lib1-test/package.json @@ -11,7 +11,7 @@ }, "devDependencies": { "@microsoft/api-extractor": "workspace:*", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~2.9.2" } } diff --git a/build-tests/api-extractor-lib1-test/tsconfig.json b/build-tests/api-extractor-lib1-test/tsconfig.json index b0538f2bd78..3aa126ee55e 100644 --- a/build-tests/api-extractor-lib1-test/tsconfig.json +++ b/build-tests/api-extractor-lib1-test/tsconfig.json @@ -7,7 +7,7 @@ "sourceMap": true, "experimentalDecorators": true, "strictNullChecks": true, - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts"] diff --git a/build-tests/api-extractor-lib2-test/package.json b/build-tests/api-extractor-lib2-test/package.json index 9c0c305d3b4..36f3b7c32d4 100644 --- a/build-tests/api-extractor-lib2-test/package.json +++ b/build-tests/api-extractor-lib2-test/package.json @@ -13,7 +13,7 @@ "@microsoft/api-extractor": "workspace:*", "@types/jest": "29.2.5", "@types/node": "18.17.15", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-extractor-lib2-test/tsconfig.json b/build-tests/api-extractor-lib2-test/tsconfig.json index 1799652cc42..86f0b7cd8fa 100644 --- a/build-tests/api-extractor-lib2-test/tsconfig.json +++ b/build-tests/api-extractor-lib2-test/tsconfig.json @@ -9,7 +9,7 @@ "experimentalDecorators": true, "strictNullChecks": true, "types": ["node", "jest"], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts", "typings/tsd.d.ts"] diff --git a/build-tests/api-extractor-lib3-test/package.json b/build-tests/api-extractor-lib3-test/package.json index 9231a72defa..dd27afcc7f5 100644 --- a/build-tests/api-extractor-lib3-test/package.json +++ b/build-tests/api-extractor-lib3-test/package.json @@ -16,7 +16,7 @@ "@microsoft/api-extractor": "workspace:*", "@types/jest": "29.2.5", "@types/node": "18.17.15", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-extractor-lib3-test/tsconfig.json b/build-tests/api-extractor-lib3-test/tsconfig.json index 1799652cc42..86f0b7cd8fa 100644 --- a/build-tests/api-extractor-lib3-test/tsconfig.json +++ b/build-tests/api-extractor-lib3-test/tsconfig.json @@ -9,7 +9,7 @@ "experimentalDecorators": true, "strictNullChecks": true, "types": ["node", "jest"], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts", "typings/tsd.d.ts"] diff --git a/build-tests/api-extractor-lib4-test/package.json b/build-tests/api-extractor-lib4-test/package.json index 13ffdd65902..d477450b616 100644 --- a/build-tests/api-extractor-lib4-test/package.json +++ b/build-tests/api-extractor-lib4-test/package.json @@ -13,7 +13,7 @@ "@microsoft/api-extractor": "workspace:*", "@types/jest": "29.2.5", "@types/node": "18.17.15", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-extractor-lib4-test/tsconfig.json b/build-tests/api-extractor-lib4-test/tsconfig.json index 1799652cc42..86f0b7cd8fa 100644 --- a/build-tests/api-extractor-lib4-test/tsconfig.json +++ b/build-tests/api-extractor-lib4-test/tsconfig.json @@ -9,7 +9,7 @@ "experimentalDecorators": true, "strictNullChecks": true, "types": ["node", "jest"], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts", "typings/tsd.d.ts"] diff --git a/build-tests/api-extractor-lib5-test/package.json b/build-tests/api-extractor-lib5-test/package.json index 1aafce8bcbc..5ccf75336c1 100644 --- a/build-tests/api-extractor-lib5-test/package.json +++ b/build-tests/api-extractor-lib5-test/package.json @@ -13,7 +13,7 @@ "@microsoft/api-extractor": "workspace:*", "@types/jest": "29.2.5", "@types/node": "18.17.15", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-extractor-lib5-test/tsconfig.json b/build-tests/api-extractor-lib5-test/tsconfig.json index 1799652cc42..86f0b7cd8fa 100644 --- a/build-tests/api-extractor-lib5-test/tsconfig.json +++ b/build-tests/api-extractor-lib5-test/tsconfig.json @@ -9,7 +9,7 @@ "experimentalDecorators": true, "strictNullChecks": true, "types": ["node", "jest"], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts", "typings/tsd.d.ts"] diff --git a/build-tests/api-extractor-scenarios/package.json b/build-tests/api-extractor-scenarios/package.json index e90c285149f..602646bfbce 100644 --- a/build-tests/api-extractor-scenarios/package.json +++ b/build-tests/api-extractor-scenarios/package.json @@ -22,7 +22,6 @@ "api-extractor-lib3-test": "workspace:*", "api-extractor-lib4-test": "workspace:*", "api-extractor-lib5-test": "workspace:*", - "colors": "~1.2.1", "local-node-rig": "workspace:*" }, "peerDependencies": { diff --git a/build-tests/api-extractor-test-01/package.json b/build-tests/api-extractor-test-01/package.json index 92c43e8c7aa..9c0e8820ceb 100644 --- a/build-tests/api-extractor-test-01/package.json +++ b/build-tests/api-extractor-test-01/package.json @@ -18,7 +18,7 @@ "@microsoft/api-extractor": "workspace:*", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-extractor-test-01/tsconfig.json b/build-tests/api-extractor-test-01/tsconfig.json index a48293c1057..4d7f50479a2 100644 --- a/build-tests/api-extractor-test-01/tsconfig.json +++ b/build-tests/api-extractor-test-01/tsconfig.json @@ -10,7 +10,7 @@ "strictNullChecks": true, "esModuleInterop": true, "types": ["node", "jest"], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts", "typings/tsd.d.ts"] diff --git a/build-tests/api-extractor-test-02/package.json b/build-tests/api-extractor-test-02/package.json index 8e39826118b..b2b08e5afb1 100644 --- a/build-tests/api-extractor-test-02/package.json +++ b/build-tests/api-extractor-test-02/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@microsoft/api-extractor": "workspace:*", "@types/node": "18.17.15", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-extractor-test-02/tsconfig.json b/build-tests/api-extractor-test-02/tsconfig.json index 0a13e0ef163..0d36523cc09 100644 --- a/build-tests/api-extractor-test-02/tsconfig.json +++ b/build-tests/api-extractor-test-02/tsconfig.json @@ -10,7 +10,7 @@ "strictNullChecks": true, "esModuleInterop": true, "types": ["node"], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts", "typings/tsd.d.ts"] diff --git a/build-tests/api-extractor-test-03/package.json b/build-tests/api-extractor-test-03/package.json index 1c6e2e7225c..7b5dac4d9b1 100644 --- a/build-tests/api-extractor-test-03/package.json +++ b/build-tests/api-extractor-test-03/package.json @@ -11,7 +11,7 @@ "@types/jest": "29.2.5", "@types/node": "18.17.15", "api-extractor-test-02": "workspace:*", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-extractor-test-03/tsconfig.json b/build-tests/api-extractor-test-03/tsconfig.json index a48293c1057..4d7f50479a2 100644 --- a/build-tests/api-extractor-test-03/tsconfig.json +++ b/build-tests/api-extractor-test-03/tsconfig.json @@ -10,7 +10,7 @@ "strictNullChecks": true, "esModuleInterop": true, "types": ["node", "jest"], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts", "typings/tsd.d.ts"] diff --git a/build-tests/api-extractor-test-04/beta-consumer/tsconfig.json b/build-tests/api-extractor-test-04/beta-consumer/tsconfig.json index 805bac5b2e8..a2f349c815e 100644 --- a/build-tests/api-extractor-test-04/beta-consumer/tsconfig.json +++ b/build-tests/api-extractor-test-04/beta-consumer/tsconfig.json @@ -8,7 +8,7 @@ "declarationMap": true, "experimentalDecorators": true, "strictNullChecks": true, - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts", "typings/tsd.d.ts"] diff --git a/build-tests/api-extractor-test-04/package.json b/build-tests/api-extractor-test-04/package.json index 75dd7d8acd2..046661f9d20 100644 --- a/build-tests/api-extractor-test-04/package.json +++ b/build-tests/api-extractor-test-04/package.json @@ -12,7 +12,7 @@ "dependencies": { "@microsoft/api-extractor": "workspace:*", "api-extractor-lib1-test": "workspace:*", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/build-tests/api-extractor-test-04/tsconfig.json b/build-tests/api-extractor-test-04/tsconfig.json index 7e2cba55d35..8950b5fc51c 100644 --- a/build-tests/api-extractor-test-04/tsconfig.json +++ b/build-tests/api-extractor-test-04/tsconfig.json @@ -10,7 +10,7 @@ "strictNullChecks": true, "esModuleInterop": true, "types": [], - "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable", "dom"], + "lib": ["es5", "scripthost", "es2015.collection", "es2015.promise", "es2015.iterable"], "outDir": "lib" }, "include": ["src/**/*.ts", "typings/tsd.d.ts"] diff --git a/build-tests/heft-node-everything-test/config/heft.json b/build-tests/heft-node-everything-test/config/heft.json index 41b92441f9d..fc24874e5d3 100644 --- a/build-tests/heft-node-everything-test/config/heft.json +++ b/build-tests/heft-node-everything-test/config/heft.json @@ -26,6 +26,16 @@ "taskPlugin": { "pluginPackage": "@rushstack/heft-api-extractor-plugin" } + }, + "metadata-test": { + "taskDependencies": ["typescript"], + "taskPlugin": { + "pluginPackage": "@rushstack/heft", + "pluginName": "run-script-plugin", + "options": { + "scriptPath": "./lib/test-metadata.js" + } + } } } }, diff --git a/build-tests/heft-node-everything-test/package.json b/build-tests/heft-node-everything-test/package.json index 5163114f745..a8bf85ffb45 100644 --- a/build-tests/heft-node-everything-test/package.json +++ b/build-tests/heft-node-everything-test/package.json @@ -8,7 +8,9 @@ "scripts": { "build": "heft build --clean", "_phase:build": "heft run --only build -- --clean", - "_phase:test": "heft run --only test -- --clean" + "_phase:build:incremental": "heft run --only build --", + "_phase:test": "heft run --only test -- --clean", + "_phase:test:incremental": "heft run --only test --" }, "devDependencies": { "@microsoft/api-extractor": "workspace:*", diff --git a/build-tests/heft-node-everything-test/src/test-metadata.ts b/build-tests/heft-node-everything-test/src/test-metadata.ts new file mode 100644 index 00000000000..1fd618c599a --- /dev/null +++ b/build-tests/heft-node-everything-test/src/test-metadata.ts @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import * as fs from 'node:fs/promises'; + +import type { IRunScriptOptions } from '@rushstack/heft'; + +export async function runAsync({ heftConfiguration: { buildFolderPath } }: IRunScriptOptions): Promise { + const metadataFolder: string = `${buildFolderPath}/.rush/temp/operation/_phase_build`; + + await fs.mkdir(metadataFolder, { recursive: true }); + + await fs.writeFile(`${metadataFolder}/test.txt`, new Date().toString(), 'utf-8'); +} diff --git a/build-tests/heft-typescript-v2-test/tsconfig.json b/build-tests/heft-typescript-v2-test/tsconfig.json index a24c429ddf6..4596d666047 100644 --- a/build-tests/heft-typescript-v2-test/tsconfig.json +++ b/build-tests/heft-typescript-v2-test/tsconfig.json @@ -18,7 +18,10 @@ "module": "commonjs", "target": "es2017", - "lib": ["es2017"] + "lib": ["es2017"], + + // TODO: REVERT THIS AFTER WE UPGRADE heft-typescript-v2-test TO A NEWER VERSION + "skipLibCheck": true }, "include": ["src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules", "lib"] diff --git a/build-tests/heft-typescript-v4-test/package.json b/build-tests/heft-typescript-v4-test/package.json index 2b7c8aa430b..ec0f505e1d9 100644 --- a/build-tests/heft-typescript-v4-test/package.json +++ b/build-tests/heft-typescript-v4-test/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@microsoft/api-extractor": "workspace:*", - "@rushstack/eslint-config": "4.0.2", + "@rushstack/eslint-config": "4.1.1", "@rushstack/eslint-patch": "workspace:*", "@rushstack/heft": "workspace:*", "@rushstack/heft-api-extractor-plugin": "workspace:*", diff --git a/build-tests/heft-webpack5-everything-test/config/jest.config.json b/build-tests/heft-webpack5-everything-test/config/jest.config.json index 331b9187503..f22bb14d6d1 100644 --- a/build-tests/heft-webpack5-everything-test/config/jest.config.json +++ b/build-tests/heft-webpack5-everything-test/config/jest.config.json @@ -7,5 +7,6 @@ "coverageReporters": ["cobertura", "html"], // Use v8 coverage provider to avoid Babel - "coverageProvider": "v8" + "coverageProvider": "v8", + "resolver": "@rushstack/heft-jest-plugin/lib/exports/jest-node-modules-symlink-resolver" } diff --git a/build-tests/heft-webpack5-everything-test/config/typescript.json b/build-tests/heft-webpack5-everything-test/config/typescript.json index 29f5117a1b7..86a32ee3552 100644 --- a/build-tests/heft-webpack5-everything-test/config/typescript.json +++ b/build-tests/heft-webpack5-everything-test/config/typescript.json @@ -49,5 +49,7 @@ // "excludeGlobs": [ // "some/path/*.css" // ] - } + }, + + "onlyResolveSymlinksInNodeModules": true } diff --git a/build-tests/rush-amazon-s3-build-cache-plugin-integration-test/package.json b/build-tests/rush-amazon-s3-build-cache-plugin-integration-test/package.json index 685b6c89b5d..897c23faea1 100644 --- a/build-tests/rush-amazon-s3-build-cache-plugin-integration-test/package.json +++ b/build-tests/rush-amazon-s3-build-cache-plugin-integration-test/package.json @@ -11,17 +11,16 @@ "start-proxy-server": "node ./lib/startProxyServer.js" }, "devDependencies": { + "@microsoft/rush-lib": "workspace:*", "@rushstack/heft": "workspace:*", - "local-node-rig": "workspace:*", "@rushstack/rush-amazon-s3-build-cache-plugin": "workspace:*", "@rushstack/node-core-library": "workspace:*", + "@rushstack/terminal": "workspace:*", + "@types/http-proxy": "~1.17.8", "@types/node": "18.17.15", "eslint": "~8.57.0", - "typescript": "~5.4.2", "http-proxy": "~1.18.1", - "@types/http-proxy": "~1.17.8" - }, - "dependencies": { - "@rushstack/terminal": "workspace:*" + "local-node-rig": "workspace:*", + "typescript": "~5.4.2" } } diff --git a/build-tests/rush-amazon-s3-build-cache-plugin-integration-test/src/readObject.ts b/build-tests/rush-amazon-s3-build-cache-plugin-integration-test/src/readObject.ts index aaaa1927cfb..5501dcf6d72 100644 --- a/build-tests/rush-amazon-s3-build-cache-plugin-integration-test/src/readObject.ts +++ b/build-tests/rush-amazon-s3-build-cache-plugin-integration-test/src/readObject.ts @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import { AmazonS3Client } from '@rushstack/rush-amazon-s3-build-cache-plugin'; -import { WebClient } from '@rushstack/rush-amazon-s3-build-cache-plugin'; +import { WebClient } from '@microsoft/rush-lib/lib/utilities/WebClient'; import { ConsoleTerminalProvider, type ITerminal, Terminal } from '@rushstack/terminal'; const webClient: WebClient = new WebClient(); diff --git a/build-tests/rush-lib-declaration-paths-test/config/heft.json b/build-tests/rush-lib-declaration-paths-test/config/heft.json index d3967bd0396..857ca850bcb 100644 --- a/build-tests/rush-lib-declaration-paths-test/config/heft.json +++ b/build-tests/rush-lib-declaration-paths-test/config/heft.json @@ -18,24 +18,8 @@ } }, - "copy-src-typings": { - "taskPlugin": { - "pluginPackage": "@rushstack/heft", - "pluginName": "copy-files-plugin", - "options": { - "copyOperations": [ - { - "sourcePath": "node_modules/@microsoft/rush-lib/src", - "destinationFolders": ["src"], - "includeGlobs": ["npm-check-typings.d.ts"] - } - ] - } - } - }, - "typescript": { - "taskDependencies": ["create-src", "copy-src-typings"] + "taskDependencies": ["create-src"] } } } diff --git a/build-tests/rush-lib-declaration-paths-test/scripts/createSrc.js b/build-tests/rush-lib-declaration-paths-test/scripts/createSrc.js index cf8107f2da0..01bcec568b9 100644 --- a/build-tests/rush-lib-declaration-paths-test/scripts/createSrc.js +++ b/build-tests/rush-lib-declaration-paths-test/scripts/createSrc.js @@ -26,7 +26,7 @@ module.exports = { } } - const indexFileLines = ['/// ', '']; + const indexFileLines = []; for await (const dtsPath of collectDtsPaths(`${rushLibPath}/lib`, '@microsoft/rush-lib/lib')) { indexFileLines.push(`import '${dtsPath}';`); } diff --git a/build-tests/ts-command-line-test/package.json b/build-tests/ts-command-line-test/package.json index f2500b41831..f354d9b2240 100644 --- a/build-tests/ts-command-line-test/package.json +++ b/build-tests/ts-command-line-test/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@rushstack/ts-command-line": "workspace:*", "@types/node": "18.17.15", - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "typescript": "~5.4.2" } } diff --git a/common/autoinstallers/rush-prettier/pnpm-lock.yaml b/common/autoinstallers/rush-prettier/pnpm-lock.yaml index 683c545c001..f5ea674ea1c 100644 --- a/common/autoinstallers/rush-prettier/pnpm-lock.yaml +++ b/common/autoinstallers/rush-prettier/pnpm-lock.yaml @@ -14,8 +14,8 @@ dependencies: packages: - /cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + /cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} dependencies: path-key: 3.1.1 @@ -27,7 +27,7 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 get-stream: 6.0.1 human-signals: 2.1.0 is-stream: 2.0.1 diff --git a/common/changes/@microsoft/rush/available-parallelism_2025-01-30-01-01.json b/common/changes/@microsoft/rush/available-parallelism_2025-01-30-01-01.json new file mode 100644 index 00000000000..96684da0d74 --- /dev/null +++ b/common/changes/@microsoft/rush/available-parallelism_2025-01-30-01-01.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Prefer `os.availableParallelism()` to `os.cpus().length`.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/enelson-add-timeline-param_2025-01-18-21-32.json b/common/changes/@microsoft/rush/enelson-add-timeline-param_2025-01-18-21-32.json new file mode 100644 index 00000000000..373c94ac8ea --- /dev/null +++ b/common/changes/@microsoft/rush/enelson-add-timeline-param_2025-01-18-21-32.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Allow --timeline option for all phased commands", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/fix-ensure-consistent-versions_2025-01-29-22-15.json b/common/changes/@microsoft/rush/fix-ensure-consistent-versions_2025-01-29-22-15.json new file mode 100644 index 00000000000..221f70a473c --- /dev/null +++ b/common/changes/@microsoft/rush/fix-ensure-consistent-versions_2025-01-29-22-15.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Fix support for \"ensureConsistentVersions\" in common-versions.json when subspaces features is not enabled.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-patch/octogonz-bump-decoupled_2025-01-07-23-21.json b/common/changes/@rushstack/eslint-patch/octogonz-bump-decoupled_2025-01-07-23-21.json new file mode 100644 index 00000000000..ceefa44d69e --- /dev/null +++ b/common/changes/@rushstack/eslint-patch/octogonz-bump-decoupled_2025-01-07-23-21.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-patch", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-patch" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin-packlets/ating-eslint-sarif-formatter_2024-10-02-21-04.json b/common/changes/@rushstack/eslint-plugin-packlets/ating-eslint-sarif-formatter_2024-10-02-21-04.json new file mode 100644 index 00000000000..ff918c1ad1d --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-packlets/ating-eslint-sarif-formatter_2024-10-02-21-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin-packlets", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin-packlets" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin-packlets/heft-jest-punycode_2024-12-10-05-37.json b/common/changes/@rushstack/eslint-plugin-packlets/heft-jest-punycode_2024-12-10-05-37.json new file mode 100644 index 00000000000..ff918c1ad1d --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-packlets/heft-jest-punycode_2024-12-10-05-37.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin-packlets", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin-packlets" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin-packlets/main_2024-11-23-00-43.json b/common/changes/@rushstack/eslint-plugin-packlets/main_2024-11-23-00-43.json new file mode 100644 index 00000000000..ff918c1ad1d --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-packlets/main_2024-11-23-00-43.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin-packlets", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin-packlets" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin-packlets/octogonz-bump-decoupled_2025-01-07-23-21.json b/common/changes/@rushstack/eslint-plugin-packlets/octogonz-bump-decoupled_2025-01-07-23-21.json new file mode 100644 index 00000000000..ff918c1ad1d --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-packlets/octogonz-bump-decoupled_2025-01-07-23-21.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin-packlets", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin-packlets" +} \ No newline at end of file diff --git a/common/changes/@microsoft/api-extractor-model/main_2024-09-20-22-48.json b/common/changes/@rushstack/eslint-plugin-packlets/update-cyclics_2024-12-04-01-12.json similarity index 52% rename from common/changes/@microsoft/api-extractor-model/main_2024-09-20-22-48.json rename to common/changes/@rushstack/eslint-plugin-packlets/update-cyclics_2024-12-04-01-12.json index 52f6a7d52bc..a04cd0021ef 100644 --- a/common/changes/@microsoft/api-extractor-model/main_2024-09-20-22-48.json +++ b/common/changes/@rushstack/eslint-plugin-packlets/update-cyclics_2024-12-04-01-12.json @@ -3,9 +3,9 @@ { "comment": "", "type": "none", - "packageName": "@microsoft/api-extractor-model" + "packageName": "@rushstack/eslint-plugin-packlets" } ], - "packageName": "@microsoft/api-extractor-model", + "packageName": "@rushstack/eslint-plugin-packlets", "email": "iclanton@users.noreply.github.com" } \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin-security/ating-eslint-sarif-formatter_2024-10-02-21-04.json b/common/changes/@rushstack/eslint-plugin-security/ating-eslint-sarif-formatter_2024-10-02-21-04.json new file mode 100644 index 00000000000..a4477ef1a61 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-security/ating-eslint-sarif-formatter_2024-10-02-21-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin-security", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin-security" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin-security/heft-jest-punycode_2024-12-10-05-37.json b/common/changes/@rushstack/eslint-plugin-security/heft-jest-punycode_2024-12-10-05-37.json new file mode 100644 index 00000000000..a4477ef1a61 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-security/heft-jest-punycode_2024-12-10-05-37.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin-security", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin-security" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin-security/main_2024-11-23-00-43.json b/common/changes/@rushstack/eslint-plugin-security/main_2024-11-23-00-43.json new file mode 100644 index 00000000000..a4477ef1a61 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-security/main_2024-11-23-00-43.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin-security", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin-security" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin-security/octogonz-bump-decoupled_2025-01-07-23-21.json b/common/changes/@rushstack/eslint-plugin-security/octogonz-bump-decoupled_2025-01-07-23-21.json new file mode 100644 index 00000000000..a4477ef1a61 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-security/octogonz-bump-decoupled_2025-01-07-23-21.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin-security", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin-security" +} \ No newline at end of file diff --git a/common/changes/@rushstack/heft-config-file/main_2024-09-20-22-48.json b/common/changes/@rushstack/eslint-plugin-security/update-cyclics_2024-12-04-01-12.json similarity index 52% rename from common/changes/@rushstack/heft-config-file/main_2024-09-20-22-48.json rename to common/changes/@rushstack/eslint-plugin-security/update-cyclics_2024-12-04-01-12.json index ebc8dd79c07..e8c34c96411 100644 --- a/common/changes/@rushstack/heft-config-file/main_2024-09-20-22-48.json +++ b/common/changes/@rushstack/eslint-plugin-security/update-cyclics_2024-12-04-01-12.json @@ -3,9 +3,9 @@ { "comment": "", "type": "none", - "packageName": "@rushstack/heft-config-file" + "packageName": "@rushstack/eslint-plugin-security" } ], - "packageName": "@rushstack/heft-config-file", + "packageName": "@rushstack/eslint-plugin-security", "email": "iclanton@users.noreply.github.com" } \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin/ating-eslint-sarif-formatter_2024-10-02-21-04.json b/common/changes/@rushstack/eslint-plugin/ating-eslint-sarif-formatter_2024-10-02-21-04.json new file mode 100644 index 00000000000..dcf93469653 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin/ating-eslint-sarif-formatter_2024-10-02-21-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin/heft-jest-punycode_2024-12-10-05-37.json b/common/changes/@rushstack/eslint-plugin/heft-jest-punycode_2024-12-10-05-37.json new file mode 100644 index 00000000000..dcf93469653 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin/heft-jest-punycode_2024-12-10-05-37.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin/octogonz-bump-decoupled_2025-01-07-23-21.json b/common/changes/@rushstack/eslint-plugin/octogonz-bump-decoupled_2025-01-07-23-21.json new file mode 100644 index 00000000000..dcf93469653 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin/octogonz-bump-decoupled_2025-01-07-23-21.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin" +} \ No newline at end of file diff --git a/common/changes/@microsoft/api-extractor/main_2024-09-20-22-48.json b/common/changes/@rushstack/eslint-plugin/update-cyclics_2024-12-04-01-12.json similarity index 57% rename from common/changes/@microsoft/api-extractor/main_2024-09-20-22-48.json rename to common/changes/@rushstack/eslint-plugin/update-cyclics_2024-12-04-01-12.json index f7c3a8a84e4..5669a1df6aa 100644 --- a/common/changes/@microsoft/api-extractor/main_2024-09-20-22-48.json +++ b/common/changes/@rushstack/eslint-plugin/update-cyclics_2024-12-04-01-12.json @@ -3,9 +3,9 @@ { "comment": "", "type": "none", - "packageName": "@microsoft/api-extractor" + "packageName": "@rushstack/eslint-plugin" } ], - "packageName": "@microsoft/api-extractor", + "packageName": "@rushstack/eslint-plugin", "email": "iclanton@users.noreply.github.com" } \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin/user-ianc-bump-cyclics_2024-11-23-00-48.json b/common/changes/@rushstack/eslint-plugin/user-ianc-bump-cyclics_2024-11-23-00-48.json new file mode 100644 index 00000000000..dcf93469653 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin/user-ianc-bump-cyclics_2024-11-23-00-48.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/eslint-plugin", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/eslint-plugin" +} \ No newline at end of file diff --git a/common/changes/@rushstack/node-core-library/main_2024-09-20-22-48.json b/common/changes/@rushstack/node-core-library/main_2024-09-20-22-48.json deleted file mode 100644 index db57b2feb86..00000000000 --- a/common/changes/@rushstack/node-core-library/main_2024-09-20-22-48.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "comment": "", - "type": "none", - "packageName": "@rushstack/node-core-library" - } - ], - "packageName": "@rushstack/node-core-library", - "email": "iclanton@users.noreply.github.com" -} \ No newline at end of file diff --git a/common/changes/@rushstack/operation-graph/main_2024-09-20-22-48.json b/common/changes/@rushstack/operation-graph/main_2024-09-20-22-48.json deleted file mode 100644 index ccb47662fbf..00000000000 --- a/common/changes/@rushstack/operation-graph/main_2024-09-20-22-48.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "comment": "", - "type": "none", - "packageName": "@rushstack/operation-graph" - } - ], - "packageName": "@rushstack/operation-graph", - "email": "iclanton@users.noreply.github.com" -} \ No newline at end of file diff --git a/common/changes/@rushstack/rig-package/heft-jest-punycode_2024-12-10-05-37.json b/common/changes/@rushstack/rig-package/heft-jest-punycode_2024-12-10-05-37.json new file mode 100644 index 00000000000..1c1df562afb --- /dev/null +++ b/common/changes/@rushstack/rig-package/heft-jest-punycode_2024-12-10-05-37.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/rig-package", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/rig-package" +} \ No newline at end of file diff --git a/common/changes/@rushstack/rig-package/main_2024-11-23-00-43.json b/common/changes/@rushstack/rig-package/main_2024-11-23-00-43.json new file mode 100644 index 00000000000..1c1df562afb --- /dev/null +++ b/common/changes/@rushstack/rig-package/main_2024-11-23-00-43.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/rig-package", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/rig-package" +} \ No newline at end of file diff --git a/common/changes/@rushstack/rig-package/octogonz-bump-decoupled_2025-01-07-23-21.json b/common/changes/@rushstack/rig-package/octogonz-bump-decoupled_2025-01-07-23-21.json new file mode 100644 index 00000000000..1c1df562afb --- /dev/null +++ b/common/changes/@rushstack/rig-package/octogonz-bump-decoupled_2025-01-07-23-21.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/rig-package", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/rig-package" +} \ No newline at end of file diff --git a/common/changes/@rushstack/terminal/main_2024-09-20-22-48.json b/common/changes/@rushstack/rig-package/update-cyclics_2024-12-04-01-12.json similarity index 58% rename from common/changes/@rushstack/terminal/main_2024-09-20-22-48.json rename to common/changes/@rushstack/rig-package/update-cyclics_2024-12-04-01-12.json index 13894830365..c66505525a1 100644 --- a/common/changes/@rushstack/terminal/main_2024-09-20-22-48.json +++ b/common/changes/@rushstack/rig-package/update-cyclics_2024-12-04-01-12.json @@ -3,9 +3,9 @@ { "comment": "", "type": "none", - "packageName": "@rushstack/terminal" + "packageName": "@rushstack/rig-package" } ], - "packageName": "@rushstack/terminal", + "packageName": "@rushstack/rig-package", "email": "iclanton@users.noreply.github.com" } \ No newline at end of file diff --git a/common/changes/@rushstack/tree-pattern/heft-jest-punycode_2024-12-10-05-37.json b/common/changes/@rushstack/tree-pattern/heft-jest-punycode_2024-12-10-05-37.json new file mode 100644 index 00000000000..120c33a1f7e --- /dev/null +++ b/common/changes/@rushstack/tree-pattern/heft-jest-punycode_2024-12-10-05-37.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/tree-pattern", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/tree-pattern" +} \ No newline at end of file diff --git a/common/changes/@rushstack/tree-pattern/main_2024-11-23-00-43.json b/common/changes/@rushstack/tree-pattern/main_2024-11-23-00-43.json new file mode 100644 index 00000000000..120c33a1f7e --- /dev/null +++ b/common/changes/@rushstack/tree-pattern/main_2024-11-23-00-43.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/tree-pattern", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/tree-pattern" +} \ No newline at end of file diff --git a/common/changes/@rushstack/tree-pattern/octogonz-bump-decoupled_2025-01-07-23-21.json b/common/changes/@rushstack/tree-pattern/octogonz-bump-decoupled_2025-01-07-23-21.json new file mode 100644 index 00000000000..120c33a1f7e --- /dev/null +++ b/common/changes/@rushstack/tree-pattern/octogonz-bump-decoupled_2025-01-07-23-21.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/tree-pattern", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/tree-pattern" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-patch/main_2024-09-20-22-48.json b/common/changes/@rushstack/tree-pattern/update-cyclics_2024-12-04-01-12.json similarity index 57% rename from common/changes/@rushstack/eslint-patch/main_2024-09-20-22-48.json rename to common/changes/@rushstack/tree-pattern/update-cyclics_2024-12-04-01-12.json index 6a61cc13329..619a10c75e3 100644 --- a/common/changes/@rushstack/eslint-patch/main_2024-09-20-22-48.json +++ b/common/changes/@rushstack/tree-pattern/update-cyclics_2024-12-04-01-12.json @@ -3,9 +3,9 @@ { "comment": "", "type": "none", - "packageName": "@rushstack/eslint-patch" + "packageName": "@rushstack/tree-pattern" } ], - "packageName": "@rushstack/eslint-patch", + "packageName": "@rushstack/tree-pattern", "email": "iclanton@users.noreply.github.com" } \ No newline at end of file diff --git a/common/changes/@rushstack/ts-command-line/main_2024-09-20-22-48.json b/common/changes/@rushstack/ts-command-line/main_2024-09-20-22-48.json deleted file mode 100644 index 1f3658b8dc4..00000000000 --- a/common/changes/@rushstack/ts-command-line/main_2024-09-20-22-48.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "comment": "", - "type": "none", - "packageName": "@rushstack/ts-command-line" - } - ], - "packageName": "@rushstack/ts-command-line", - "email": "iclanton@users.noreply.github.com" -} \ No newline at end of file diff --git a/common/config/azure-pipelines/templates/install-node.yaml b/common/config/azure-pipelines/templates/install-node.yaml index d3e16755fc3..9983a8a311e 100644 --- a/common/config/azure-pipelines/templates/install-node.yaml +++ b/common/config/azure-pipelines/templates/install-node.yaml @@ -1,7 +1,7 @@ parameters: - name: NodeMajorVersion type: number - default: 18 + default: 20 steps: - task: NodeTool@0 diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index 64c497e90f4..7a5edb8f445 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -14,10 +14,6 @@ "name": "@lifaon/path", "allowedCategories": [ "libraries" ] }, - { - "name": "@microsoft/rush-sdk", - "allowedCategories": [ "tests" ] - }, { "name": "@radix-ui/colors", "allowedCategories": [ "libraries" ] @@ -54,10 +50,6 @@ "name": "axios", "allowedCategories": [ "libraries" ] }, - { - "name": "colors", - "allowedCategories": [ "tests" ] - }, { "name": "dependency-path", "allowedCategories": [ "libraries" ] diff --git a/common/config/rush/build-cache.json b/common/config/rush/build-cache.json index 13fe1a5b2b4..59bc58ccb99 100644 --- a/common/config/rush/build-cache.json +++ b/common/config/rush/build-cache.json @@ -34,6 +34,11 @@ */ "cacheEntryNamePattern": "[projectName:normalize]-[phaseName:normalize]-[hash]", + /** + * (Optional) Salt to inject during calculation of the cache key. This can be used to invalidate the cache for all projects when the salt changes. + */ + // "cacheHashSalt": "1", + /** * Use this configuration with "cacheProvider"="azure-blob-storage" */ @@ -59,7 +64,15 @@ /** * If set to true, allow writing to the cache. Defaults to false. */ - // "isCacheWriteAllowed": true + // "isCacheWriteAllowed": true, + /** + * The Entra ID login flow to use. Defaults to 'AdoCodespacesAuth' on GitHub Codespaces, 'InteractiveBrowser' otherwise. + */ + // "loginFlow": "InteractiveBrowser", + /** + * If set to true, reading the cache requires authentication. Defaults to false. + */ + // "readRequiresAuthentication": true }, /** diff --git a/common/config/rush/experiments.json b/common/config/rush/experiments.json index 282d389ba0b..f8071d80056 100644 --- a/common/config/rush/experiments.json +++ b/common/config/rush/experiments.json @@ -82,10 +82,39 @@ * If set to true, Rush will generate a `project-impact-graph.yaml` file in the repository root during `rush update`. */ // "generateProjectImpactGraphDuringRushUpdate": true, + /** * If true, when running in watch mode, Rush will check for phase scripts named `_phase::ipc` and run them instead * of `_phase:` if they exist. The created child process will be provided with an IPC channel and expected to persist * across invocations. */ - // "useIPCScriptsInWatchMode": true + // "useIPCScriptsInWatchMode": true, + + /** + * (UNDER DEVELOPMENT) The Rush alerts feature provides a way to send announcements to engineers + * working in the monorepo, by printing directly in the user's shell window when they invoke Rush commands. + * This ensures that important notices will be seen by anyone doing active development, since people often + * ignore normal discussion group messages or don't know to subscribe. + */ + // "rushAlerts": true, + + /** + * When using cobuilds, this experiment allows uncacheable operations to benefit from cobuild orchestration without using the build cache. + */ + // "allowCobuildWithoutCache": true, + + /** + * By default, rush perform a full scan of the entire repository. For example, Rush runs `git status` to check for local file changes. + * When this toggle is enabled, Rush will only scan specific paths, significantly speeding up Git operations. + */ + // "enableSubpathScan": true + + /** + * Rush has a policy that normally requires Rush projects to specify `workspace:*` in package.json when depending + * on other projects in the workspace, unless they are explicitly declared as `decoupledLocalDependencies` + * in rush.json. Enabling this experiment will remove that requirement for dependencies belonging to a different + * subspace. This is useful for large product groups who work in separate subspaces and generally prefer to consume + * each other's packages via the NPM registry. + */ + // "exemptDecoupledDependenciesBetweenSubspaces": true } diff --git a/common/config/rush/nonbrowser-approved-packages.json b/common/config/rush/nonbrowser-approved-packages.json index 6aa58323b73..e76901fd1f9 100644 --- a/common/config/rush/nonbrowser-approved-packages.json +++ b/common/config/rush/nonbrowser-approved-packages.json @@ -102,6 +102,10 @@ "name": "@pnpm/logger", "allowedCategories": [ "libraries" ] }, + { + "name": "@pnpm/lockfile.types", + "allowedCategories": [ "libraries" ] + }, { "name": "@redis/client", "allowedCategories": [ "libraries" ] @@ -230,6 +234,10 @@ "name": "@rushstack/package-extractor", "allowedCategories": [ "libraries", "vscode-extensions" ] }, + { + "name": "@rushstack/real-node-module-path", + "allowedCategories": [ "libraries" ] + }, { "name": "@rushstack/rig-package", "allowedCategories": [ "libraries" ] @@ -782,6 +790,10 @@ "name": "pseudolocale", "allowedCategories": [ "libraries" ] }, + { + "name": "punycode", + "allowedCategories": [ "libraries" ] + }, { "name": "read-package-tree", "allowedCategories": [ "libraries" ] diff --git a/common/config/rush/pnpm-config.json b/common/config/rush/pnpm-config.json index ace3d064ab1..b862ec1ff0a 100644 --- a/common/config/rush/pnpm-config.json +++ b/common/config/rush/pnpm-config.json @@ -1,6 +1,11 @@ /** * This configuration file provides settings specific to the PNPM package manager. * More documentation is available on the Rush website: https://rushjs.io + * + * Rush normally looks for this file in `common/config/rush/pnpm-config.json`. However, + * if `subspacesEnabled` is true in subspaces.json, then Rush will instead first look + * for `common/config/subspaces//pnpm-config.json`. (If the file exists in both places, + * then the file under `common/config/rush` is ignored.) */ { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/pnpm-config.schema.json", @@ -196,6 +201,7 @@ "globalOverrides": { // "example1": "^1.0.0", // "example2": "npm:@company/example2@^1.0.0" + // TODO: Remove once https://github.com/dylang/npm-check/issues/499 // has been closed and a new version of `npm-check` is published. "package-json": "^7" @@ -422,6 +428,21 @@ // "fsevents" ], + /** + * The `globalIgnoredOptionalDependencies` setting suppresses the installation of optional NPM + * dependencies specified in the list. This is useful when certain optional dependencies are + * not needed in your environment, such as platform-specific packages or dependencies that + * fail during installation but are not critical to your project. + * These settings are copied into the `pnpm.overrides` field of the `common/temp/package.json` + * file that is generated by Rush during installation, instructing PNPM to ignore the specified + * optional dependencies. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmignoredoptionaldependencies + */ + "globalIgnoredOptionalDependencies": [ + // "fsevents" + ], + /** * The `globalAllowedDeprecatedVersions` setting suppresses installation warnings for package * versions that the NPM registry reports as being deprecated. This is useful if the diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index c742404f9ed..16b20e7ac7f 100644 --- a/common/config/rush/version-policies.json +++ b/common/config/rush/version-policies.json @@ -102,7 +102,7 @@ { "policyName": "rush", "definitionName": "lockStepVersion", - "version": "5.138.0", + "version": "5.148.0", "nextBump": "minor", "mainProject": "@microsoft/rush" } diff --git a/common/config/subspaces/build-tests-subspace/common-versions.json b/common/config/subspaces/build-tests-subspace/common-versions.json index 4c20aea7322..fdf2dced761 100644 --- a/common/config/subspaces/build-tests-subspace/common-versions.json +++ b/common/config/subspaces/build-tests-subspace/common-versions.json @@ -97,7 +97,7 @@ "~4.9.5", // API Extractor bundles a specific TypeScript version because it calls internal APIs - "5.4.2" + "5.7.2" ], "source-map": [ "~0.6.1" // API Extractor is using an older version of source-map because newer versions are async diff --git a/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml b/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml index d96170e3a18..745a2ae2451 100644 --- a/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml +++ b/common/config/subspaces/build-tests-subspace/pnpm-lock.yaml @@ -24,7 +24,7 @@ importers: devDependencies: '@rushstack/eslint-config': specifier: file:../../eslint/eslint-config - version: file:../../../eslint/eslint-config(eslint@8.57.0)(typescript@5.4.5) + version: file:../../../eslint/eslint-config(eslint@8.57.1)(typescript@5.4.5) '@rushstack/heft': specifier: file:../../apps/heft version: file:../../../apps/heft(@types/node@18.17.15) @@ -33,7 +33,7 @@ importers: version: 18.17.15 eslint: specifier: ~8.57.0 - version: 8.57.0 + version: 8.57.1 local-node-rig: specifier: file:../../rigs/local-node-rig version: file:../../../rigs/local-node-rig @@ -63,7 +63,7 @@ importers: version: file:../../../libraries/rush-lib(@types/node@18.17.15) '@rushstack/eslint-config': specifier: file:../../eslint/eslint-config - version: file:../../../eslint/eslint-config(eslint@8.57.0)(typescript@5.4.5) + version: file:../../../eslint/eslint-config(eslint@8.57.1)(typescript@5.4.5) '@rushstack/heft': specifier: file:../../apps/heft version: file:../../../apps/heft(@types/node@18.17.15) @@ -72,7 +72,7 @@ importers: version: 18.17.15 eslint: specifier: ~8.57.0 - version: 8.57.0 + version: 8.57.1 local-node-rig: specifier: file:../../rigs/local-node-rig version: file:../../../rigs/local-node-rig @@ -95,13 +95,13 @@ importers: devDependencies: '@rushstack/eslint-config': specifier: file:../../eslint/eslint-config - version: file:../../../eslint/eslint-config(eslint@8.57.0)(typescript@5.4.5) + version: file:../../../eslint/eslint-config(eslint@8.57.1)(typescript@5.4.5) '@rushstack/heft': specifier: file:../../apps/heft version: file:../../../apps/heft(@types/node@18.17.15) eslint: specifier: ~8.57.0 - version: 8.57.0 + version: 8.57.1 local-node-rig: specifier: file:../../rigs/local-node-rig version: file:../../../rigs/local-node-rig @@ -120,19 +120,19 @@ importers: devDependencies: '@rushstack/eslint-config': specifier: file:../../eslint/eslint-config - version: file:../../../eslint/eslint-config(eslint@8.57.0)(typescript@4.9.5) + version: file:../../../eslint/eslint-config(eslint@8.57.1)(typescript@4.9.5) '@rushstack/heft': specifier: file:../../apps/heft version: file:../../../apps/heft(@types/node@18.17.15) '@rushstack/heft-lint-plugin': specifier: file:../../heft-plugins/heft-lint-plugin - version: file:../../../heft-plugins/heft-lint-plugin(@rushstack/heft@0.68.2)(@types/node@18.17.15) + version: file:../../../heft-plugins/heft-lint-plugin(@rushstack/heft@0.68.13)(@types/node@18.17.15) '@rushstack/heft-typescript-plugin': specifier: file:../../heft-plugins/heft-typescript-plugin - version: file:../../../heft-plugins/heft-typescript-plugin(@rushstack/heft@0.68.2)(@types/node@18.17.15) + version: file:../../../heft-plugins/heft-typescript-plugin(@rushstack/heft@0.68.13)(@types/node@18.17.15) eslint: specifier: ~8.57.0 - version: 8.57.0 + version: 8.57.1 tslint: specifier: ~5.20.1 version: 5.20.1(typescript@4.9.5) @@ -159,34 +159,35 @@ packages: '@jridgewell/trace-mapping': 0.3.25 dev: true - /@babel/code-frame@7.24.2: - resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} + /@babel/code-frame@7.26.2: + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.24.5 - picocolors: 1.0.1 + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 - /@babel/compat-data@7.24.4: - resolution: {integrity: sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==} + /@babel/compat-data@7.26.2: + resolution: {integrity: sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==} engines: {node: '>=6.9.0'} dev: true - /@babel/core@7.24.5: - resolution: {integrity: sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==} + /@babel/core@7.26.0: + resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.5 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) - '@babel/helpers': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helpers': 7.26.0 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 convert-source-map: 2.0.0 - debug: 4.3.4 + debug: 4.3.7 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -194,281 +195,271 @@ packages: - supports-color dev: true - /@babel/generator@7.24.5: - resolution: {integrity: sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==} + /@babel/generator@7.26.2: + resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.5 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 + jsesc: 3.0.2 - /@babel/helper-compilation-targets@7.23.6: - resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} + /@babel/helper-compilation-targets@7.25.9: + resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/compat-data': 7.24.4 - '@babel/helper-validator-option': 7.23.5 - browserslist: 4.23.0 + '@babel/compat-data': 7.26.2 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.2 lru-cache: 5.1.1 semver: 6.3.1 dev: true - /@babel/helper-environment-visitor@7.22.20: - resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} - engines: {node: '>=6.9.0'} - - /@babel/helper-function-name@7.23.0: - resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.24.0 - '@babel/types': 7.24.5 - - /@babel/helper-hoist-variables@7.22.5: - resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - - /@babel/helper-module-imports@7.24.3: - resolution: {integrity: sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==} + /@babel/helper-module-imports@7.25.9: + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.5 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color dev: true - /@babel/helper-module-transforms@7.24.5(@babel/core@7.24.5): - resolution: {integrity: sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==} + /@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0): + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.24.3 - '@babel/helper-simple-access': 7.24.5 - '@babel/helper-split-export-declaration': 7.24.5 - '@babel/helper-validator-identifier': 7.24.5 - dev: true - - /@babel/helper-plugin-utils@7.24.5: - resolution: {integrity: sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==} - engines: {node: '>=6.9.0'} + '@babel/core': 7.26.0 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color dev: true - /@babel/helper-simple-access@7.24.5: - resolution: {integrity: sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==} + /@babel/helper-plugin-utils@7.25.9: + resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 dev: true - /@babel/helper-split-export-declaration@7.24.5: - resolution: {integrity: sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==} + /@babel/helper-string-parser@7.25.9: + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.5 - /@babel/helper-string-parser@7.24.1: - resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==} + /@babel/helper-validator-identifier@7.25.9: + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-identifier@7.24.5: - resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==} - engines: {node: '>=6.9.0'} - - /@babel/helper-validator-option@7.23.5: - resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} + /@babel/helper-validator-option@7.25.9: + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} engines: {node: '>=6.9.0'} dev: true - /@babel/helpers@7.24.5: - resolution: {integrity: sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==} + /@babel/helpers@7.26.0: + resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 - transitivePeerDependencies: - - supports-color + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 dev: true - /@babel/highlight@7.24.5: - resolution: {integrity: sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.24.5 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.0.1 - - /@babel/parser@7.24.5: - resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} + /@babel/parser@7.26.2: + resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} engines: {node: '>=6.0.0'} hasBin: true + dependencies: + '@babel/types': 7.26.0 - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.5): + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.0): resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.24.5): + /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.0): resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.5): + /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.0): resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + dev: true + + /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.0): + resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + dev: true + + /@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.0): + resolution: {integrity: sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.5): + /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.0): resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.5): + /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.0): resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-jsx@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==} + /@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0): + resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.5): + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.0): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.5): + /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.0): resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.5): + /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.0): resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.5): + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.0): resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.5): + /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.0): resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.5): + /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.0): resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.5): + /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.0): + resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + dev: true + + /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.0): resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/plugin-syntax-typescript@7.24.1(@babel/core@7.24.5): - resolution: {integrity: sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==} + /@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.0): + resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.5 - '@babel/helper-plugin-utils': 7.24.5 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: true - /@babel/template@7.24.0: - resolution: {integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==} + /@babel/template@7.25.9: + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.24.2 - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 - /@babel/traverse@7.24.5: - resolution: {integrity: sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==} + /@babel/traverse@7.25.9: + resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 - debug: 4.3.4 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 + debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color - /@babel/types@7.24.5: - resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} + /@babel/types@7.26.0: + resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-string-parser': 7.24.1 - '@babel/helper-validator-identifier': 7.24.5 - to-fast-properties: 2.0.0 + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -484,22 +475,22 @@ packages: engines: {node: ^12 || ^14 || ^16 || ^17} dependencies: comment-parser: 1.3.0 - esquery: 1.5.0 + esquery: 1.6.0 jsdoc-type-pratt-parser: 2.2.5 dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + /@eslint-community/eslint-utils@4.4.1(eslint@8.57.1): + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.57.0 + eslint: 8.57.1 eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.10.0: - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + /@eslint-community/regexpp@4.12.1: + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true @@ -508,10 +499,10 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.7 espree: 9.6.1 globals: 13.24.0 - ignore: 5.3.1 + ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -520,17 +511,18 @@ packages: - supports-color dev: true - /@eslint/js@8.57.0: - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + /@eslint/js@8.57.1: + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@humanwhocodes/config-array@0.11.14: - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + /@humanwhocodes/config-array@0.13.0: + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4 + debug: 4.3.7 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -543,6 +535,7 @@ packages: /@humanwhocodes/object-schema@2.0.3: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead dev: true /@istanbuljs/load-nyc-config@1.1.0: @@ -606,7 +599,7 @@ packages: jest-util: 29.7.0 jest-validate: 29.7.0 jest-watcher: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 pretty-format: 29.7.0 slash: 3.0.0 strip-ansi: 6.0.1 @@ -700,7 +693,7 @@ packages: slash: 3.0.0 string-length: 4.0.2 strip-ansi: 6.0.1 - v8-to-istanbul: 9.2.0 + v8-to-istanbul: 9.3.0 transitivePeerDependencies: - supports-color dev: true @@ -751,7 +744,7 @@ packages: resolution: {integrity: sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.24.5 + '@babel/core': 7.26.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 babel-plugin-istanbul: 6.1.1 @@ -762,7 +755,7 @@ packages: jest-haste-map: 29.7.0 jest-regex-util: 29.6.3 jest-util: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 pirates: 4.0.6 slash: 3.0.0 write-file-atomic: 4.0.2 @@ -774,7 +767,7 @@ packages: resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.24.5 + '@babel/core': 7.26.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 babel-plugin-istanbul: 6.1.1 @@ -785,7 +778,7 @@ packages: jest-haste-map: 29.7.0 jest-regex-util: 29.6.3 jest-util: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 pirates: 4.0.6 slash: 3.0.0 write-file-atomic: 4.0.2 @@ -801,7 +794,7 @@ packages: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 '@types/node': 18.17.15 - '@types/yargs': 17.0.32 + '@types/yargs': 17.0.33 chalk: 4.1.2 dev: true @@ -810,7 +803,7 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 /@jridgewell/resolve-uri@3.1.2: @@ -821,26 +814,42 @@ packages: resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} engines: {node: '>=6.0.0'} - /@jridgewell/sourcemap-codec@1.4.15: - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + /@jridgewell/sourcemap-codec@1.5.0: + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} /@jridgewell/trace-mapping@0.3.25: resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 - /@microsoft/tsdoc-config@0.17.0: - resolution: {integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==} + /@jsep-plugin/assignment@1.3.0(jsep@1.4.0): + resolution: {integrity: sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==} + engines: {node: '>= 10.16.0'} + peerDependencies: + jsep: ^0.4.0||^1.0.0 dependencies: - '@microsoft/tsdoc': 0.15.0 + jsep: 1.4.0 + + /@jsep-plugin/regex@1.0.4(jsep@1.4.0): + resolution: {integrity: sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==} + engines: {node: '>= 10.16.0'} + peerDependencies: + jsep: ^0.4.0||^1.0.0 + dependencies: + jsep: 1.4.0 + + /@microsoft/tsdoc-config@0.17.1: + resolution: {integrity: sha512-UtjIFe0C6oYgTnad4q1QP4qXwLhe6tIpNTRStJ2RZEPIkqQPREAwE5spzVxsdn9UaEMUqhh0AqSx3X4nWAKXWw==} + dependencies: + '@microsoft/tsdoc': 0.15.1 ajv: 8.12.0 jju: 1.4.0 resolve: 1.22.8 dev: true - /@microsoft/tsdoc@0.15.0: - resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} + /@microsoft/tsdoc@0.15.1: + resolution: {integrity: sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==} dev: true /@nodelib/fs.scandir@2.1.5: @@ -873,6 +882,17 @@ packages: dependencies: rfc4648: 1.5.3 + /@pnpm/crypto.base32-hash@3.0.1: + resolution: {integrity: sha512-DM4RR/tvB7tMb2FekL0Q97A5PCXNyEC+6ht8SaufAUFSJNxeozqHw9PHTZR03mzjziPzNQLOld0pNINBX3srtw==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/crypto.polyfill': 1.0.0 + rfc4648: 1.5.3 + + /@pnpm/crypto.polyfill@1.0.0: + resolution: {integrity: sha512-WbmsqqcUXKKaAF77ox1TQbpZiaQcr26myuMUu+WjUtoWYgD3VP6iKYEvSx35SZ6G2L316lu+pv+40A2GbWJc1w==} + engines: {node: '>=18.12'} + /@pnpm/dependency-path@2.1.8: resolution: {integrity: sha512-ywBaTjy0iSEF7lH3DlF8UXrdL2bw4AQFV2tTOeNeY7wc1W5CE+RHSJhf9MXBYcZPesqGRrPiU7Pimj3l05L9VA==} engines: {node: '>=16.14'} @@ -880,7 +900,15 @@ packages: '@pnpm/crypto.base32-hash': 2.0.0 '@pnpm/types': 9.4.2 encode-registry: 3.0.1 - semver: 7.5.4 + semver: 7.6.3 + + /@pnpm/dependency-path@5.1.7: + resolution: {integrity: sha512-MKCyaTy1r9fhBXAnhDZNBVgo6ThPnicwJEG203FDp7pGhD7NruS/FhBI+uMd7GNsK3D7aIFCDAgbWpNTXn/eWw==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/crypto.base32-hash': 3.0.1 + '@pnpm/types': 12.2.0 + semver: 7.6.3 /@pnpm/error@1.4.0: resolution: {integrity: sha512-vxkRrkneBPVmP23kyjnYwVOtipwlSl6UfL+h+Xa3TrABJTz5rYBXemlTsU5BzST8U4pD7YDkTb3SQu+MMuIDKA==} @@ -904,6 +932,14 @@ packages: p-settle: 4.1.1 ramda: 0.27.2 + /@pnpm/lockfile.types@1.0.3: + resolution: {integrity: sha512-A7vUWktnhDkrIs+WmXm7AdffJVyVYJpQUEouya/DYhB+Y+tQ3BXjZ6CV0KybqLgI/8AZErgCJqFxA0GJH6QDjA==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/patching.types': 1.0.0 + '@pnpm/types': 12.2.0 + dev: false + /@pnpm/package-bins@4.1.0: resolution: {integrity: sha512-57/ioGYLBbVRR80Ux9/q2i3y8Q+uQADc3c+Yse8jr/60YLOi3jcWz13e2Jy+ANYtZI258Qc5wk2X077rp0Ly/Q==} engines: {node: '>=10.16'} @@ -912,6 +948,11 @@ packages: fast-glob: 3.3.2 is-subdir: 1.2.0 + /@pnpm/patching.types@1.0.0: + resolution: {integrity: sha512-juCdQCC1USqLcOhVPl1tYReoTO9YH4fTullMnFXXcmpsDM7Dkn3tzuOQKC3oPoJ2ozv+0EeWWMtMGqn2+IM3pQ==} + engines: {node: '>=18.12'} + dev: false + /@pnpm/read-modules-dir@2.0.3: resolution: {integrity: sha512-i9OgRvSlxrTS9a2oXokhDxvQzDtfqtsooJ9jaGoHkznue5aFCTSrNZFQ6M18o8hC03QWfnxaKi0BtOvNkKu2+A==} engines: {node: '>=10.13'} @@ -944,6 +985,10 @@ packages: sort-keys: 4.2.0 strip-bom: 4.0.0 + /@pnpm/types@12.2.0: + resolution: {integrity: sha512-5RtwWhX39j89/Tmyv2QSlpiNjErA357T/8r1Dkg+2lD3P7RuS7Xi2tChvmOC3VlezEFNcWnEGCOeKoGRkDuqFA==} + engines: {node: '>=18.12'} + /@pnpm/types@6.4.0: resolution: {integrity: sha512-nco4+4sZqNHn60Y4VE/fbtlShCBqipyUO+nKRPvDHqLrecMW9pzHWMVRxk4nrMRoeowj3q0rX3GYRBa8lsHTAg==} engines: {node: '>=10.16'} @@ -998,30 +1043,30 @@ packages: /@types/babel__core@7.20.5: resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.5 + '@types/babel__traverse': 7.20.6 dev: true /@types/babel__generator@7.6.8: resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.26.0 dev: true /@types/babel__template@7.4.4: resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 dev: true - /@types/babel__traverse@7.20.5: - resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} + /@types/babel__traverse@7.20.6: + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.26.0 dev: true /@types/cacheable-request@6.0.3: @@ -1041,7 +1086,7 @@ packages: /@types/heft-jest@1.0.1: resolution: {integrity: sha512-cF2iEUpvGh2WgLowHVAdjI05xuDo+GwCA8hGV3Q5PBl8apjd6BTcpPFQ2uPlfUM7BLpgur2xpYo8VeBXopMI4A==} dependencies: - '@types/jest': 29.5.12 + '@types/jest': 29.5.14 dev: true /@types/http-cache-semantics@4.0.4: @@ -1067,8 +1112,8 @@ packages: '@types/istanbul-lib-report': 3.0.3 dev: true - /@types/jest@29.5.12: - resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==} + /@types/jest@29.5.14: + resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} dependencies: expect: 29.7.0 pretty-format: 29.7.0 @@ -1087,8 +1132,8 @@ packages: dependencies: '@types/node': 18.17.15 - /@types/lodash@4.17.1: - resolution: {integrity: sha512-X+2qazGS3jxLAIz5JDXDzglAF3KpijdhFxlf/V1+hEsOUc+HnWi81L/uv/EvGuV90WY+7mPGFCUDGfQC3Gj95Q==} + /@types/lodash@4.17.13: + resolution: {integrity: sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==} /@types/minimatch@3.0.5: resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} @@ -1100,7 +1145,7 @@ packages: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: '@types/node': 18.17.15 - form-data: 3.0.1 + form-data: 3.0.2 /@types/node@18.17.15: resolution: {integrity: sha512-2yrWpBk32tvV/JAd3HNHWuZn/VDN1P+72hWirHnvsvTGSqbANi+kSeuQR9yAHnbvaBvHDsoTdXV0Fe+iRtHLKA==} @@ -1136,13 +1181,13 @@ packages: resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} dev: true - /@types/yargs@17.0.32: - resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} + /@types/yargs@17.0.33: + resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} dependencies: '@types/yargs-parser': 21.0.3 dev: true - /@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0)(eslint@8.57.0)(typescript@4.9.5): + /@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0)(eslint@8.57.1)(typescript@4.9.5): resolution: {integrity: sha512-LlNBaHFCEBPHyD4pZXb35mzjGkuGKXU5eeCA1SxvHfiRES0E82dOounfVpL4DCqYvJEKab0bZIA0gCRpdLKkCw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1153,23 +1198,23 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 8.1.0(eslint@8.57.0)(typescript@4.9.5) + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.1.0(eslint@8.57.1)(typescript@4.9.5) '@typescript-eslint/scope-manager': 8.1.0(typescript@4.9.5) - '@typescript-eslint/type-utils': 8.1.0(eslint@8.57.0)(typescript@4.9.5) - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@4.9.5) + '@typescript-eslint/type-utils': 8.1.0(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@4.9.5) '@typescript-eslint/visitor-keys': 8.1.0(typescript@4.9.5) - eslint: 8.57.0 + eslint: 8.57.1 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@4.9.5) + ts-api-utils: 1.4.3(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0)(eslint@8.57.0)(typescript@5.4.5): + /@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0)(eslint@8.57.1)(typescript@5.4.5): resolution: {integrity: sha512-LlNBaHFCEBPHyD4pZXb35mzjGkuGKXU5eeCA1SxvHfiRES0E82dOounfVpL4DCqYvJEKab0bZIA0gCRpdLKkCw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1180,23 +1225,23 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 8.1.0(eslint@8.57.0)(typescript@5.4.5) + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.1.0(eslint@8.57.1)(typescript@5.4.5) '@typescript-eslint/scope-manager': 8.1.0(typescript@5.4.5) - '@typescript-eslint/type-utils': 8.1.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/type-utils': 8.1.0(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@5.4.5) '@typescript-eslint/visitor-keys': 8.1.0(typescript@5.4.5) - eslint: 8.57.0 + eslint: 8.57.1 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.4.5) + ts-api-utils: 1.4.3(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@8.1.0(eslint@8.57.0)(typescript@4.9.5): + /@typescript-eslint/parser@8.1.0(eslint@8.57.1)(typescript@4.9.5): resolution: {integrity: sha512-U7iTAtGgJk6DPX9wIWPPOlt1gO57097G06gIcl0N0EEnNw8RGD62c+2/DiP/zL7KrkqnnqF7gtFGR7YgzPllTA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1210,14 +1255,14 @@ packages: '@typescript-eslint/types': 8.1.0(typescript@4.9.5) '@typescript-eslint/typescript-estree': 8.1.0(typescript@4.9.5) '@typescript-eslint/visitor-keys': 8.1.0(typescript@4.9.5) - debug: 4.3.4 - eslint: 8.57.0 + debug: 4.3.7 + eslint: 8.57.1 typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@8.1.0(eslint@8.57.0)(typescript@5.4.5): + /@typescript-eslint/parser@8.1.0(eslint@8.57.1)(typescript@5.4.5): resolution: {integrity: sha512-U7iTAtGgJk6DPX9wIWPPOlt1gO57097G06gIcl0N0EEnNw8RGD62c+2/DiP/zL7KrkqnnqF7gtFGR7YgzPllTA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1231,8 +1276,8 @@ packages: '@typescript-eslint/types': 8.1.0(typescript@5.4.5) '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.4.5) '@typescript-eslint/visitor-keys': 8.1.0(typescript@5.4.5) - debug: 4.3.4 - eslint: 8.57.0 + debug: 4.3.7 + eslint: 8.57.1 typescript: 5.4.5 transitivePeerDependencies: - supports-color @@ -1268,7 +1313,7 @@ packages: - typescript dev: true - /@typescript-eslint/type-utils@8.1.0(eslint@8.57.0)(typescript@4.9.5): + /@typescript-eslint/type-utils@8.1.0(eslint@8.57.1)(typescript@4.9.5): resolution: {integrity: sha512-oLYvTxljVvsMnldfl6jIKxTaU7ok7km0KDrwOt1RHYu6nxlhN3TIx8k5Q52L6wR33nOwDgM7VwW1fT1qMNfFIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1278,16 +1323,16 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 8.1.0(typescript@4.9.5) - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@4.9.5) - debug: 4.3.4 - ts-api-utils: 1.3.0(typescript@4.9.5) + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@4.9.5) + debug: 4.3.7 + ts-api-utils: 1.4.3(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: - eslint - supports-color dev: true - /@typescript-eslint/type-utils@8.1.0(eslint@8.57.0)(typescript@5.4.5): + /@typescript-eslint/type-utils@8.1.0(eslint@8.57.1)(typescript@5.4.5): resolution: {integrity: sha512-oLYvTxljVvsMnldfl6jIKxTaU7ok7km0KDrwOt1RHYu6nxlhN3TIx8k5Q52L6wR33nOwDgM7VwW1fT1qMNfFIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: @@ -1297,9 +1342,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.4.5) - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.4 - ts-api-utils: 1.3.0(typescript@5.4.5) + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@5.4.5) + debug: 4.3.7 + ts-api-utils: 1.4.3(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: - eslint @@ -1344,12 +1389,12 @@ packages: dependencies: '@typescript-eslint/types': 6.21.0(typescript@5.4.5) '@typescript-eslint/visitor-keys': 6.21.0(typescript@5.4.5) - debug: 4.3.4 + debug: 4.3.7 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.4.5) + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: - supports-color @@ -1366,12 +1411,12 @@ packages: dependencies: '@typescript-eslint/types': 8.1.0(typescript@4.9.5) '@typescript-eslint/visitor-keys': 8.1.0(typescript@4.9.5) - debug: 4.3.4 + debug: 4.3.7 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@4.9.5) + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: - supports-color @@ -1388,63 +1433,63 @@ packages: dependencies: '@typescript-eslint/types': 8.1.0(typescript@5.4.5) '@typescript-eslint/visitor-keys': 8.1.0(typescript@5.4.5) - debug: 4.3.4 + debug: 4.3.7 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.4.5) + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.5): + /@typescript-eslint/utils@6.21.0(eslint@8.57.1)(typescript@5.4.5): resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.21.0(typescript@5.4.5) '@typescript-eslint/types': 6.21.0(typescript@5.4.5) '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) - eslint: 8.57.0 - semver: 7.6.2 + eslint: 8.57.1 + semver: 7.6.3 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@8.1.0(eslint@8.57.0)(typescript@4.9.5): + /@typescript-eslint/utils@8.1.0(eslint@8.57.1)(typescript@4.9.5): resolution: {integrity: sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) '@typescript-eslint/scope-manager': 8.1.0(typescript@4.9.5) '@typescript-eslint/types': 8.1.0(typescript@4.9.5) '@typescript-eslint/typescript-estree': 8.1.0(typescript@4.9.5) - eslint: 8.57.0 + eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@8.1.0(eslint@8.57.0)(typescript@5.4.5): + /@typescript-eslint/utils@8.1.0(eslint@8.57.1)(typescript@5.4.5): resolution: {integrity: sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) '@typescript-eslint/scope-manager': 8.1.0(typescript@5.4.5) '@typescript-eslint/types': 8.1.0(typescript@5.4.5) '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.4.5) - eslint: 8.57.0 + eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript @@ -1484,42 +1529,42 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vue/compiler-core@3.4.27: - resolution: {integrity: sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==} + /@vue/compiler-core@3.5.13: + resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} dependencies: - '@babel/parser': 7.24.5 - '@vue/shared': 3.4.27 + '@babel/parser': 7.26.2 + '@vue/shared': 3.5.13 entities: 4.5.0 estree-walker: 2.0.2 - source-map-js: 1.2.0 + source-map-js: 1.2.1 - /@vue/compiler-dom@3.4.27: - resolution: {integrity: sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==} + /@vue/compiler-dom@3.5.13: + resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} dependencies: - '@vue/compiler-core': 3.4.27 - '@vue/shared': 3.4.27 + '@vue/compiler-core': 3.5.13 + '@vue/shared': 3.5.13 - /@vue/compiler-sfc@3.4.27: - resolution: {integrity: sha512-nDwntUEADssW8e0rrmE0+OrONwmRlegDA1pD6QhVeXxjIytV03yDqTey9SBDiALsvAd5U4ZrEKbMyVXhX6mCGA==} + /@vue/compiler-sfc@3.5.13: + resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==} dependencies: - '@babel/parser': 7.24.5 - '@vue/compiler-core': 3.4.27 - '@vue/compiler-dom': 3.4.27 - '@vue/compiler-ssr': 3.4.27 - '@vue/shared': 3.4.27 + '@babel/parser': 7.26.2 + '@vue/compiler-core': 3.5.13 + '@vue/compiler-dom': 3.5.13 + '@vue/compiler-ssr': 3.5.13 + '@vue/shared': 3.5.13 estree-walker: 2.0.2 - magic-string: 0.30.10 - postcss: 8.4.38 - source-map-js: 1.2.0 + magic-string: 0.30.14 + postcss: 8.4.49 + source-map-js: 1.2.1 - /@vue/compiler-ssr@3.4.27: - resolution: {integrity: sha512-CVRzSJIltzMG5FcidsW0jKNQnNRYC8bT21VegyMMtHmhW3UOI7knmUehzswXLrExDLE6lQCZdrhD4ogI7c+vuw==} + /@vue/compiler-ssr@3.5.13: + resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} dependencies: - '@vue/compiler-dom': 3.4.27 - '@vue/shared': 3.4.27 + '@vue/compiler-dom': 3.5.13 + '@vue/shared': 3.5.13 - /@vue/shared@3.4.27: - resolution: {integrity: sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==} + /@vue/shared@3.5.13: + resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} /@yarnpkg/lockfile@1.0.2: resolution: {integrity: sha512-MqJ00WXw89ga0rK6GZkdmmgv3bAsxpJixyTthjcix73O44pBqotyU2BejBkLuIsaOBI6SEu77vAnSyLe5iIHkw==} @@ -1532,16 +1577,16 @@ packages: graceful-fs: 4.2.11 is-windows: 1.0.2 - /acorn-jsx@5.3.2(acorn@8.11.3): + /acorn-jsx@5.3.2(acorn@8.14.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.11.3 + acorn: 8.14.0 dev: true - /acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + /acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true dev: true @@ -1550,7 +1595,7 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} dependencies: - debug: 4.3.4 + debug: 4.3.7 transitivePeerDependencies: - supports-color @@ -1669,10 +1714,10 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-object-atoms: 1.0.0 get-intrinsic: 1.2.4 - is-string: 1.0.7 + is-string: 1.1.0 dev: true /array-union@2.1.0: @@ -1685,7 +1730,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-shim-unscopables: 1.0.2 dev: true @@ -1695,16 +1740,17 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-shim-unscopables: 1.0.2 dev: true - /array.prototype.tosorted@1.1.3: - resolution: {integrity: sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==} + /array.prototype.tosorted@1.1.4: + resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-errors: 1.3.0 es-shim-unscopables: 1.0.2 dev: true @@ -1716,7 +1762,7 @@ packages: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-errors: 1.3.0 get-intrinsic: 1.2.4 is-array-buffer: 3.0.4 @@ -1744,17 +1790,17 @@ packages: possible-typed-array-names: 1.0.0 dev: true - /babel-jest@29.7.0(@babel/core@7.24.5): + /babel-jest@29.7.0(@babel/core@7.26.0): resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.8.0 dependencies: - '@babel/core': 7.24.5 + '@babel/core': 7.26.0 '@jest/transform': 29.7.0 '@types/babel__core': 7.20.5 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@7.24.5) + babel-preset-jest: 29.6.3(@babel/core@7.26.0) chalk: 4.1.2 graceful-fs: 4.2.11 slash: 3.0.0 @@ -1766,7 +1812,7 @@ packages: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} dependencies: - '@babel/helper-plugin-utils': 7.24.5 + '@babel/helper-plugin-utils': 7.25.9 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 5.2.1 @@ -1779,41 +1825,44 @@ packages: resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/template': 7.24.0 - '@babel/types': 7.24.5 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 '@types/babel__core': 7.20.5 - '@types/babel__traverse': 7.20.5 + '@types/babel__traverse': 7.20.6 dev: true - /babel-preset-current-node-syntax@1.0.1(@babel/core@7.24.5): - resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} + /babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.0): + resolution: {integrity: sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.5 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.5) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.24.5) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.24.5) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.5) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.5) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.5) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.24.5) - dev: true - - /babel-preset-jest@29.6.3(@babel/core@7.24.5): + '@babel/core': 7.26.0 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.26.0) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.26.0) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.26.0) + '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.26.0) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.26.0) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.0) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.0) + dev: true + + /babel-preset-jest@29.6.3(@babel/core@7.26.0): resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.5 + '@babel/core': 7.26.0 babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.5) + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) dev: true /balanced-match@1.0.2: @@ -1859,21 +1908,21 @@ packages: dependencies: balanced-match: 1.0.2 - /braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + /braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} dependencies: - fill-range: 7.0.1 + fill-range: 7.1.1 - /browserslist@4.23.0: - resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} + /browserslist@4.24.2: + resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001618 - electron-to-chromium: 1.4.770 - node-releases: 2.0.14 - update-browserslist-db: 1.0.16(browserslist@4.23.0) + caniuse-lite: 1.0.30001686 + electron-to-chromium: 1.5.68 + node-releases: 2.0.18 + update-browserslist-db: 1.1.1(browserslist@4.24.2) dev: true /bser@2.1.1: @@ -1935,7 +1984,7 @@ packages: resolution: {integrity: sha512-OqeheDucGKifjQRx524URgV4z4NaKjocGhygTptDea+DLROre4ZEecA4KXDq+P7qlGCohYVNOh3qr+y5XH5Ftg==} dependencies: '@devexpress/error-stack-parser': 2.0.6 - '@types/lodash': 4.17.1 + '@types/lodash': 4.17.13 callsite: 1.0.0 chalk: 2.4.2 highlight-es: 1.0.3 @@ -1965,8 +2014,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - /caniuse-lite@1.0.30001618: - resolution: {integrity: sha512-p407+D1tIkDvsEAPS22lJxLQQaG8OTBEqo0KhzfABGk0TU4juBNDSfH0hyAp/HRyx+M8L17z/ltyhxh27FTfQg==} + /caniuse-lite@1.0.30001686: + resolution: {integrity: sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA==} dev: true /chalk@2.4.2: @@ -2004,8 +2053,8 @@ packages: engines: {node: '>=8'} dev: true - /cjs-module-lexer@1.3.1: - resolution: {integrity: sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==} + /cjs-module-lexer@1.4.1: + resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} dev: true /cli-boxes@2.2.1: @@ -2131,8 +2180,8 @@ packages: path-type: 4.0.0 yaml: 1.10.2 - /cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + /cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} dependencies: path-key: 3.1.1 @@ -2182,8 +2231,8 @@ packages: ms: 2.1.3 dev: true - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + /debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -2191,7 +2240,7 @@ packages: supports-color: optional: true dependencies: - ms: 2.1.2 + ms: 2.1.3 /debuglog@1.0.1: resolution: {integrity: sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==} @@ -2251,7 +2300,7 @@ packages: dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 - gopd: 1.0.1 + gopd: 1.1.0 dev: true /define-properties@1.2.1: @@ -2272,17 +2321,17 @@ packages: engines: {node: '>=10'} hasBin: true dependencies: - '@babel/parser': 7.24.5 - '@babel/traverse': 7.24.5 - '@vue/compiler-sfc': 3.4.27 + '@babel/parser': 7.26.2 + '@babel/traverse': 7.25.9 + '@vue/compiler-sfc': 3.5.13 callsite: 1.0.0 camelcase: 6.3.0 cosmiconfig: 7.1.0 - debug: 4.3.4 + debug: 4.3.7 deps-regex: 0.2.0 findup-sync: 5.0.0 - ignore: 5.3.1 - is-core-module: 2.13.1 + ignore: 5.3.2 + is-core-module: 2.15.1 js-yaml: 3.14.1 json5: 2.2.3 lodash: 4.17.21 @@ -2293,7 +2342,7 @@ packages: require-package-name: 2.0.1 resolve: 1.22.8 resolve-from: 5.0.0 - semver: 7.5.4 + semver: 7.6.3 yargs: 16.2.0 transitivePeerDependencies: - supports-color @@ -2365,8 +2414,8 @@ packages: dependencies: is-obj: 2.0.0 - /electron-to-chromium@1.4.770: - resolution: {integrity: sha512-ONwOsDiVvV07CMsyH4+dEaZ9L79HMH/ODHnDS3GkIhgNqdDHJN2C18kFb0fBj0RXpQywsPJl6k2Pqg1IY4r1ig==} + /electron-to-chromium@1.5.68: + resolution: {integrity: sha512-FgMdJlma0OzUYlbrtZ4AeXjKxKPk6KT8WOP8BjcqxWtlg8qyJQjRzPJzUtUn5GBg1oQ26hFs7HOOHJMYiJRnvQ==} dev: true /emittery@0.13.1: @@ -2397,8 +2446,8 @@ packages: dependencies: is-arrayish: 0.2.1 - /es-abstract@1.23.3: - resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} + /es-abstract@1.23.5: + resolution: {integrity: sha512-vlmniQ0WNPwXqA0BnmwV3Ng7HxiGlh6r5U6JcTMNx8OilcAGqVJBHJcPjqOMaczU9fRuRK5Px2BdVyPRnKMMVQ==} engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.1 @@ -2412,30 +2461,30 @@ packages: es-errors: 1.3.0 es-object-atoms: 1.0.0 es-set-tostringtag: 2.0.3 - es-to-primitive: 1.2.1 + es-to-primitive: 1.3.0 function.prototype.name: 1.1.6 get-intrinsic: 1.2.4 get-symbol-description: 1.0.2 globalthis: 1.0.4 - gopd: 1.0.1 + gopd: 1.1.0 has-property-descriptors: 1.0.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 + has-proto: 1.1.0 + has-symbols: 1.1.0 hasown: 2.0.2 internal-slot: 1.0.7 is-array-buffer: 3.0.4 is-callable: 1.2.7 is-data-view: 1.0.1 is-negative-zero: 2.0.3 - is-regex: 1.1.4 + is-regex: 1.2.0 is-shared-array-buffer: 1.0.3 - is-string: 1.0.7 + is-string: 1.1.0 is-typed-array: 1.1.13 is-weakref: 1.0.2 - object-inspect: 1.13.1 + object-inspect: 1.13.3 object-keys: 1.1.1 object.assign: 4.1.5 - regexp.prototype.flags: 1.5.2 + regexp.prototype.flags: 1.5.3 safe-array-concat: 1.1.2 safe-regex-test: 1.0.3 string.prototype.trim: 1.2.9 @@ -2443,10 +2492,10 @@ packages: string.prototype.trimstart: 1.0.8 typed-array-buffer: 1.0.2 typed-array-byte-length: 1.0.1 - typed-array-byte-offset: 1.0.2 - typed-array-length: 1.0.6 + typed-array-byte-offset: 1.0.3 + typed-array-length: 1.0.7 unbox-primitive: 1.0.2 - which-typed-array: 1.1.15 + which-typed-array: 1.1.16 dev: true /es-define-property@1.0.0: @@ -2461,23 +2510,24 @@ packages: engines: {node: '>= 0.4'} dev: true - /es-iterator-helpers@1.0.19: - resolution: {integrity: sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==} + /es-iterator-helpers@1.2.0: + resolution: {integrity: sha512-tpxqxncxnpw3c93u8n3VOzACmRFoVmWJqbWXvX/JfKbkhBw1oslgPrUfeSt2psuqyEJFD6N/9lg5i7bsKpoq+Q==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-errors: 1.3.0 es-set-tostringtag: 2.0.3 function-bind: 1.1.2 get-intrinsic: 1.2.4 globalthis: 1.0.4 + gopd: 1.1.0 has-property-descriptors: 1.0.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 + has-proto: 1.1.0 + has-symbols: 1.1.0 internal-slot: 1.0.7 - iterator.prototype: 1.1.2 + iterator.prototype: 1.1.3 safe-array-concat: 1.1.2 dev: true @@ -2503,17 +2553,17 @@ packages: hasown: 2.0.2 dev: true - /es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + /es-to-primitive@1.3.0: + resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} dependencies: is-callable: 1.2.7 is-date-object: 1.0.5 - is-symbol: 1.0.4 + is-symbol: 1.1.0 dev: true - /escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + /escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} /escape-goat@2.1.1: @@ -2538,12 +2588,12 @@ packages: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: debug: 3.2.7 - is-core-module: 2.13.1 + is-core-module: 2.15.1 resolve: 1.22.8 dev: true - /eslint-module-utils@2.8.1(eslint@8.57.0): - resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} + /eslint-module-utils@2.12.0(eslint@8.57.1): + resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} engines: {node: '>=4'} peerDependencies: eslint: '*' @@ -2552,33 +2602,33 @@ packages: optional: true dependencies: debug: 3.2.7 - eslint: 8.57.0 + eslint: 8.57.1 dev: true - /eslint-plugin-deprecation@2.0.0(eslint@8.57.0)(typescript@5.4.5): + /eslint-plugin-deprecation@2.0.0(eslint@8.57.1)(typescript@5.4.5): resolution: {integrity: sha512-OAm9Ohzbj11/ZFyICyR5N6LbOIvQMp7ZU2zI7Ej0jIc8kiGUERXPNMfw2QqqHD1ZHtjMub3yPZILovYEYucgoQ==} peerDependencies: eslint: ^7.0.0 || ^8.0.0 typescript: ^4.2.4 || ^5.0.0 dependencies: - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 - tslib: 2.6.2 + '@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@5.4.5) + eslint: 8.57.1 + tslib: 2.8.1 tsutils: 3.21.0(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-header@3.1.1(eslint@8.57.0): + /eslint-plugin-header@3.1.1(eslint@8.57.1): resolution: {integrity: sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==} peerDependencies: eslint: '>=7.7.0' dependencies: - eslint: 8.57.0 + eslint: 8.57.1 dev: true - /eslint-plugin-import@2.25.4(eslint@8.57.0): + /eslint-plugin-import@2.25.4(eslint@8.57.1): resolution: {integrity: sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==} engines: {node: '>=4'} peerDependencies: @@ -2588,11 +2638,11 @@ packages: array.prototype.flat: 1.3.2 debug: 2.6.9 doctrine: 2.1.0 - eslint: 8.57.0 + eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(eslint@8.57.0) + eslint-module-utils: 2.12.0(eslint@8.57.1) has: 1.0.4 - is-core-module: 2.13.1 + is-core-module: 2.15.1 is-glob: 4.0.3 minimatch: 3.1.2 object.values: 1.2.0 @@ -2600,7 +2650,7 @@ packages: tsconfig-paths: 3.15.0 dev: true - /eslint-plugin-jsdoc@37.6.1(eslint@8.57.0): + /eslint-plugin-jsdoc@37.6.1(eslint@8.57.1): resolution: {integrity: sha512-Y9UhH9BQD40A9P1NOxj59KrSLZb9qzsqYkLCZv30bNeJ7C9eaumTWhh9beiGqvK7m821Hj1dTsZ5LOaFIUTeTg==} engines: {node: ^12 || ^14 || ^16 || ^17} peerDependencies: @@ -2608,36 +2658,36 @@ packages: dependencies: '@es-joy/jsdoccomment': 0.17.0 comment-parser: 1.3.0 - debug: 4.3.4 + debug: 4.3.7 escape-string-regexp: 4.0.0 - eslint: 8.57.0 - esquery: 1.5.0 + eslint: 8.57.1 + esquery: 1.6.0 regextras: 0.8.0 - semver: 7.6.2 + semver: 7.6.3 spdx-expression-parse: 3.0.1 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-promise@6.1.1(eslint@8.57.0): + /eslint-plugin-promise@6.1.1(eslint@8.57.1): resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.57.0 + eslint: 8.57.1 dev: true - /eslint-plugin-react-hooks@4.3.0(eslint@8.57.0): + /eslint-plugin-react-hooks@4.3.0(eslint@8.57.1): resolution: {integrity: sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.57.0 + eslint: 8.57.1 dev: true - /eslint-plugin-react@7.33.2(eslint@8.57.0): + /eslint-plugin-react@7.33.2(eslint@8.57.1): resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: @@ -2645,10 +2695,10 @@ packages: dependencies: array-includes: 3.1.8 array.prototype.flatmap: 1.3.2 - array.prototype.tosorted: 1.1.3 + array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 - es-iterator-helpers: 1.0.19 - eslint: 8.57.0 + es-iterator-helpers: 1.2.0 + eslint: 8.57.1 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 minimatch: 3.1.2 @@ -2662,11 +2712,11 @@ packages: string.prototype.matchall: 4.0.11 dev: true - /eslint-plugin-tsdoc@0.3.0: - resolution: {integrity: sha512-0MuFdBrrJVBjT/gyhkP2BqpD0np1NxNLfQ38xXDlSs/KVVpKI2A6vN7jx2Rve/CyUsvOsMGwp9KKrinv7q9g3A==} + /eslint-plugin-tsdoc@0.4.0: + resolution: {integrity: sha512-MT/8b4aKLdDClnS8mP3R/JNjg29i0Oyqd/0ym6NnQf+gfKbJJ4ZcSh2Bs1H0YiUMTBwww5JwXGTWot/RwyJ7aQ==} dependencies: - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 dev: true /eslint-scope@7.2.2: @@ -2682,29 +2732,30 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + /eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 + cross-spawn: 7.0.6 + debug: 4.3.7 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - esquery: 1.5.0 + esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 @@ -2712,7 +2763,7 @@ packages: glob-parent: 6.0.2 globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -2733,8 +2784,8 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) eslint-visitor-keys: 3.4.3 dev: true @@ -2743,8 +2794,8 @@ packages: engines: {node: '>=4'} hasBin: true - /esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + /esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} dependencies: estraverse: 5.3.0 @@ -2774,7 +2825,7 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 get-stream: 6.0.1 human-signals: 2.1.0 is-stream: 2.0.1 @@ -2825,7 +2876,7 @@ packages: '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 - micromatch: 4.0.5 + micromatch: 4.0.8 /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -2859,8 +2910,8 @@ packages: flat-cache: 3.2.0 dev: true - /fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + /fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 @@ -2882,7 +2933,7 @@ packages: /find-yarn-workspace-root2@1.2.16: resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} dependencies: - micromatch: 4.0.5 + micromatch: 4.0.8 pkg-dir: 4.2.0 /findup-sync@5.0.0: @@ -2891,20 +2942,20 @@ packages: dependencies: detect-file: 1.0.0 is-glob: 4.0.3 - micromatch: 4.0.5 + micromatch: 4.0.8 resolve-dir: 1.0.1 /flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flatted: 3.3.1 + flatted: 3.3.2 keyv: 4.5.4 rimraf: 3.0.2 dev: true - /flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + /flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} dev: true /for-each@0.3.3: @@ -2913,21 +2964,21 @@ packages: is-callable: 1.2.7 dev: true - /form-data@3.0.1: - resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==} + /form-data@3.0.2: + resolution: {integrity: sha512-sJe+TQb2vIaIyO783qN6BlMYWMw3WBOHA1Ay2qxsnjuafEOQFJ2JakedOQirT6D5XPRxDvS7AHYyem9fTpb4LQ==} engines: {node: '>= 6'} dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 - /fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} + /fs-extra@11.3.0: + resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} + engines: {node: '>=14.14'} dependencies: graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 + jsonfile: 6.1.0 + universalify: 2.0.1 /fs-minipass@2.1.0: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} @@ -2955,7 +3006,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 functions-have-names: 1.2.3 dev: true @@ -2978,8 +3029,8 @@ packages: dependencies: es-errors: 1.3.0 function-bind: 1.1.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 + has-proto: 1.1.0 + has-symbols: 1.1.0 hasown: 2.0.2 dev: true @@ -2992,7 +3043,7 @@ packages: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} dependencies: - pump: 3.0.0 + pump: 3.0.2 /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} @@ -3038,6 +3089,7 @@ packages: /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -3100,7 +3152,7 @@ packages: engines: {node: '>= 0.4'} dependencies: define-properties: 1.2.1 - gopd: 1.0.1 + gopd: 1.1.0 dev: true /globby@11.1.0: @@ -3110,12 +3162,13 @@ packages: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 - /gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + /gopd@1.1.0: + resolution: {integrity: sha512-FQoVQnqcdk4hVM4JN1eromaun4iuS34oStkdlLENLdpULsuQcTyXj8w7ayhuUfPwEYZ1ZOooOTT6fdA9Vmx/RA==} + engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.4 dev: true @@ -3168,13 +3221,15 @@ packages: es-define-property: 1.0.0 dev: true - /has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + /has-proto@1.1.0: + resolution: {integrity: sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q==} engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 dev: true - /has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + /has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} dev: true @@ -3182,7 +3237,7 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} dependencies: - has-symbols: 1.0.3 + has-symbols: 1.1.0 dev: true /has-yarn@2.1.0: @@ -3241,7 +3296,7 @@ packages: engines: {node: '>= 6'} dependencies: agent-base: 6.0.2 - debug: 4.3.4 + debug: 4.3.7 transitivePeerDependencies: - supports-color @@ -3267,8 +3322,8 @@ packages: resolution: {integrity: sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==} engines: {node: '>= 4'} - /ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + /ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} /immediate@3.0.6: @@ -3299,6 +3354,7 @@ packages: /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. dependencies: once: 1.4.0 wrappy: 1.0.2 @@ -3358,14 +3414,15 @@ packages: has-tostringtag: 1.0.2 dev: true - /is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + /is-bigint@1.1.0: + resolution: {integrity: sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==} + engines: {node: '>= 0.4'} dependencies: has-bigints: 1.0.2 dev: true - /is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + /is-boolean-object@1.2.0: + resolution: {integrity: sha512-kR5g0+dXf/+kXnqI+lu0URKYPKgICtHGGNCDSB10AaUFj3o/HkB3u7WfpRBJGFopxxY0oH3ux7ZsDjLtK7xqvw==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 @@ -3383,8 +3440,9 @@ packages: dependencies: ci-info: 2.0.0 - /is-core-module@2.13.1: - resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + /is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} dependencies: hasown: 2.0.2 @@ -3409,8 +3467,9 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - /is-finalizationregistry@1.0.2: - resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + /is-finalizationregistry@1.1.0: + resolution: {integrity: sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 dev: true @@ -3462,10 +3521,11 @@ packages: resolution: {integrity: sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==} engines: {node: '>=10'} - /is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + /is-number-object@1.1.0: + resolution: {integrity: sha512-KVSZV0Dunv9DTPkhXwcZ3Q+tUc9TsaE1ZwX5J2WMvsSGS6Md8TFPun5uwh0yRdrNerI6vf/tbJxqSx4c1ZI1Lw==} engines: {node: '>= 0.4'} dependencies: + call-bind: 1.0.7 has-tostringtag: 1.0.2 dev: true @@ -3489,12 +3549,14 @@ packages: resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} engines: {node: '>=8'} - /is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + /is-regex@1.2.0: + resolution: {integrity: sha512-B6ohK4ZmoftlUe+uvenXSbPJFo6U37BH7oO1B3nQH8f/7h27N56s85MhUtbFJAziz5dcmuR3i8ovUl35zp8pFA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 + gopd: 1.1.0 has-tostringtag: 1.0.2 + hasown: 2.0.2 dev: true /is-set@2.0.3: @@ -3513,10 +3575,11 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - /is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + /is-string@1.1.0: + resolution: {integrity: sha512-PlfzajuF9vSo5wErv3MJAKD/nqf9ngAs1NFQYm16nUYFO2IzxJ2hcm+IOCg+EEopdykNNUhVq5cz35cAUxU8+g==} engines: {node: '>= 0.4'} dependencies: + call-bind: 1.0.7 has-tostringtag: 1.0.2 dev: true @@ -3526,18 +3589,20 @@ packages: dependencies: better-path-resolve: 1.0.0 - /is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + /is-symbol@1.1.0: + resolution: {integrity: sha512-qS8KkNNXUZ/I+nX6QT8ZS1/Yx0A444yhzdTKxCzKkNjQ9sHErBxJnJAgh+f5YhusYECEcjo4XcyH87hn6+ks0A==} engines: {node: '>= 0.4'} dependencies: - has-symbols: 1.0.3 + call-bind: 1.0.7 + has-symbols: 1.1.0 + safe-regex-test: 1.0.3 dev: true /is-typed-array@1.1.13: resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} engines: {node: '>= 0.4'} dependencies: - which-typed-array: 1.1.15 + which-typed-array: 1.1.16 dev: true /is-typedarray@1.0.0: @@ -3592,8 +3657,8 @@ packages: resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} engines: {node: '>=8'} dependencies: - '@babel/core': 7.24.5 - '@babel/parser': 7.24.5 + '@babel/core': 7.26.0 + '@babel/parser': 7.26.2 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 6.3.1 @@ -3614,7 +3679,7 @@ packages: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} dependencies: - debug: 4.3.4 + debug: 4.3.7 istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -3629,13 +3694,14 @@ packages: istanbul-lib-report: 3.0.1 dev: true - /iterator.prototype@1.1.2: - resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} + /iterator.prototype@1.1.3: + resolution: {integrity: sha512-FW5iMbeQ6rBGm/oKgzq2aW4KvAGpxPzYES8N4g4xNXUKpL1mclMvOe+76AcLDTvD+Ze+sOpVhgdAQEKF4L9iGQ==} + engines: {node: '>= 0.4'} dependencies: define-properties: 1.2.1 get-intrinsic: 1.2.4 - has-symbols: 1.0.3 - reflect.getprototypeof: 1.0.6 + has-symbols: 1.1.0 + reflect.getprototypeof: 1.0.7 set-function-name: 2.0.2 dev: true @@ -3689,11 +3755,11 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.24.5 + '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0(@types/node@18.17.15) '@jest/types': 29.6.3 '@types/node': 18.17.15 - babel-jest: 29.7.0(@babel/core@7.24.5) + babel-jest: 29.7.0(@babel/core@7.26.0) chalk: 4.1.2 ci-info: 3.9.0 deepmerge: 4.3.1 @@ -3707,7 +3773,7 @@ packages: jest-runner: 29.7.0 jest-util: 29.7.0 jest-validate: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 parse-json: 5.2.0 pretty-format: 29.7.0 slash: 3.0.0 @@ -3787,7 +3853,7 @@ packages: jest-regex-util: 29.6.3 jest-util: 29.7.0 jest-worker: 29.7.0 - micromatch: 4.0.5 + micromatch: 4.0.8 walker: 1.0.8 optionalDependencies: fsevents: 2.3.3 @@ -3825,12 +3891,12 @@ packages: resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.26.2 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 graceful-fs: 4.2.11 - micromatch: 4.0.5 + micromatch: 4.0.8 pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 @@ -3895,7 +3961,7 @@ packages: jest-util: 29.7.0 jest-validate: 29.7.0 resolve: 1.22.8 - resolve.exports: 2.0.2 + resolve.exports: 2.0.3 slash: 3.0.0 dev: true @@ -3910,7 +3976,7 @@ packages: jest-util: 29.7.0 jest-validate: 29.7.0 resolve: 1.22.8 - resolve.exports: 2.0.2 + resolve.exports: 2.0.3 slash: 3.0.0 dev: true @@ -3956,7 +4022,7 @@ packages: '@jest/types': 29.6.3 '@types/node': 18.17.15 chalk: 4.1.2 - cjs-module-lexer: 1.3.1 + cjs-module-lexer: 1.4.1 collect-v8-coverage: 1.0.2(@types/node@18.17.15) glob: 7.2.3 graceful-fs: 4.2.11 @@ -3977,18 +4043,18 @@ packages: resolution: {integrity: sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.24.5 - '@babel/generator': 7.24.5 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.5) - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 + '@babel/core': 7.26.0 + '@babel/generator': 7.26.2 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 '@jest/expect-utils': 29.7.0 '@jest/transform': 29.5.0 '@jest/types': 29.6.3 - '@types/babel__traverse': 7.20.5 + '@types/babel__traverse': 7.20.6 '@types/prettier': 2.7.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.5) + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) chalk: 4.1.2 expect: 29.7.0 graceful-fs: 4.2.11 @@ -3999,7 +4065,7 @@ packages: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - supports-color dev: true @@ -4008,15 +4074,15 @@ packages: resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.24.5 - '@babel/generator': 7.24.5 - '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.5) - '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.5) - '@babel/types': 7.24.5 + '@babel/core': 7.26.0 + '@babel/generator': 7.26.2 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) + '@babel/types': 7.26.0 '@jest/expect-utils': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.5) + babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.0) chalk: 4.1.2 expect: 29.7.0 graceful-fs: 4.2.11 @@ -4027,7 +4093,7 @@ packages: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - supports-color dev: true @@ -4114,9 +4180,13 @@ packages: engines: {node: '>=12.0.0'} dev: true - /jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} + /jsep@1.4.0: + resolution: {integrity: sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==} + engines: {node: '>= 10.16.0'} + + /jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} hasBin: true /json-buffer@3.0.1: @@ -4148,14 +4218,21 @@ packages: engines: {node: '>=6'} hasBin: true - /jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.1 optionalDependencies: graceful-fs: 4.2.11 - /jsonpath-plus@4.0.0: - resolution: {integrity: sha512-e0Jtg4KAzDJKKwzbLaUtinCn0RZseWBVRTRGihSpvFlM3wTR7ExSp+PTdeTsDrLNJUe7L7JYJe8mblHX5SCT6A==} - engines: {node: '>=10.0'} + /jsonpath-plus@10.2.0: + resolution: {integrity: sha512-T9V+8iNYKFL2n2rF+w02LBOT2JjDnTjioaNFrxRy0Bv1y/hNsqR/EBK7Ojy2ythRHwmz2cRIls+9JitQGZC/sw==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + '@jsep-plugin/assignment': 1.3.0(jsep@1.4.0) + '@jsep-plugin/regex': 1.0.4(jsep@1.4.0) + jsep: 1.4.0 /jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} @@ -4278,10 +4355,10 @@ packages: dependencies: yallist: 4.0.0 - /magic-string@0.30.10: - resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + /magic-string@0.30.14: + resolution: {integrity: sha512-5c99P1WKTed11ZC0HMJOj6CDIue6F8ySu+bJL+85q1zBEIY8IklrJ1eiKC2NDRh3Ct3FcvmJPyQHb9erXMTJNw==} dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 /make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} @@ -4293,7 +4370,7 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} dependencies: - semver: 7.6.2 + semver: 7.6.3 dev: true /makeerror@1.0.12: @@ -4347,11 +4424,11 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - /micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + /micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} dependencies: - braces: 3.0.2 + braces: 3.0.3 picomatch: 2.3.1 /mime-db@1.52.0: @@ -4458,12 +4535,8 @@ packages: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: true - /ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true /multimatch@5.0.0: resolution: {integrity: sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==} @@ -4485,8 +4558,8 @@ packages: object-assign: 4.1.1 thenify-all: 1.6.0 - /nanoid@3.3.7: - resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + /nanoid@3.3.8: + resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -4514,8 +4587,8 @@ packages: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} dev: true - /node-releases@2.0.14: - resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + /node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} dev: true /normalize-package-data@2.5.0: @@ -4531,8 +4604,8 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 4.1.0 - is-core-module: 2.13.1 - semver: 7.5.4 + is-core-module: 2.15.1 + semver: 7.6.3 validate-npm-package-license: 3.0.4 /normalize-path@3.0.0: @@ -4571,7 +4644,7 @@ packages: package-json: 7.0.0 path-exists: 4.0.0 pkg-dir: 5.0.0 - preferred-pm: 3.1.3 + preferred-pm: 3.1.4 rc-config-loader: 4.1.3 semver: 7.5.4 semver-diff: 3.1.1 @@ -4614,8 +4687,9 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - /object-inspect@1.13.1: - resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + /object-inspect@1.13.3: + resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==} + engines: {node: '>= 0.4'} dev: true /object-keys@1.1.1: @@ -4629,7 +4703,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - has-symbols: 1.0.3 + has-symbols: 1.1.0 object-keys: 1.1.1 dev: true @@ -4648,7 +4722,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-object-atoms: 1.0.0 dev: true @@ -4657,7 +4731,7 @@ packages: engines: {node: '>= 0.4'} dependencies: define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-object-atoms: 1.0.0 dev: true @@ -4717,6 +4791,7 @@ packages: /osenv@0.1.5: resolution: {integrity: sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==} + deprecated: This package is no longer supported. dependencies: os-homedir: 1.0.2 os-tmpdir: 1.0.2 @@ -4775,7 +4850,7 @@ packages: got: 11.8.6 registry-auth-token: 4.2.2 registry-url: 5.1.0 - semver: 7.5.4 + semver: 7.6.3 /pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} @@ -4790,7 +4865,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.26.2 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -4818,8 +4893,8 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - /picocolors@1.0.1: - resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + /picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -4872,22 +4947,22 @@ packages: engines: {node: '>= 0.4'} dev: true - /postcss@8.4.38: - resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} + /postcss@8.4.49: + resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} engines: {node: ^10 || ^12 || >=14} dependencies: - nanoid: 3.3.7 - picocolors: 1.0.1 - source-map-js: 1.2.0 + nanoid: 3.3.8 + picocolors: 1.1.1 + source-map-js: 1.2.1 - /preferred-pm@3.1.3: - resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} + /preferred-pm@3.1.4: + resolution: {integrity: sha512-lEHd+yEm22jXdCphDrkvIJQU66EuLojPPtvZkpKIkiD+l0DMThF/niqZKJSoU8Vl7iuvtmzyMhir9LdVy5WMnA==} engines: {node: '>=10'} dependencies: find-up: 5.0.0 find-yarn-workspace-root2: 1.2.16 path-exists: 4.0.0 - which-pm: 2.0.0 + which-pm: 2.2.0 /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -4914,8 +4989,8 @@ packages: react-is: 16.13.1 dev: true - /pump@3.0.0: - resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + /pump@3.0.2: + resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} dependencies: end-of-stream: 1.4.4 once: 1.4.0 @@ -4951,7 +5026,7 @@ packages: /rc-config-loader@4.1.3: resolution: {integrity: sha512-kD7FqML7l800i6pS6pvLyIE2ncbk9Du8Q0gp/4hMPhJU6ZxApkoLcGD8ZeqgiAlfwZ6BlETq6qqe+12DUL207w==} dependencies: - debug: 4.3.4 + debug: 4.3.7 js-yaml: 4.1.0 json5: 2.2.3 require-from-string: 2.0.2 @@ -4977,6 +5052,7 @@ packages: /read-package-json@2.1.2: resolution: {integrity: sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==} + deprecated: This package is no longer supported. Please use @npmcli/package-json instead. dependencies: glob: 7.2.3 json-parse-even-better-errors: 2.3.1 @@ -5058,21 +5134,21 @@ packages: indent-string: 4.0.0 strip-indent: 3.0.0 - /reflect.getprototypeof@1.0.6: - resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} + /reflect.getprototypeof@1.0.7: + resolution: {integrity: sha512-bMvFGIUKlc/eSfXNX+aZ+EL95/EgZzuwA0OBPTbZZDEJw/0AkentjMuM1oiRfwHrshqk4RzdgiTg5CcDalXN5g==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-errors: 1.3.0 get-intrinsic: 1.2.4 - globalthis: 1.0.4 - which-builtin-type: 1.1.3 + gopd: 1.1.0 + which-builtin-type: 1.2.0 dev: true - /regexp.prototype.flags@1.5.2: - resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} + /regexp.prototype.flags@1.5.3: + resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 @@ -5127,8 +5203,8 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - /resolve.exports@2.0.2: - resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} + /resolve.exports@2.0.3: + resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} engines: {node: '>=10'} dev: true @@ -5136,7 +5212,7 @@ packages: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: - is-core-module: 2.13.1 + is-core-module: 2.15.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -5144,7 +5220,7 @@ packages: resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} hasBin: true dependencies: - is-core-module: 2.13.1 + is-core-module: 2.15.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -5170,6 +5246,7 @@ packages: /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true dependencies: glob: 7.2.3 @@ -5196,7 +5273,7 @@ packages: dependencies: call-bind: 1.0.7 get-intrinsic: 1.2.4 - has-symbols: 1.0.3 + has-symbols: 1.1.0 isarray: 2.0.5 dev: true @@ -5212,7 +5289,7 @@ packages: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 - is-regex: 1.1.4 + is-regex: 1.2.0 dev: true /safer-buffer@2.1.2: @@ -5242,11 +5319,10 @@ packages: dependencies: lru-cache: 6.0.0 - /semver@7.6.2: - resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + /semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true - dev: true /set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} @@ -5256,7 +5332,7 @@ packages: es-errors: 1.3.0 function-bind: 1.1.2 get-intrinsic: 1.2.4 - gopd: 1.0.1 + gopd: 1.1.0 has-property-descriptors: 1.0.2 dev: true @@ -5291,7 +5367,7 @@ packages: call-bind: 1.0.7 es-errors: 1.3.0 get-intrinsic: 1.2.4 - object-inspect: 1.13.1 + object-inspect: 1.13.3 dev: true /signal-exit@3.0.7: @@ -5307,8 +5383,8 @@ packages: dependencies: is-plain-obj: 2.1.0 - /source-map-js@1.2.0: - resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + /source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} /source-map-support@0.5.13: @@ -5327,7 +5403,7 @@ packages: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.17 + spdx-license-ids: 3.0.20 /spdx-exceptions@2.5.0: resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} @@ -5336,10 +5412,10 @@ packages: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.17 + spdx-license-ids: 3.0.20 - /spdx-license-ids@3.0.17: - resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} + /spdx-license-ids@3.0.20: + resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -5390,14 +5466,14 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-errors: 1.3.0 es-object-atoms: 1.0.0 get-intrinsic: 1.2.4 - gopd: 1.0.1 - has-symbols: 1.0.3 + gopd: 1.1.0 + has-symbols: 1.1.0 internal-slot: 1.0.7 - regexp.prototype.flags: 1.5.2 + regexp.prototype.flags: 1.5.3 set-function-name: 2.0.2 side-channel: 1.0.6 dev: true @@ -5408,7 +5484,7 @@ packages: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.23.3 + es-abstract: 1.23.5 es-object-atoms: 1.0.0 dev: true @@ -5559,10 +5635,6 @@ packages: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} dev: true - /to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} - /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -5579,8 +5651,8 @@ packages: /true-case-path@2.2.1: resolution: {integrity: sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q==} - /ts-api-utils@1.3.0(typescript@4.9.5): - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + /ts-api-utils@1.4.3(typescript@4.9.5): + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' @@ -5588,8 +5660,8 @@ packages: typescript: 4.9.5 dev: true - /ts-api-utils@1.3.0(typescript@5.4.5): - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + /ts-api-utils@1.4.3(typescript@5.4.5): + resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' @@ -5609,8 +5681,8 @@ packages: /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - /tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + /tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} dev: true /tslint@5.20.1(typescript@4.9.5): @@ -5620,7 +5692,7 @@ packages: peerDependencies: typescript: '>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev' dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.26.2 builtin-modules: 1.1.1 chalk: 2.4.2 commander: 2.20.3 @@ -5702,33 +5774,34 @@ packages: dependencies: call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 + gopd: 1.1.0 + has-proto: 1.1.0 is-typed-array: 1.1.13 dev: true - /typed-array-byte-offset@1.0.2: - resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} + /typed-array-byte-offset@1.0.3: + resolution: {integrity: sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==} engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 + gopd: 1.1.0 + has-proto: 1.1.0 is-typed-array: 1.1.13 + reflect.getprototypeof: 1.0.7 dev: true - /typed-array-length@1.0.6: - resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} + /typed-array-length@1.0.7: + resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 + gopd: 1.1.0 is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 + reflect.getprototypeof: 1.0.7 dev: true /typedarray-to-buffer@3.1.5: @@ -5742,14 +5815,14 @@ packages: hasBin: true dev: true - /typescript@5.4.2: - resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} + /typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} hasBin: true dev: true - /typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + /typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -5759,8 +5832,8 @@ packages: dependencies: call-bind: 1.0.7 has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 + has-symbols: 1.1.0 + which-boxed-primitive: 1.1.0 dev: true /unique-string@2.0.0: @@ -5769,19 +5842,19 @@ packages: dependencies: crypto-random-string: 2.0.0 - /universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} - /update-browserslist-db@1.0.16(browserslist@4.23.0): - resolution: {integrity: sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==} + /update-browserslist-db@1.1.1(browserslist@4.24.2): + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.23.0 - escalade: 3.1.2 - picocolors: 1.0.1 + browserslist: 4.24.2 + escalade: 3.2.0 + picocolors: 1.1.1 dev: true /update-notifier@5.1.0: @@ -5799,7 +5872,7 @@ packages: is-yarn-global: 0.3.0 latest-version: 5.1.0 pupa: 2.1.1 - semver: 7.5.4 + semver: 7.6.3 semver-diff: 3.1.1 xdg-basedir: 4.0.0 @@ -5815,8 +5888,8 @@ packages: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true - /v8-to-istanbul@9.2.0: - resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} + /v8-to-istanbul@9.3.0: + resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} engines: {node: '>=10.12.0'} dependencies: '@jridgewell/trace-mapping': 0.3.25 @@ -5863,32 +5936,34 @@ packages: tr46: 0.0.3 webidl-conversions: 3.0.1 - /which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + /which-boxed-primitive@1.1.0: + resolution: {integrity: sha512-Ei7Miu/AXe2JJ4iNF5j/UphAgRoma4trE6PtisM09bPygb3egMH3YLW/befsWb1A1AxvNSFidOFTB18XtnIIng==} + engines: {node: '>= 0.4'} dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 + is-bigint: 1.1.0 + is-boolean-object: 1.2.0 + is-number-object: 1.1.0 + is-string: 1.1.0 + is-symbol: 1.1.0 dev: true - /which-builtin-type@1.1.3: - resolution: {integrity: sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==} + /which-builtin-type@1.2.0: + resolution: {integrity: sha512-I+qLGQ/vucCby4tf5HsLmGueEla4ZhwTBSqaooS+Y0BuxN4Cp+okmGuV+8mXZ84KDI9BA+oklo+RzKg0ONdSUA==} engines: {node: '>= 0.4'} dependencies: + call-bind: 1.0.7 function.prototype.name: 1.1.6 has-tostringtag: 1.0.2 is-async-function: 2.0.0 is-date-object: 1.0.5 - is-finalizationregistry: 1.0.2 + is-finalizationregistry: 1.1.0 is-generator-function: 1.0.10 - is-regex: 1.1.4 + is-regex: 1.2.0 is-weakref: 1.0.2 isarray: 2.0.5 - which-boxed-primitive: 1.0.2 + which-boxed-primitive: 1.1.0 which-collection: 1.0.2 - which-typed-array: 1.1.15 + which-typed-array: 1.1.16 dev: true /which-collection@1.0.2: @@ -5901,21 +5976,21 @@ packages: is-weakset: 2.0.3 dev: true - /which-pm@2.0.0: - resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} + /which-pm@2.2.0: + resolution: {integrity: sha512-MOiaDbA5ZZgUjkeMWM5EkJp4loW5ZRoa5bc3/aeMox/PJelMhE6t7S/mLuiY43DBupyxH+S0U1bTui9kWUlmsw==} engines: {node: '>=8.15'} dependencies: load-yaml-file: 0.2.0 path-exists: 4.0.0 - /which-typed-array@1.1.15: - resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + /which-typed-array@1.1.16: + resolution: {integrity: sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==} engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 + gopd: 1.1.0 has-tostringtag: 1.0.2 dev: true @@ -6018,7 +6093,7 @@ packages: engines: {node: '>=10'} dependencies: cliui: 7.0.4 - escalade: 3.1.2 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 @@ -6036,8 +6111,8 @@ packages: hasBin: true dependencies: '@microsoft/api-extractor-model': file:../../../libraries/api-extractor-model(@types/node@18.17.15) - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 '@rushstack/node-core-library': file:../../../libraries/node-core-library(@types/node@18.17.15) '@rushstack/rig-package': file:../../../libraries/rig-package '@rushstack/terminal': file:../../../libraries/terminal(@types/node@18.17.15) @@ -6047,7 +6122,7 @@ packages: resolve: 1.22.8 semver: 7.5.4 source-map: 0.6.1 - typescript: 5.4.2 + typescript: 5.7.2 transitivePeerDependencies: - '@types/node' dev: true @@ -6070,13 +6145,12 @@ packages: git-repo-info: 2.1.1 ignore: 5.1.9 tapable: 1.1.3 - true-case-path: 2.2.1 watchpack: 2.4.0 transitivePeerDependencies: - '@types/node' dev: true - file:../../../eslint/eslint-config(eslint@8.57.0)(typescript@4.9.5): + file:../../../eslint/eslint-config(eslint@8.57.1)(typescript@4.9.5): resolution: {directory: ../../../eslint/eslint-config, type: directory} id: file:../../../eslint/eslint-config name: '@rushstack/eslint-config' @@ -6085,23 +6159,23 @@ packages: typescript: '>=4.7.0' dependencies: '@rushstack/eslint-patch': file:../../../eslint/eslint-patch - '@rushstack/eslint-plugin': file:../../../eslint/eslint-plugin(eslint@8.57.0)(typescript@4.9.5) - '@rushstack/eslint-plugin-packlets': file:../../../eslint/eslint-plugin-packlets(eslint@8.57.0)(typescript@4.9.5) - '@rushstack/eslint-plugin-security': file:../../../eslint/eslint-plugin-security(eslint@8.57.0)(typescript@4.9.5) - '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0)(eslint@8.57.0)(typescript@4.9.5) - '@typescript-eslint/parser': 8.1.0(eslint@8.57.0)(typescript@4.9.5) + '@rushstack/eslint-plugin': file:../../../eslint/eslint-plugin(eslint@8.57.1)(typescript@4.9.5) + '@rushstack/eslint-plugin-packlets': file:../../../eslint/eslint-plugin-packlets(eslint@8.57.1)(typescript@4.9.5) + '@rushstack/eslint-plugin-security': file:../../../eslint/eslint-plugin-security(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0)(eslint@8.57.1)(typescript@4.9.5) + '@typescript-eslint/parser': 8.1.0(eslint@8.57.1)(typescript@4.9.5) '@typescript-eslint/typescript-estree': 8.1.0(typescript@4.9.5) - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@4.9.5) - eslint: 8.57.0 - eslint-plugin-promise: 6.1.1(eslint@8.57.0) - eslint-plugin-react: 7.33.2(eslint@8.57.0) - eslint-plugin-tsdoc: 0.3.0 + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@4.9.5) + eslint: 8.57.1 + eslint-plugin-promise: 6.1.1(eslint@8.57.1) + eslint-plugin-react: 7.33.2(eslint@8.57.1) + eslint-plugin-tsdoc: 0.4.0 typescript: 4.9.5 transitivePeerDependencies: - supports-color dev: true - file:../../../eslint/eslint-config(eslint@8.57.0)(typescript@5.4.5): + file:../../../eslint/eslint-config(eslint@8.57.1)(typescript@5.4.5): resolution: {directory: ../../../eslint/eslint-config, type: directory} id: file:../../../eslint/eslint-config name: '@rushstack/eslint-config' @@ -6110,17 +6184,17 @@ packages: typescript: '>=4.7.0' dependencies: '@rushstack/eslint-patch': file:../../../eslint/eslint-patch - '@rushstack/eslint-plugin': file:../../../eslint/eslint-plugin(eslint@8.57.0)(typescript@5.4.5) - '@rushstack/eslint-plugin-packlets': file:../../../eslint/eslint-plugin-packlets(eslint@8.57.0)(typescript@5.4.5) - '@rushstack/eslint-plugin-security': file:../../../eslint/eslint-plugin-security(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0)(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 8.1.0(eslint@8.57.0)(typescript@5.4.5) + '@rushstack/eslint-plugin': file:../../../eslint/eslint-plugin(eslint@8.57.1)(typescript@5.4.5) + '@rushstack/eslint-plugin-packlets': file:../../../eslint/eslint-plugin-packlets(eslint@8.57.1)(typescript@5.4.5) + '@rushstack/eslint-plugin-security': file:../../../eslint/eslint-plugin-security(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0)(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/parser': 8.1.0(eslint@8.57.1)(typescript@5.4.5) '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.4.5) - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 - eslint-plugin-promise: 6.1.1(eslint@8.57.0) - eslint-plugin-react: 7.33.2(eslint@8.57.0) - eslint-plugin-tsdoc: 0.3.0 + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@5.4.5) + eslint: 8.57.1 + eslint-plugin-promise: 6.1.1(eslint@8.57.1) + eslint-plugin-react: 7.33.2(eslint@8.57.1) + eslint-plugin-tsdoc: 0.4.0 typescript: 5.4.5 transitivePeerDependencies: - supports-color @@ -6131,7 +6205,7 @@ packages: name: '@rushstack/eslint-patch' dev: true - file:../../../eslint/eslint-plugin(eslint@8.57.0)(typescript@4.9.5): + file:../../../eslint/eslint-plugin(eslint@8.57.1)(typescript@4.9.5): resolution: {directory: ../../../eslint/eslint-plugin, type: directory} id: file:../../../eslint/eslint-plugin name: '@rushstack/eslint-plugin' @@ -6139,14 +6213,14 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@rushstack/tree-pattern': file:../../../libraries/tree-pattern - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@4.9.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@4.9.5) + eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript dev: true - file:../../../eslint/eslint-plugin(eslint@8.57.0)(typescript@5.4.5): + file:../../../eslint/eslint-plugin(eslint@8.57.1)(typescript@5.4.5): resolution: {directory: ../../../eslint/eslint-plugin, type: directory} id: file:../../../eslint/eslint-plugin name: '@rushstack/eslint-plugin' @@ -6154,14 +6228,14 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@rushstack/tree-pattern': file:../../../libraries/tree-pattern - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@5.4.5) + eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript dev: true - file:../../../eslint/eslint-plugin-packlets(eslint@8.57.0)(typescript@4.9.5): + file:../../../eslint/eslint-plugin-packlets(eslint@8.57.1)(typescript@4.9.5): resolution: {directory: ../../../eslint/eslint-plugin-packlets, type: directory} id: file:../../../eslint/eslint-plugin-packlets name: '@rushstack/eslint-plugin-packlets' @@ -6169,14 +6243,14 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@rushstack/tree-pattern': file:../../../libraries/tree-pattern - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@4.9.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@4.9.5) + eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript dev: true - file:../../../eslint/eslint-plugin-packlets(eslint@8.57.0)(typescript@5.4.5): + file:../../../eslint/eslint-plugin-packlets(eslint@8.57.1)(typescript@5.4.5): resolution: {directory: ../../../eslint/eslint-plugin-packlets, type: directory} id: file:../../../eslint/eslint-plugin-packlets name: '@rushstack/eslint-plugin-packlets' @@ -6184,14 +6258,14 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@rushstack/tree-pattern': file:../../../libraries/tree-pattern - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@5.4.5) + eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript dev: true - file:../../../eslint/eslint-plugin-security(eslint@8.57.0)(typescript@4.9.5): + file:../../../eslint/eslint-plugin-security(eslint@8.57.1)(typescript@4.9.5): resolution: {directory: ../../../eslint/eslint-plugin-security, type: directory} id: file:../../../eslint/eslint-plugin-security name: '@rushstack/eslint-plugin-security' @@ -6199,14 +6273,14 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@rushstack/tree-pattern': file:../../../libraries/tree-pattern - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@4.9.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@4.9.5) + eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript dev: true - file:../../../eslint/eslint-plugin-security(eslint@8.57.0)(typescript@5.4.5): + file:../../../eslint/eslint-plugin-security(eslint@8.57.1)(typescript@5.4.5): resolution: {directory: ../../../eslint/eslint-plugin-security, type: directory} id: file:../../../eslint/eslint-plugin-security name: '@rushstack/eslint-plugin-security' @@ -6214,33 +6288,33 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@rushstack/tree-pattern': file:../../../libraries/tree-pattern - '@typescript-eslint/utils': 8.1.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 8.1.0(eslint@8.57.1)(typescript@5.4.5) + eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript dev: true - file:../../../eslint/local-eslint-config(eslint@8.57.0)(typescript@5.4.5): + file:../../../eslint/local-eslint-config(eslint@8.57.1)(typescript@5.4.5): resolution: {directory: ../../../eslint/local-eslint-config, type: directory} id: file:../../../eslint/local-eslint-config name: local-eslint-config dependencies: - '@rushstack/eslint-config': file:../../../eslint/eslint-config(eslint@8.57.0)(typescript@5.4.5) + '@rushstack/eslint-config': file:../../../eslint/eslint-config(eslint@8.57.1)(typescript@5.4.5) '@rushstack/eslint-patch': file:../../../eslint/eslint-patch - '@typescript-eslint/parser': 8.1.0(eslint@8.57.0)(typescript@5.4.5) - eslint-plugin-deprecation: 2.0.0(eslint@8.57.0)(typescript@5.4.5) - eslint-plugin-header: 3.1.1(eslint@8.57.0) - eslint-plugin-import: 2.25.4(eslint@8.57.0) - eslint-plugin-jsdoc: 37.6.1(eslint@8.57.0) - eslint-plugin-react-hooks: 4.3.0(eslint@8.57.0) + '@typescript-eslint/parser': 8.1.0(eslint@8.57.1)(typescript@5.4.5) + eslint-plugin-deprecation: 2.0.0(eslint@8.57.1)(typescript@5.4.5) + eslint-plugin-header: 3.1.1(eslint@8.57.1) + eslint-plugin-import: 2.25.4(eslint@8.57.1) + eslint-plugin-jsdoc: 37.6.1(eslint@8.57.1) + eslint-plugin-react-hooks: 4.3.0(eslint@8.57.1) transitivePeerDependencies: - eslint - supports-color - typescript dev: true - file:../../../heft-plugins/heft-api-extractor-plugin(@rushstack/heft@0.68.2)(@types/node@18.17.15): + file:../../../heft-plugins/heft-api-extractor-plugin(@rushstack/heft@0.68.13)(@types/node@18.17.15): resolution: {directory: ../../../heft-plugins/heft-api-extractor-plugin, type: directory} id: file:../../../heft-plugins/heft-api-extractor-plugin name: '@rushstack/heft-api-extractor-plugin' @@ -6255,7 +6329,7 @@ packages: - '@types/node' dev: true - file:../../../heft-plugins/heft-jest-plugin(@rushstack/heft@0.68.2)(@types/node@18.17.15)(jest-environment-node@29.5.0): + file:../../../heft-plugins/heft-jest-plugin(@rushstack/heft@0.68.13)(@types/node@18.17.15)(jest-environment-node@29.5.0): resolution: {directory: ../../../heft-plugins/heft-jest-plugin, type: directory} id: file:../../../heft-plugins/heft-jest-plugin name: '@rushstack/heft-jest-plugin' @@ -6281,6 +6355,7 @@ packages: jest-resolve: 29.5.0 jest-snapshot: 29.5.0 lodash: 4.17.21 + punycode: 2.3.1 transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -6289,7 +6364,7 @@ packages: - ts-node dev: true - file:../../../heft-plugins/heft-lint-plugin(@rushstack/heft@0.68.2)(@types/node@18.17.15): + file:../../../heft-plugins/heft-lint-plugin(@rushstack/heft@0.68.13)(@types/node@18.17.15): resolution: {directory: ../../../heft-plugins/heft-lint-plugin, type: directory} id: file:../../../heft-plugins/heft-lint-plugin name: '@rushstack/heft-lint-plugin' @@ -6303,7 +6378,7 @@ packages: - '@types/node' dev: true - file:../../../heft-plugins/heft-typescript-plugin(@rushstack/heft@0.68.2)(@types/node@18.17.15): + file:../../../heft-plugins/heft-typescript-plugin(@rushstack/heft@0.68.13)(@types/node@18.17.15): resolution: {directory: ../../../heft-plugins/heft-typescript-plugin, type: directory} id: file:../../../heft-plugins/heft-typescript-plugin name: '@rushstack/heft-typescript-plugin' @@ -6325,8 +6400,8 @@ packages: id: file:../../../libraries/api-extractor-model name: '@microsoft/api-extractor-model' dependencies: - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 '@rushstack/node-core-library': file:../../../libraries/node-core-library(@types/node@18.17.15) transitivePeerDependencies: - '@types/node' @@ -6341,7 +6416,7 @@ packages: '@rushstack/node-core-library': file:../../../libraries/node-core-library(@types/node@18.17.15) '@rushstack/rig-package': file:../../../libraries/rig-package '@rushstack/terminal': file:../../../libraries/terminal(@types/node@18.17.15) - jsonpath-plus: 4.0.0 + jsonpath-plus: 10.2.0 transitivePeerDependencies: - '@types/node' @@ -6371,7 +6446,7 @@ packages: ajv: 8.13.0 ajv-draft-04: 1.0.0(ajv@8.13.0) ajv-formats: 3.0.1 - fs-extra: 7.0.1 + fs-extra: 11.3.0 import-lazy: 4.0.0 jju: 1.4.0 resolve: 1.22.8 @@ -6409,6 +6484,7 @@ packages: '@pnpm/link-bins': 5.3.25 '@rushstack/node-core-library': file:../../../libraries/node-core-library(@types/node@18.17.15) '@rushstack/terminal': file:../../../libraries/terminal(@types/node@18.17.15) + '@rushstack/ts-command-line': file:../../../libraries/ts-command-line(@types/node@18.17.15) ignore: 5.1.9 jszip: 3.8.0 minimatch: 3.0.8 @@ -6430,7 +6506,8 @@ packages: name: '@microsoft/rush-lib' engines: {node: '>=5.6.0'} dependencies: - '@pnpm/dependency-path': 2.1.8 + '@pnpm/dependency-path': 5.1.7 + '@pnpm/dependency-path-lockfile-pre-v9': /@pnpm/dependency-path@2.1.8 '@pnpm/link-bins': 5.3.25 '@rushstack/heft-config-file': file:../../../libraries/heft-config-file(@types/node@18.17.15) '@rushstack/lookup-by-path': file:../../../libraries/lookup-by-path(@types/node@18.17.15) @@ -6469,7 +6546,6 @@ packages: uuid: 8.3.2 transitivePeerDependencies: - '@types/node' - - encoding - supports-color file:../../../libraries/rush-sdk(@types/node@18.17.15): @@ -6477,6 +6553,7 @@ packages: id: file:../../../libraries/rush-sdk name: '@rushstack/rush-sdk' dependencies: + '@pnpm/lockfile.types': 1.0.3 '@rushstack/lookup-by-path': file:../../../libraries/lookup-by-path(@types/node@18.17.15) '@rushstack/node-core-library': file:../../../libraries/node-core-library(@types/node@18.17.15) '@rushstack/package-deps-hash': file:../../../libraries/package-deps-hash(@types/node@18.17.15) @@ -6528,7 +6605,7 @@ packages: transitivePeerDependencies: - '@types/node' - file:../../../rigs/heft-node-rig(@rushstack/heft@0.68.2)(@types/node@18.17.15): + file:../../../rigs/heft-node-rig(@rushstack/heft@0.68.13)(@types/node@18.17.15): resolution: {directory: ../../../rigs/heft-node-rig, type: directory} id: file:../../../rigs/heft-node-rig name: '@rushstack/heft-node-rig' @@ -6536,14 +6613,14 @@ packages: '@rushstack/heft': '*' dependencies: '@microsoft/api-extractor': file:../../../apps/api-extractor(@types/node@18.17.15) - '@rushstack/eslint-config': file:../../../eslint/eslint-config(eslint@8.57.0)(typescript@5.4.5) + '@rushstack/eslint-config': file:../../../eslint/eslint-config(eslint@8.57.1)(typescript@5.4.5) '@rushstack/heft': file:../../../apps/heft(@types/node@18.17.15) - '@rushstack/heft-api-extractor-plugin': file:../../../heft-plugins/heft-api-extractor-plugin(@rushstack/heft@0.68.2)(@types/node@18.17.15) - '@rushstack/heft-jest-plugin': file:../../../heft-plugins/heft-jest-plugin(@rushstack/heft@0.68.2)(@types/node@18.17.15)(jest-environment-node@29.5.0) - '@rushstack/heft-lint-plugin': file:../../../heft-plugins/heft-lint-plugin(@rushstack/heft@0.68.2)(@types/node@18.17.15) - '@rushstack/heft-typescript-plugin': file:../../../heft-plugins/heft-typescript-plugin(@rushstack/heft@0.68.2)(@types/node@18.17.15) + '@rushstack/heft-api-extractor-plugin': file:../../../heft-plugins/heft-api-extractor-plugin(@rushstack/heft@0.68.13)(@types/node@18.17.15) + '@rushstack/heft-jest-plugin': file:../../../heft-plugins/heft-jest-plugin(@rushstack/heft@0.68.13)(@types/node@18.17.15)(jest-environment-node@29.5.0) + '@rushstack/heft-lint-plugin': file:../../../heft-plugins/heft-lint-plugin(@rushstack/heft@0.68.13)(@types/node@18.17.15) + '@rushstack/heft-typescript-plugin': file:../../../heft-plugins/heft-typescript-plugin(@rushstack/heft@0.68.13)(@types/node@18.17.15) '@types/heft-jest': 1.0.1 - eslint: 8.57.0 + eslint: 8.57.1 jest-environment-node: 29.5.0 typescript: 5.4.5 transitivePeerDependencies: @@ -6561,12 +6638,12 @@ packages: dependencies: '@microsoft/api-extractor': file:../../../apps/api-extractor(@types/node@18.17.15) '@rushstack/heft': file:../../../apps/heft(@types/node@18.17.15) - '@rushstack/heft-node-rig': file:../../../rigs/heft-node-rig(@rushstack/heft@0.68.2)(@types/node@18.17.15) + '@rushstack/heft-node-rig': file:../../../rigs/heft-node-rig(@rushstack/heft@0.68.13)(@types/node@18.17.15) '@types/heft-jest': 1.0.1 '@types/node': 18.17.15 - eslint: 8.57.0 + eslint: 8.57.1 jest-junit: 12.3.0 - local-eslint-config: file:../../../eslint/local-eslint-config(eslint@8.57.0)(typescript@5.4.5) + local-eslint-config: file:../../../eslint/local-eslint-config(eslint@8.57.1)(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: - babel-plugin-macros diff --git a/common/config/subspaces/build-tests-subspace/repo-state.json b/common/config/subspaces/build-tests-subspace/repo-state.json index ef88d270727..ebe69a72c1e 100644 --- a/common/config/subspaces/build-tests-subspace/repo-state.json +++ b/common/config/subspaces/build-tests-subspace/repo-state.json @@ -1,6 +1,6 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "5b75a8ef91af53a8caf52319e5eb0042c4d06852", + "pnpmShrinkwrapHash": "033fae07451be7b435c9b4fd8274c1ad39c74035", "preferredVersionsHash": "ce857ea0536b894ec8f346aaea08cfd85a5af648", - "packageJsonInjectedDependenciesHash": "8927ca4e0147b9436659f98a2ff8ca347107d52f" + "packageJsonInjectedDependenciesHash": "0f4121dfcf69b20aee9c6012b385b633c79600e4" } diff --git a/common/config/subspaces/default/common-versions.json b/common/config/subspaces/default/common-versions.json index 0f5615cd970..5f47e5c3b7f 100644 --- a/common/config/subspaces/default/common-versions.json +++ b/common/config/subspaces/default/common-versions.json @@ -100,7 +100,7 @@ "~4.9.5", // API Extractor bundles a specific TypeScript version because it calls internal APIs - "5.4.2" + "5.7.2" ], "source-map": [ "~0.6.1" // API Extractor is using an older version of source-map because newer versions are async diff --git a/common/config/subspaces/default/pnpm-lock.yaml b/common/config/subspaces/default/pnpm-lock.yaml index 8a615b6e7aa..19b6d2414e1 100644 --- a/common/config/subspaces/default/pnpm-lock.yaml +++ b/common/config/subspaces/default/pnpm-lock.yaml @@ -19,8 +19,8 @@ importers: specifier: workspace:* version: link:../../libraries/api-extractor-model '@microsoft/tsdoc': - specifier: ~0.15.0 - version: 0.15.0 + specifier: ~0.15.1 + version: 0.15.1 '@rushstack/node-core-library': specifier: workspace:* version: link:../../libraries/node-core-library @@ -56,11 +56,11 @@ importers: specifier: workspace:* version: link:../../libraries/api-extractor-model '@microsoft/tsdoc': - specifier: ~0.15.0 - version: 0.15.0 + specifier: ~0.15.1 + version: 0.15.1 '@microsoft/tsdoc-config': - specifier: ~0.17.0 - version: 0.17.0 + specifier: ~0.17.1 + version: 0.17.1 '@rushstack/node-core-library': specifier: workspace:* version: link:../../libraries/node-core-library @@ -89,15 +89,15 @@ importers: specifier: ~0.6.1 version: 0.6.1 typescript: - specifier: 5.4.2 - version: 5.4.2 + specifier: 5.7.2 + version: 5.7.2 devDependencies: '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -155,9 +155,6 @@ importers: tapable: specifier: 1.1.3 version: 1.1.3 - true-case-path: - specifier: ~2.2.1 - version: 2.2.1 watchpack: specifier: 2.4.0 version: 2.4.0 @@ -166,11 +163,11 @@ importers: specifier: workspace:* version: link:../api-extractor '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -192,9 +189,9 @@ importers: '@microsoft/rush-lib': specifier: workspace:* version: link:../../libraries/rush-lib - '@pnpm/dependency-path': - specifier: ~2.1.2 - version: 2.1.8 + '@pnpm/dependency-path-lockfile-pre-v9': + specifier: npm:@pnpm/dependency-path@~2.1.2 + version: /@pnpm/dependency-path@2.1.8 '@rushstack/node-core-library': specifier: workspace:* version: link:../../libraries/node-core-library @@ -866,8 +863,8 @@ importers: specifier: 18.17.15 version: 18.17.15 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -902,8 +899,8 @@ importers: specifier: 18.17.15 version: 18.17.15 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -920,8 +917,8 @@ importers: specifier: 18.17.15 version: 18.17.15 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -932,8 +929,8 @@ importers: specifier: workspace:* version: link:../../apps/api-extractor fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~2.9.2 version: 2.9.2 @@ -950,8 +947,8 @@ importers: specifier: 18.17.15 version: 18.17.15 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -972,8 +969,8 @@ importers: specifier: 18.17.15 version: 18.17.15 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -990,8 +987,8 @@ importers: specifier: 18.17.15 version: 18.17.15 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -1008,8 +1005,8 @@ importers: specifier: 18.17.15 version: 18.17.15 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -1047,9 +1044,6 @@ importers: api-extractor-lib5-test: specifier: workspace:* version: link:../api-extractor-lib5-test - colors: - specifier: ~1.2.1 - version: 1.2.5 local-node-rig: specifier: workspace:* version: link:../../rigs/local-node-rig @@ -1076,8 +1070,8 @@ importers: specifier: 18.17.15 version: 18.17.15 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -1101,8 +1095,8 @@ importers: specifier: 18.17.15 version: 18.17.15 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -1119,8 +1113,8 @@ importers: specifier: workspace:* version: link:../api-extractor-test-02 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -1134,8 +1128,8 @@ importers: specifier: workspace:* version: link:../api-extractor-lib1-test fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -1858,8 +1852,8 @@ importers: specifier: workspace:* version: link:../../apps/api-extractor '@rushstack/eslint-config': - specifier: 4.0.2 - version: 4.0.2(eslint@8.57.0)(typescript@4.9.5) + specifier: 4.1.1 + version: 4.1.1(eslint@8.57.0)(typescript@4.9.5) '@rushstack/eslint-patch': specifier: workspace:* version: link:../../eslint/eslint-patch @@ -2190,11 +2184,10 @@ importers: version: link:../../libraries/node-core-library ../../../build-tests/rush-amazon-s3-build-cache-plugin-integration-test: - dependencies: - '@rushstack/terminal': - specifier: workspace:* - version: link:../../libraries/terminal devDependencies: + '@microsoft/rush-lib': + specifier: workspace:* + version: link:../../libraries/rush-lib '@rushstack/heft': specifier: workspace:* version: link:../../apps/heft @@ -2204,6 +2197,9 @@ importers: '@rushstack/rush-amazon-s3-build-cache-plugin': specifier: workspace:* version: link:../../rush-plugins/rush-amazon-s3-build-cache-plugin + '@rushstack/terminal': + specifier: workspace:* + version: link:../../libraries/terminal '@types/http-proxy': specifier: ~1.17.8 version: 1.17.14 @@ -2345,8 +2341,8 @@ importers: specifier: 18.17.15 version: 18.17.15 fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 typescript: specifier: ~5.4.2 version: 5.4.2 @@ -2396,8 +2392,8 @@ importers: specifier: ~7.33.2 version: 7.33.2(eslint@8.57.0) eslint-plugin-tsdoc: - specifier: ~0.3.0 - version: 0.3.0 + specifier: ~0.4.0 + version: 0.4.0 devDependencies: eslint: specifier: ~8.57.0 @@ -2409,14 +2405,14 @@ importers: ../../../eslint/eslint-patch: devDependencies: '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/eslint': - specifier: 8.2.0 - version: 8.2.0 + specifier: 8.56.10 + version: 8.56.10 '@types/node': specifier: 18.17.15 version: 18.17.15 @@ -2446,14 +2442,14 @@ importers: specifier: ~3.0.0 version: 3.0.2 '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/eslint': - specifier: 8.2.0 - version: 8.2.0 + specifier: 8.56.10 + version: 8.56.10 '@types/estree': specifier: 1.0.5 version: 1.0.5 @@ -2492,14 +2488,14 @@ importers: version: 8.1.0(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2) devDependencies: '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/eslint': - specifier: 8.2.0 - version: 8.2.0 + specifier: 8.56.10 + version: 8.56.10 '@types/estree': specifier: 1.0.5 version: 1.0.5 @@ -2538,14 +2534,14 @@ importers: specifier: ~3.0.0 version: 3.0.2 '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/eslint': - specifier: 8.2.0 - version: 8.2.0 + specifier: 8.56.10 + version: 8.56.10 '@types/estree': specifier: 1.0.5 version: 1.0.5 @@ -2627,8 +2623,8 @@ importers: specifier: workspace:* version: link:../../apps/heft '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0) '@rushstack/terminal': specifier: workspace:* version: link:../../libraries/terminal @@ -2699,6 +2695,9 @@ importers: lodash: specifier: ~4.17.15 version: 4.17.21 + punycode: + specifier: ~2.3.1 + version: 2.3.1 devDependencies: '@jest/types': specifier: 29.5.0 @@ -2707,8 +2706,8 @@ importers: specifier: workspace:* version: link:../../apps/heft '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0) '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -2750,8 +2749,8 @@ importers: specifier: workspace:* version: link:../../apps/heft '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0) '@rushstack/heft-typescript-plugin': specifier: workspace:* version: link:../heft-typescript-plugin @@ -2759,8 +2758,8 @@ importers: specifier: workspace:* version: link:../../libraries/terminal '@types/eslint': - specifier: 8.2.0 - version: 8.2.0 + specifier: 8.56.10 + version: 8.56.10 '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -2896,8 +2895,8 @@ importers: specifier: workspace:* version: link:../../apps/heft '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0) '@rushstack/terminal': specifier: workspace:* version: link:../../libraries/terminal @@ -2994,21 +2993,21 @@ importers: ../../../libraries/api-extractor-model: dependencies: '@microsoft/tsdoc': - specifier: ~0.15.0 - version: 0.15.0 + specifier: ~0.15.1 + version: 0.15.1 '@microsoft/tsdoc-config': - specifier: ~0.17.0 - version: 0.17.0 + specifier: ~0.17.1 + version: 0.17.1 '@rushstack/node-core-library': specifier: workspace:* version: link:../node-core-library devDependencies: '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -3056,15 +3055,15 @@ importers: specifier: workspace:* version: link:../terminal jsonpath-plus: - specifier: ~4.0.0 - version: 4.0.0 + specifier: ~10.2.0 + version: 10.2.0 devDependencies: '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -3158,8 +3157,8 @@ importers: specifier: ~3.0.1 version: 3.0.1(ajv@8.13.0) fs-extra: - specifier: ~7.0.1 - version: 7.0.1 + specifier: ~11.3.0 + version: 11.3.0 import-lazy: specifier: ~4.0.0 version: 4.0.0 @@ -3174,11 +3173,11 @@ importers: version: 7.5.4 devDependencies: '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/fs-extra': specifier: 7.0.0 version: 7.0.0 @@ -3211,11 +3210,11 @@ importers: version: link:../terminal devDependencies: '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -3250,6 +3249,9 @@ importers: '@rushstack/terminal': specifier: workspace:* version: link:../terminal + '@rushstack/ts-command-line': + specifier: workspace:* + version: link:../ts-command-line ignore: specifier: ~5.1.6 version: 5.1.9 @@ -3307,11 +3309,11 @@ importers: version: 3.1.1 devDependencies: '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -3331,8 +3333,11 @@ importers: ../../../libraries/rush-lib: dependencies: '@pnpm/dependency-path': - specifier: ~2.1.2 - version: 2.1.8 + specifier: ~5.1.7 + version: 5.1.7 + '@pnpm/dependency-path-lockfile-pre-v9': + specifier: npm:@pnpm/dependency-path@~2.1.2 + version: /@pnpm/dependency-path@2.1.8 '@pnpm/link-bins': specifier: ~5.3.7 version: 5.3.25 @@ -3363,9 +3368,6 @@ importers: '@rushstack/ts-command-line': specifier: workspace:* version: link:../ts-command-line - '@types/node-fetch': - specifier: 2.6.2 - version: 2.6.2 '@yarnpkg/lockfile': specifier: ~1.0.2 version: 1.0.2 @@ -3402,9 +3404,6 @@ importers: js-yaml: specifier: ~3.13.1 version: 3.13.1 - node-fetch: - specifier: 2.6.7 - version: 2.6.7 npm-check: specifier: ~6.0.1 version: 6.0.1 @@ -3442,6 +3441,9 @@ importers: specifier: ~8.3.2 version: 8.3.2 devDependencies: + '@pnpm/lockfile.types': + specifier: ~1.0.3 + version: 1.0.3 '@pnpm/logger': specifier: 4.0.0 version: 4.0.0 @@ -3502,6 +3504,9 @@ importers: ../../../libraries/rush-sdk: dependencies: + '@pnpm/lockfile.types': + specifier: ~1.0.3 + version: 1.0.3 '@rushstack/lookup-by-path': specifier: workspace:* version: link:../lookup-by-path @@ -3514,9 +3519,6 @@ importers: '@rushstack/terminal': specifier: workspace:* version: link:../terminal - '@types/node-fetch': - specifier: 2.6.2 - version: 2.6.2 tapable: specifier: 2.2.1 version: 2.2.1 @@ -3628,11 +3630,11 @@ importers: version: 8.1.1 devDependencies: '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -3649,14 +3651,14 @@ importers: ../../../libraries/tree-pattern: devDependencies: '@rushstack/eslint-config': - specifier: 4.0.2 - version: 4.0.2(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2) + specifier: 4.1.1 + version: 4.1.1(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2) '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -3686,11 +3688,11 @@ importers: version: 0.3.2 devDependencies: '@rushstack/heft': - specifier: 0.67.2 - version: 0.67.2(@types/node@18.17.15) + specifier: 0.68.12 + version: 0.68.12(@types/node@18.17.15) '@rushstack/heft-node-rig': - specifier: 2.6.31 - version: 2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1) + specifier: 2.6.48 + version: 2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1) '@types/heft-jest': specifier: 1.0.1 version: 1.0.1 @@ -3744,8 +3746,8 @@ importers: specifier: workspace:* version: link:../../libraries/api-extractor-model '@microsoft/tsdoc': - specifier: ~0.15.0 - version: 0.15.0 + specifier: ~0.15.1 + version: 0.15.1 '@rushstack/node-core-library': specifier: workspace:* version: link:../../libraries/node-core-library @@ -4002,9 +4004,6 @@ importers: https-proxy-agent: specifier: ~5.0.0 version: 5.0.1 - node-fetch: - specifier: 2.6.7 - version: 2.6.7 devDependencies: '@microsoft/rush-lib': specifier: workspace:* @@ -4012,9 +4011,6 @@ importers: '@rushstack/heft': specifier: workspace:* version: link:../../apps/heft - '@types/node-fetch': - specifier: 2.6.2 - version: 2.6.2 local-node-rig: specifier: workspace:* version: link:../../rigs/local-node-rig @@ -4022,11 +4018,11 @@ importers: ../../../rush-plugins/rush-azure-storage-build-cache-plugin: dependencies: '@azure/identity': - specifier: ~4.2.1 - version: 4.2.1 + specifier: ~4.5.0 + version: 4.5.0 '@azure/storage-blob': - specifier: ~12.17.0 - version: 12.17.0 + specifier: ~12.26.0 + version: 12.26.0 '@rushstack/node-core-library': specifier: workspace:* version: link:../../libraries/node-core-library @@ -4058,9 +4054,6 @@ importers: https-proxy-agent: specifier: ~5.0.0 version: 5.0.1 - node-fetch: - specifier: 2.6.7 - version: 2.6.7 devDependencies: '@microsoft/rush-lib': specifier: workspace:* @@ -4071,9 +4064,6 @@ importers: '@rushstack/terminal': specifier: workspace:* version: link:../../libraries/terminal - '@types/node-fetch': - specifier: 2.6.2 - version: 2.6.2 local-node-rig: specifier: workspace:* version: link:../../rigs/local-node-rig @@ -5220,15 +5210,15 @@ packages: tslib: 2.3.1 dev: true - /@azure/abort-controller@1.1.0: - resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==} - engines: {node: '>=12.0.0'} + /@azure/abort-controller@2.1.0: + resolution: {integrity: sha512-SYtcG13aiV7znycu6plCClWUzD9BBtfnsbIxT89nkkRvQRB4n0kuZyJJvJ7hqdKOn7x7YoGKZ9lVStLJpLnOFw==} + engines: {node: '>=18.0.0'} dependencies: - tslib: 2.3.1 + tslib: 2.6.2 dev: false - /@azure/abort-controller@2.1.0: - resolution: {integrity: sha512-SYtcG13aiV7znycu6plCClWUzD9BBtfnsbIxT89nkkRvQRB4n0kuZyJJvJ7hqdKOn7x7YoGKZ9lVStLJpLnOFw==} + /@azure/abort-controller@2.1.2: + resolution: {integrity: sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==} engines: {node: '>=18.0.0'} dependencies: tslib: 2.6.2 @@ -5238,19 +5228,28 @@ packages: resolution: {integrity: sha512-OuDVn9z2LjyYbpu6e7crEwSipa62jX7/ObV/pmXQfnOG8cHwm363jYtg3FSX3GB1V7jsIKri1zgq7mfXkFk/qw==} engines: {node: '>=18.0.0'} dependencies: - '@azure/abort-controller': 2.1.0 + '@azure/abort-controller': 2.1.2 '@azure/core-util': 1.8.0 tslib: 2.6.2 dev: false + /@azure/core-auth@1.9.0: + resolution: {integrity: sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.0 + '@azure/core-util': 1.11.0 + tslib: 2.6.2 + dev: false + /@azure/core-client@1.9.0: resolution: {integrity: sha512-x50SSD7bbG5wen3tMDI2oWVSAjt1K1xw6JZSnc6239RmBwqLJF9dPsKsh9w0Rzh5+mGpsu9FDu3DlsT0lo1+Uw==} engines: {node: '>=18.0.0'} dependencies: - '@azure/abort-controller': 2.1.0 + '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.7.0 '@azure/core-rest-pipeline': 1.15.0 - '@azure/core-tracing': 1.1.0 + '@azure/core-tracing': 1.2.0 '@azure/core-util': 1.8.0 '@azure/logger': 1.1.0 tslib: 2.6.2 @@ -5258,33 +5257,37 @@ packages: - supports-color dev: false - /@azure/core-http@3.0.4: - resolution: {integrity: sha512-Fok9VVhMdxAFOtqiiAtg74fL0UJkt0z3D+ouUUxcRLzZNBioPRAMJFVxiWoJljYpXsRi4GDQHzQHDc9AiYaIUQ==} - engines: {node: '>=14.0.0'} + /@azure/core-client@1.9.2: + resolution: {integrity: sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==} + engines: {node: '>=18.0.0'} dependencies: - '@azure/abort-controller': 1.1.0 - '@azure/core-auth': 1.7.0 - '@azure/core-tracing': 1.0.0-preview.13 - '@azure/core-util': 1.8.0 + '@azure/abort-controller': 2.1.0 + '@azure/core-auth': 1.9.0 + '@azure/core-rest-pipeline': 1.18.1 + '@azure/core-tracing': 1.1.0 + '@azure/core-util': 1.11.0 '@azure/logger': 1.1.0 - '@types/node-fetch': 2.6.2 - '@types/tunnel': 0.0.3 - form-data: 4.0.0 - node-fetch: 2.6.7 - process: 0.11.10 - tslib: 2.3.1 - tunnel: 0.0.6 - uuid: 8.3.2 - xml2js: 0.5.0 + tslib: 2.6.2 transitivePeerDependencies: - - encoding + - supports-color + dev: false + + /@azure/core-http-compat@2.1.2: + resolution: {integrity: sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-client': 1.9.0 + '@azure/core-rest-pipeline': 1.15.0 + transitivePeerDependencies: + - supports-color dev: false /@azure/core-lro@2.7.0: resolution: {integrity: sha512-oj7d8vWEvOREIByH1+BnoiFwszzdE7OXUEd6UTv+cmx5HvjBBlkVezm3uZgpXWaxDj5ATL/k89+UMeGx1Ou9TQ==} engines: {node: '>=18.0.0'} dependencies: - '@azure/abort-controller': 2.1.0 + '@azure/abort-controller': 2.1.2 '@azure/core-util': 1.8.0 '@azure/logger': 1.1.0 tslib: 2.6.2 @@ -5301,9 +5304,9 @@ packages: resolution: {integrity: sha512-6kBQwE75ZVlOjBbp0/PX0fgNLHxoMDxHe3aIPV/RLVwrIDidxTbsHtkSbPNTkheMset3v9s1Z08XuMNpWRK/7w==} engines: {node: '>=18.0.0'} dependencies: - '@azure/abort-controller': 2.1.0 + '@azure/abort-controller': 2.1.2 '@azure/core-auth': 1.7.0 - '@azure/core-tracing': 1.1.0 + '@azure/core-tracing': 1.2.0 '@azure/core-util': 1.8.0 '@azure/logger': 1.1.0 http-proxy-agent: 7.0.2 @@ -5313,12 +5316,20 @@ packages: - supports-color dev: false - /@azure/core-tracing@1.0.0-preview.13: - resolution: {integrity: sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==} - engines: {node: '>=12.0.0'} + /@azure/core-rest-pipeline@1.18.1: + resolution: {integrity: sha512-/wS73UEDrxroUEVywEm7J0p2c+IIiVxyfigCGfsKvCxxCET4V/Hef2aURqltrXMRjNmdmt5IuOgIpl8f6xdO5A==} + engines: {node: '>=18.0.0'} dependencies: - '@opentelemetry/api': 1.8.0 - tslib: 2.3.1 + '@azure/abort-controller': 2.1.0 + '@azure/core-auth': 1.9.0 + '@azure/core-tracing': 1.1.0 + '@azure/core-util': 1.11.0 + '@azure/logger': 1.1.0 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.4 + tslib: 2.6.2 + transitivePeerDependencies: + - supports-color dev: false /@azure/core-tracing@1.1.0: @@ -5328,27 +5339,50 @@ packages: tslib: 2.6.2 dev: false + /@azure/core-tracing@1.2.0: + resolution: {integrity: sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==} + engines: {node: '>=18.0.0'} + dependencies: + tslib: 2.6.2 + dev: false + + /@azure/core-util@1.11.0: + resolution: {integrity: sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.0 + tslib: 2.6.2 + dev: false + /@azure/core-util@1.8.0: resolution: {integrity: sha512-w8NrGnrlGDF7fj36PBnJhGXDK2Y3kpTOgL7Ksb5snEHXq/3EAbKYOp1yqme0yWCUlSDq5rjqvxSBAJmsqYac3w==} engines: {node: '>=18.0.0'} dependencies: - '@azure/abort-controller': 2.1.0 + '@azure/abort-controller': 2.1.2 tslib: 2.6.2 dev: false - /@azure/identity@4.2.1: - resolution: {integrity: sha512-U8hsyC9YPcEIzoaObJlRDvp7KiF0MGS7xcWbyJSVvXRkC/HXo1f0oYeBYmEvVgRfacw7GHf6D6yAoh9JHz6A5Q==} + /@azure/core-xml@1.4.4: + resolution: {integrity: sha512-J4FYAqakGXcbfeZjwjMzjNcpcH4E+JtEBv+xcV1yL0Ydn/6wbQfeFKTCHh9wttAi0lmajHw7yBbHPRG+YHckZQ==} engines: {node: '>=18.0.0'} dependencies: - '@azure/abort-controller': 1.1.0 - '@azure/core-auth': 1.7.0 - '@azure/core-client': 1.9.0 - '@azure/core-rest-pipeline': 1.15.0 + fast-xml-parser: 4.5.0 + tslib: 2.6.2 + dev: false + + /@azure/identity@4.5.0: + resolution: {integrity: sha512-EknvVmtBuSIic47xkOqyNabAme0RYTw52BTMz8eBgU1ysTyMrD1uOoM+JdS0J/4Yfp98IBT3osqq3BfwSaNaGQ==} + engines: {node: '>=18.0.0'} + dependencies: + '@azure/abort-controller': 2.1.0 + '@azure/core-auth': 1.9.0 + '@azure/core-client': 1.9.2 + '@azure/core-rest-pipeline': 1.18.1 '@azure/core-tracing': 1.1.0 - '@azure/core-util': 1.8.0 + '@azure/core-util': 1.11.0 '@azure/logger': 1.1.0 - '@azure/msal-browser': 3.17.0 - '@azure/msal-node': 2.9.2 + '@azure/msal-browser': 3.27.0 + '@azure/msal-node': 2.16.2 events: 3.3.0 jws: 4.0.0 open: 8.4.2 @@ -5365,41 +5399,46 @@ packages: tslib: 2.6.2 dev: false - /@azure/msal-browser@3.17.0: - resolution: {integrity: sha512-csccKXmW2z7EkZ0I3yAoW/offQt+JECdTIV/KrnRoZyM7wCSsQWODpwod8ZhYy7iOyamcHApR9uCh0oD1M+0/A==} + /@azure/msal-browser@3.27.0: + resolution: {integrity: sha512-+b4ZKSD8+vslCtVRVetkegEhOFMLP3rxDWJY212ct+2r6jVg6OSQKc1Qz3kCoXo0FgwaXkb+76TMZfpHp8QtgA==} engines: {node: '>=0.8.0'} dependencies: - '@azure/msal-common': 14.12.0 + '@azure/msal-common': 14.16.0 dev: false - /@azure/msal-common@14.12.0: - resolution: {integrity: sha512-IDDXmzfdwmDkv4SSmMEyAniJf6fDu3FJ7ncOjlxkDuT85uSnLEhZi3fGZpoR7T4XZpOMx9teM9GXBgrfJgyeBw==} + /@azure/msal-common@14.16.0: + resolution: {integrity: sha512-1KOZj9IpcDSwpNiQNjt0jDYZpQvNZay7QAEi/5DLubay40iGYtLzya/jbjRPLyOTZhEKyL1MzPuw2HqBCjceYA==} engines: {node: '>=0.8.0'} dev: false - /@azure/msal-node@2.9.2: - resolution: {integrity: sha512-8tvi6Cos3m+0KmRbPjgkySXi+UQU/QiuVRFnrxIwt5xZlEEFa69O04RTaNESGgImyBBlYbo2mfE8/U8Bbdk1WQ==} + /@azure/msal-node@2.16.2: + resolution: {integrity: sha512-An7l1hEr0w1HMMh1LU+rtDtqL7/jw74ORlc9Wnh06v7TU/xpG39/Zdr1ZJu3QpjUfKJ+E0/OXMW8DRSWTlh7qQ==} engines: {node: '>=16'} dependencies: - '@azure/msal-common': 14.12.0 + '@azure/msal-common': 14.16.0 jsonwebtoken: 9.0.2 uuid: 8.3.2 dev: false - /@azure/storage-blob@12.17.0: - resolution: {integrity: sha512-sM4vpsCpcCApagRW5UIjQNlNylo02my2opgp0Emi8x888hZUvJ3dN69Oq20cEGXkMUWnoCrBaB0zyS3yeB87sQ==} - engines: {node: '>=14.0.0'} + /@azure/storage-blob@12.26.0: + resolution: {integrity: sha512-SriLPKezypIsiZ+TtlFfE46uuBIap2HeaQVS78e1P7rz5OSbq0rsd52WE1mC5f7vAeLiXqv7I7oRhL3WFZEw3Q==} + engines: {node: '>=18.0.0'} dependencies: - '@azure/abort-controller': 1.1.0 - '@azure/core-http': 3.0.4 + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.7.0 + '@azure/core-client': 1.9.0 + '@azure/core-http-compat': 2.1.2 '@azure/core-lro': 2.7.0 '@azure/core-paging': 1.6.0 - '@azure/core-tracing': 1.0.0-preview.13 + '@azure/core-rest-pipeline': 1.15.0 + '@azure/core-tracing': 1.2.0 + '@azure/core-util': 1.8.0 + '@azure/core-xml': 1.4.4 '@azure/logger': 1.1.0 events: 3.3.0 tslib: 2.3.1 transitivePeerDependencies: - - encoding + - supports-color dev: false /@babel/code-frame@7.12.11: @@ -9023,7 +9062,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 17.0.41 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -9466,6 +9505,22 @@ packages: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 + /@jsep-plugin/assignment@1.3.0(jsep@1.4.0): + resolution: {integrity: sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==} + engines: {node: '>= 10.16.0'} + peerDependencies: + jsep: ^0.4.0||^1.0.0 + dependencies: + jsep: 1.4.0 + + /@jsep-plugin/regex@1.0.4(jsep@1.4.0): + resolution: {integrity: sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==} + engines: {node: '>= 10.16.0'} + peerDependencies: + jsep: ^0.4.0||^1.0.0 + dependencies: + jsep: 1.4.0 + /@jsonjoy.com/base64@1.1.2(tslib@2.3.1): resolution: {integrity: sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==} engines: {node: '>=10.0'} @@ -9551,33 +9606,33 @@ packages: resolution: {integrity: sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==} dev: true - /@microsoft/api-extractor-model@7.29.8(@types/node@18.17.15): - resolution: {integrity: sha512-t3Z/xcO6TRbMcnKGVMs4uMzv/gd5j0NhMiJIGjD4cJMeFJ1Hf8wnLSx37vxlRlL0GWlGJhnFgxvnaL6JlS+73g==} + /@microsoft/api-extractor-model@7.30.1(@types/node@18.17.15): + resolution: {integrity: sha512-CTS2PlASJHxVY8hqHORVb1HdECWOEMcMnM6/kDkPr0RZapAFSIHhg9D4jxuE8g+OWYHtPc10LCpmde5pylTRlA==} dependencies: - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) transitivePeerDependencies: - '@types/node' dev: true - /@microsoft/api-extractor@7.47.9(@types/node@18.17.15): - resolution: {integrity: sha512-TTq30M1rikVsO5wZVToQT/dGyJY7UXJmjiRtkHPLb74Prx3Etw8+bX7Bv7iLuby6ysb7fuu1NFWqma+csym8Jw==} + /@microsoft/api-extractor@7.49.0(@types/node@18.17.15): + resolution: {integrity: sha512-X5b462k0/yl8qWdGx3siq5vyI8fTDU9fRnwqTMlGHqFhLxpASmLWA2EU6nft+ZG8cQM2HRZlr4HSo62UqiAnug==} hasBin: true dependencies: - '@microsoft/api-extractor-model': 7.29.8(@types/node@18.17.15) - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) + '@microsoft/api-extractor-model': 7.30.1(@types/node@18.17.15) + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) '@rushstack/rig-package': 0.5.3 - '@rushstack/terminal': 0.14.2(@types/node@18.17.15) - '@rushstack/ts-command-line': 4.22.8(@types/node@18.17.15) + '@rushstack/terminal': 0.14.4(@types/node@18.17.15) + '@rushstack/ts-command-line': 4.23.2(@types/node@18.17.15) lodash: 4.17.21 minimatch: 3.0.8 resolve: 1.22.8 semver: 7.5.4 source-map: 0.6.1 - typescript: 5.4.2 + typescript: 5.7.2 transitivePeerDependencies: - '@types/node' dev: true @@ -9597,9 +9652,22 @@ packages: ajv: 8.12.0 jju: 1.4.0 resolve: 1.22.8 + dev: true + + /@microsoft/tsdoc-config@0.17.1: + resolution: {integrity: sha512-UtjIFe0C6oYgTnad4q1QP4qXwLhe6tIpNTRStJ2RZEPIkqQPREAwE5spzVxsdn9UaEMUqhh0AqSx3X4nWAKXWw==} + dependencies: + '@microsoft/tsdoc': 0.15.1 + ajv: 8.12.0 + jju: 1.4.0 + resolve: 1.22.8 /@microsoft/tsdoc@0.15.0: resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} + dev: true + + /@microsoft/tsdoc@0.15.1: + resolution: {integrity: sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==} /@mrmlnc/readdir-enhanced@2.2.1: resolution: {integrity: sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==} @@ -9648,11 +9716,6 @@ packages: rimraf: 3.0.2 dev: true - /@opentelemetry/api@1.8.0: - resolution: {integrity: sha512-I/s6F7yKUDdtMsoBWXJe8Qz40Tui5vsuKCWJEWVL+5q9sSWRzzx6v2KeNsOBEwd94j0eWkpWCH4yB6rZg9Mf0w==} - engines: {node: '>=8.0.0'} - dev: false - /@pmmmwh/react-refresh-webpack-plugin@0.5.11(react-refresh@0.11.0)(webpack@4.47.0): resolution: {integrity: sha512-7j/6vdTym0+qZ6u4XbSAxrWBGYSdCfTzySkj7WAFgDLmSyWlOrWvpyzxlFh5jtw9dn0oL/jtW+06XfFiisN3JQ==} engines: {node: '>= 10.13'} @@ -9706,6 +9769,19 @@ packages: rfc4648: 1.5.3 dev: false + /@pnpm/crypto.base32-hash@3.0.1: + resolution: {integrity: sha512-DM4RR/tvB7tMb2FekL0Q97A5PCXNyEC+6ht8SaufAUFSJNxeozqHw9PHTZR03mzjziPzNQLOld0pNINBX3srtw==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/crypto.polyfill': 1.0.0 + rfc4648: 1.5.3 + dev: false + + /@pnpm/crypto.polyfill@1.0.0: + resolution: {integrity: sha512-WbmsqqcUXKKaAF77ox1TQbpZiaQcr26myuMUu+WjUtoWYgD3VP6iKYEvSx35SZ6G2L316lu+pv+40A2GbWJc1w==} + engines: {node: '>=18.12'} + dev: false + /@pnpm/dependency-path@2.1.8: resolution: {integrity: sha512-ywBaTjy0iSEF7lH3DlF8UXrdL2bw4AQFV2tTOeNeY7wc1W5CE+RHSJhf9MXBYcZPesqGRrPiU7Pimj3l05L9VA==} engines: {node: '>=16.14'} @@ -9716,6 +9792,15 @@ packages: semver: 7.5.4 dev: false + /@pnpm/dependency-path@5.1.7: + resolution: {integrity: sha512-MKCyaTy1r9fhBXAnhDZNBVgo6ThPnicwJEG203FDp7pGhD7NruS/FhBI+uMd7GNsK3D7aIFCDAgbWpNTXn/eWw==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/crypto.base32-hash': 3.0.1 + '@pnpm/types': 12.2.0 + semver: 7.6.3 + dev: false + /@pnpm/error@1.4.0: resolution: {integrity: sha512-vxkRrkneBPVmP23kyjnYwVOtipwlSl6UfL+h+Xa3TrABJTz5rYBXemlTsU5BzST8U4pD7YDkTb3SQu+MMuIDKA==} engines: {node: '>=10.16'} @@ -9747,6 +9832,13 @@ packages: '@pnpm/types': 9.4.2 dev: true + /@pnpm/lockfile.types@1.0.3: + resolution: {integrity: sha512-A7vUWktnhDkrIs+WmXm7AdffJVyVYJpQUEouya/DYhB+Y+tQ3BXjZ6CV0KybqLgI/8AZErgCJqFxA0GJH6QDjA==} + engines: {node: '>=18.12'} + dependencies: + '@pnpm/patching.types': 1.0.0 + '@pnpm/types': 12.2.0 + /@pnpm/logger@4.0.0: resolution: {integrity: sha512-SIShw+k556e7S7tLZFVSIHjCdiVog1qWzcKW2RbLEHPItdisAFVNIe34kYd9fMSswTlSRLS/qRjw3ZblzWmJ9Q==} engines: {node: '>=12.17'} @@ -9764,6 +9856,10 @@ packages: is-subdir: 1.2.0 dev: false + /@pnpm/patching.types@1.0.0: + resolution: {integrity: sha512-juCdQCC1USqLcOhVPl1tYReoTO9YH4fTullMnFXXcmpsDM7Dkn3tzuOQKC3oPoJ2ozv+0EeWWMtMGqn2+IM3pQ==} + engines: {node: '>=18.12'} + /@pnpm/read-modules-dir@2.0.3: resolution: {integrity: sha512-i9OgRvSlxrTS9a2oXokhDxvQzDtfqtsooJ9jaGoHkznue5aFCTSrNZFQ6M18o8hC03QWfnxaKi0BtOvNkKu2+A==} engines: {node: '>=10.13'} @@ -9799,6 +9895,10 @@ packages: strip-bom: 4.0.0 dev: false + /@pnpm/types@12.2.0: + resolution: {integrity: sha512-5RtwWhX39j89/Tmyv2QSlpiNjErA357T/8r1Dkg+2lD3P7RuS7Xi2tChvmOC3VlezEFNcWnEGCOeKoGRkDuqFA==} + engines: {node: '>=18.12'} + /@pnpm/types@6.4.0: resolution: {integrity: sha512-nco4+4sZqNHn60Y4VE/fbtlShCBqipyUO+nKRPvDHqLrecMW9pzHWMVRxk4nrMRoeowj3q0rX3GYRBa8lsHTAg==} engines: {node: '>=10.16'} @@ -10339,13 +10439,13 @@ packages: - supports-color dev: true - /@rushstack/eslint-config@4.0.2(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2): - resolution: {integrity: sha512-RFLynEk5hiGjgzFKephENrBWZZfoQe+3e76Q78KXjeGsndbaZXDHy0OxLfZethlEutDQEDiE3vpkbJ1mfcMeGg==} + /@rushstack/eslint-config@4.1.1(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2): + resolution: {integrity: sha512-fVL6mGv2pFEe8t8FRu6rKYRHpTIYrbY/Iqc/xQTa4u4bp6V+Y47teSWn1FeApgKk5tr34KmWqLPjzyNKEOTCig==} peerDependencies: eslint: ^8.57.0 typescript: '>=4.7.0' dependencies: - '@rushstack/eslint-patch': 1.10.4 + '@rushstack/eslint-patch': 1.10.5 '@rushstack/eslint-plugin': 0.16.1(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2) '@rushstack/eslint-plugin-packlets': 0.9.2(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2) '@rushstack/eslint-plugin-security': 0.8.3(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2) @@ -10356,19 +10456,19 @@ packages: eslint: 8.57.0(supports-color@8.1.1) eslint-plugin-promise: 6.1.1(eslint@8.57.0) eslint-plugin-react: 7.33.2(eslint@8.57.0) - eslint-plugin-tsdoc: 0.3.0 + eslint-plugin-tsdoc: 0.4.0 typescript: 5.4.2 transitivePeerDependencies: - supports-color dev: true - /@rushstack/eslint-config@4.0.2(eslint@8.57.0)(typescript@4.9.5): - resolution: {integrity: sha512-RFLynEk5hiGjgzFKephENrBWZZfoQe+3e76Q78KXjeGsndbaZXDHy0OxLfZethlEutDQEDiE3vpkbJ1mfcMeGg==} + /@rushstack/eslint-config@4.1.1(eslint@8.57.0)(typescript@4.9.5): + resolution: {integrity: sha512-fVL6mGv2pFEe8t8FRu6rKYRHpTIYrbY/Iqc/xQTa4u4bp6V+Y47teSWn1FeApgKk5tr34KmWqLPjzyNKEOTCig==} peerDependencies: eslint: ^8.57.0 typescript: '>=4.7.0' dependencies: - '@rushstack/eslint-patch': 1.10.4 + '@rushstack/eslint-patch': 1.10.5 '@rushstack/eslint-plugin': 0.16.1(eslint@8.57.0)(typescript@4.9.5) '@rushstack/eslint-plugin-packlets': 0.9.2(eslint@8.57.0)(typescript@4.9.5) '@rushstack/eslint-plugin-security': 0.8.3(eslint@8.57.0)(typescript@4.9.5) @@ -10379,7 +10479,7 @@ packages: eslint: 8.57.0(supports-color@8.1.1) eslint-plugin-promise: 6.1.1(eslint@8.57.0) eslint-plugin-react: 7.33.2(eslint@8.57.0) - eslint-plugin-tsdoc: 0.3.0 + eslint-plugin-tsdoc: 0.4.0 typescript: 4.9.5 transitivePeerDependencies: - supports-color @@ -10389,6 +10489,10 @@ packages: resolution: {integrity: sha512-WJgX9nzTqknM393q1QJDJmoW28kUfEnybeTfVNcNAPnIx210RXm2DiXiHzfNPJNIUUb1tJnz/l4QGtJ30PgWmA==} dev: true + /@rushstack/eslint-patch@1.10.5: + resolution: {integrity: sha512-kkKUDVlII2DQiKy7UstOR1ErJP8kUKAQ4oa+SQtM0K+lPdmmjj0YnnxBgtTVYH7mUKtbsxeFC9y0AmK7Yb78/A==} + dev: true + /@rushstack/eslint-plugin-packlets@0.9.2(eslint@7.11.0)(typescript@5.4.2): resolution: {integrity: sha512-rZofSLJpwyP7Xo6e4eKYkI7N4JM5PycvPuoX5IEK08PgxPDm/k5pdltH9DkIKnmWvLrxIMU+85VrB5xnjbK0RQ==} peerDependencies: @@ -10610,46 +10714,46 @@ packages: - typescript dev: true - /@rushstack/heft-api-extractor-plugin@0.3.49(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15): - resolution: {integrity: sha512-tqao7Rikm2OYpcwiRVzfD6Ghm2a2mJt+sZyz3iKKPpkFQEklf3hppBv2NQ2HRF7jjT+PeOBQfrGf30aK6gPHKQ==} + /@rushstack/heft-api-extractor-plugin@0.3.62(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15): + resolution: {integrity: sha512-BP685Wu8sWhERuMHwsR8LM59YNQ+ir/YHOeks5hG6tvmeG/I+PNG+2PauFYWZ3EMwwQuVu6ibgM6hbWA+5yFCQ==} peerDependencies: '@rushstack/heft': '*' dependencies: '@rushstack/heft': link:../../../apps/heft - '@rushstack/heft-config-file': 0.15.7(@types/node@18.17.15) - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) + '@rushstack/heft-config-file': 0.16.2(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) semver: 7.5.4 transitivePeerDependencies: - '@types/node' dev: true - /@rushstack/heft-api-extractor-plugin@0.3.49(@rushstack/heft@0.67.2)(@types/node@18.17.15): - resolution: {integrity: sha512-tqao7Rikm2OYpcwiRVzfD6Ghm2a2mJt+sZyz3iKKPpkFQEklf3hppBv2NQ2HRF7jjT+PeOBQfrGf30aK6gPHKQ==} + /@rushstack/heft-api-extractor-plugin@0.3.62(@rushstack/heft@0.68.12)(@types/node@18.17.15): + resolution: {integrity: sha512-BP685Wu8sWhERuMHwsR8LM59YNQ+ir/YHOeks5hG6tvmeG/I+PNG+2PauFYWZ3EMwwQuVu6ibgM6hbWA+5yFCQ==} peerDependencies: '@rushstack/heft': '*' dependencies: - '@rushstack/heft': 0.67.2(@types/node@18.17.15) - '@rushstack/heft-config-file': 0.15.7(@types/node@18.17.15) - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) + '@rushstack/heft': 0.68.12(@types/node@18.17.15) + '@rushstack/heft-config-file': 0.16.2(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) semver: 7.5.4 transitivePeerDependencies: - '@types/node' dev: true - /@rushstack/heft-config-file@0.15.7(@types/node@18.17.15): - resolution: {integrity: sha512-d8rwr9ctVmnVBPyl0o1WFh6NKsAJEX9eJip3mRGKOUd6Lq5FLHaTELwVNbqmZ76oQITABueD5MS02QE5Yq2fhw==} + /@rushstack/heft-config-file@0.16.2(@types/node@18.17.15): + resolution: {integrity: sha512-06H3nie7vxzBRYvUmLDzXHh1g85JqZMoYkv4ksvZJ2F8eXy3KZZ5opSygNfXfJOv0SuuZ7vzcqKalISSUpszHQ==} engines: {node: '>=10.13.0'} dependencies: - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) '@rushstack/rig-package': 0.5.3 - '@rushstack/terminal': 0.14.2(@types/node@18.17.15) - jsonpath-plus: 4.0.0 + '@rushstack/terminal': 0.14.4(@types/node@18.17.15) + jsonpath-plus: 10.2.0 transitivePeerDependencies: - '@types/node' dev: true - /@rushstack/heft-jest-plugin@0.12.11(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0)(jest-environment-node@29.5.0): - resolution: {integrity: sha512-jhVTD0j4FgGM1RKzaGk13KYtSw6YkEw1LorxlvwSW5eVGbBbBY0Jpep3AUcLu/WZW43kxmEuyoe/THlqpnaf8Q==} + /@rushstack/heft-jest-plugin@0.14.2(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0)(jest-environment-node@29.5.0): + resolution: {integrity: sha512-G8NQbyvjZVJ9/dBxOybwd/QYtzSPaylv7uHFlRHD5a4QxWPlTmPJu6+rUpjvEkDAFa8rnQkIHDr5CbdMVxNUww==} peerDependencies: '@rushstack/heft': '*' jest-environment-jsdom: ^29.5.0 @@ -10664,15 +10768,16 @@ packages: '@jest/reporters': 29.5.0(supports-color@8.1.1) '@jest/transform': 29.5.0(supports-color@8.1.1) '@rushstack/heft': link:../../../apps/heft - '@rushstack/heft-config-file': 0.15.7(@types/node@18.17.15) - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) - '@rushstack/terminal': 0.14.2(@types/node@18.17.15) + '@rushstack/heft-config-file': 0.16.2(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) + '@rushstack/terminal': 0.14.4(@types/node@18.17.15) jest-config: 29.5.0(@types/node@18.17.15)(supports-color@8.1.1) jest-environment-jsdom: 29.5.0 jest-environment-node: 29.5.0 jest-resolve: 29.5.0 jest-snapshot: 29.5.0(supports-color@8.1.1) lodash: 4.17.21 + punycode: 2.3.1 transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -10681,8 +10786,8 @@ packages: - ts-node dev: true - /@rushstack/heft-jest-plugin@0.12.11(@rushstack/heft@0.67.2)(@types/node@18.17.15)(jest-environment-node@29.5.0)(supports-color@8.1.1): - resolution: {integrity: sha512-jhVTD0j4FgGM1RKzaGk13KYtSw6YkEw1LorxlvwSW5eVGbBbBY0Jpep3AUcLu/WZW43kxmEuyoe/THlqpnaf8Q==} + /@rushstack/heft-jest-plugin@0.14.2(@rushstack/heft@0.68.12)(@types/node@18.17.15)(jest-environment-node@29.5.0)(supports-color@8.1.1): + resolution: {integrity: sha512-G8NQbyvjZVJ9/dBxOybwd/QYtzSPaylv7uHFlRHD5a4QxWPlTmPJu6+rUpjvEkDAFa8rnQkIHDr5CbdMVxNUww==} peerDependencies: '@rushstack/heft': '*' jest-environment-jsdom: ^29.5.0 @@ -10696,15 +10801,16 @@ packages: '@jest/core': 29.5.0(supports-color@8.1.1) '@jest/reporters': 29.5.0(supports-color@8.1.1) '@jest/transform': 29.5.0(supports-color@8.1.1) - '@rushstack/heft': 0.67.2(@types/node@18.17.15) - '@rushstack/heft-config-file': 0.15.7(@types/node@18.17.15) - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) - '@rushstack/terminal': 0.14.2(@types/node@18.17.15) + '@rushstack/heft': 0.68.12(@types/node@18.17.15) + '@rushstack/heft-config-file': 0.16.2(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) + '@rushstack/terminal': 0.14.4(@types/node@18.17.15) jest-config: 29.5.0(@types/node@18.17.15)(supports-color@8.1.1) jest-environment-node: 29.5.0 jest-resolve: 29.5.0 jest-snapshot: 29.5.0(supports-color@8.1.1) lodash: 4.17.21 + punycode: 2.3.1 transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -10713,42 +10819,42 @@ packages: - ts-node dev: true - /@rushstack/heft-lint-plugin@0.4.3(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15): - resolution: {integrity: sha512-HQBwB0tySabwZUPbhliKIsVmU8TMr6ZRKeqJabagtXg53W+qBBqLDc6uMjQGQeU+e1YPt/FyDi2eXgYWUmb50g==} + /@rushstack/heft-lint-plugin@0.5.11(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15): + resolution: {integrity: sha512-gMl4QNQvgNPvO8DTKPEL7F6QsYj583lcFJMYmEgOhzpNy0MByhjDxIotBbAuCT3zqAamctx4U6M3utmBcJeTJA==} peerDependencies: '@rushstack/heft': '*' dependencies: '@rushstack/heft': link:../../../apps/heft - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) semver: 7.5.4 transitivePeerDependencies: - '@types/node' dev: true - /@rushstack/heft-lint-plugin@0.4.3(@rushstack/heft@0.67.2)(@types/node@18.17.15): - resolution: {integrity: sha512-HQBwB0tySabwZUPbhliKIsVmU8TMr6ZRKeqJabagtXg53W+qBBqLDc6uMjQGQeU+e1YPt/FyDi2eXgYWUmb50g==} + /@rushstack/heft-lint-plugin@0.5.11(@rushstack/heft@0.68.12)(@types/node@18.17.15): + resolution: {integrity: sha512-gMl4QNQvgNPvO8DTKPEL7F6QsYj583lcFJMYmEgOhzpNy0MByhjDxIotBbAuCT3zqAamctx4U6M3utmBcJeTJA==} peerDependencies: '@rushstack/heft': '*' dependencies: - '@rushstack/heft': 0.67.2(@types/node@18.17.15) - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) + '@rushstack/heft': 0.68.12(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) semver: 7.5.4 transitivePeerDependencies: - '@types/node' dev: true - /@rushstack/heft-node-rig@2.6.31(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0): - resolution: {integrity: sha512-67DRhRxb7yX2ATm/LPCqqAUkhDSRV7u4ns+HwITuoTWSsbFprgHchXpe+yRocfpt6gtSEmQs0895ne9lDL5tgQ==} + /@rushstack/heft-node-rig@2.6.48(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0): + resolution: {integrity: sha512-j7CHt3GLT2wsv+C4ZUgO9wp1pMTgn4al7bjAHPxOttdzxTBqmodXmFeIywNT9DXO6f2m730dJlUNcqif4T5NcQ==} peerDependencies: '@rushstack/heft': '*' dependencies: - '@microsoft/api-extractor': 7.47.9(@types/node@18.17.15) - '@rushstack/eslint-config': 4.0.2(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2) + '@microsoft/api-extractor': 7.49.0(@types/node@18.17.15) + '@rushstack/eslint-config': 4.1.1(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2) '@rushstack/heft': link:../../../apps/heft - '@rushstack/heft-api-extractor-plugin': 0.3.49(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15) - '@rushstack/heft-jest-plugin': 0.12.11(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0)(jest-environment-node@29.5.0) - '@rushstack/heft-lint-plugin': 0.4.3(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15) - '@rushstack/heft-typescript-plugin': 0.5.27(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15) + '@rushstack/heft-api-extractor-plugin': 0.3.62(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15) + '@rushstack/heft-jest-plugin': 0.14.2(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15)(jest-environment-jsdom@29.5.0)(jest-environment-node@29.5.0) + '@rushstack/heft-lint-plugin': 0.5.11(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15) + '@rushstack/heft-typescript-plugin': 0.6.5(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15) '@types/heft-jest': 1.0.1 eslint: 8.57.0(supports-color@8.1.1) jest-environment-node: 29.5.0 @@ -10762,18 +10868,18 @@ packages: - ts-node dev: true - /@rushstack/heft-node-rig@2.6.31(@rushstack/heft@0.67.2)(@types/node@18.17.15)(supports-color@8.1.1): - resolution: {integrity: sha512-67DRhRxb7yX2ATm/LPCqqAUkhDSRV7u4ns+HwITuoTWSsbFprgHchXpe+yRocfpt6gtSEmQs0895ne9lDL5tgQ==} + /@rushstack/heft-node-rig@2.6.48(@rushstack/heft@0.68.12)(@types/node@18.17.15)(supports-color@8.1.1): + resolution: {integrity: sha512-j7CHt3GLT2wsv+C4ZUgO9wp1pMTgn4al7bjAHPxOttdzxTBqmodXmFeIywNT9DXO6f2m730dJlUNcqif4T5NcQ==} peerDependencies: '@rushstack/heft': '*' dependencies: - '@microsoft/api-extractor': 7.47.9(@types/node@18.17.15) - '@rushstack/eslint-config': 4.0.2(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2) - '@rushstack/heft': 0.67.2(@types/node@18.17.15) - '@rushstack/heft-api-extractor-plugin': 0.3.49(@rushstack/heft@0.67.2)(@types/node@18.17.15) - '@rushstack/heft-jest-plugin': 0.12.11(@rushstack/heft@0.67.2)(@types/node@18.17.15)(jest-environment-node@29.5.0)(supports-color@8.1.1) - '@rushstack/heft-lint-plugin': 0.4.3(@rushstack/heft@0.67.2)(@types/node@18.17.15) - '@rushstack/heft-typescript-plugin': 0.5.27(@rushstack/heft@0.67.2)(@types/node@18.17.15) + '@microsoft/api-extractor': 7.49.0(@types/node@18.17.15) + '@rushstack/eslint-config': 4.1.1(eslint@8.57.0)(supports-color@8.1.1)(typescript@5.4.2) + '@rushstack/heft': 0.68.12(@types/node@18.17.15) + '@rushstack/heft-api-extractor-plugin': 0.3.62(@rushstack/heft@0.68.12)(@types/node@18.17.15) + '@rushstack/heft-jest-plugin': 0.14.2(@rushstack/heft@0.68.12)(@types/node@18.17.15)(jest-environment-node@29.5.0)(supports-color@8.1.1) + '@rushstack/heft-lint-plugin': 0.5.11(@rushstack/heft@0.68.12)(@types/node@18.17.15) + '@rushstack/heft-typescript-plugin': 0.6.5(@rushstack/heft@0.68.12)(@types/node@18.17.15) '@types/heft-jest': 1.0.1 eslint: 8.57.0(supports-color@8.1.1) jest-environment-node: 29.5.0 @@ -10787,14 +10893,14 @@ packages: - ts-node dev: true - /@rushstack/heft-typescript-plugin@0.5.27(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15): - resolution: {integrity: sha512-8Z06Uq3O/5lrQj1Avig5Uu9Yuvt/uFU0YlD5X/X+H2r+eqgrP1ubay73pSOHq1685COJjnUOGJh454abJkW+Zw==} + /@rushstack/heft-typescript-plugin@0.6.5(@rushstack/heft@..+..+apps+heft)(@types/node@18.17.15): + resolution: {integrity: sha512-Ocp/iRpzRJFzzSnxMfv7iUVfQR9QeN9A87G4Sj9b/ycBFnuE6e0oB0Hz3Y4sSaWqW20nEBby+50j7ErKF+8TUw==} peerDependencies: '@rushstack/heft': '*' dependencies: '@rushstack/heft': link:../../../apps/heft - '@rushstack/heft-config-file': 0.15.7(@types/node@18.17.15) - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) + '@rushstack/heft-config-file': 0.16.2(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) '@types/tapable': 1.0.6 semver: 7.5.4 tapable: 1.1.3 @@ -10802,14 +10908,14 @@ packages: - '@types/node' dev: true - /@rushstack/heft-typescript-plugin@0.5.27(@rushstack/heft@0.67.2)(@types/node@18.17.15): - resolution: {integrity: sha512-8Z06Uq3O/5lrQj1Avig5Uu9Yuvt/uFU0YlD5X/X+H2r+eqgrP1ubay73pSOHq1685COJjnUOGJh454abJkW+Zw==} + /@rushstack/heft-typescript-plugin@0.6.5(@rushstack/heft@0.68.12)(@types/node@18.17.15): + resolution: {integrity: sha512-Ocp/iRpzRJFzzSnxMfv7iUVfQR9QeN9A87G4Sj9b/ycBFnuE6e0oB0Hz3Y4sSaWqW20nEBby+50j7ErKF+8TUw==} peerDependencies: '@rushstack/heft': '*' dependencies: - '@rushstack/heft': 0.67.2(@types/node@18.17.15) - '@rushstack/heft-config-file': 0.15.7(@types/node@18.17.15) - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) + '@rushstack/heft': 0.68.12(@types/node@18.17.15) + '@rushstack/heft-config-file': 0.16.2(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) '@types/tapable': 1.0.6 semver: 7.5.4 tapable: 1.1.3 @@ -10817,23 +10923,22 @@ packages: - '@types/node' dev: true - /@rushstack/heft@0.67.2(@types/node@18.17.15): - resolution: {integrity: sha512-Lf+tdOdi5sWF18PLI1sjo83ywl7l+sVTmCzO9qnTZyF2PdbD1ajsWJZFJhk6OL5KKik/Qn61qKgJf/BLhzJl+g==} + /@rushstack/heft@0.68.12(@types/node@18.17.15): + resolution: {integrity: sha512-JPwNtpOYZeZg7lswWuaeXZPWPfhL3L2IDNA8knq93NUrHaTalFx9Mwpx5fAqCnvUKXesuqTw1d8DzwI12Y4sRQ==} engines: {node: '>=10.13.0'} hasBin: true dependencies: - '@rushstack/heft-config-file': 0.15.7(@types/node@18.17.15) - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) - '@rushstack/operation-graph': 0.2.33(@types/node@18.17.15) + '@rushstack/heft-config-file': 0.16.2(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) + '@rushstack/operation-graph': 0.2.35(@types/node@18.17.15) '@rushstack/rig-package': 0.5.3 - '@rushstack/terminal': 0.14.2(@types/node@18.17.15) - '@rushstack/ts-command-line': 4.22.8(@types/node@18.17.15) + '@rushstack/terminal': 0.14.4(@types/node@18.17.15) + '@rushstack/ts-command-line': 4.23.2(@types/node@18.17.15) '@types/tapable': 1.0.6 fast-glob: 3.3.2 git-repo-info: 2.1.1 ignore: 5.1.9 tapable: 1.1.3 - true-case-path: 2.2.1 watchpack: 2.4.0 transitivePeerDependencies: - '@types/node' @@ -10856,8 +10961,8 @@ packages: semver: 7.5.4 z-schema: 5.0.6 - /@rushstack/node-core-library@5.9.0(@types/node@18.17.15): - resolution: {integrity: sha512-MMsshEWkTbXqxqFxD4gcIUWQOCeBChlGczdZbHfqmNZQFLHB3yWxDFSMHFUdu2/OB9NUk7Awn5qRL+rws4HQNg==} + /@rushstack/node-core-library@5.10.1(@types/node@18.17.15): + resolution: {integrity: sha512-BSb/KcyBHmUQwINrgtzo6jiH0HlGFmrUy33vO6unmceuVKTEyL2q+P0fQq2oB5hvXVWOEUhxB2QvlkZluvUEmg==} peerDependencies: '@types/node': '*' peerDependenciesMeta: @@ -10875,16 +10980,16 @@ packages: semver: 7.5.4 dev: true - /@rushstack/operation-graph@0.2.33(@types/node@18.17.15): - resolution: {integrity: sha512-bokTOAt8jNAMiMZuMs83GXK4GkfAVbj3mx7g0hYuyqTVw7M/EgJO7eL2S/WjqyLxljwHL3cesXSY+csvhbbggA==} + /@rushstack/operation-graph@0.2.35(@types/node@18.17.15): + resolution: {integrity: sha512-J/aNzpvQ+/9mecSt75FqYJR/LUyT3iXRL/Cs4bnA/OOqmF9520XX4MZo/uQTLc1HI9Y0FaEIU8+XqfYpSP5e9A==} peerDependencies: '@types/node': '*' peerDependenciesMeta: '@types/node': optional: true dependencies: - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) - '@rushstack/terminal': 0.14.2(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) + '@rushstack/terminal': 0.14.4(@types/node@18.17.15) '@types/node': 18.17.15 dev: true @@ -10910,15 +11015,15 @@ packages: - '@types/node' - webpack - /@rushstack/terminal@0.14.2(@types/node@18.17.15): - resolution: {integrity: sha512-2fC1wqu1VCExKC0/L+0noVcFQEXEnoBOtCIex1TOjBzEDWcw8KzJjjj7aTP6mLxepG0XIyn9OufeFb6SFsa+sg==} + /@rushstack/terminal@0.14.4(@types/node@18.17.15): + resolution: {integrity: sha512-NxACqERW0PHq8Rpq1V6v5iTHEwkRGxenjEW+VWqRYQ8T9puUzgmGHmEZUaUEDHAe9Qyvp0/Ew04sAiQw9XjhJg==} peerDependencies: '@types/node': '*' peerDependenciesMeta: '@types/node': optional: true dependencies: - '@rushstack/node-core-library': 5.9.0(@types/node@18.17.15) + '@rushstack/node-core-library': 5.10.1(@types/node@18.17.15) '@types/node': 18.17.15 supports-color: 8.1.1 dev: true @@ -10927,10 +11032,10 @@ packages: resolution: {integrity: sha512-9uROnkiHWsQqxW6HirXABfTRlgzhYp6tevbYIGkwKQ09VaayUBkvFvt/urDKMwlo+tGU0iQQLuVige6c48wTgw==} dev: true - /@rushstack/ts-command-line@4.22.8(@types/node@18.17.15): - resolution: {integrity: sha512-XbFjOoV7qZHJnSuFUHv0pKaFA4ixyCuki+xMjsMfDwfvQjs5MYG0IK5COal3tRnG7KCDe2l/G+9LrzYE/RJhgg==} + /@rushstack/ts-command-line@4.23.2(@types/node@18.17.15): + resolution: {integrity: sha512-JJ7XZX5K3ThBBva38aomgsPv1L7FV6XmSOcR6HtM7HDFZJkepqT65imw26h9ggGqMjsY0R9jcl30tzKcVj9aOQ==} dependencies: - '@rushstack/terminal': 0.14.2(@types/node@18.17.15) + '@rushstack/terminal': 0.14.4(@types/node@18.17.15) '@types/argparse': 1.0.38 argparse: 1.0.10 string-argv: 0.3.2 @@ -12918,8 +13023,8 @@ packages: resolution: {integrity: sha512-XIpxU6Qdvp1ZE6Kr3yrkv1qgUab0fyf4mHYvW8N3Bx3PCsbN6or1q9/q72cv5jIFWolaGH08U9XyYoLLIykyKQ==} dev: true - /@types/eslint@8.2.0: - resolution: {integrity: sha512-74hbvsnc+7TEDa1z5YLSe4/q8hGYB3USNvCuzHUJrjPV6hXaq8IXcngCrHkuvFt0+8rFz7xYXrHgNayIX0UZvQ==} + /@types/eslint@8.56.10: + resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==} dependencies: '@types/estree': 1.0.5 '@types/json-schema': 7.0.15 @@ -13125,6 +13230,7 @@ packages: dependencies: '@types/node': 20.12.12 form-data: 3.0.1 + dev: true /@types/node-forge@1.0.4: resolution: {integrity: sha512-UpX8LTRrarEZPQvQqF5/6KQAqZolOVckH7txWdlsWIJrhBFFtwEUTcqeDouhrJl6t0F7Wg5cyUOAqqF8a6hheg==} @@ -13328,12 +13434,6 @@ packages: /@types/tough-cookie@4.0.5: resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} - /@types/tunnel@0.0.3: - resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} - dependencies: - '@types/node': 17.0.41 - dev: false - /@types/uglify-js@3.17.5: resolution: {integrity: sha512-TU+fZFBTBcXj/GpDpDaBmgWk/gn96kMZ+uocaFUlV2f8a6WdMzzI44QBCmGcCiYR0Y6ZlNRiyUyKKt5nl/lbzQ==} dependencies: @@ -18292,6 +18392,13 @@ packages: dependencies: '@microsoft/tsdoc': 0.15.0 '@microsoft/tsdoc-config': 0.17.0 + dev: true + + /eslint-plugin-tsdoc@0.4.0: + resolution: {integrity: sha512-MT/8b4aKLdDClnS8mP3R/JNjg29i0Oyqd/0ym6NnQf+gfKbJJ4ZcSh2Bs1H0YiUMTBwww5JwXGTWot/RwyJ7aQ==} + dependencies: + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 /eslint-scope@4.0.3: resolution: {integrity: sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==} @@ -18940,6 +19047,13 @@ packages: strnum: 1.0.5 dev: true + /fast-xml-parser@4.5.0: + resolution: {integrity: sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==} + hasBin: true + dependencies: + strnum: 1.0.5 + dev: false + /fastify-error@0.3.1: resolution: {integrity: sha512-oCfpcsDndgnDVgiI7bwFKAun2dO+4h84vBlkWsWnz/OUK9Reff5UFoFl241xTiLeHWX/vU9zkDVXqYUxjOwHcQ==} dev: false @@ -19286,6 +19400,7 @@ packages: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 + dev: true /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} @@ -19345,6 +19460,14 @@ packages: universalify: 2.0.1 dev: true + /fs-extra@11.3.0: + resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + /fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -21637,7 +21760,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 17.0.41 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -21679,7 +21802,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.12.12 + '@types/node': 17.0.41 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -21696,7 +21819,7 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.12.12 + '@types/node': 17.0.41 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -21846,6 +21969,10 @@ packages: - supports-color - utf-8-validate + /jsep@1.4.0: + resolution: {integrity: sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==} + engines: {node: '>= 10.16.0'} + /jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true @@ -21904,11 +22031,15 @@ packages: universalify: 2.0.1 optionalDependencies: graceful-fs: 4.2.11 - dev: true - /jsonpath-plus@4.0.0: - resolution: {integrity: sha512-e0Jtg4KAzDJKKwzbLaUtinCn0RZseWBVRTRGihSpvFlM3wTR7ExSp+PTdeTsDrLNJUe7L7JYJe8mblHX5SCT6A==} - engines: {node: '>=10.0'} + /jsonpath-plus@10.2.0: + resolution: {integrity: sha512-T9V+8iNYKFL2n2rF+w02LBOT2JjDnTjioaNFrxRy0Bv1y/hNsqR/EBK7Ojy2ythRHwmz2cRIls+9JitQGZC/sw==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + '@jsep-plugin/assignment': 1.3.0(jsep@1.4.0) + '@jsep-plugin/regex': 1.0.4(jsep@1.4.0) + jsep: 1.4.0 /jsonschema@1.4.1: resolution: {integrity: sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==} @@ -23022,6 +23153,7 @@ packages: optional: true dependencies: whatwg-url: 5.0.0 + dev: true /node-forge@1.3.1: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} @@ -26645,7 +26777,6 @@ packages: /strnum@1.0.5: resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} - dev: true /style-loader@1.3.0(webpack@4.47.0): resolution: {integrity: sha512-V7TCORko8rs9rIqkSrlMfkqA63DfoGBBJmK1kKGCcSi+BWb4cqz0SRsnp4l6rU5iwOEd0/2ePv68SV22VXon4Q==} @@ -27094,6 +27225,7 @@ packages: /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + dev: true /tr46@3.0.0: resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} @@ -27133,6 +27265,7 @@ packages: /true-case-path@2.2.1: resolution: {integrity: sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q==} + dev: false /ts-api-utils@1.3.0(typescript@4.9.5): resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} @@ -27354,6 +27487,7 @@ packages: /tunnel@0.0.6: resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} + dev: true /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} @@ -27477,6 +27611,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + /typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + engines: {node: '>=14.17'} + hasBin: true + /uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: true @@ -27634,7 +27773,6 @@ packages: /universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} - dev: true /unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} @@ -28035,6 +28173,7 @@ packages: /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + dev: true /webidl-conversions@7.0.0: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} @@ -28463,6 +28602,7 @@ packages: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 + dev: true /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -28708,14 +28848,6 @@ packages: xmlbuilder: 11.0.1 dev: true - /xml2js@0.5.0: - resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==} - engines: {node: '>=4.0.0'} - dependencies: - sax: 1.3.0 - xmlbuilder: 11.0.1 - dev: false - /xml2js@0.6.2: resolution: {integrity: sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==} engines: {node: '>=4.0.0'} @@ -28731,6 +28863,7 @@ packages: /xmlbuilder@11.0.1: resolution: {integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==} engines: {node: '>=4.0'} + dev: true /xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} diff --git a/common/config/subspaces/default/repo-state.json b/common/config/subspaces/default/repo-state.json index 70786e90e01..b0d778f0df8 100644 --- a/common/config/subspaces/default/repo-state.json +++ b/common/config/subspaces/default/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "5afee1d392a0c2404869d7eda687b5571fe88515", + "pnpmShrinkwrapHash": "b3cfbd225a2425647bf5ca7739f1dce1a71410ea", "preferredVersionsHash": "ce857ea0536b894ec8f346aaea08cfd85a5af648" } diff --git a/common/reviews/api/heft-config-file.api.md b/common/reviews/api/heft-config-file.api.md index 24dd86b64a8..d508fb1419a 100644 --- a/common/reviews/api/heft-config-file.api.md +++ b/common/reviews/api/heft-config-file.api.md @@ -7,44 +7,50 @@ import type { IRigConfig } from '@rushstack/rig-package'; import type { ITerminal } from '@rushstack/terminal'; +// @beta @deprecated (undocumented) +export const ConfigurationFile: typeof ProjectConfigurationFile; + +// @beta @deprecated (undocumented) +export type ConfigurationFile = ProjectConfigurationFile; + // @beta (undocumented) -export class ConfigurationFile { - constructor(options: IConfigurationFileOptions); +export abstract class ConfigurationFileBase { + constructor(options: IConfigurationFileOptions); // @internal (undocumented) static _formatPathForLogging: (path: string) => string; getObjectSourceFilePath(obj: TObject): string | undefined; getPropertyOriginalValue(options: IOriginalValueOptions): TValue | undefined; - loadConfigurationFileForProject(terminal: ITerminal, projectPath: string, rigConfig?: IRigConfig): TConfigurationFile; - loadConfigurationFileForProjectAsync(terminal: ITerminal, projectPath: string, rigConfig?: IRigConfig): Promise; - readonly projectRelativeFilePath: string; - tryLoadConfigurationFileForProject(terminal: ITerminal, projectPath: string, rigConfig?: IRigConfig): TConfigurationFile | undefined; - tryLoadConfigurationFileForProjectAsync(terminal: ITerminal, projectPath: string, rigConfig?: IRigConfig): Promise; + // (undocumented) + protected _loadConfigurationFileInnerWithCache(terminal: ITerminal, resolvedConfigurationFilePath: string, visitedConfigurationFilePaths: Set, rigConfig: IRigConfig | undefined): TConfigurationFile; + // (undocumented) + protected _loadConfigurationFileInnerWithCacheAsync(terminal: ITerminal, resolvedConfigurationFilePath: string, visitedConfigurationFilePaths: Set, rigConfig: IRigConfig | undefined): Promise; + // (undocumented) + protected abstract _tryLoadConfigurationFileInRig(terminal: ITerminal, rigConfig: IRigConfig, visitedConfigurationFilePaths: Set): TConfigurationFile | undefined; + // (undocumented) + protected abstract _tryLoadConfigurationFileInRigAsync(terminal: ITerminal, rigConfig: IRigConfig, visitedConfigurationFilePaths: Set): Promise; } // @beta (undocumented) -export type IConfigurationFileOptions = IConfigurationFileOptionsWithJsonSchemaFilePath | IConfigurationFileOptionsWithJsonSchemaObject; +export type IConfigurationFileOptions = IConfigurationFileOptionsWithJsonSchemaFilePath | IConfigurationFileOptionsWithJsonSchemaObject; // @beta (undocumented) export interface IConfigurationFileOptionsBase { jsonPathMetadata?: IJsonPathsMetadata; - projectRelativeFilePath: string; propertyInheritance?: IPropertiesInheritance; propertyInheritanceDefaults?: IPropertyInheritanceDefaults; } // @beta (undocumented) -export interface IConfigurationFileOptionsWithJsonSchemaFilePath extends IConfigurationFileOptionsBase { - // (undocumented) - jsonSchemaObject?: never; +export type IConfigurationFileOptionsWithJsonSchemaFilePath = IConfigurationFileOptionsBase & TExtraOptions & { jsonSchemaPath: string; -} + jsonSchemaObject?: never; +}; // @beta (undocumented) -export interface IConfigurationFileOptionsWithJsonSchemaObject extends IConfigurationFileOptionsBase { +export type IConfigurationFileOptionsWithJsonSchemaObject = IConfigurationFileOptionsBase & TExtraOptions & { jsonSchemaObject: object; - // (undocumented) jsonSchemaPath?: never; -} +}; // @beta export interface ICustomJsonPathMetadata { @@ -95,6 +101,11 @@ export interface IOriginalValueOptions { propertyName: keyof TParentProperty; } +// @beta (undocumented) +export interface IProjectConfigurationFileOptions { + projectRelativeFilePath: string; +} + // @beta (undocumented) export type IPropertiesInheritance = { [propertyName in keyof TConfigurationFile]?: IPropertyInheritance | ICustomPropertyInheritance; @@ -114,6 +125,18 @@ export interface IPropertyInheritanceDefaults { object?: IPropertyInheritance; } +// @beta (undocumented) +export class NonProjectConfigurationFile extends ConfigurationFileBase { + loadConfigurationFile(terminal: ITerminal, filePath: string): TConfigurationFile; + loadConfigurationFileAsync(terminal: ITerminal, filePath: string): Promise; + tryLoadConfigurationFile(terminal: ITerminal, filePath: string): TConfigurationFile | undefined; + tryLoadConfigurationFileAsync(terminal: ITerminal, filePath: string): Promise; + // (undocumented) + protected _tryLoadConfigurationFileInRig(terminal: ITerminal, rigConfig: IRigConfig, visitedConfigurationFilePaths: Set): TConfigurationFile | undefined; + // (undocumented) + protected _tryLoadConfigurationFileInRigAsync(terminal: ITerminal, rigConfig: IRigConfig, visitedConfigurationFilePaths: Set): Promise; +} + // @beta (undocumented) export enum PathResolutionMethod { custom = "custom", @@ -124,7 +147,30 @@ export enum PathResolutionMethod { resolvePathRelativeToProjectRoot = "resolvePathRelativeToProjectRoot" } +// @beta (undocumented) +export class ProjectConfigurationFile extends ConfigurationFileBase { + constructor(options: IConfigurationFileOptions); + loadConfigurationFileForProject(terminal: ITerminal, projectPath: string, rigConfig?: IRigConfig): TConfigurationFile; + loadConfigurationFileForProjectAsync(terminal: ITerminal, projectPath: string, rigConfig?: IRigConfig): Promise; + readonly projectRelativeFilePath: string; + tryLoadConfigurationFileForProject(terminal: ITerminal, projectPath: string, rigConfig?: IRigConfig): TConfigurationFile | undefined; + tryLoadConfigurationFileForProjectAsync(terminal: ITerminal, projectPath: string, rigConfig?: IRigConfig): Promise; + // (undocumented) + protected _tryLoadConfigurationFileInRig(terminal: ITerminal, rigConfig: IRigConfig, visitedConfigurationFilePaths: Set): TConfigurationFile | undefined; + // (undocumented) + protected _tryLoadConfigurationFileInRigAsync(terminal: ITerminal, rigConfig: IRigConfig, visitedConfigurationFilePaths: Set): Promise; +} + // @beta (undocumented) export type PropertyInheritanceCustomFunction = (currentObject: TObject, parentObject: TObject) => TObject; +// @beta +function stripAnnotations(obj: TObject): TObject; + +declare namespace TestUtilities { + export { + stripAnnotations + } +} + ``` diff --git a/common/reviews/api/heft-typescript-plugin.api.md b/common/reviews/api/heft-typescript-plugin.api.md index 50b95f9b678..c66a92da0ed 100644 --- a/common/reviews/api/heft-typescript-plugin.api.md +++ b/common/reviews/api/heft-typescript-plugin.api.md @@ -55,6 +55,7 @@ export interface ITypeScriptConfigurationJson { buildProjectReferences?: boolean; emitCjsExtensionForCommonJS?: boolean | undefined; emitMjsExtensionForESModule?: boolean | undefined; + onlyResolveSymlinksInNodeModules?: boolean; // (undocumented) project?: string; staticAssetsToCopy?: IStaticAssetsCopyConfiguration; diff --git a/common/reviews/api/lookup-by-path.api.md b/common/reviews/api/lookup-by-path.api.md index 1d779056878..694afe0e223 100644 --- a/common/reviews/api/lookup-by-path.api.md +++ b/common/reviews/api/lookup-by-path.api.md @@ -5,23 +5,43 @@ ```ts // @beta -export interface IPrefixMatch { +export interface IPrefixMatch { index: number; lastMatch?: IPrefixMatch; value: TItem; } // @beta -export class LookupByPath { +export interface IReadonlyLookupByPath extends Iterable<[string, TItem]> { + [Symbol.iterator](query?: string, delimiter?: string): IterableIterator<[string, TItem]>; + entries(query?: string, delimiter?: string): IterableIterator<[string, TItem]>; + findChildPath(childPath: string, delimiter?: string): TItem | undefined; + findChildPathFromSegments(childPathSegments: Iterable): TItem | undefined; + findLongestPrefixMatch(query: string, delimiter?: string): IPrefixMatch | undefined; + get(query: string, delimiter?: string): TItem | undefined; + groupByChild(infoByPath: Map, delimiter?: string): Map>; + has(query: string, delimiter?: string): boolean; + get size(): number; +} + +// @beta +export class LookupByPath implements IReadonlyLookupByPath { + [Symbol.iterator](query?: string, delimiter?: string): IterableIterator<[string, TItem]>; constructor(entries?: Iterable<[string, TItem]>, delimiter?: string); + clear(): this; + deleteItem(query: string, delimeter?: string): boolean; readonly delimiter: string; - findChildPath(childPath: string): TItem | undefined; + entries(query?: string, delimiter?: string): IterableIterator<[string, TItem]>; + findChildPath(childPath: string, delimiter?: string): TItem | undefined; findChildPathFromSegments(childPathSegments: Iterable): TItem | undefined; - findLongestPrefixMatch(query: string): IPrefixMatch | undefined; - groupByChild(infoByPath: Map): Map>; + findLongestPrefixMatch(query: string, delimiter?: string): IPrefixMatch | undefined; + get(key: string, delimiter?: string): TItem | undefined; + groupByChild(infoByPath: Map, delimiter?: string): Map>; + has(key: string, delimiter?: string): boolean; static iteratePathSegments(serializedPath: string, delimiter?: string): Iterable; - setItem(serializedPath: string, value: TItem): this; + setItem(serializedPath: string, value: TItem, delimiter?: string): this; setItemFromSegments(pathSegments: Iterable, value: TItem): this; + get size(): number; } ``` diff --git a/common/reviews/api/module-minifier.api.md b/common/reviews/api/module-minifier.api.md index a412088ee68..b74aba5638a 100644 --- a/common/reviews/api/module-minifier.api.md +++ b/common/reviews/api/module-minifier.api.md @@ -8,6 +8,7 @@ import { MinifyOptions } from 'terser'; import type { RawSourceMap } from 'source-map'; +import type { ResourceLimits } from 'worker_threads'; import type * as WorkerThreads from 'worker_threads'; // @public @@ -79,6 +80,7 @@ export interface IWorkerPoolMinifierOptions { maxThreads?: number; terserOptions?: MinifyOptions; verbose?: boolean; + workerResourceLimits?: ResourceLimits; } // @public diff --git a/common/reviews/api/node-core-library.api.md b/common/reviews/api/node-core-library.api.md index a11e5a042da..f1e2a9d0e93 100644 --- a/common/reviews/api/node-core-library.api.md +++ b/common/reviews/api/node-core-library.api.md @@ -7,7 +7,8 @@ /// import * as child_process from 'child_process'; -import * as fs from 'fs'; +import * as nodeFs from 'fs'; +import * as nodePath from 'path'; // @public export enum AlreadyExistsBehavior { @@ -213,7 +214,7 @@ export type FileSystemCopyFilesAsyncFilter = (sourcePath: string, destinationPat export type FileSystemCopyFilesFilter = (sourcePath: string, destinationPath: string) => boolean; // @public -export type FileSystemStats = fs.Stats; +export type FileSystemStats = nodeFs.Stats; // @public export class FileWriter { @@ -231,7 +232,7 @@ export const FolderConstants: { }; // @public -export type FolderItem = fs.Dirent; +export type FolderItem = nodeFs.Dirent; // @public export interface IAsyncParallelismOptions { @@ -605,13 +606,18 @@ export interface IReadLinesFromIterableOptions { ignoreEmptyLines?: boolean; } -// @public (undocumented) -export interface IRunWithRetriesOptions { +// @public +export interface IRealNodeModulePathResolverOptions { // (undocumented) - action: () => Promise | TResult; + fs?: Partial>; // (undocumented) + path?: Partial>; +} + +// @public (undocumented) +export interface IRunWithRetriesOptions { + action: (retryCount: number) => Promise | TResult; maxRetries: number; - // (undocumented) retryDelayMs?: number; } @@ -834,6 +840,13 @@ export class ProtectableMap { get size(): number; } +// @public +export class RealNodeModulePathResolver { + constructor(options?: IRealNodeModulePathResolverOptions); + clearCache(): void; + readonly realNodeModulePath: (input: string) => string; +} + // @public export class Sort { static compareByValue(x: any, y: any): number; diff --git a/common/reviews/api/package-deps-hash.api.md b/common/reviews/api/package-deps-hash.api.md index 1a7df0094e4..e6fd75084d2 100644 --- a/common/reviews/api/package-deps-hash.api.md +++ b/common/reviews/api/package-deps-hash.api.md @@ -20,7 +20,7 @@ export function getRepoChanges(currentWorkingDirectory: string, revision?: strin export function getRepoRoot(currentWorkingDirectory: string, gitPath?: string): string; // @beta -export function getRepoStateAsync(rootDirectory: string, additionalRelativePathsToHash?: string[], gitPath?: string): Promise>; +export function getRepoStateAsync(rootDirectory: string, additionalRelativePathsToHash?: string[], gitPath?: string, filterPath?: string[]): Promise>; // @beta export function hashFilesAsync(rootDirectory: string, filesToHash: Iterable | AsyncIterable, gitPath?: string): Promise>; diff --git a/common/reviews/api/real-node-module-path.api.md b/common/reviews/api/real-node-module-path.api.md new file mode 100644 index 00000000000..751844943b5 --- /dev/null +++ b/common/reviews/api/real-node-module-path.api.md @@ -0,0 +1,17 @@ +## API Report File for "@rushstack/real-node-module-path" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +/// + +// @public +export function clearCache(): void; + +// @public +export const realNodeModulePath: (input: string) => string; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/common/reviews/api/rush-amazon-s3-build-cache-plugin.api.md b/common/reviews/api/rush-amazon-s3-build-cache-plugin.api.md index af43e1c9946..e0d5fe032ad 100644 --- a/common/reviews/api/rush-amazon-s3-build-cache-plugin.api.md +++ b/common/reviews/api/rush-amazon-s3-build-cache-plugin.api.md @@ -6,11 +6,11 @@ /// -import * as fetch from 'node-fetch'; import type { IRushPlugin } from '@rushstack/rush-sdk'; import { ITerminal } from '@rushstack/terminal'; import type { RushConfiguration } from '@rushstack/rush-sdk'; import type { RushSession } from '@rushstack/rush-sdk'; +import { WebClient } from '@rushstack/rush-sdk/lib/utilities/WebClient'; // @public export class AmazonS3Client { @@ -61,22 +61,6 @@ export interface IAmazonS3Credentials { sessionToken: string | undefined; } -// Warning: (ae-forgotten-export) The symbol "IWebFetchOptionsBase" needs to be exported by the entry point index.d.ts -// -// @public -export interface IGetFetchOptions extends IWebFetchOptionsBase { - // (undocumented) - verb: 'GET' | never; -} - -// @public -export interface IPutFetchOptions extends IWebFetchOptionsBase { - // (undocumented) - body?: Buffer; - // (undocumented) - verb: 'PUT'; -} - // @public (undocumented) class RushAmazonS3BuildCachePlugin implements IRushPlugin { // (undocumented) @@ -86,30 +70,6 @@ class RushAmazonS3BuildCachePlugin implements IRushPlugin { } export default RushAmazonS3BuildCachePlugin; -// @public -export class WebClient { - constructor(); - // (undocumented) - accept: string | undefined; - // (undocumented) - addBasicAuthHeader(userName: string, password: string): void; - // (undocumented) - fetchAsync(url: string, options?: IGetFetchOptions | IPutFetchOptions): Promise; - // (undocumented) - static mergeHeaders(target: fetch.Headers, source: fetch.Headers): void; - // Warning: (ae-forgotten-export) The symbol "WebClientProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - proxy: WebClientProxy; - // (undocumented) - readonly standardHeaders: fetch.Headers; - // (undocumented) - userAgent: string | undefined; -} - -// @public -export type WebClientResponse = fetch.Response; - // (No @packageDocumentation comment for this package) ``` diff --git a/common/reviews/api/rush-azure-storage-build-cache-plugin.api.md b/common/reviews/api/rush-azure-storage-build-cache-plugin.api.md index 5b39e0eee40..5237a79fced 100644 --- a/common/reviews/api/rush-azure-storage-build-cache-plugin.api.md +++ b/common/reviews/api/rush-azure-storage-build-cache-plugin.api.md @@ -47,7 +47,7 @@ export abstract class AzureAuthenticationBase { tryGetCachedCredentialAsync(options: ITryGetCachedCredentialOptionsLogWarning): Promise; // (undocumented) updateCachedCredentialAsync(terminal: ITerminal, credential: string): Promise; - updateCachedCredentialInteractiveAsync(terminal: ITerminal, onlyIfExistingCredentialExpiresAfter?: Date): Promise; + updateCachedCredentialInteractiveAsync(terminal: ITerminal, onlyIfExistingCredentialExpiresBefore?: Date): Promise; } // @public (undocumented) diff --git a/common/reviews/api/rush-lib.api.md b/common/reviews/api/rush-lib.api.md index 005423e2727..5ead502d072 100644 --- a/common/reviews/api/rush-lib.api.md +++ b/common/reviews/api/rush-lib.api.md @@ -66,6 +66,7 @@ export class ApprovedPackagesPolicy { // @beta export class BuildCacheConfiguration { readonly buildCacheEnabled: boolean; + readonly cacheHashSalt: string | undefined; cacheWriteEnabled: boolean; readonly cloudCacheProvider: ICloudBuildCacheProvider | undefined; static getBuildCacheConfigFilePath(rushConfiguration: RushConfiguration): string; @@ -330,6 +331,9 @@ export class _FlagFile { // @beta export type GetCacheEntryIdFunction = (options: IGenerateCacheEntryIdOptions) => string; +// @beta +export type GetInputsSnapshotAsyncFn = () => Promise; + // @internal (undocumented) export interface _IBuiltInPluginConfiguration extends _IRushPluginConfigurationBase { // (undocumented) @@ -462,7 +466,7 @@ export interface IEnvironmentConfigurationInitializeOptions { // @alpha export interface IExecuteOperationsContext extends ICreateOperationsContext { - readonly projectChangeAnalyzer: ProjectChangeAnalyzer; + readonly inputsSnapshot?: IInputsSnapshot; } // @alpha @@ -477,6 +481,8 @@ export interface IExperimentsJson { buildCacheWithAllowWarningsInSuccessfulBuild?: boolean; buildSkipWithAllowWarningsInSuccessfulBuild?: boolean; cleanInstallAfterNpmrcChanges?: boolean; + enableSubpathScan?: boolean; + exemptDecoupledDependenciesBetweenSubspaces?: boolean; forbidPhantomResolvableNodeModulesFolders?: boolean; generateProjectImpactGraphDuringRushUpdate?: boolean; noChmodFieldInTarHeaderNormalization?: boolean; @@ -521,6 +527,14 @@ export interface IGetChangedProjectsOptions { export interface IGlobalCommand extends IRushCommand { } +// @beta +export interface IInputsSnapshot { + getOperationOwnStateHash(project: IRushConfigurationProjectForSnapshot, operationName?: string): string; + getTrackedFileHashesForOperation(project: IRushConfigurationProjectForSnapshot, operationName?: string): ReadonlyMap; + readonly hashes: ReadonlyMap; + readonly rootDirectory: string; +} + // @public export interface ILaunchOptions { alreadyReportedNodeTooNewError?: boolean; @@ -570,8 +584,10 @@ export interface IOperationExecutionResult { readonly cobuildRunnerId: string | undefined; readonly error: Error | undefined; readonly logFilePaths: ILogFilePaths | undefined; + readonly metadataFolderPath: string | undefined; readonly nonCachedDurationMs: number | undefined; readonly operation: Operation; + readonly silent: boolean; readonly status: OperationStatus; readonly stdioSummarizer: StdioSummarizer; readonly stopwatch: IStopwatchResult; @@ -713,6 +729,7 @@ export interface _IPnpmOptionsJson extends IPackageManagerOptionsJsonBase { alwaysInjectDependenciesFromOtherSubspaces?: boolean; autoInstallPeers?: boolean; globalAllowedDeprecatedVersions?: Record; + globalIgnoredOptionalDependencies?: string[]; globalNeverBuiltDependencies?: string[]; globalOverrides?: Record; globalPackageExtensions?: Record; @@ -759,16 +776,6 @@ export interface IPnpmPeerDependencyRules { export { IPrefixMatch } -// @internal (undocumented) -export interface _IRawRepoState { - // (undocumented) - projectState: Map> | undefined; - // (undocumented) - rawHashes: Map; - // (undocumented) - rootDir: string; -} - // @beta export interface IRushCommand { readonly actionName: string; @@ -798,6 +805,9 @@ export interface IRushCommandLineSpec { actions: IRushCommandLineAction[]; } +// @beta (undocumented) +export type IRushConfigurationProjectForSnapshot = Pick; + // @alpha (undocumented) export interface IRushPhaseSharding { count: number; @@ -877,6 +887,7 @@ export interface ITelemetryOperationResult { nonCachedDurationMs?: number; result: string; startTimestampMs?: number; + wasExecutedOnThisMachine?: boolean; } // @public @@ -924,6 +935,7 @@ export class Operation { readonly consumers: ReadonlySet; deleteDependency(dependency: Operation): void; readonly dependencies: ReadonlySet; + enabled: boolean; get isNoOp(): boolean; logFilenameIdentifier: string; get name(): string | undefined; @@ -937,7 +949,7 @@ export class _OperationMetadataManager { constructor(options: _IOperationMetadataManagerOptions); // (undocumented) readonly logFilenameIdentifier: string; - get relativeFilepaths(): string[]; + get metadataFolderPath(): string; // (undocumented) saveAsync({ durationInSeconds, cobuildContextId, cobuildRunnerId, logPath, errorLogPath, logChunksPath }: _IOperationMetadata): Promise; // (undocumented) @@ -1078,6 +1090,7 @@ export class PnpmOptionsConfiguration extends PackageManagerOptionsConfiguration readonly alwaysInjectDependenciesFromOtherSubspaces: boolean | undefined; readonly autoInstallPeers: boolean | undefined; readonly globalAllowedDeprecatedVersions: Record | undefined; + readonly globalIgnoredOptionalDependencies: string[] | undefined; readonly globalNeverBuiltDependencies: string[] | undefined; readonly globalOverrides: Record | undefined; readonly globalPackageExtensions: Record | undefined; @@ -1113,16 +1126,12 @@ export type PnpmStoreOptions = PnpmStoreLocation; export class ProjectChangeAnalyzer { constructor(rushConfiguration: RushConfiguration); // @internal (undocumented) - _ensureInitializedAsync(terminal: ITerminal): Promise<_IRawRepoState | undefined>; - // (undocumented) _filterProjectDataAsync(project: RushConfigurationProject, unfilteredProjectData: Map, rootDir: string, terminal: ITerminal): Promise>; getChangedProjectsAsync(options: IGetChangedProjectsOptions): Promise>; // (undocumented) protected getChangesByProject(lookup: LookupByPath, changedFiles: Map): Map>; // @internal - _tryGetProjectDependenciesAsync(project: RushConfigurationProject, terminal: ITerminal): Promise | undefined>; - // @internal - _tryGetProjectStateHashAsync(project: RushConfigurationProject, terminal: ITerminal): Promise; + _tryGetSnapshotProviderAsync(projectConfigurations: ReadonlyMap, terminal: ITerminal, projectSelection?: ReadonlySet): Promise; } // @public @@ -1215,6 +1224,7 @@ export class RushConfiguration { readonly gitTagSeparator: string | undefined; readonly gitVersionBumpCommitMessage: string | undefined; readonly hotfixChangeEnabled: boolean; + readonly isPnpm: boolean; static loadFromConfigurationFile(rushJsonFilename: string): RushConfiguration; // (undocumented) static loadFromDefaultLocation(options?: ITryFindRushJsonLocationOptions): RushConfiguration; @@ -1492,7 +1502,7 @@ export class Subspace { // @beta getPackageJsonInjectedDependenciesHash(variant?: string): string | undefined; // @beta - getPnpmConfigFilePath(variant?: string): string; + getPnpmConfigFilePath(): string; // @beta getPnpmfilePath(variant?: string): string; // @beta diff --git a/common/reviews/api/ts-command-line.api.md b/common/reviews/api/ts-command-line.api.md index bbe3fec5cee..e1e38b3fe19 100644 --- a/common/reviews/api/ts-command-line.api.md +++ b/common/reviews/api/ts-command-line.api.md @@ -37,10 +37,10 @@ export abstract class CommandLineAction extends CommandLineParameterProvider { export class CommandLineChoiceListParameter extends CommandLineParameter { // @internal constructor(definition: ICommandLineChoiceListDefinition); - readonly alternatives: ReadonlyArray; + readonly alternatives: ReadonlySet; // @override appendToArgList(argList: string[]): void; - readonly completions: (() => Promise) | undefined; + readonly completions: (() => Promise | ReadonlySet>) | undefined; readonly kind: CommandLineParameterKind.ChoiceList; // @internal _setValue(data: unknown): void; @@ -51,10 +51,10 @@ export class CommandLineChoiceListParameter ext export class CommandLineChoiceParameter extends CommandLineParameter { // @internal constructor(definition: ICommandLineChoiceDefinition); - readonly alternatives: ReadonlyArray; + readonly alternatives: ReadonlySet; // @override appendToArgList(argList: string[]): void; - readonly completions: (() => Promise) | undefined; + readonly completions: (() => Promise | ReadonlySet>) | undefined; readonly defaultValue: TChoice | undefined; // @internal _getSupplementaryNotes(supplementaryNotes: string[]): void; @@ -246,7 +246,7 @@ export abstract class CommandLineParameterWithArgument extends CommandLineParame // @internal constructor(definition: IBaseCommandLineDefinitionWithArgument); readonly argumentName: string; - readonly completions: (() => Promise) | undefined; + readonly completions: (() => Promise | ReadonlySet>) | undefined; } // @public @@ -343,7 +343,7 @@ export interface IBaseCommandLineDefinition { // @public export interface IBaseCommandLineDefinitionWithArgument extends IBaseCommandLineDefinition { argumentName: string; - completions?: () => Promise; + completions?: () => Promise | ReadonlySet>; } // @public @@ -355,15 +355,15 @@ export interface ICommandLineActionOptions { // @public export interface ICommandLineChoiceDefinition extends IBaseCommandLineDefinition { - alternatives: TChoice[]; - completions?: () => Promise; + alternatives: ReadonlyArray | ReadonlySet; + completions?: () => Promise | ReadonlySet>; defaultValue?: TChoice; } // @public export interface ICommandLineChoiceListDefinition extends IBaseCommandLineDefinition { - alternatives: TChoice[]; - completions?: () => Promise; + alternatives: ReadonlyArray | ReadonlySet; + completions?: () => Promise | ReadonlySet>; } // @public diff --git a/common/reviews/api/webpack-workspace-resolve-plugin.api.md b/common/reviews/api/webpack-workspace-resolve-plugin.api.md index cfa818c83ca..ef0216174c9 100644 --- a/common/reviews/api/webpack-workspace-resolve-plugin.api.md +++ b/common/reviews/api/webpack-workspace-resolve-plugin.api.md @@ -41,6 +41,7 @@ export interface IWorkspaceLayoutCacheOptions { // @beta export interface IWorkspaceResolvePluginOptions { cache: WorkspaceLayoutCache; + resolverNames?: Iterable; } // @beta @@ -58,7 +59,7 @@ export class WorkspaceLayoutCache { // @beta export class WorkspaceResolvePlugin implements WebpackPluginInstance { - constructor(cache: WorkspaceLayoutCache); + constructor(options: IWorkspaceResolvePluginOptions); // (undocumented) apply(compiler: Compiler): void; } diff --git a/common/reviews/api/worker-pool.api.md b/common/reviews/api/worker-pool.api.md index 83d458d5576..1b5a387b8d3 100644 --- a/common/reviews/api/worker-pool.api.md +++ b/common/reviews/api/worker-pool.api.md @@ -6,6 +6,7 @@ /// +import { ResourceLimits } from 'worker_threads'; import { Worker } from 'worker_threads'; // Warning: (ae-internal-missing-underscore) The name "IWorkerPoolOptions" should be prefixed with an underscore because the declaration is marked as @internal @@ -17,6 +18,7 @@ export interface IWorkerPoolOptions { onWorkerDestroyed?: () => void; prepareWorker?: (worker: Worker) => void; workerData?: unknown; + workerResourceLimits?: ResourceLimits; workerScriptPath: string; } diff --git a/common/scripts/install-run-rush.js b/common/scripts/install-run-rush.js index 9676fc718f9..20f33d19262 100644 --- a/common/scripts/install-run-rush.js +++ b/common/scripts/install-run-rush.js @@ -16,7 +16,7 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ 657147: +/***/ 179896: /*!*********************!*\ !*** external "fs" ***! \*********************/ @@ -26,7 +26,7 @@ module.exports = require("fs"); /***/ }), -/***/ 371017: +/***/ 16928: /*!***********************!*\ !*** external "path" ***! \***********************/ @@ -111,9 +111,9 @@ var __webpack_exports__ = {}; !*** ./lib-esnext/scripts/install-run-rush.js ***! \************************************************/ __webpack_require__.r(__webpack_exports__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 371017); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 16928); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 657147); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 179896); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. diff --git a/common/scripts/install-run.js b/common/scripts/install-run.js index 9283c445267..96cbd258b91 100644 --- a/common/scripts/install-run.js +++ b/common/scripts/install-run.js @@ -16,7 +16,7 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ 679877: +/***/ 832286: /*!************************************************!*\ !*** ./lib-esnext/utilities/npmrcUtilities.js ***! \************************************************/ @@ -24,12 +24,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "isVariableSetInNpmrcFile": () => (/* binding */ isVariableSetInNpmrcFile), -/* harmony export */ "syncNpmrc": () => (/* binding */ syncNpmrc) +/* harmony export */ isVariableSetInNpmrcFile: () => (/* binding */ isVariableSetInNpmrcFile), +/* harmony export */ syncNpmrc: () => (/* binding */ syncNpmrc), +/* harmony export */ trimNpmrcFileLines: () => (/* binding */ trimNpmrcFileLines) /* harmony export */ }); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs */ 657147); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs */ 179896); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ 371017); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ 16928); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. @@ -46,7 +47,7 @@ __webpack_require__.r(__webpack_exports__); // create a global _combinedNpmrc for cache purpose const _combinedNpmrcMap = new Map(); function _trimNpmrcFile(options) { - const { sourceNpmrcPath, linesToPrepend, linesToAppend } = options; + const { sourceNpmrcPath, linesToPrepend, linesToAppend, supportEnvVarFallbackSyntax } = options; const combinedNpmrcFromCache = _combinedNpmrcMap.get(sourceNpmrcPath); if (combinedNpmrcFromCache !== undefined) { return combinedNpmrcFromCache; @@ -62,6 +63,21 @@ function _trimNpmrcFile(options) { npmrcFileLines.push(...linesToAppend); } npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim()); + const resultLines = trimNpmrcFileLines(npmrcFileLines, process.env, supportEnvVarFallbackSyntax); + const combinedNpmrc = resultLines.join('\n'); + //save the cache + _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); + return combinedNpmrc; +} +/** + * + * @param npmrcFileLines The npmrc file's lines + * @param env The environment variables object + * @param supportEnvVarFallbackSyntax Whether to support fallback values in the form of `${VAR_NAME:-fallback}` + * @returns + */ +function trimNpmrcFileLines(npmrcFileLines, env, supportEnvVarFallbackSyntax) { + var _a; const resultLines = []; // This finds environment variable tokens that look like "${VAR_NAME}" const expansionRegExp = /\$\{([^\}]+)\}/g; @@ -80,10 +96,35 @@ function _trimNpmrcFile(options) { const environmentVariables = line.match(expansionRegExp); if (environmentVariables) { for (const token of environmentVariables) { - // Remove the leading "${" and the trailing "}" from the token - const environmentVariableName = token.substring(2, token.length - 1); - // Is the environment variable defined? - if (!process.env[environmentVariableName]) { + /** + * Remove the leading "${" and the trailing "}" from the token + * + * ${nameString} -> nameString + * ${nameString-fallbackString} -> name-fallbackString + * ${nameString:-fallbackString} -> name:-fallbackString + */ + const nameWithFallback = token.substring(2, token.length - 1); + let environmentVariableName; + let fallback; + if (supportEnvVarFallbackSyntax) { + /** + * Get the environment variable name and fallback value. + * + * name fallback + * nameString -> nameString undefined + * nameString-fallbackString -> nameString fallbackString + * nameString:-fallbackString -> nameString fallbackString + */ + const matched = nameWithFallback.match(/^([^:-]+)(?:\:?-(.+))?$/); + // matched: [originStr, variableName, fallback] + environmentVariableName = (_a = matched === null || matched === void 0 ? void 0 : matched[1]) !== null && _a !== void 0 ? _a : nameWithFallback; + fallback = matched === null || matched === void 0 ? void 0 : matched[2]; + } + else { + environmentVariableName = nameWithFallback; + } + // Is the environment variable and fallback value defined. + if (!env[environmentVariableName] && !fallback) { // No, so trim this line lineShouldBeTrimmed = true; break; @@ -100,20 +141,13 @@ function _trimNpmrcFile(options) { resultLines.push(line); } } - const combinedNpmrc = resultLines.join('\n'); - //save the cache - _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); - return combinedNpmrc; + return resultLines; } function _copyAndTrimNpmrcFile(options) { - const { logger, sourceNpmrcPath, targetNpmrcPath, linesToPrepend, linesToAppend } = options; + const { logger, sourceNpmrcPath, targetNpmrcPath } = options; logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose logger.info(` --> "${targetNpmrcPath}"`); - const combinedNpmrc = _trimNpmrcFile({ - sourceNpmrcPath, - linesToPrepend, - linesToAppend - }); + const combinedNpmrc = _trimNpmrcFile(options); fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(targetNpmrcPath, combinedNpmrc); return combinedNpmrc; } @@ -123,7 +157,7 @@ function syncNpmrc(options) { info: console.log, // eslint-disable-next-line no-console error: console.error - }, createIfMissing = false, linesToAppend, linesToPrepend } = options; + }, createIfMissing = false } = options; const sourceNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish'); const targetNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetNpmrcFolder, '.npmrc'); try { @@ -132,13 +166,9 @@ function syncNpmrc(options) { if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcFolder)) { fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync(targetNpmrcFolder, { recursive: true }); } - return _copyAndTrimNpmrcFile({ - sourceNpmrcPath, + return _copyAndTrimNpmrcFile(Object.assign({ sourceNpmrcPath, targetNpmrcPath, - logger, - linesToAppend, - linesToPrepend - }); + logger }, options)); } else if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcPath)) { // If the source .npmrc doesn't exist and there is one in the target, delete the one in the target @@ -150,13 +180,13 @@ function syncNpmrc(options) { throw new Error(`Error syncing .npmrc file: ${e}`); } } -function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey) { +function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey, supportEnvVarFallbackSyntax) { const sourceNpmrcPath = `${sourceNpmrcFolder}/.npmrc`; //if .npmrc file does not exist, return false directly if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { return false; } - const trimmedNpmrcFile = _trimNpmrcFile({ sourceNpmrcPath }); + const trimmedNpmrcFile = _trimNpmrcFile({ sourceNpmrcPath, supportEnvVarFallbackSyntax }); const variableKeyRegExp = new RegExp(`^${variableKey}=`, 'm'); return trimmedNpmrcFile.match(variableKeyRegExp) !== null; } @@ -164,7 +194,7 @@ function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey) { /***/ }), -/***/ 532081: +/***/ 535317: /*!********************************!*\ !*** external "child_process" ***! \********************************/ @@ -174,7 +204,7 @@ module.exports = require("child_process"); /***/ }), -/***/ 657147: +/***/ 179896: /*!*********************!*\ !*** external "fs" ***! \*********************/ @@ -184,7 +214,7 @@ module.exports = require("fs"); /***/ }), -/***/ 822037: +/***/ 370857: /*!*********************!*\ !*** external "os" ***! \*********************/ @@ -194,7 +224,7 @@ module.exports = require("os"); /***/ }), -/***/ 371017: +/***/ 16928: /*!***********************!*\ !*** external "path" ***! \***********************/ @@ -280,21 +310,21 @@ var __webpack_exports__ = {}; \*******************************************/ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "RUSH_JSON_FILENAME": () => (/* binding */ RUSH_JSON_FILENAME), -/* harmony export */ "findRushJsonFolder": () => (/* binding */ findRushJsonFolder), -/* harmony export */ "getNpmPath": () => (/* binding */ getNpmPath), -/* harmony export */ "installAndRun": () => (/* binding */ installAndRun), -/* harmony export */ "runWithErrorAndStatusCode": () => (/* binding */ runWithErrorAndStatusCode) +/* harmony export */ RUSH_JSON_FILENAME: () => (/* binding */ RUSH_JSON_FILENAME), +/* harmony export */ findRushJsonFolder: () => (/* binding */ findRushJsonFolder), +/* harmony export */ getNpmPath: () => (/* binding */ getNpmPath), +/* harmony export */ installAndRun: () => (/* binding */ installAndRun), +/* harmony export */ runWithErrorAndStatusCode: () => (/* binding */ runWithErrorAndStatusCode) /* harmony export */ }); -/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ 532081); +/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ 535317); /* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 657147); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 179896); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! os */ 822037); +/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! os */ 370857); /* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! path */ 371017); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! path */ 16928); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utilities/npmrcUtilities */ 679877); +/* harmony import */ var _utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utilities/npmrcUtilities */ 832286); // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. /* eslint-disable no-console */ @@ -440,7 +470,8 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) { (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({ sourceNpmrcFolder, targetNpmrcFolder: rushTempFolder, - logger + logger, + supportEnvVarFallbackSyntax: false }); const npmPath = getNpmPath(); // This returns something that looks like: @@ -656,7 +687,8 @@ function installAndRun(logger, packageName, packageVersion, packageBinName, pack (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({ sourceNpmrcFolder, targetNpmrcFolder: packageInstallFolder, - logger + logger, + supportEnvVarFallbackSyntax: false }); _createPackageJson(packageInstallFolder, packageName, packageVersion); const command = lockFilePath ? 'ci' : 'install'; diff --git a/eslint/eslint-bulk/CHANGELOG.json b/eslint/eslint-bulk/CHANGELOG.json index 6ea08997840..435c42d92e1 100644 --- a/eslint/eslint-bulk/CHANGELOG.json +++ b/eslint/eslint-bulk/CHANGELOG.json @@ -1,6 +1,162 @@ { "name": "@rushstack/eslint-bulk", "entries": [ + { + "version": "0.1.74", + "tag": "@rushstack/eslint-bulk_v0.1.74", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.1.73", + "tag": "@rushstack/eslint-bulk_v0.1.73", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.1.72", + "tag": "@rushstack/eslint-bulk_v0.1.72", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.1.71", + "tag": "@rushstack/eslint-bulk_v0.1.71", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.1.70", + "tag": "@rushstack/eslint-bulk_v0.1.70", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.1.69", + "tag": "@rushstack/eslint-bulk_v0.1.69", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.1.68", + "tag": "@rushstack/eslint-bulk_v0.1.68", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.1.67", + "tag": "@rushstack/eslint-bulk_v0.1.67", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.1.66", + "tag": "@rushstack/eslint-bulk_v0.1.66", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.1.65", + "tag": "@rushstack/eslint-bulk_v0.1.65", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.1.64", + "tag": "@rushstack/eslint-bulk_v0.1.64", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.1.63", + "tag": "@rushstack/eslint-bulk_v0.1.63", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.1.62", + "tag": "@rushstack/eslint-bulk_v0.1.62", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.1.61", "tag": "@rushstack/eslint-bulk_v0.1.61", diff --git a/eslint/eslint-bulk/CHANGELOG.md b/eslint/eslint-bulk/CHANGELOG.md index f472ed3823b..6971f999677 100644 --- a/eslint/eslint-bulk/CHANGELOG.md +++ b/eslint/eslint-bulk/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/eslint-bulk -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.1.74 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.1.73 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.1.72 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.1.71 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.1.70 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.1.69 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.1.68 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.1.67 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.1.66 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.1.65 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.1.64 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.1.63 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.1.62 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.1.61 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/eslint/eslint-bulk/package.json b/eslint/eslint-bulk/package.json index 63eca6ab543..9e8daa33ead 100755 --- a/eslint/eslint-bulk/package.json +++ b/eslint/eslint-bulk/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/eslint-bulk", - "version": "0.1.61", + "version": "0.1.74", "description": "Roll out new ESLint rules in a large monorepo without cluttering up your code with \"eslint-ignore-next-line\"", "main": "index.js", "license": "MIT", diff --git a/eslint/eslint-config/CHANGELOG.json b/eslint/eslint-config/CHANGELOG.json index ece8a98c528..7d20f0b14d9 100644 --- a/eslint/eslint-config/CHANGELOG.json +++ b/eslint/eslint-config/CHANGELOG.json @@ -1,6 +1,30 @@ { "name": "@rushstack/eslint-config", "entries": [ + { + "version": "4.1.1", + "tag": "@rushstack/eslint-config_v4.1.1", + "date": "Tue, 07 Jan 2025 16:11:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-patch\" to `1.10.5`" + } + ] + } + }, + { + "version": "4.1.0", + "tag": "@rushstack/eslint-config_v4.1.0", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "minor": [ + { + "comment": "Update TSDoc dependencies." + } + ] + } + }, { "version": "4.0.2", "tag": "@rushstack/eslint-config_v4.0.2", diff --git a/eslint/eslint-config/CHANGELOG.md b/eslint/eslint-config/CHANGELOG.md index 17dbde4c4ff..71c93a60e51 100644 --- a/eslint/eslint-config/CHANGELOG.md +++ b/eslint/eslint-config/CHANGELOG.md @@ -1,6 +1,18 @@ # Change Log - @rushstack/eslint-config -This log was last generated on Thu, 19 Sep 2024 00:11:08 GMT and should not be manually modified. +This log was last generated on Tue, 07 Jan 2025 16:11:06 GMT and should not be manually modified. + +## 4.1.1 +Tue, 07 Jan 2025 16:11:06 GMT + +_Version update only_ + +## 4.1.0 +Sat, 23 Nov 2024 01:18:55 GMT + +### Minor changes + +- Update TSDoc dependencies. ## 4.0.2 Thu, 19 Sep 2024 00:11:08 GMT diff --git a/eslint/eslint-config/package.json b/eslint/eslint-config/package.json index 196b1b985af..c20b11db453 100644 --- a/eslint/eslint-config/package.json +++ b/eslint/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/eslint-config", - "version": "4.0.2", + "version": "4.1.1", "description": "A TypeScript ESLint ruleset designed for large teams and projects", "license": "MIT", "repository": { @@ -37,7 +37,7 @@ "@typescript-eslint/typescript-estree": "~8.1.0", "eslint-plugin-promise": "~6.1.1", "eslint-plugin-react": "~7.33.2", - "eslint-plugin-tsdoc": "~0.3.0" + "eslint-plugin-tsdoc": "~0.4.0" }, "devDependencies": { "eslint": "~8.57.0", diff --git a/eslint/eslint-patch/CHANGELOG.json b/eslint/eslint-patch/CHANGELOG.json index a47aa869584..f5159127dc3 100644 --- a/eslint/eslint-patch/CHANGELOG.json +++ b/eslint/eslint-patch/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@rushstack/eslint-patch", "entries": [ + { + "version": "1.10.5", + "tag": "@rushstack/eslint-patch_v1.10.5", + "date": "Tue, 07 Jan 2025 16:11:06 GMT", + "comments": { + "patch": [ + { + "comment": "Fix a performance issue when locating \".eslint-bulk-suppressions.json\"." + } + ] + } + }, { "version": "1.10.4", "tag": "@rushstack/eslint-patch_v1.10.4", diff --git a/eslint/eslint-patch/CHANGELOG.md b/eslint/eslint-patch/CHANGELOG.md index 56baa534d16..aacf88d1992 100644 --- a/eslint/eslint-patch/CHANGELOG.md +++ b/eslint/eslint-patch/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @rushstack/eslint-patch -This log was last generated on Sat, 27 Jul 2024 00:10:27 GMT and should not be manually modified. +This log was last generated on Tue, 07 Jan 2025 16:11:06 GMT and should not be manually modified. + +## 1.10.5 +Tue, 07 Jan 2025 16:11:06 GMT + +### Patches + +- Fix a performance issue when locating ".eslint-bulk-suppressions.json". ## 1.10.4 Sat, 27 Jul 2024 00:10:27 GMT diff --git a/eslint/eslint-patch/package.json b/eslint/eslint-patch/package.json index b5835cafa27..59bd1cc79bc 100644 --- a/eslint/eslint-patch/package.json +++ b/eslint/eslint-patch/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/eslint-patch", - "version": "1.10.4", + "version": "1.10.5", "description": "Enhance ESLint with better support for large scale monorepos", "main": "lib/usage.js", "license": "MIT", @@ -30,9 +30,9 @@ "patch" ], "devDependencies": { - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", - "@types/eslint": "8.2.0", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", + "@types/eslint": "8.56.10", "@types/node": "18.17.15", "@typescript-eslint/types": "~5.59.2", "eslint": "~8.57.0", diff --git a/eslint/eslint-patch/src/eslint-bulk-suppressions/bulk-suppressions-patch.ts b/eslint/eslint-patch/src/eslint-bulk-suppressions/bulk-suppressions-patch.ts index 72978ceb69a..68b897f7a8c 100644 --- a/eslint/eslint-patch/src/eslint-bulk-suppressions/bulk-suppressions-patch.ts +++ b/eslint/eslint-patch/src/eslint-bulk-suppressions/bulk-suppressions-patch.ts @@ -110,7 +110,9 @@ function findEslintrcFolderPathForNormalizedFileAbsolutePath(normalizedFilePath: ) { const cachedEslintrcFolderPath: string | undefined = eslintrcPathByFileOrFolderPath.get(currentFolder); if (cachedEslintrcFolderPath) { - return cachedEslintrcFolderPath; + // Need to cache this result into the intermediate paths + eslintrcFolderPath = cachedEslintrcFolderPath; + break; } pathsToCache.push(currentFolder); diff --git a/eslint/eslint-patch/src/eslint-bulk-suppressions/cli/runEslint.ts b/eslint/eslint-patch/src/eslint-bulk-suppressions/cli/runEslint.ts index ff26a0ad387..be0bdf494ef 100644 --- a/eslint/eslint-patch/src/eslint-bulk-suppressions/cli/runEslint.ts +++ b/eslint/eslint-patch/src/eslint-bulk-suppressions/cli/runEslint.ts @@ -35,7 +35,7 @@ export async function runEslintAsync(files: string[], mode: 'suppress' | 'prune' if (results.length > 0) { const stylishFormatter: ESLint.Formatter = await eslint.loadFormatter(); - const formattedResults: string = stylishFormatter.format(results); + const formattedResults: string = await Promise.resolve(stylishFormatter.format(results)); console.log(formattedResults); } diff --git a/eslint/eslint-plugin-packlets/package.json b/eslint/eslint-plugin-packlets/package.json index 644761b1122..3ff32c92d14 100644 --- a/eslint/eslint-plugin-packlets/package.json +++ b/eslint/eslint-plugin-packlets/package.json @@ -30,9 +30,9 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "devDependencies": { - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", - "@types/eslint": "8.2.0", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", + "@types/eslint": "8.56.10", "@types/estree": "1.0.5", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15", diff --git a/eslint/eslint-plugin-security/package.json b/eslint/eslint-plugin-security/package.json index e66f0bb89ef..a68947e8be5 100644 --- a/eslint/eslint-plugin-security/package.json +++ b/eslint/eslint-plugin-security/package.json @@ -30,9 +30,9 @@ }, "devDependencies": { "@eslint/eslintrc": "~3.0.0", - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", - "@types/eslint": "8.2.0", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", + "@types/eslint": "8.56.10", "@types/estree": "1.0.5", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15", diff --git a/eslint/eslint-plugin/package.json b/eslint/eslint-plugin/package.json index be579e6ee4d..2e3e982c917 100644 --- a/eslint/eslint-plugin/package.json +++ b/eslint/eslint-plugin/package.json @@ -34,9 +34,9 @@ }, "devDependencies": { "@eslint/eslintrc": "~3.0.0", - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", - "@types/eslint": "8.2.0", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", + "@types/eslint": "8.56.10", "@types/estree": "1.0.5", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15", diff --git a/heft-plugins/heft-api-extractor-plugin/CHANGELOG.json b/heft-plugins/heft-api-extractor-plugin/CHANGELOG.json index 136881a8682..0ba2b92665d 100644 --- a/heft-plugins/heft-api-extractor-plugin/CHANGELOG.json +++ b/heft-plugins/heft-api-extractor-plugin/CHANGELOG.json @@ -1,6 +1,270 @@ { "name": "@rushstack/heft-api-extractor-plugin", "entries": [ + { + "version": "0.3.65", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.65", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.3.64", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.64", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.4`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.3.63", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.63", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.3`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.3.62", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.62", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.3.61", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.61", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.2`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.3.60", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.60", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.3.59", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.59", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.3.58", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.58", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.3.57", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.57", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.15.9`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.3.56", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.56", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.15.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.3.55", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.55", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.3.54", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.54", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.3.53", + "tag": "@rushstack/heft-api-extractor-plugin_v0.3.53", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.2` to `0.68.3`" + } + ] + } + }, { "version": "0.3.52", "tag": "@rushstack/heft-api-extractor-plugin_v0.3.52", diff --git a/heft-plugins/heft-api-extractor-plugin/CHANGELOG.md b/heft-plugins/heft-api-extractor-plugin/CHANGELOG.md index 8ecc1315785..97ae672e69f 100644 --- a/heft-plugins/heft-api-extractor-plugin/CHANGELOG.md +++ b/heft-plugins/heft-api-extractor-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/heft-api-extractor-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.3.65 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.3.64 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.3.63 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.3.62 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.3.61 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.3.60 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.3.59 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 0.3.58 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.3.57 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.3.56 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.3.55 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.3.54 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.3.53 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.3.52 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/heft-plugins/heft-api-extractor-plugin/package.json b/heft-plugins/heft-api-extractor-plugin/package.json index ac8741124d8..8890214d287 100644 --- a/heft-plugins/heft-api-extractor-plugin/package.json +++ b/heft-plugins/heft-api-extractor-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-api-extractor-plugin", - "version": "0.3.52", + "version": "0.3.65", "description": "A Heft plugin for API Extractor", "repository": { "type": "git", @@ -15,7 +15,7 @@ "_phase:build": "heft run --only build -- --clean" }, "peerDependencies": { - "@rushstack/heft": "0.68.2" + "@rushstack/heft": "0.68.15" }, "dependencies": { "@rushstack/heft-config-file": "workspace:*", @@ -26,7 +26,7 @@ "@microsoft/api-extractor": "workspace:*", "local-eslint-config": "workspace:*", "@rushstack/heft": "workspace:*", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/heft-node-rig": "2.6.48", "@rushstack/terminal": "workspace:*", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15", diff --git a/heft-plugins/heft-api-extractor-plugin/src/ApiExtractorPlugin.ts b/heft-plugins/heft-api-extractor-plugin/src/ApiExtractorPlugin.ts index 18f6b2a2485..58bcb4e731f 100644 --- a/heft-plugins/heft-api-extractor-plugin/src/ApiExtractorPlugin.ts +++ b/heft-plugins/heft-api-extractor-plugin/src/ApiExtractorPlugin.ts @@ -9,7 +9,7 @@ import type { HeftConfiguration, IHeftTaskRunIncrementalHookOptions } from '@rushstack/heft'; -import { ConfigurationFile } from '@rushstack/heft-config-file'; +import { ProjectConfigurationFile } from '@rushstack/heft-config-file'; import { ApiExtractorRunner } from './ApiExtractorRunner'; import apiExtractorConfigSchema from './schemas/api-extractor-task.schema.json'; @@ -51,7 +51,7 @@ export default class ApiExtractorPlugin implements IHeftTaskPlugin { private _apiExtractor: typeof TApiExtractor | undefined; private _apiExtractorConfigurationFilePath: string | undefined | typeof UNINITIALIZED = UNINITIALIZED; private _apiExtractorTaskConfigurationFileLoader: - | ConfigurationFile + | ProjectConfigurationFile | undefined; private _printedWatchWarning: boolean = false; @@ -156,10 +156,11 @@ export default class ApiExtractorPlugin implements IHeftTaskPlugin { heftConfiguration: HeftConfiguration ): Promise { if (!this._apiExtractorTaskConfigurationFileLoader) { - this._apiExtractorTaskConfigurationFileLoader = new ConfigurationFile({ - projectRelativeFilePath: TASK_CONFIG_RELATIVE_PATH, - jsonSchemaObject: apiExtractorConfigSchema - }); + this._apiExtractorTaskConfigurationFileLoader = + new ProjectConfigurationFile({ + projectRelativeFilePath: TASK_CONFIG_RELATIVE_PATH, + jsonSchemaObject: apiExtractorConfigSchema + }); } return await this._apiExtractorTaskConfigurationFileLoader.tryLoadConfigurationFileForProjectAsync( diff --git a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json index 13326404cd2..1cc497496ce 100644 --- a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json +++ b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json @@ -1,6 +1,264 @@ { "name": "@rushstack/heft-dev-cert-plugin", "entries": [ + { + "version": "0.4.83", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.83", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.16`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.4.82", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.82", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.15`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.4.81", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.81", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.14`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.4.80", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.80", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.13`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.4.79", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.79", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.12`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.4.78", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.78", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.4.77", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.77", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.4.76", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.76", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.9`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.4.75", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.75", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.8`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.4.74", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.74", + "date": "Thu, 24 Oct 2024 00:15:47 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.4.73", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.73", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.4.72", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.72", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.5`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.4.71", + "tag": "@rushstack/heft-dev-cert-plugin_v0.4.71", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.4`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.2` to `0.68.3`" + } + ] + } + }, { "version": "0.4.70", "tag": "@rushstack/heft-dev-cert-plugin_v0.4.70", diff --git a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md index 581d77da1b0..f5aa2b86fc5 100644 --- a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md +++ b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/heft-dev-cert-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.4.83 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.4.82 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.4.81 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.4.80 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.4.79 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.4.78 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.4.77 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 0.4.76 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.4.75 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.4.74 +Thu, 24 Oct 2024 00:15:47 GMT + +_Version update only_ + +## 0.4.73 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.4.72 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.4.71 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.4.70 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/heft-plugins/heft-dev-cert-plugin/package.json b/heft-plugins/heft-dev-cert-plugin/package.json index 304d4dcb2c0..5eec3797c34 100644 --- a/heft-plugins/heft-dev-cert-plugin/package.json +++ b/heft-plugins/heft-dev-cert-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-dev-cert-plugin", - "version": "0.4.70", + "version": "0.4.83", "description": "A Heft plugin for generating and using local development certificates", "repository": { "type": "git", @@ -16,7 +16,7 @@ "_phase:test": "heft run --only test -- --clean" }, "peerDependencies": { - "@rushstack/heft": "^0.68.2" + "@rushstack/heft": "^0.68.15" }, "dependencies": { "@rushstack/debug-certificate-manager": "workspace:*" diff --git a/heft-plugins/heft-jest-plugin/CHANGELOG.json b/heft-plugins/heft-jest-plugin/CHANGELOG.json index f5577c85cb3..c93083cd0b2 100644 --- a/heft-plugins/heft-jest-plugin/CHANGELOG.json +++ b/heft-plugins/heft-jest-plugin/CHANGELOG.json @@ -1,6 +1,268 @@ { "name": "@rushstack/heft-jest-plugin", "entries": [ + { + "version": "0.14.5", + "tag": "@rushstack/heft-jest-plugin_v0.14.5", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.14.4", + "tag": "@rushstack/heft-jest-plugin_v0.14.4", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.4`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.14.3", + "tag": "@rushstack/heft-jest-plugin_v0.14.3", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.3`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.14.2", + "tag": "@rushstack/heft-jest-plugin_v0.14.2", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.14.1", + "tag": "@rushstack/heft-jest-plugin_v0.14.1", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.2`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.14.0", + "tag": "@rushstack/heft-jest-plugin_v0.14.0", + "date": "Tue, 10 Dec 2024 07:32:19 GMT", + "comments": { + "minor": [ + { + "comment": "Inject `punycode` into the NodeJS module cache in Node versions 22 and above to work around a deprecation warning." + } + ] + } + }, + { + "version": "0.13.3", + "tag": "@rushstack/heft-jest-plugin_v0.13.3", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.13.2", + "tag": "@rushstack/heft-jest-plugin_v0.13.2", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.13.1", + "tag": "@rushstack/heft-jest-plugin_v0.13.1", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "patch": [ + { + "comment": "Fix a bug in `jest-node-modules-symlink-resolver` with respect to evaluating paths that don't exist. Expected behavior in that situation is to return the input path." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.13.0", + "tag": "@rushstack/heft-jest-plugin_v0.13.0", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "minor": [ + { + "comment": "Add a custom resolver that only resolves symlinks that are within node_modules." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.15.9`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.12.18", + "tag": "@rushstack/heft-jest-plugin_v0.12.18", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.15.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.12.17", + "tag": "@rushstack/heft-jest-plugin_v0.12.17", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.12.16", + "tag": "@rushstack/heft-jest-plugin_v0.12.16", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.12.15", + "tag": "@rushstack/heft-jest-plugin_v0.12.15", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.2` to `0.68.3`" + } + ] + } + }, { "version": "0.12.14", "tag": "@rushstack/heft-jest-plugin_v0.12.14", diff --git a/heft-plugins/heft-jest-plugin/CHANGELOG.md b/heft-plugins/heft-jest-plugin/CHANGELOG.md index 7d54d73be07..cdc276881b2 100644 --- a/heft-plugins/heft-jest-plugin/CHANGELOG.md +++ b/heft-plugins/heft-jest-plugin/CHANGELOG.md @@ -1,6 +1,82 @@ # Change Log - @rushstack/heft-jest-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.14.5 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.14.4 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.14.3 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.14.2 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.14.1 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.14.0 +Tue, 10 Dec 2024 07:32:19 GMT + +### Minor changes + +- Inject `punycode` into the NodeJS module cache in Node versions 22 and above to work around a deprecation warning. + +## 0.13.3 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.13.2 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 0.13.1 +Sat, 23 Nov 2024 01:18:55 GMT + +### Patches + +- Fix a bug in `jest-node-modules-symlink-resolver` with respect to evaluating paths that don't exist. Expected behavior in that situation is to return the input path. + +## 0.13.0 +Fri, 22 Nov 2024 01:10:43 GMT + +### Minor changes + +- Add a custom resolver that only resolves symlinks that are within node_modules. + +## 0.12.18 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.12.17 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.12.16 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.12.15 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.12.14 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/heft-plugins/heft-jest-plugin/package.json b/heft-plugins/heft-jest-plugin/package.json index 22489be3580..81d57ff125f 100644 --- a/heft-plugins/heft-jest-plugin/package.json +++ b/heft-plugins/heft-jest-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-jest-plugin", - "version": "0.12.14", + "version": "0.14.5", "description": "Heft plugin for Jest", "repository": { "type": "git", @@ -16,7 +16,7 @@ "_phase:test": "heft run --only test -- --clean" }, "peerDependencies": { - "@rushstack/heft": "^0.68.2", + "@rushstack/heft": "^0.68.15", "jest-environment-jsdom": "^29.5.0", "jest-environment-node": "^29.5.0" }, @@ -38,11 +38,12 @@ "jest-config": "~29.5.0", "jest-resolve": "~29.5.0", "jest-snapshot": "~29.5.0", - "lodash": "~4.17.15" + "lodash": "~4.17.15", + "punycode": "~2.3.1" }, "devDependencies": { "@jest/types": "29.5.0", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/heft-node-rig": "2.6.48", "@rushstack/heft": "workspace:*", "@types/heft-jest": "1.0.1", "@types/lodash": "4.14.116", diff --git a/heft-plugins/heft-jest-plugin/src/JestPlugin.ts b/heft-plugins/heft-jest-plugin/src/JestPlugin.ts index e8f7274b773..13a00818e4b 100644 --- a/heft-plugins/heft-jest-plugin/src/JestPlugin.ts +++ b/heft-plugins/heft-jest-plugin/src/JestPlugin.ts @@ -24,7 +24,7 @@ import type { CommandLineStringListParameter } from '@rushstack/heft'; import { - ConfigurationFile, + ProjectConfigurationFile, type ICustomJsonPathMetadata, type IJsonPathMetadataResolverOptions, InheritanceType, @@ -122,6 +122,7 @@ const PLUGIN_NAME: 'jest-plugin' = 'jest-plugin'; const PLUGIN_PACKAGE_NAME: '@rushstack/heft-jest-plugin' = '@rushstack/heft-jest-plugin'; const PLUGIN_PACKAGE_FOLDER: string = path.resolve(__dirname, '..'); const JEST_CONFIGURATION_LOCATION: 'config/jest.config.json' = `config/jest.config.json`; +export const JEST_CONFIG_JSDOM_PACKAGE_NAME: 'jest-environment-jsdom' = 'jest-environment-jsdom'; const ROOTDIR_TOKEN: '' = ''; const CONFIGDIR_TOKEN: '' = ''; @@ -139,7 +140,8 @@ interface IPendingTestRun { * @internal */ export default class JestPlugin implements IHeftTaskPlugin { - private static _jestConfigurationFileLoader: ConfigurationFile | undefined; + private static _jestConfigurationFileLoader: ProjectConfigurationFile | undefined; + private static _includedJestEnvironmentJsdomPath: string | undefined; private _jestPromise: Promise | undefined; private _pendingTestRuns: Set = new Set(); @@ -677,7 +679,7 @@ export default class JestPlugin implements IHeftTaskPlugin { public static _getJestConfigurationLoader( buildFolder: string, projectRelativeFilePath: string - ): ConfigurationFile { + ): ProjectConfigurationFile { if (!JestPlugin._jestConfigurationFileLoader) { // By default, ConfigurationFile will replace all objects, so we need to provide merge functions for these const shallowObjectInheritanceFunc: | undefined>( @@ -722,7 +724,7 @@ export default class JestPlugin implements IHeftTaskPlugin { resolveAsModule: true }); - JestPlugin._jestConfigurationFileLoader = new ConfigurationFile({ + JestPlugin._jestConfigurationFileLoader = new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, // Bypass Jest configuration validation jsonSchemaObject: anythingSchema, @@ -980,27 +982,47 @@ export default class JestPlugin implements IHeftTaskPlugin { filePath: propertyValue, requireResolveFunction }); + case 'testSequencer': return resolveSequencer(/*resolver:*/ undefined, { rootDir: configDir, filePath: propertyValue, requireResolveFunction }); + case 'testEnvironment': - return resolveTestEnvironment({ + const testEnvironment: string = resolveTestEnvironment({ rootDir: configDir, testEnvironment: propertyValue, requireResolveFunction }); + + if (propertyValue === JEST_CONFIG_JSDOM_PACKAGE_NAME) { + // If the testEnvironment is the included jest-environment-jsdom, + // redirect to the version that injects punycode for Node >= 22. + if (!JestPlugin._includedJestEnvironmentJsdomPath) { + JestPlugin._includedJestEnvironmentJsdomPath = require.resolve( + JEST_CONFIG_JSDOM_PACKAGE_NAME + ); + } + + if (JestPlugin._includedJestEnvironmentJsdomPath === testEnvironment) { + return `${__dirname}/exports/patched-jest-environment-jsdom.js`; + } + } + + return testEnvironment; + case 'watchPlugins': return resolveWatchPlugin(/*resolver:*/ undefined, { rootDir: configDir, filePath: propertyValue, requireResolveFunction }); + case 'preset': // Do not allow use of presets and extends together, since that would create a - // confusing heirarchy. + // confusing hierarchy. if ( configurationFile.preset && (configurationFile as IHeftJestConfigurationWithExtends).extends @@ -1038,6 +1060,7 @@ export default class JestPlugin implements IHeftTaskPlugin { } else { return propertyValue; } + default: // We know the value will be non-null since resolve will throw an error if it is null // and non-optional diff --git a/heft-plugins/heft-jest-plugin/src/JestRealPathPatch.ts b/heft-plugins/heft-jest-plugin/src/JestRealPathPatch.ts new file mode 100644 index 00000000000..404af5e3766 --- /dev/null +++ b/heft-plugins/heft-jest-plugin/src/JestRealPathPatch.ts @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import * as path from 'node:path'; +import { RealNodeModulePathResolver } from '@rushstack/node-core-library/lib/RealNodeModulePath'; + +const jestResolvePackageFolder: string = path.dirname(require.resolve('jest-resolve/package.json')); + +const jestUtilPackageFolder: string = path.dirname( + require.resolve('jest-util/package.json', { paths: [jestResolvePackageFolder] }) +); +const jestUtilTryRealpathPath: string = path.resolve(jestUtilPackageFolder, './build/tryRealpath.js'); + +const { realNodeModulePath }: RealNodeModulePathResolver = new RealNodeModulePathResolver(); + +const tryRealpathModule: { + default: (filePath: string) => string; +} = require(jestUtilTryRealpathPath); +tryRealpathModule.default = (input: string): string => { + try { + return realNodeModulePath(input); + } catch (error) { + // Not using the helper from FileSystem here because this code loads in every Jest worker process + // and FileSystem has a lot of extra dependencies + // These error codes cloned from the logic in jest-util's tryRealpath.js + if (error.code !== 'ENOENT' && error.code !== 'EISDIR') { + throw error; + } + } + return input; +}; diff --git a/heft-plugins/heft-jest-plugin/src/exports/jest-node-modules-symlink-resolver.ts b/heft-plugins/heft-jest-plugin/src/exports/jest-node-modules-symlink-resolver.ts new file mode 100644 index 00000000000..5c4f9fb6e70 --- /dev/null +++ b/heft-plugins/heft-jest-plugin/src/exports/jest-node-modules-symlink-resolver.ts @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import '../JestRealPathPatch'; +// Using this syntax because HeftJestResolver uses `export =` syntax. +import resolver = require('../HeftJestResolver'); +export = resolver; diff --git a/heft-plugins/heft-jest-plugin/src/exports/patched-jest-environment-jsdom.ts b/heft-plugins/heft-jest-plugin/src/exports/patched-jest-environment-jsdom.ts new file mode 100644 index 00000000000..9292372bdaa --- /dev/null +++ b/heft-plugins/heft-jest-plugin/src/exports/patched-jest-environment-jsdom.ts @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +const PUNYCODE_MODULE_NAME: 'punycode' = 'punycode'; +const nodeMajorVersion: number = parseInt(process.versions.node, 10); +if (nodeMajorVersion >= 22) { + // Inject the "punycode" module into the Node.js module cache in Node >=22. JSDom has indirect + // dependencies on this module, which is marked as deprecated in Node >=22. + const punycode: unknown = require('punycode/punycode'); + require.cache[PUNYCODE_MODULE_NAME] = { + id: PUNYCODE_MODULE_NAME, + path: PUNYCODE_MODULE_NAME, + exports: punycode, + isPreloading: false, + require, + filename: PUNYCODE_MODULE_NAME, + loaded: true, + parent: undefined, + children: [], + paths: [] + }; +} + +module.exports = require('jest-environment-jsdom'); diff --git a/heft-plugins/heft-jest-plugin/src/test/JestPlugin.test.ts b/heft-plugins/heft-jest-plugin/src/test/JestPlugin.test.ts index 33630934214..9833d353a33 100644 --- a/heft-plugins/heft-jest-plugin/src/test/JestPlugin.test.ts +++ b/heft-plugins/heft-jest-plugin/src/test/JestPlugin.test.ts @@ -4,11 +4,15 @@ import * as path from 'path'; import type { Config } from '@jest/types'; import type { IHeftTaskSession, HeftConfiguration, CommandLineParameter } from '@rushstack/heft'; -import type { ConfigurationFile } from '@rushstack/heft-config-file'; -import { Import, JsonFile } from '@rushstack/node-core-library'; +import type { ProjectConfigurationFile } from '@rushstack/heft-config-file'; +import { Import, JsonFile, Path } from '@rushstack/node-core-library'; import { StringBufferTerminalProvider, Terminal } from '@rushstack/terminal'; -import { default as JestPlugin, type IHeftJestConfiguration } from '../JestPlugin'; +import { + JEST_CONFIG_JSDOM_PACKAGE_NAME, + default as JestPlugin, + type IHeftJestConfiguration +} from '../JestPlugin'; interface IPartialHeftPluginJson { taskPlugins?: { @@ -74,13 +78,13 @@ describe('JestConfigLoader', () => { // Because we require the built modules, we need to set our rootDir to be in the 'lib' folder, since transpilation // means that we don't run on the built test assets directly const rootDir: string = path.resolve(__dirname, '..', '..', 'lib', 'test', 'project1'); - const loader: ConfigurationFile = JestPlugin._getJestConfigurationLoader( + const loader: ProjectConfigurationFile = JestPlugin._getJestConfigurationLoader( rootDir, 'config/jest.config.json' ); const loadedConfig: IHeftJestConfiguration = await loader.loadConfigurationFileForProjectAsync( terminal, - path.join(__dirname, '..', '..', 'lib', 'test', 'project1') + rootDir ); expect(loadedConfig.preset).toBe(undefined); @@ -161,13 +165,13 @@ describe('JestConfigLoader', () => { // Because we require the built modules, we need to set our rootDir to be in the 'lib' folder, since transpilation // means that we don't run on the built test assets directly const rootDir: string = path.resolve(__dirname, '..', '..', 'lib', 'test', 'project2'); - const loader: ConfigurationFile = JestPlugin._getJestConfigurationLoader( + const loader: ProjectConfigurationFile = JestPlugin._getJestConfigurationLoader( rootDir, 'config/jest.config.json' ); const loadedConfig: IHeftJestConfiguration = await loader.loadConfigurationFileForProjectAsync( terminal, - path.resolve(__dirname, '..', '..', 'lib', 'test', 'project2') + rootDir ); expect(loadedConfig.setupFiles?.length).toBe(1); @@ -178,4 +182,25 @@ describe('JestConfigLoader', () => { expect(loadedConfig.testEnvironment).toContain('jest-environment-jsdom'); expect(loadedConfig.testEnvironment).toMatch(/index.js$/); }); + + it('the default web config const matches the name in the config JSON file', async () => { + const { testEnvironment } = await JsonFile.loadAsync(`${__dirname}/../../includes/jest-web.config.json`); + expect(testEnvironment).toEqual(JEST_CONFIG_JSDOM_PACKAGE_NAME); + }); + + it('replaces jest-environment-jsdom with the patched version', async () => { + // Because we require the built modules, we need to set our rootDir to be in the 'lib' folder, since transpilation + // means that we don't run on the built test assets directly + const rootDir: string = path.resolve(__dirname, '..', '..', 'lib', 'test', 'project3'); + const loader: ProjectConfigurationFile = JestPlugin._getJestConfigurationLoader( + rootDir, + 'config/jest.config.json' + ); + const loadedConfig: IHeftJestConfiguration = await loader.loadConfigurationFileForProjectAsync( + terminal, + rootDir + ); + const testEnvironment: string = Path.convertToPlatformDefault(loadedConfig.testEnvironment!); + expect(testEnvironment).toEqual(require.resolve('../exports/patched-jest-environment-jsdom')); + }); }); diff --git a/heft-plugins/heft-jest-plugin/src/test/project3/config/jest.config.json b/heft-plugins/heft-jest-plugin/src/test/project3/config/jest.config.json new file mode 100644 index 00000000000..d052e597d38 --- /dev/null +++ b/heft-plugins/heft-jest-plugin/src/test/project3/config/jest.config.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../../includes/jest-web.config.json" +} diff --git a/heft-plugins/heft-lint-plugin/CHANGELOG.json b/heft-plugins/heft-lint-plugin/CHANGELOG.json index 80e0d25e7c5..5bf2730822b 100644 --- a/heft-plugins/heft-lint-plugin/CHANGELOG.json +++ b/heft-plugins/heft-lint-plugin/CHANGELOG.json @@ -1,6 +1,288 @@ { "name": "@rushstack/heft-lint-plugin", "entries": [ + { + "version": "0.5.14", + "tag": "@rushstack/heft-lint-plugin_v0.5.14", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.5.13", + "tag": "@rushstack/heft-lint-plugin_v0.5.13", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.7`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.5.12", + "tag": "@rushstack/heft-lint-plugin_v0.5.12", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.6`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.5.11", + "tag": "@rushstack/heft-lint-plugin_v0.5.11", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.5.10", + "tag": "@rushstack/heft-lint-plugin_v0.5.10", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.4`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.5.9", + "tag": "@rushstack/heft-lint-plugin_v0.5.9", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.5.8", + "tag": "@rushstack/heft-lint-plugin_v0.5.8", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.5.7", + "tag": "@rushstack/heft-lint-plugin_v0.5.7", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.5.6", + "tag": "@rushstack/heft-lint-plugin_v0.5.6", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.5.5", + "tag": "@rushstack/heft-lint-plugin_v0.5.5", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.35`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.5.4", + "tag": "@rushstack/heft-lint-plugin_v0.5.4", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.34`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.5.3", + "tag": "@rushstack/heft-lint-plugin_v0.5.3", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.33`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.5.2", + "tag": "@rushstack/heft-lint-plugin_v0.5.2", + "date": "Wed, 16 Oct 2024 00:11:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.32`" + } + ] + } + }, + { + "version": "0.5.1", + "tag": "@rushstack/heft-lint-plugin_v0.5.1", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.31`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `0.68.2` to `0.68.3`" + } + ] + } + }, + { + "version": "0.5.0", + "tag": "@rushstack/heft-lint-plugin_v0.5.0", + "date": "Thu, 10 Oct 2024 00:11:51 GMT", + "comments": { + "minor": [ + { + "comment": "Add an option `sarifLogPath` that, when specified, will emit logs in the SARIF format: https://sarifweb.azurewebsites.net/. Note that this is only supported by ESLint." + } + ] + } + }, { "version": "0.4.6", "tag": "@rushstack/heft-lint-plugin_v0.4.6", diff --git a/heft-plugins/heft-lint-plugin/CHANGELOG.md b/heft-plugins/heft-lint-plugin/CHANGELOG.md index 6578cfb3fae..55dda0b5b35 100644 --- a/heft-plugins/heft-lint-plugin/CHANGELOG.md +++ b/heft-plugins/heft-lint-plugin/CHANGELOG.md @@ -1,6 +1,83 @@ # Change Log - @rushstack/heft-lint-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.5.14 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.5.13 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.5.12 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.5.11 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.5.10 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.5.9 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.5.8 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.5.7 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.5.6 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.5.5 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.5.4 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.5.3 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.5.2 +Wed, 16 Oct 2024 00:11:20 GMT + +_Version update only_ + +## 0.5.1 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ + +## 0.5.0 +Thu, 10 Oct 2024 00:11:51 GMT + +### Minor changes + +- Add an option `sarifLogPath` that, when specified, will emit logs in the SARIF format: https://sarifweb.azurewebsites.net/. Note that this is only supported by ESLint. ## 0.4.6 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/heft-plugins/heft-lint-plugin/package.json b/heft-plugins/heft-lint-plugin/package.json index 00a63df3650..273263540b7 100644 --- a/heft-plugins/heft-lint-plugin/package.json +++ b/heft-plugins/heft-lint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-lint-plugin", - "version": "0.4.6", + "version": "0.5.14", "description": "A Heft plugin for using ESLint or TSLint. Intended for use with @rushstack/heft-typescript-plugin", "repository": { "type": "git", @@ -15,7 +15,7 @@ "_phase:build": "heft run --only build -- --clean" }, "peerDependencies": { - "@rushstack/heft": "0.68.2" + "@rushstack/heft": "0.68.15" }, "dependencies": { "@rushstack/node-core-library": "workspace:*", @@ -25,9 +25,9 @@ "local-eslint-config": "workspace:*", "@rushstack/heft": "workspace:*", "@rushstack/heft-typescript-plugin": "workspace:*", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/heft-node-rig": "2.6.48", "@rushstack/terminal": "workspace:*", - "@types/eslint": "8.2.0", + "@types/eslint": "8.56.10", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15", "@types/semver": "7.5.0", diff --git a/heft-plugins/heft-lint-plugin/src/Eslint.ts b/heft-plugins/heft-lint-plugin/src/Eslint.ts index edc4603fd2f..b5027f2b171 100644 --- a/heft-plugins/heft-lint-plugin/src/Eslint.ts +++ b/heft-plugins/heft-lint-plugin/src/Eslint.ts @@ -6,7 +6,7 @@ import * as semver from 'semver'; import type * as TTypescript from 'typescript'; import type * as TEslint from 'eslint'; import { performance } from 'perf_hooks'; -import { FileError } from '@rushstack/node-core-library'; +import { FileError, FileSystem } from '@rushstack/node-core-library'; import { LinterBase, type ILinterBaseOptions } from './LinterBase'; @@ -59,12 +59,22 @@ export class Eslint extends LinterBase { private readonly _currentFixMessages: TEslint.Linter.LintMessage[] = []; private readonly _fixMessagesByResult: Map = new Map(); + private readonly _sarifLogPath: string | undefined; protected constructor(options: IEslintOptions) { super('eslint', options); - const { buildFolderPath, eslintPackage, linterConfigFilePath, tsProgram, eslintTimings, fix } = options; + const { + buildFolderPath, + eslintPackage, + linterConfigFilePath, + tsProgram, + eslintTimings, + fix, + sarifLogPath + } = options; this._eslintPackage = eslintPackage; + this._sarifLogPath = sarifLogPath; let overrideConfig: TEslint.Linter.Config | undefined; let fixFn: Exclude; @@ -166,17 +176,10 @@ export class Eslint extends LinterBase { return lintResult.fixableErrorCount + lintResult.fixableWarningCount > 0; })); - const failures: TEslint.ESLint.LintResult[] = []; - for (const lintResult of lintResults) { - if (lintResult.messages.length > 0 || lintResult.output) { - failures.push(lintResult); - } - } - - return failures; + return lintResults; } - protected async lintingFinishedAsync(lintFailures: TEslint.ESLint.LintResult[]): Promise { + protected async lintingFinishedAsync(lintResults: TEslint.ESLint.LintResult[]): Promise { let omittedRuleCount: number = 0; const timings: [string, number][] = Array.from(this._eslintTimings).sort( (x: [string, number], y: [string, number]) => { @@ -196,24 +199,23 @@ export class Eslint extends LinterBase { } if (this._fix && this._fixMessagesByResult.size > 0) { - await this._eslintPackage.ESLint.outputFixes(lintFailures); + await this._eslintPackage.ESLint.outputFixes(lintResults); } - for (const lintFailure of lintFailures) { + for (const lintResult of lintResults) { // Report linter fixes to the logger. These will only be returned when the underlying failure was fixed - const fixMessages: TEslint.Linter.LintMessage[] | undefined = - this._fixMessagesByResult.get(lintFailure); + const fixMessages: TEslint.Linter.LintMessage[] | undefined = this._fixMessagesByResult.get(lintResult); if (fixMessages) { for (const fixMessage of fixMessages) { const formattedMessage: string = `[FIXED] ${getFormattedErrorMessage(fixMessage)}`; - const errorObject: FileError = this._getLintFileError(lintFailure, fixMessage, formattedMessage); + const errorObject: FileError = this._getLintFileError(lintResult, fixMessage, formattedMessage); this._scopedLogger.emitWarning(errorObject); } } // Report linter errors and warnings to the logger - for (const lintMessage of lintFailure.messages) { - const errorObject: FileError = this._getLintFileError(lintFailure, lintMessage); + for (const lintMessage of lintResult.messages) { + const errorObject: FileError = this._getLintFileError(lintResult, lintMessage); switch (lintMessage.severity) { case EslintMessageSeverity.error: { this._scopedLogger.emitError(errorObject); @@ -227,6 +229,24 @@ export class Eslint extends LinterBase { } } } + + const sarifLogPath: string | undefined = this._sarifLogPath; + if (sarifLogPath) { + const rulesMeta: TEslint.ESLint.LintResultData['rulesMeta'] = + this._linter.getRulesMetaForResults(lintResults); + const { formatEslintResultsAsSARIF } = await import('./SarifFormatter'); + const sarifString: string = JSON.stringify( + formatEslintResultsAsSARIF(lintResults, rulesMeta, { + ignoreSuppressed: false, + eslintVersion: this._eslintPackage.ESLint.version, + buildFolderPath: this._buildFolderPath + }), + undefined, + 2 + ); + + await FileSystem.writeFileAsync(sarifLogPath, sarifString, { ensureFolderExists: true }); + } } protected async isFileExcludedAsync(filePath: string): Promise { diff --git a/heft-plugins/heft-lint-plugin/src/LintPlugin.ts b/heft-plugins/heft-lint-plugin/src/LintPlugin.ts index faee0f156ab..aabfe0dc561 100644 --- a/heft-plugins/heft-lint-plugin/src/LintPlugin.ts +++ b/heft-plugins/heft-lint-plugin/src/LintPlugin.ts @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. +import path from 'node:path'; + import { FileSystem } from '@rushstack/node-core-library'; import type { HeftConfiguration, @@ -28,6 +30,7 @@ const ESLINTRC_CJS_FILENAME: string = '.eslintrc.cjs'; interface ILintPluginOptions { alwaysFix?: boolean; + sarifLogPath?: string; } interface ILintOptions { @@ -35,6 +38,7 @@ interface ILintOptions { heftConfiguration: HeftConfiguration; tsProgram: IExtendedProgram; fix?: boolean; + sarifLogPath?: string; changedFiles?: ReadonlySet; } @@ -67,6 +71,10 @@ export default class LintPlugin implements IHeftTaskPlugin { fix = false; } + const relativeSarifLogPath: string | undefined = pluginOptions?.sarifLogPath; + const sarifLogPath: string | undefined = + relativeSarifLogPath && path.resolve(heftConfiguration.buildFolderPath, relativeSarifLogPath); + // Use the changed files hook to kick off linting asynchronously taskSession.requestAccessToPluginByName( '@rushstack/heft-typescript-plugin', @@ -80,6 +88,7 @@ export default class LintPlugin implements IHeftTaskPlugin { taskSession, heftConfiguration, fix, + sarifLogPath, tsProgram: changedFilesHookOptions.program as IExtendedProgram, changedFiles: changedFilesHookOptions.changedFiles as ReadonlySet }); @@ -144,7 +153,7 @@ export default class LintPlugin implements IHeftTaskPlugin { } private async _lintAsync(options: ILintOptions): Promise { - const { taskSession, heftConfiguration, tsProgram, changedFiles, fix } = options; + const { taskSession, heftConfiguration, tsProgram, changedFiles, fix, sarifLogPath } = options; // Ensure that we have initialized. This promise is cached, so calling init // multiple times will only init once. @@ -155,6 +164,7 @@ export default class LintPlugin implements IHeftTaskPlugin { const eslintLinter: Eslint = await Eslint.initializeAsync({ tsProgram, fix, + sarifLogPath, scopedLogger: taskSession.logger, linterToolPath: this._eslintToolPath, linterConfigFilePath: this._eslintConfigFilePath, diff --git a/heft-plugins/heft-lint-plugin/src/LinterBase.ts b/heft-plugins/heft-lint-plugin/src/LinterBase.ts index fe996d47e1f..a198e4fab23 100644 --- a/heft-plugins/heft-lint-plugin/src/LinterBase.ts +++ b/heft-plugins/heft-lint-plugin/src/LinterBase.ts @@ -21,6 +21,7 @@ export interface ILinterBaseOptions { linterConfigFilePath: string; tsProgram: IExtendedProgram; fix?: boolean; + sarifLogPath?: string; } export interface IRunLinterOptions { @@ -128,7 +129,7 @@ export abstract class LinterBase { // Some of this code comes from here: // https://github.com/palantir/tslint/blob/24d29e421828348f616bf761adb3892bcdf51662/src/linter.ts#L161-L179 // Modified to only lint files that have changed and that we care about - const lintFailures: TLintResult[] = []; + const lintResults: TLintResult[] = []; for (const sourceFile of options.tsProgram.getSourceFiles()) { const filePath: string = sourceFile.fileName; const relative: string | undefined = relativePaths.get(filePath); @@ -147,12 +148,12 @@ export abstract class LinterBase { options.changedFiles.has(sourceFile) ) { fileCount++; - const failures: TLintResult[] = await this.lintFileAsync(sourceFile); - if (failures.length === 0) { + const results: TLintResult[] = await this.lintFileAsync(sourceFile); + if (results.length === 0) { newNoFailureFileVersions.set(relative, version); } else { - for (const failure of failures) { - lintFailures.push(failure); + for (const result of results) { + lintResults.push(result); } } } else { @@ -161,7 +162,7 @@ export abstract class LinterBase { } //#endregion - await this.lintingFinishedAsync(lintFailures); + await this.lintingFinishedAsync(lintResults); if (!this._fix && this._fixesPossible) { this._terminal.writeWarningLine( diff --git a/heft-plugins/heft-lint-plugin/src/SarifFormatter.ts b/heft-plugins/heft-lint-plugin/src/SarifFormatter.ts new file mode 100644 index 00000000000..80ec1d463b8 --- /dev/null +++ b/heft-plugins/heft-lint-plugin/src/SarifFormatter.ts @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import type * as TEslint from 'eslint'; +import path from 'node:path'; +import { Path } from '@rushstack/node-core-library'; + +export interface ISerifFormatterOptions { + ignoreSuppressed: boolean; + eslintVersion?: string; + buildFolderPath: string; +} + +export interface ISarifRun { + tool: { + driver: { + name: string; + informationUri: string; + version?: string; + rules: IStaticAnalysisRules[]; + }; + }; + artifacts?: ISarifFile[]; + results?: ISarifRepresentation[]; + invocations?: { + toolConfigurationNotifications: ISarifRepresentation[]; + executionSuccessful: boolean; + }[]; +} + +export interface ISarifRepresentation { + level: string; + message: { + text: string; + }; + locations: ISarifLocation[]; + ruleId?: string; + ruleIndex?: number; + descriptor?: { + id: string; + }; + suppressions?: ISuppressedAnalysis[]; +} + +// Interface for the SARIF log structure +export interface ISarifLog { + version: string; + $schema: string; + runs: ISarifRun[]; +} + +export interface IRegion { + startLine?: number; + startColumn?: number; + endLine?: number; + endColumn?: number; + snippet?: { + text: string; + }; +} + +export interface IStaticAnalysisRules { + id: string; + name?: string; + shortDescription?: { + text: string; + }; + fullDescription?: { + text: string; + }; + defaultConfiguration?: { + level: 'note' | 'warning' | 'error'; + }; + helpUri?: string; + properties?: { + category?: string; + precision?: 'very-high' | 'high' | 'medium' | 'low'; + tags?: string[]; + problem?: { + severity?: 'recommendation' | 'warning' | 'error'; + securitySeverity?: number; + }; + }; +} + +export interface ISarifFile { + location: { + uri: string; + }; +} + +export interface ISuppressedAnalysis { + kind: string; + justification: string; +} + +export interface ISarifLocation { + physicalLocation: ISarifPhysicalLocation; +} + +export interface ISarifArtifactLocation { + uri: string; + index?: number; +} + +export interface ISarifPhysicalLocation { + artifactLocation: ISarifArtifactLocation; + region?: IRegion; +} + +export interface ISarifRule { + id: string; + helpUri?: string; + shortDescription?: { + text: string; + }; + properties?: { + category?: string; + }; +} + +interface IMessage extends TEslint.Linter.LintMessage { + suppressions?: ISuppressedAnalysis[]; +} + +const INTERNAL_ERROR_ID: 'ESL0999' = 'ESL0999'; +const SARIF_VERSION: '2.1.0' = '2.1.0'; +const SARIF_INFORMATION_URI: 'http://json.schemastore.org/sarif-2.1.0-rtm.5' = + 'http://json.schemastore.org/sarif-2.1.0-rtm.5'; +/** + * Converts ESLint results into a SARIF (Static Analysis Results Interchange Format) log. + * + * This function takes in a list of ESLint lint results, processes them to extract + * relevant information such as errors, warnings, and suppressed messages, and + * outputs a SARIF log which conforms to the SARIF v2.1.0 specification. + * + * @param results - An array of lint results from ESLint that contains linting information, + * such as file paths, messages, and suppression details. + * @param rulesMeta - An object containing metadata about the ESLint rules that were applied during the linting session. + * The keys are the rule names, and the values are rule metadata objects + * that describe each rule. This metadata typically includes: + * - `docs`: Documentation about the rule. + * - `fixable`: Indicates whether the rule is fixable. + * - `messages`: Custom messages that the rule might output when triggered. + * - `schema`: The configuration schema for the rule. + * This metadata helps in providing more context about the rules when generating the SARIF log. + * @param options - An object containing options for formatting: + * - `ignoreSuppressed`: Boolean flag to decide whether to ignore suppressed messages. + * - `eslintVersion`: Optional string to include the version of ESLint in the SARIF log. + * @returns The SARIF log containing information about the linting results in SARIF format. + */ + +export function formatEslintResultsAsSARIF( + results: TEslint.ESLint.LintResult[], + rulesMeta: TEslint.ESLint.LintResultData['rulesMeta'], + options: ISerifFormatterOptions +): ISarifLog { + const { ignoreSuppressed, eslintVersion, buildFolderPath } = options; + const toolConfigurationNotifications: ISarifRepresentation[] = []; + const sarifFiles: ISarifFile[] = []; + const sarifResults: ISarifRepresentation[] = []; + const sarifArtifactIndices: Map = new Map(); + const sarifRules: ISarifRule[] = []; + const sarifRuleIndices: Map = new Map(); + + const sarifRun: ISarifRun = { + tool: { + driver: { + name: 'ESLint', + informationUri: 'https://eslint.org', + version: eslintVersion, + rules: [] + } + } + }; + + const sarifLog: ISarifLog = { + version: SARIF_VERSION, + $schema: SARIF_INFORMATION_URI, + runs: [sarifRun] + }; + + let executionSuccessful: boolean = true; + let currentArtifactIndex: number = 0; + let currentRuleIndex: number = 0; + + for (const result of results) { + const { filePath } = result; + const fileUrl: string = Path.convertToSlashes(path.relative(buildFolderPath, filePath)); + let sarifFileIndex: number | undefined = sarifArtifactIndices.get(fileUrl); + + if (sarifFileIndex === undefined) { + sarifFileIndex = currentArtifactIndex++; + sarifArtifactIndices.set(fileUrl, sarifFileIndex); + sarifFiles.push({ + location: { + uri: fileUrl + } + }); + } + + const artifactLocation: ISarifArtifactLocation = { + uri: fileUrl, + index: sarifFileIndex + }; + + const containsSuppressedMessages: boolean = + result.suppressedMessages && result.suppressedMessages.length > 0; + const messages: IMessage[] = + containsSuppressedMessages && !ignoreSuppressed + ? [...result.messages, ...result.suppressedMessages] + : result.messages; + + for (const message of messages) { + const level: string = message.fatal || message.severity === 2 ? 'error' : 'warning'; + const physicalLocation: ISarifPhysicalLocation = { + artifactLocation + }; + + const sarifRepresentation: ISarifRepresentation = { + level, + message: { + text: message.message + }, + locations: [ + { + physicalLocation + } + ] + }; + + if (message.ruleId) { + sarifRepresentation.ruleId = message.ruleId; + + if (rulesMeta && sarifRuleIndices.get(message.ruleId) === undefined) { + const meta: TEslint.Rule.RuleMetaData = rulesMeta[message.ruleId]; + + // An unknown ruleId will return null. This check prevents unit test failure. + if (meta) { + sarifRuleIndices.set(message.ruleId, currentRuleIndex++); + + if (meta.docs) { + // Create a new entry in the rules dictionary. + const shortDescription: string = meta.docs.description ?? ''; + + const sarifRule: ISarifRule = { + id: message.ruleId, + helpUri: meta.docs.url, + properties: { + category: meta.docs.category + }, + shortDescription: { + text: shortDescription + } + }; + sarifRules.push(sarifRule); + // Some rulesMetas do not have docs property + } else { + sarifRules.push({ + id: message.ruleId, + properties: { + category: 'No category provided' + }, + shortDescription: { + text: 'Please see details in message' + } + }); + } + } + } + + if (sarifRuleIndices.has(message.ruleId)) { + sarifRepresentation.ruleIndex = sarifRuleIndices.get(message.ruleId); + } + + if (containsSuppressedMessages && !ignoreSuppressed) { + sarifRepresentation.suppressions = message.suppressions + ? message.suppressions.map((suppression: ISuppressedAnalysis) => { + return { + kind: suppression.kind === 'directive' ? 'inSource' : 'external', + justification: suppression.justification + }; + }) + : []; + } + } else { + sarifRepresentation.descriptor = { + id: INTERNAL_ERROR_ID + }; + + if (sarifRepresentation.level === 'error') { + executionSuccessful = false; + } + } + + if (message.line !== undefined || message.column !== undefined) { + const { line: startLine, column: startColumn, endLine, endColumn } = message; + const region: IRegion = { + startLine, + startColumn, + endLine, + endColumn + }; + physicalLocation.region = region; + } + + if (message.source) { + physicalLocation.region ??= {}; + physicalLocation.region.snippet = { + text: message.source + }; + } + + if (message.ruleId) { + sarifResults.push(sarifRepresentation); + } else { + toolConfigurationNotifications.push(sarifRepresentation); + } + } + } + + if (sarifRules.length > 0) { + sarifRun.tool.driver.rules = sarifRules; + } + + if (sarifFiles.length > 0) { + sarifRun.artifacts = sarifFiles; + } + + sarifRun.results = sarifResults; + + if (toolConfigurationNotifications.length > 0) { + sarifRun.invocations = [ + { + toolConfigurationNotifications, + executionSuccessful + } + ]; + } + + return sarifLog; +} diff --git a/heft-plugins/heft-lint-plugin/src/schemas/heft-lint-plugin.schema.json b/heft-plugins/heft-lint-plugin/src/schemas/heft-lint-plugin.schema.json index d48c0d3788e..072d2c70df6 100644 --- a/heft-plugins/heft-lint-plugin/src/schemas/heft-lint-plugin.schema.json +++ b/heft-plugins/heft-lint-plugin/src/schemas/heft-lint-plugin.schema.json @@ -11,6 +11,12 @@ "title": "Always Fix", "description": "If set to true, fix all encountered rule violations where the violated rule provides a fixer, regardless of if the \"--fix\" command-line argument is provided. When running in production mode, fixes will be disabled regardless of this setting.", "type": "boolean" + }, + + "sarifLogPath": { + "title": "SARIF Log Path", + "description": "If specified and using ESLint, a log describing the lint configuration and all messages (suppressed or not) will be emitted in the Static Analysis Results Interchange Format (https://sarifweb.azurewebsites.net/) at the provided path, relative to the project root.", + "type": "string" } } } diff --git a/heft-plugins/heft-lint-plugin/src/test/SarifFormatter.test.ts b/heft-plugins/heft-lint-plugin/src/test/SarifFormatter.test.ts new file mode 100644 index 00000000000..c4f359cf3ad --- /dev/null +++ b/heft-plugins/heft-lint-plugin/src/test/SarifFormatter.test.ts @@ -0,0 +1,651 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { formatEslintResultsAsSARIF } from '../SarifFormatter'; +import type { ISerifFormatterOptions } from '../SarifFormatter'; +import type { ESLint } from 'eslint'; + +describe('formatEslintResultsAsSARIF', () => { + test('should correctly format ESLint results into SARIF log', () => { + const mockLintResults: ESLint.LintResult[] = [ + { + filePath: '/src/file1.ts', + messages: [ + { + ruleId: 'no-unused-vars', + severity: 2, + message: "'x' is defined but never used.", + line: 10, + column: 5, + nodeType: 'Identifier', + endLine: 10, + endColumn: 6, + source: 'const x = 1;' + } + ], + suppressedMessages: [], + errorCount: 1, + warningCount: 0, + fixableErrorCount: 0, + fixableWarningCount: 0, + usedDeprecatedRules: [], + fatalErrorCount: 0 + } + ]; + + const mockRulesMeta: ESLint.LintResultData['rulesMeta'] = { + 'no-unused-vars': { + type: 'suggestion', + docs: { + description: "'x' is defined but never used.", + recommended: false, + url: 'https://eslint.org/docs/latest/rules/no-unused-vars' + }, + schema: [ + { + type: 'object', + properties: { + allow: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + hasSuggestions: true, + messages: { + unexpected: "'x' is defined but never used." + } + } + }; + + const options: ISerifFormatterOptions = { + ignoreSuppressed: false, + eslintVersion: '7.32.0', + buildFolderPath: '/' + }; + + const sarifLog = formatEslintResultsAsSARIF(mockLintResults, mockRulesMeta, options); + + expect(sarifLog).toMatchSnapshot(); + }); + + test('case with no files', () => { + const mockLintResults: ESLint.LintResult[] = []; + + const mockRulesMeta: ESLint.LintResultData['rulesMeta'] = {}; + + const options: ISerifFormatterOptions = { + ignoreSuppressed: false, + eslintVersion: '7.32.0', + buildFolderPath: '/' + }; + + const sarifLog = formatEslintResultsAsSARIF(mockLintResults, mockRulesMeta, options); + + expect(sarifLog).toMatchSnapshot(); + }); + + test('case with single issues in the same file', () => { + const mockLintResults: ESLint.LintResult[] = [ + { + filePath: '/src/file1.ts', + messages: [ + { + ruleId: 'no-unused-vars', + severity: 2, + message: "'x' is defined but never used.", + line: 10, + column: 5, + nodeType: 'Identifier', + endLine: 10, + endColumn: 6, + source: 'const x = 1;' + } + ], + suppressedMessages: [], + errorCount: 1, + warningCount: 0, + fixableErrorCount: 0, + fixableWarningCount: 0, + usedDeprecatedRules: [], + fatalErrorCount: 0 + } + ]; + + const mockRulesMeta: ESLint.LintResultData['rulesMeta'] = { + 'no-unused-vars': { + type: 'suggestion', + docs: { + description: "'x' is defined but never used.", + recommended: false, + url: 'https://eslint.org/docs/latest/rules/no-unused-vars' + }, + schema: [ + { + type: 'object', + properties: { + allow: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + hasSuggestions: true, + messages: { + unexpected: "'x' is defined but never used." + } + } + }; + + const options: ISerifFormatterOptions = { + ignoreSuppressed: false, + eslintVersion: '7.32.0', + buildFolderPath: '/' + }; + + const sarifLog = formatEslintResultsAsSARIF(mockLintResults, mockRulesMeta, options); + + expect(sarifLog).toMatchSnapshot(); + }); + + test('should handle multiple issues in the same file', async () => { + const mockLintResults: ESLint.LintResult[] = [ + { + filePath: '/src/file2.ts', + messages: [ + { + ruleId: 'no-unused-vars', + severity: 2, + message: "'x' is defined but never used.", + line: 5, + column: 10, + nodeType: 'Identifier', + endLine: 5, + endColumn: 11, + source: 'let x;' + }, + { + ruleId: 'no-console', + severity: 1, + message: 'Unexpected console statement.', + line: 10, + column: 5, + nodeType: 'MemberExpression', + endLine: 10, + endColumn: 16, + source: 'console.log("test");' + } + ], + suppressedMessages: [], + errorCount: 1, + warningCount: 1, + fixableErrorCount: 0, + fixableWarningCount: 0, + usedDeprecatedRules: [], + fatalErrorCount: 0 + } + ]; + + const mockRulesMeta: ESLint.LintResultData['rulesMeta'] = { + 'no-console': { + type: 'suggestion', + docs: { + description: 'Disallow the use of `console`', + recommended: false, + url: 'https://eslint.org/docs/latest/rules/no-console' + }, + schema: [ + { + type: 'object', + properties: { + allow: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + hasSuggestions: true, + messages: { + unexpected: 'Unexpected console statement.', + removeConsole: 'Remove the console.{{ propertyName }}().' + } + }, + 'no-unused-vars': { + type: 'suggestion', + docs: { + description: "'x' is defined but never used.", + recommended: false, + url: 'https://eslint.org/docs/latest/rules/no-unused-vars' + }, + schema: [ + { + type: 'object', + properties: { + allow: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + hasSuggestions: true, + messages: { + unexpected: "'x' is defined but never used." + } + } + }; + + const options: ISerifFormatterOptions = { + ignoreSuppressed: false, + eslintVersion: '7.32.0', + buildFolderPath: '/' + }; + + const sarifLog = await formatEslintResultsAsSARIF(mockLintResults, mockRulesMeta, options); + + expect(sarifLog).toMatchSnapshot(); + }); + + test('should handle a file with no messages', async () => { + const mockLintResults: ESLint.LintResult[] = [ + { + filePath: '/src/file3.ts', + messages: [], + suppressedMessages: [], + errorCount: 0, + warningCount: 0, + fixableErrorCount: 0, + fixableWarningCount: 0, + usedDeprecatedRules: [], + fatalErrorCount: 0 + } + ]; + + const mockRulesMeta: ESLint.LintResultData['rulesMeta'] = {}; + + const options: ISerifFormatterOptions = { + ignoreSuppressed: false, + eslintVersion: '7.32.0', + buildFolderPath: '/' + }; + + const sarifLog = await formatEslintResultsAsSARIF(mockLintResults, mockRulesMeta, options); + + expect(sarifLog).toMatchSnapshot(); + }); + + test('should handle multiple files', async () => { + const mockLintResults: ESLint.LintResult[] = [ + { + filePath: '/src/file1.ts', + messages: [ + { + ruleId: 'no-unused-vars', + severity: 2, + message: "'x' is defined but never used.", + line: 10, + column: 5, + nodeType: 'Identifier', + endLine: 10, + endColumn: 6, + source: 'const x = 1;' + } + ], + suppressedMessages: [], + errorCount: 1, + warningCount: 0, + fixableErrorCount: 0, + fixableWarningCount: 0, + usedDeprecatedRules: [], + fatalErrorCount: 0 + }, + { + filePath: '/src/file2.ts', + messages: [ + { + ruleId: 'eqeqeq', + severity: 2, + message: "Expected '===' and instead saw '=='.", + line: 15, + column: 8, + nodeType: 'BinaryExpression', + endLine: 15, + endColumn: 10, + source: 'if (a == b) { }' + } + ], + suppressedMessages: [], + errorCount: 1, + warningCount: 0, + fixableErrorCount: 0, + fixableWarningCount: 0, + usedDeprecatedRules: [], + fatalErrorCount: 0 + } + ]; + + const mockRulesMeta: ESLint.LintResultData['rulesMeta'] = { + 'no-console': { + type: 'suggestion', + docs: { + description: 'Disallow the use of `console`', + recommended: false, + url: 'https://eslint.org/docs/latest/rules/no-console' + }, + schema: [ + { + type: 'object', + properties: { + allow: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + hasSuggestions: true, + messages: { + unexpected: 'Unexpected console statement.', + removeConsole: 'Remove the console.{{ propertyName }}().' + } + }, + eqeqeq: { + type: 'problem', + docs: { + description: 'Require the use of === and !==', + recommended: false, + url: 'https://eslint.org/docs/latest/rules/eqeqeq' + }, + schema: [ + { + type: 'object', + properties: { + allow: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + hasSuggestions: true, + messages: { + unexpected: "Expected '===' and instead saw '=='." + } + } + }; + + const options: ISerifFormatterOptions = { + ignoreSuppressed: false, + eslintVersion: '7.32.0', + buildFolderPath: '/' + }; + + const sarifLog = await formatEslintResultsAsSARIF(mockLintResults, mockRulesMeta, options); + + expect(sarifLog).toMatchSnapshot(); + }); + + test('should handle ignoreSuppressed: true with suppressed messages', async () => { + const mockLintResults: ESLint.LintResult[] = [ + { + filePath: '/src/file4.ts', + messages: [ + { + ruleId: 'no-debugger', + severity: 2, + message: "Unexpected 'debugger' statement.", + line: 20, + column: 1, + nodeType: 'DebuggerStatement', + endLine: 20, + endColumn: 9, + source: 'debugger;' + } + ], + suppressedMessages: [ + { + ruleId: 'no-console', + severity: 1, + message: 'Unexpected console statement.', + line: 10, + column: 5, + nodeType: 'MemberExpression', + endLine: 10, + endColumn: 16, + source: 'console.log("test");', + suppressions: [ + { + kind: 'inSource', + justification: 'rejected' + } + ] + } + ], + errorCount: 1, + warningCount: 0, + fixableErrorCount: 0, + fixableWarningCount: 0, + usedDeprecatedRules: [], + fatalErrorCount: 0 + } + ]; + + const mockRulesMeta: ESLint.LintResultData['rulesMeta'] = { + 'no-console': { + type: 'suggestion', + docs: { + description: 'Disallow the use of `console`', + recommended: false, + url: 'https://eslint.org/docs/latest/rules/no-console' + }, + schema: [ + { + type: 'object', + properties: { + allow: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + hasSuggestions: true, + messages: { + unexpected: 'Unexpected console statement.', + removeConsole: 'Remove the console.{{ propertyName }}().' + } + }, + 'no-debugger': { + type: 'suggestion', + docs: { + description: 'Disallow the use of debugger', + recommended: false, + url: 'https://eslint.org/docs/latest/rules/no-debugger' + }, + schema: [ + { + type: 'object', + properties: { + allow: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + hasSuggestions: true, + messages: { + unexpected: "Unexpected 'debugger' statement." + } + } + }; + + const options: ISerifFormatterOptions = { + ignoreSuppressed: true, + eslintVersion: '7.32.0', + buildFolderPath: '/' + }; + + const sarifLog = await formatEslintResultsAsSARIF(mockLintResults, mockRulesMeta, options); + + expect(sarifLog).toMatchSnapshot(); + }); + + test('should handle ignoreSuppressed: false with suppressed messages', async () => { + const mockLintResults: ESLint.LintResult[] = [ + { + filePath: '/src/file4.ts', + messages: [ + { + ruleId: 'no-debugger', + severity: 2, + message: "Unexpected 'debugger' statement.", + line: 20, + column: 1, + nodeType: 'DebuggerStatement', + endLine: 20, + endColumn: 9, + source: 'debugger;' + } + ], + suppressedMessages: [ + { + ruleId: 'no-console', + severity: 1, + message: 'Unexpected console statement.', + line: 10, + column: 5, + nodeType: 'MemberExpression', + endLine: 10, + endColumn: 16, + source: 'console.log("test");', + suppressions: [ + { + kind: 'inSource', + justification: 'rejected' + } + ] + } + ], + errorCount: 1, + warningCount: 0, + fixableErrorCount: 0, + fixableWarningCount: 0, + usedDeprecatedRules: [], + fatalErrorCount: 0 + } + ]; + + const mockRulesMeta: ESLint.LintResultData['rulesMeta'] = { + 'no-console': { + type: 'suggestion', + docs: { + description: 'Disallow the use of `console`', + recommended: false, + url: 'https://eslint.org/docs/latest/rules/no-console' + }, + schema: [ + { + type: 'object', + properties: { + allow: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + hasSuggestions: true, + messages: { + unexpected: 'Unexpected console statement.', + removeConsole: 'Remove the console.{{ propertyName }}().' + } + }, + 'no-debugger': { + type: 'suggestion', + docs: { + description: 'Disallow the use of debugger', + recommended: false, + url: 'https://eslint.org/docs/latest/rules/no-debugger' + }, + schema: [ + { + type: 'object', + properties: { + allow: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + hasSuggestions: true, + messages: { + unexpected: "Unexpected 'debugger' statement." + } + } + }; + + const options: ISerifFormatterOptions = { + ignoreSuppressed: false, + eslintVersion: '7.32.0', + buildFolderPath: '/' + }; + + const sarifLog = await formatEslintResultsAsSARIF(mockLintResults, mockRulesMeta, options); + + expect(sarifLog).toMatchSnapshot(); + }); +}); diff --git a/heft-plugins/heft-lint-plugin/src/test/__snapshots__/SarifFormatter.test.ts.snap b/heft-plugins/heft-lint-plugin/src/test/__snapshots__/SarifFormatter.test.ts.snap new file mode 100644 index 00000000000..5460eb4c2b0 --- /dev/null +++ b/heft-plugins/heft-lint-plugin/src/test/__snapshots__/SarifFormatter.test.ts.snap @@ -0,0 +1,622 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`formatEslintResultsAsSARIF case with no files 1`] = ` +Object { + "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.5", + "runs": Array [ + Object { + "results": Array [], + "tool": Object { + "driver": Object { + "informationUri": "https://eslint.org", + "name": "ESLint", + "rules": Array [], + "version": "7.32.0", + }, + }, + }, + ], + "version": "2.1.0", +} +`; + +exports[`formatEslintResultsAsSARIF case with single issues in the same file 1`] = ` +Object { + "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.5", + "runs": Array [ + Object { + "artifacts": Array [ + Object { + "location": Object { + "uri": "src/file1.ts", + }, + }, + ], + "results": Array [ + Object { + "level": "error", + "locations": Array [ + Object { + "physicalLocation": Object { + "artifactLocation": Object { + "index": 0, + "uri": "src/file1.ts", + }, + "region": Object { + "endColumn": 6, + "endLine": 10, + "snippet": Object { + "text": "const x = 1;", + }, + "startColumn": 5, + "startLine": 10, + }, + }, + }, + ], + "message": Object { + "text": "'x' is defined but never used.", + }, + "ruleId": "no-unused-vars", + "ruleIndex": 0, + }, + ], + "tool": Object { + "driver": Object { + "informationUri": "https://eslint.org", + "name": "ESLint", + "rules": Array [ + Object { + "helpUri": "https://eslint.org/docs/latest/rules/no-unused-vars", + "id": "no-unused-vars", + "properties": Object { + "category": undefined, + }, + "shortDescription": Object { + "text": "'x' is defined but never used.", + }, + }, + ], + "version": "7.32.0", + }, + }, + }, + ], + "version": "2.1.0", +} +`; + +exports[`formatEslintResultsAsSARIF should correctly format ESLint results into SARIF log 1`] = ` +Object { + "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.5", + "runs": Array [ + Object { + "artifacts": Array [ + Object { + "location": Object { + "uri": "src/file1.ts", + }, + }, + ], + "results": Array [ + Object { + "level": "error", + "locations": Array [ + Object { + "physicalLocation": Object { + "artifactLocation": Object { + "index": 0, + "uri": "src/file1.ts", + }, + "region": Object { + "endColumn": 6, + "endLine": 10, + "snippet": Object { + "text": "const x = 1;", + }, + "startColumn": 5, + "startLine": 10, + }, + }, + }, + ], + "message": Object { + "text": "'x' is defined but never used.", + }, + "ruleId": "no-unused-vars", + "ruleIndex": 0, + }, + ], + "tool": Object { + "driver": Object { + "informationUri": "https://eslint.org", + "name": "ESLint", + "rules": Array [ + Object { + "helpUri": "https://eslint.org/docs/latest/rules/no-unused-vars", + "id": "no-unused-vars", + "properties": Object { + "category": undefined, + }, + "shortDescription": Object { + "text": "'x' is defined but never used.", + }, + }, + ], + "version": "7.32.0", + }, + }, + }, + ], + "version": "2.1.0", +} +`; + +exports[`formatEslintResultsAsSARIF should handle a file with no messages 1`] = ` +Object { + "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.5", + "runs": Array [ + Object { + "artifacts": Array [ + Object { + "location": Object { + "uri": "src/file3.ts", + }, + }, + ], + "results": Array [], + "tool": Object { + "driver": Object { + "informationUri": "https://eslint.org", + "name": "ESLint", + "rules": Array [], + "version": "7.32.0", + }, + }, + }, + ], + "version": "2.1.0", +} +`; + +exports[`formatEslintResultsAsSARIF should handle ignoreSuppressed: false with suppressed messages 1`] = ` +Object { + "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.5", + "runs": Array [ + Object { + "artifacts": Array [ + Object { + "location": Object { + "uri": "src/file4.ts", + }, + }, + ], + "results": Array [ + Object { + "level": "error", + "locations": Array [ + Object { + "physicalLocation": Object { + "artifactLocation": Object { + "index": 0, + "uri": "src/file4.ts", + }, + "region": Object { + "endColumn": 9, + "endLine": 20, + "snippet": Object { + "text": "debugger;", + }, + "startColumn": 1, + "startLine": 20, + }, + }, + }, + ], + "message": Object { + "text": "Unexpected 'debugger' statement.", + }, + "ruleId": "no-debugger", + "ruleIndex": 0, + "suppressions": Array [], + }, + Object { + "level": "warning", + "locations": Array [ + Object { + "physicalLocation": Object { + "artifactLocation": Object { + "index": 0, + "uri": "src/file4.ts", + }, + "region": Object { + "endColumn": 16, + "endLine": 10, + "snippet": Object { + "text": "console.log(\\"test\\");", + }, + "startColumn": 5, + "startLine": 10, + }, + }, + }, + ], + "message": Object { + "text": "Unexpected console statement.", + }, + "ruleId": "no-console", + "ruleIndex": 1, + "suppressions": Array [ + Object { + "justification": "rejected", + "kind": "external", + }, + ], + }, + ], + "tool": Object { + "driver": Object { + "informationUri": "https://eslint.org", + "name": "ESLint", + "rules": Array [ + Object { + "helpUri": "https://eslint.org/docs/latest/rules/no-debugger", + "id": "no-debugger", + "properties": Object { + "category": undefined, + }, + "shortDescription": Object { + "text": "Disallow the use of debugger", + }, + }, + Object { + "helpUri": "https://eslint.org/docs/latest/rules/no-console", + "id": "no-console", + "properties": Object { + "category": undefined, + }, + "shortDescription": Object { + "text": "Disallow the use of \`console\`", + }, + }, + ], + "version": "7.32.0", + }, + }, + }, + ], + "version": "2.1.0", +} +`; + +exports[`formatEslintResultsAsSARIF should handle ignoreSuppressed: true with suppressed messages 1`] = ` +Object { + "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.5", + "runs": Array [ + Object { + "artifacts": Array [ + Object { + "location": Object { + "uri": "src/file4.ts", + }, + }, + ], + "results": Array [ + Object { + "level": "error", + "locations": Array [ + Object { + "physicalLocation": Object { + "artifactLocation": Object { + "index": 0, + "uri": "src/file4.ts", + }, + "region": Object { + "endColumn": 9, + "endLine": 20, + "snippet": Object { + "text": "debugger;", + }, + "startColumn": 1, + "startLine": 20, + }, + }, + }, + ], + "message": Object { + "text": "Unexpected 'debugger' statement.", + }, + "ruleId": "no-debugger", + "ruleIndex": 0, + }, + ], + "tool": Object { + "driver": Object { + "informationUri": "https://eslint.org", + "name": "ESLint", + "rules": Array [ + Object { + "helpUri": "https://eslint.org/docs/latest/rules/no-debugger", + "id": "no-debugger", + "properties": Object { + "category": undefined, + }, + "shortDescription": Object { + "text": "Disallow the use of debugger", + }, + }, + ], + "version": "7.32.0", + }, + }, + }, + ], + "version": "2.1.0", +} +`; + +exports[`formatEslintResultsAsSARIF should handle messages without file locations 1`] = ` +Object { + "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.5", + "runs": Array [ + Object { + "artifacts": Array [ + Object { + "location": Object { + "uri": "src/file5.ts", + }, + }, + ], + "results": Array [ + Object { + "level": "warning", + "locations": Array [ + Object { + "physicalLocation": Object { + "artifactLocation": Object { + "index": 0, + "uri": "src/file5.ts", + }, + "region": Object { + "endColumn": undefined, + "endLine": undefined, + "snippet": Object { + "text": "console.log(\\"test\\");", + }, + "startColumn": 5, + "startLine": 10, + }, + }, + }, + ], + "message": Object { + "text": "Unexpected console statement.", + }, + "ruleId": "no-console", + "ruleIndex": 0, + }, + ], + "tool": Object { + "driver": Object { + "informationUri": "https://eslint.org", + "name": "ESLint", + "rules": Array [ + Object { + "helpUri": "https://eslint.org/docs/latest/rules/no-console", + "id": "no-console", + "properties": Object { + "category": undefined, + }, + "shortDescription": Object { + "text": "Disallow the use of \`console\`", + }, + }, + ], + "version": "7.32.0", + }, + }, + }, + ], + "version": "2.1.0", +} +`; + +exports[`formatEslintResultsAsSARIF should handle multiple files 1`] = ` +Object { + "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.5", + "runs": Array [ + Object { + "artifacts": Array [ + Object { + "location": Object { + "uri": "src/file1.ts", + }, + }, + Object { + "location": Object { + "uri": "src/file2.ts", + }, + }, + ], + "results": Array [ + Object { + "level": "error", + "locations": Array [ + Object { + "physicalLocation": Object { + "artifactLocation": Object { + "index": 0, + "uri": "src/file1.ts", + }, + "region": Object { + "endColumn": 6, + "endLine": 10, + "snippet": Object { + "text": "const x = 1;", + }, + "startColumn": 5, + "startLine": 10, + }, + }, + }, + ], + "message": Object { + "text": "'x' is defined but never used.", + }, + "ruleId": "no-unused-vars", + }, + Object { + "level": "error", + "locations": Array [ + Object { + "physicalLocation": Object { + "artifactLocation": Object { + "index": 1, + "uri": "src/file2.ts", + }, + "region": Object { + "endColumn": 10, + "endLine": 15, + "snippet": Object { + "text": "if (a == b) { }", + }, + "startColumn": 8, + "startLine": 15, + }, + }, + }, + ], + "message": Object { + "text": "Expected '===' and instead saw '=='.", + }, + "ruleId": "eqeqeq", + "ruleIndex": 0, + }, + ], + "tool": Object { + "driver": Object { + "informationUri": "https://eslint.org", + "name": "ESLint", + "rules": Array [ + Object { + "helpUri": "https://eslint.org/docs/latest/rules/eqeqeq", + "id": "eqeqeq", + "properties": Object { + "category": undefined, + }, + "shortDescription": Object { + "text": "Require the use of === and !==", + }, + }, + ], + "version": "7.32.0", + }, + }, + }, + ], + "version": "2.1.0", +} +`; + +exports[`formatEslintResultsAsSARIF should handle multiple issues in the same file 1`] = ` +Object { + "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.5", + "runs": Array [ + Object { + "artifacts": Array [ + Object { + "location": Object { + "uri": "src/file2.ts", + }, + }, + ], + "results": Array [ + Object { + "level": "error", + "locations": Array [ + Object { + "physicalLocation": Object { + "artifactLocation": Object { + "index": 0, + "uri": "src/file2.ts", + }, + "region": Object { + "endColumn": 11, + "endLine": 5, + "snippet": Object { + "text": "let x;", + }, + "startColumn": 10, + "startLine": 5, + }, + }, + }, + ], + "message": Object { + "text": "'x' is defined but never used.", + }, + "ruleId": "no-unused-vars", + "ruleIndex": 0, + }, + Object { + "level": "warning", + "locations": Array [ + Object { + "physicalLocation": Object { + "artifactLocation": Object { + "index": 0, + "uri": "src/file2.ts", + }, + "region": Object { + "endColumn": 16, + "endLine": 10, + "snippet": Object { + "text": "console.log(\\"test\\");", + }, + "startColumn": 5, + "startLine": 10, + }, + }, + }, + ], + "message": Object { + "text": "Unexpected console statement.", + }, + "ruleId": "no-console", + "ruleIndex": 1, + }, + ], + "tool": Object { + "driver": Object { + "informationUri": "https://eslint.org", + "name": "ESLint", + "rules": Array [ + Object { + "helpUri": "https://eslint.org/docs/latest/rules/no-unused-vars", + "id": "no-unused-vars", + "properties": Object { + "category": undefined, + }, + "shortDescription": Object { + "text": "'x' is defined but never used.", + }, + }, + Object { + "helpUri": "https://eslint.org/docs/latest/rules/no-console", + "id": "no-console", + "properties": Object { + "category": undefined, + }, + "shortDescription": Object { + "text": "Disallow the use of \`console\`", + }, + }, + ], + "version": "7.32.0", + }, + }, + }, + ], + "version": "2.1.0", +} +`; diff --git a/heft-plugins/heft-lint-plugin/tsconfig.json b/heft-plugins/heft-lint-plugin/tsconfig.json index a66d877424d..e7de6e2eef2 100644 --- a/heft-plugins/heft-lint-plugin/tsconfig.json +++ b/heft-plugins/heft-lint-plugin/tsconfig.json @@ -3,6 +3,6 @@ "compilerOptions": { "isolatedModules": true, - "types": ["node"] + "types": ["heft-jest", "node"] } } diff --git a/heft-plugins/heft-localization-typings-plugin/CHANGELOG.json b/heft-plugins/heft-localization-typings-plugin/CHANGELOG.json index 338eff1c6f7..abf715656d0 100644 --- a/heft-plugins/heft-localization-typings-plugin/CHANGELOG.json +++ b/heft-plugins/heft-localization-typings-plugin/CHANGELOG.json @@ -1,6 +1,240 @@ { "name": "@rushstack/heft-localization-typings-plugin", "entries": [ + { + "version": "0.2.19", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.19", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.19`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.2.18", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.18", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.18`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.2.17", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.17", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.17`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.2.16", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.16", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.16`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.2.15", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.15", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.2.14", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.14", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.2.13", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.13", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.2.12", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.12", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.2.11", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.11", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.2.10", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.10", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.2.9", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.9", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.2.8", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.8", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.2.7", + "tag": "@rushstack/heft-localization-typings-plugin_v0.2.7", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.2` to `0.68.3`" + } + ] + } + }, { "version": "0.2.6", "tag": "@rushstack/heft-localization-typings-plugin_v0.2.6", diff --git a/heft-plugins/heft-localization-typings-plugin/CHANGELOG.md b/heft-plugins/heft-localization-typings-plugin/CHANGELOG.md index 7a476a4816c..5e2232d4365 100644 --- a/heft-plugins/heft-localization-typings-plugin/CHANGELOG.md +++ b/heft-plugins/heft-localization-typings-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/heft-localization-typings-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.2.19 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.2.18 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.2.17 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.2.16 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.2.15 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.2.14 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.2.13 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.2.12 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.2.11 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.2.10 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.2.9 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.2.8 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.2.7 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.2.6 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/heft-plugins/heft-localization-typings-plugin/package.json b/heft-plugins/heft-localization-typings-plugin/package.json index 4a554551277..f72a38ff5ab 100644 --- a/heft-plugins/heft-localization-typings-plugin/package.json +++ b/heft-plugins/heft-localization-typings-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-localization-typings-plugin", - "version": "0.2.6", + "version": "0.2.19", "description": "Heft plugin for generating types for localization files.", "repository": { "type": "git", @@ -16,7 +16,7 @@ "_phase:test": "heft run --only test -- --clean" }, "peerDependencies": { - "@rushstack/heft": "^0.68.2" + "@rushstack/heft": "^0.68.15" }, "devDependencies": { "@rushstack/heft": "workspace:*", diff --git a/heft-plugins/heft-sass-plugin/CHANGELOG.json b/heft-plugins/heft-sass-plugin/CHANGELOG.json index 5af96a5b62b..b4de47c7777 100644 --- a/heft-plugins/heft-sass-plugin/CHANGELOG.json +++ b/heft-plugins/heft-sass-plugin/CHANGELOG.json @@ -1,6 +1,297 @@ { "name": "@rushstack/heft-sass-plugin", "entries": [ + { + "version": "0.15.13", + "tag": "@rushstack/heft-sass-plugin_v0.15.13", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.19`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.15.12", + "tag": "@rushstack/heft-sass-plugin_v0.15.12", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.4`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.18`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.15.11", + "tag": "@rushstack/heft-sass-plugin_v0.15.11", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.3`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.17`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.15.10", + "tag": "@rushstack/heft-sass-plugin_v0.15.10", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.16`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.15.9", + "tag": "@rushstack/heft-sass-plugin_v0.15.9", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.2`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.15`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.15.8", + "tag": "@rushstack/heft-sass-plugin_v0.15.8", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.1`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.15.7", + "tag": "@rushstack/heft-sass-plugin_v0.15.7", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.16.0`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.15.6", + "tag": "@rushstack/heft-sass-plugin_v0.15.6", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.12`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.15.5", + "tag": "@rushstack/heft-sass-plugin_v0.15.5", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.15.9`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.11`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.15.4", + "tag": "@rushstack/heft-sass-plugin_v0.15.4", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.15.8`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.15.3", + "tag": "@rushstack/heft-sass-plugin_v0.15.3", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.15.2", + "tag": "@rushstack/heft-sass-plugin_v0.15.2", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.8`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.15.1", + "tag": "@rushstack/heft-sass-plugin_v0.15.1", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.7`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.2` to `0.68.3`" + } + ] + } + }, { "version": "0.15.0", "tag": "@rushstack/heft-sass-plugin_v0.15.0", diff --git a/heft-plugins/heft-sass-plugin/CHANGELOG.md b/heft-plugins/heft-sass-plugin/CHANGELOG.md index b95fe068110..cc3fbee0da3 100644 --- a/heft-plugins/heft-sass-plugin/CHANGELOG.md +++ b/heft-plugins/heft-sass-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/heft-sass-plugin -This log was last generated on Thu, 03 Oct 2024 19:46:23 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.15.13 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.15.12 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.15.11 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.15.10 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.15.9 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.15.8 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.15.7 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 0.15.6 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.15.5 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.15.4 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.15.3 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.15.2 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.15.1 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.15.0 Thu, 03 Oct 2024 19:46:23 GMT diff --git a/heft-plugins/heft-sass-plugin/package.json b/heft-plugins/heft-sass-plugin/package.json index 2965c9a4c5a..97c099ead6f 100644 --- a/heft-plugins/heft-sass-plugin/package.json +++ b/heft-plugins/heft-sass-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-sass-plugin", - "version": "0.15.0", + "version": "0.15.13", "description": "Heft plugin for SASS", "repository": { "type": "git", @@ -16,7 +16,7 @@ "_phase:test": "heft run --only test -- --clean" }, "peerDependencies": { - "@rushstack/heft": "^0.68.2" + "@rushstack/heft": "^0.68.15" }, "dependencies": { "@rushstack/heft-config-file": "workspace:*", diff --git a/heft-plugins/heft-sass-plugin/src/SassPlugin.ts b/heft-plugins/heft-sass-plugin/src/SassPlugin.ts index b819d276a1f..82018975f1d 100644 --- a/heft-plugins/heft-sass-plugin/src/SassPlugin.ts +++ b/heft-plugins/heft-sass-plugin/src/SassPlugin.ts @@ -10,7 +10,7 @@ import type { IHeftTaskRunIncrementalHookOptions, IWatchedFileState } from '@rushstack/heft'; -import { ConfigurationFile } from '@rushstack/heft-config-file'; +import { ProjectConfigurationFile } from '@rushstack/heft-config-file'; import { type ISassConfiguration, SassProcessor } from './SassProcessor'; import sassConfigSchema from './schemas/heft-sass-plugin.schema.json'; @@ -21,7 +21,7 @@ const PLUGIN_NAME: 'sass-plugin' = 'sass-plugin'; const SASS_CONFIGURATION_LOCATION: string = 'config/sass.json'; export default class SassPlugin implements IHeftPlugin { - private static _sassConfigurationLoader: ConfigurationFile | undefined; + private static _sassConfigurationLoader: ProjectConfigurationFile | undefined; private _sassConfiguration: ISassConfiguration | undefined; private _sassProcessor: SassProcessor | undefined; @@ -105,7 +105,7 @@ export default class SassPlugin implements IHeftPlugin { ): Promise { if (!this._sassConfiguration) { if (!SassPlugin._sassConfigurationLoader) { - SassPlugin._sassConfigurationLoader = new ConfigurationFile({ + SassPlugin._sassConfigurationLoader = new ProjectConfigurationFile({ projectRelativeFilePath: SASS_CONFIGURATION_LOCATION, jsonSchemaObject: sassConfigSchema }); diff --git a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json index 916a698db06..f96bd0678fa 100644 --- a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json +++ b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json @@ -1,6 +1,291 @@ { "name": "@rushstack/heft-serverless-stack-plugin", "entries": [ + { + "version": "0.3.84", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.84", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.83`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.3.83", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.83", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.82`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.3.82", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.82", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.81`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.3.81", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.81", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.80`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.3.80", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.80", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.79`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.3.79", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.79", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.78`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.3.78", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.78", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.77`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.3.77", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.77", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.76`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.3.76", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.76", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.75`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.3.75", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.75", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.74`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.3.74", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.74", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.73`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.3.73", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.73", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.72`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.3.72", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.72", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.71`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.2` to `0.68.3`" + } + ] + } + }, { "version": "0.3.71", "tag": "@rushstack/heft-serverless-stack-plugin_v0.3.71", diff --git a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md index 2bfb5da2413..eb9d36740c4 100644 --- a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md +++ b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/heft-serverless-stack-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.3.84 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.3.83 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.3.82 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.3.81 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.3.80 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.3.79 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.3.78 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 0.3.77 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.3.76 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.3.75 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.3.74 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.3.73 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.3.72 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.3.71 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/heft-plugins/heft-serverless-stack-plugin/package.json b/heft-plugins/heft-serverless-stack-plugin/package.json index d20c77bc455..9d0bf2ec0cc 100644 --- a/heft-plugins/heft-serverless-stack-plugin/package.json +++ b/heft-plugins/heft-serverless-stack-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-serverless-stack-plugin", - "version": "0.3.71", + "version": "0.3.84", "description": "Heft plugin for building apps using the Serverless Stack (SST) framework", "repository": { "type": "git", @@ -15,7 +15,7 @@ "_phase:test": "heft run --only test -- --clean" }, "peerDependencies": { - "@rushstack/heft": "^0.68.2" + "@rushstack/heft": "^0.68.15" }, "dependencies": { "@rushstack/node-core-library": "workspace:*" diff --git a/heft-plugins/heft-storybook-plugin/CHANGELOG.json b/heft-plugins/heft-storybook-plugin/CHANGELOG.json index b5d220fdbe3..74400acb56e 100644 --- a/heft-plugins/heft-storybook-plugin/CHANGELOG.json +++ b/heft-plugins/heft-storybook-plugin/CHANGELOG.json @@ -1,6 +1,327 @@ { "name": "@rushstack/heft-storybook-plugin", "entries": [ + { + "version": "0.8.2", + "tag": "@rushstack/heft-storybook-plugin_v0.8.2", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.83`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.8.1", + "tag": "@rushstack/heft-storybook-plugin_v0.8.1", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.82`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.8.0", + "tag": "@rushstack/heft-storybook-plugin_v0.8.0", + "date": "Thu, 16 Jan 2025 22:49:19 GMT", + "comments": { + "minor": [ + { + "comment": "Add support for the `--docs` parameter." + } + ] + } + }, + { + "version": "0.7.7", + "tag": "@rushstack/heft-storybook-plugin_v0.7.7", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.81`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.7.6", + "tag": "@rushstack/heft-storybook-plugin_v0.7.6", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.80`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.7.5", + "tag": "@rushstack/heft-storybook-plugin_v0.7.5", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.79`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.7.4", + "tag": "@rushstack/heft-storybook-plugin_v0.7.4", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.78`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.7.3", + "tag": "@rushstack/heft-storybook-plugin_v0.7.3", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.77`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.7.2", + "tag": "@rushstack/heft-storybook-plugin_v0.7.2", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.76`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.7.1", + "tag": "@rushstack/heft-storybook-plugin_v0.7.1", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.75`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.7.0", + "tag": "@rushstack/heft-storybook-plugin_v0.7.0", + "date": "Fri, 25 Oct 2024 00:10:38 GMT", + "comments": { + "minor": [ + { + "comment": "Add support for Storybook v8" + } + ] + } + }, + { + "version": "0.6.52", + "tag": "@rushstack/heft-storybook-plugin_v0.6.52", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.74`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.6.51", + "tag": "@rushstack/heft-storybook-plugin_v0.6.51", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.73`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.6.50", + "tag": "@rushstack/heft-storybook-plugin_v0.6.50", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.72`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.6.49", + "tag": "@rushstack/heft-storybook-plugin_v0.6.49", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack4-plugin\" to `0.10.71`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.2` to `0.68.3`" + } + ] + } + }, { "version": "0.6.48", "tag": "@rushstack/heft-storybook-plugin_v0.6.48", diff --git a/heft-plugins/heft-storybook-plugin/CHANGELOG.md b/heft-plugins/heft-storybook-plugin/CHANGELOG.md index 46b2ddedbf1..a22b5aff26a 100644 --- a/heft-plugins/heft-storybook-plugin/CHANGELOG.md +++ b/heft-plugins/heft-storybook-plugin/CHANGELOG.md @@ -1,6 +1,85 @@ # Change Log - @rushstack/heft-storybook-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.8.2 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.8.1 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.8.0 +Thu, 16 Jan 2025 22:49:19 GMT + +### Minor changes + +- Add support for the `--docs` parameter. + +## 0.7.7 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.7.6 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.7.5 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.7.4 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.7.3 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 0.7.2 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.7.1 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.7.0 +Fri, 25 Oct 2024 00:10:38 GMT + +### Minor changes + +- Add support for Storybook v8 + +## 0.6.52 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.6.51 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.6.50 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.6.49 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.6.48 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/heft-plugins/heft-storybook-plugin/heft-plugin.json b/heft-plugins/heft-storybook-plugin/heft-plugin.json index 7421e93abe5..c961ec466f9 100644 --- a/heft-plugins/heft-storybook-plugin/heft-plugin.json +++ b/heft-plugins/heft-storybook-plugin/heft-plugin.json @@ -13,6 +13,16 @@ "longName": "--storybook", "description": "(EXPERIMENTAL) Used by the \"@rushstack/heft-storybook-plugin\" package to launch Storybook.", "parameterKind": "flag" + }, + { + "longName": "--storybook-test", + "description": "Executes a stripped down build-storybook for testing purposes.", + "parameterKind": "flag" + }, + { + "longName": "--docs", + "description": "Execute storybook in docs mode.", + "parameterKind": "flag" } ] } diff --git a/heft-plugins/heft-storybook-plugin/package.json b/heft-plugins/heft-storybook-plugin/package.json index d86fa7d199b..fd8b8020022 100644 --- a/heft-plugins/heft-storybook-plugin/package.json +++ b/heft-plugins/heft-storybook-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-storybook-plugin", - "version": "0.6.48", + "version": "0.8.2", "description": "Heft plugin for supporting UI development using Storybook", "repository": { "type": "git", @@ -16,7 +16,7 @@ "_phase:test": "heft run --only test -- --clean" }, "peerDependencies": { - "@rushstack/heft": "^0.68.2" + "@rushstack/heft": "^0.68.15" }, "dependencies": { "@rushstack/node-core-library": "workspace:*", diff --git a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts index 9a50bd122e5..40b16a949e3 100644 --- a/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts +++ b/heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts @@ -56,8 +56,9 @@ enum StorybookBuildMode { * Storybook CLI versions */ enum StorybookCliVersion { + STORYBOOK6 = 'storybook6', STORYBOOK7 = 'storybook7', - STORYBOOK6 = 'storybook6' + STORYBOOK8 = 'storybook8' } /** @@ -156,7 +157,9 @@ export interface IStorybookPluginOptions { captureWebpackStats?: boolean; } -interface IRunStorybookOptions { +interface IRunStorybookOptions extends IPrepareStorybookOptions { + logger: IScopedLogger; + isServeMode: boolean; workingDirectory: string; resolvedModulePath: string; outputFolder: string | undefined; @@ -164,6 +167,15 @@ interface IRunStorybookOptions { verbose: boolean; } +interface IPrepareStorybookOptions extends IStorybookPluginOptions { + logger: IScopedLogger; + taskSession: IHeftTaskSession; + heftConfiguration: HeftConfiguration; + isServeMode: boolean; + isTestMode: boolean; + isDocsMode: boolean; +} + const DEFAULT_STORYBOOK_VERSION: StorybookCliVersion = StorybookCliVersion.STORYBOOK7; const DEFAULT_STORYBOOK_CLI_CONFIG: Record = { [StorybookCliVersion.STORYBOOK6]: { @@ -179,14 +191,22 @@ const DEFAULT_STORYBOOK_CLI_CONFIG: Record { - private _logger!: IScopedLogger; - private _isServeMode: boolean = false; - /** * Generate typings for Sass files before TypeScript compilation. */ @@ -195,9 +215,12 @@ export default class StorybookPlugin implements IHeftTaskPlugin Promise = async () => { // Discard Webpack's configuration to prevent Webpack from running - this._logger.terminal.writeLine( + logger.terminal.writeLine( 'The command line includes "--storybook", redirecting Webpack to Storybook' ); return false; }; + let isServeMode: boolean = false; taskSession.requestAccessToPluginByName( '@rushstack/heft-webpack4-plugin', WEBPACK4_PLUGIN_NAME, (accessor: IWebpack4PluginAccessor) => { - if (accessor.parameters.isServeMode) { - this._isServeMode = true; - } + isServeMode = accessor.parameters.isServeMode; + // Discard Webpack's configuration to prevent Webpack from running only when performing Storybook build accessor.hooks.onLoadConfiguration.tapPromise(PLUGIN_NAME, configureWebpackTap); } @@ -234,40 +257,58 @@ export default class StorybookPlugin implements IHeftTaskPlugin { - if (accessor.parameters.isServeMode) { - this._isServeMode = true; - } + isServeMode = accessor.parameters.isServeMode; + // Discard Webpack's configuration to prevent Webpack from running only when performing Storybook build accessor.hooks.onLoadConfiguration.tapPromise(PLUGIN_NAME, configureWebpackTap); } ); taskSession.hooks.run.tapPromise(PLUGIN_NAME, async (runOptions: IHeftTaskRunHookOptions) => { - const runStorybookOptions: IRunStorybookOptions = await this._prepareStorybookAsync( + const runStorybookOptions: IRunStorybookOptions = await this._prepareStorybookAsync({ + logger, taskSession, heftConfiguration, - options - ); + isServeMode, + isTestMode: storybookTestParameter.value, + isDocsMode: docsParameter.value, + ...options + }); await this._runStorybookAsync(runStorybookOptions, options); }); } } - private async _prepareStorybookAsync( - taskSession: IHeftTaskSession, - heftConfiguration: HeftConfiguration, - options: IStorybookPluginOptions - ): Promise { - const { storykitPackageName, staticBuildOutputFolder } = options; - const storybookCliVersion: `${StorybookCliVersion}` = - options.cliCallingConvention ?? DEFAULT_STORYBOOK_VERSION; + private async _prepareStorybookAsync(options: IPrepareStorybookOptions): Promise { + const { + logger, + taskSession, + heftConfiguration, + storykitPackageName, + staticBuildOutputFolder, + isTestMode + } = options; + const storybookCliVersion: `${StorybookCliVersion}` = this._getStorybookVersion(options); const storyBookCliConfig: IStorybookCliCallingConfig = DEFAULT_STORYBOOK_CLI_CONFIG[storybookCliVersion]; const cliPackageName: string = options.cliPackageName ?? storyBookCliConfig.packageName; const buildMode: StorybookBuildMode = taskSession.parameters.watch ? StorybookBuildMode.WATCH : StorybookBuildMode.BUILD; - this._logger.terminal.writeVerboseLine(`Probing for "${storykitPackageName}"`); + if (buildMode === StorybookBuildMode.WATCH && isTestMode) { + throw new Error(`The ${STORYBOOK_TEST_FLAG_NAME} flag is not supported in watch mode`); + } + if ( + isTestMode && + (storybookCliVersion === StorybookCliVersion.STORYBOOK6 || + storybookCliVersion === StorybookCliVersion.STORYBOOK7) + ) { + throw new Error( + `The ${STORYBOOK_TEST_FLAG_NAME} flag is only supported in Storybook version 8 and above.` + ); + } + + logger.terminal.writeVerboseLine(`Probing for "${storykitPackageName}"`); // Example: "/path/to/my-project/node_modules/my-storykit" let storykitFolderPath: string; try { @@ -279,9 +320,9 @@ export default class StorybookPlugin implements IHeftTaskPlugin { - const { resolvedModulePath, verbose } = runStorybookOptions; + const { logger, resolvedModulePath, verbose, isServeMode, isTestMode, isDocsMode } = runStorybookOptions; let { workingDirectory, outputFolder } = runStorybookOptions; - this._logger.terminal.writeLine('Running Storybook compilation'); - this._logger.terminal.writeVerboseLine(`Loading Storybook module "${resolvedModulePath}"`); + logger.terminal.writeLine('Running Storybook compilation'); + logger.terminal.writeVerboseLine(`Loading Storybook module "${resolvedModulePath}"`); + const storybookCliVersion: `${StorybookCliVersion}` = this._getStorybookVersion(options); /** * Support \'cwdPackageName\' option @@ -394,7 +437,7 @@ export default class StorybookPlugin implements IHeftTaskPlugin { + private async _invokeAsSubprocessAsync( + logger: IScopedLogger, + command: string, + args: string[], + cwd: string + ): Promise { return await new Promise((resolve, reject) => { const storybookEnv: NodeJS.ProcessEnv = { ...process.env }; const forkedProcess: child_process.ChildProcess = child_process.fork(command, args, { @@ -442,12 +505,12 @@ export default class StorybookPlugin implements IHeftTaskPlugin string = () => this._configuration.buildFolderPath; + // Need to also update watchFile and watchDirectory - const system: TTypescript.System = { + const system: ITypeScriptNodeSystem = { ...ts.sys, - getCurrentDirectory: () => this._configuration.buildFolderPath, + realpath, + getCurrentDirectory, clearTimeout, setTimeout }; + if (realpath && system.getAccessibleFileSystemEntries) { + const { getAccessibleFileSystemEntries } = system; + system.readDirectory = (folderPath, extensions, exclude, include, depth): string[] => { + return ts.matchFiles( + folderPath, + extensions, + exclude, + include, + ts.sys.useCaseSensitiveFileNames, + getCurrentDirectory(), + depth, + getAccessibleFileSystemEntries, + realpath, + ts.sys.directoryExists + ); + }; + } + this._tool = { ts, system, @@ -372,7 +410,7 @@ export class TypeScriptBuilder { if (!tool.solutionBuilder && !tool.watchProgram) { //#region CONFIGURE const { duration: configureDurationMs, tsconfig } = measureTsPerformance('Configure', () => { - const _tsconfig: TTypescript.ParsedCommandLine = this._loadTsconfig(ts); + const _tsconfig: TTypescript.ParsedCommandLine = this._loadTsconfig(tool); this._validateTsconfig(ts, _tsconfig); return { @@ -426,7 +464,7 @@ export class TypeScriptBuilder { tsconfig, compilerHost } = measureTsPerformance('Configure', () => { - const _tsconfig: TTypescript.ParsedCommandLine = this._loadTsconfig(ts); + const _tsconfig: TTypescript.ParsedCommandLine = this._loadTsconfig(tool); this._validateTsconfig(ts, _tsconfig); const _compilerHost: TTypescript.CompilerHost = this._buildIncrementalCompilerHost(tool, _tsconfig); @@ -553,7 +591,7 @@ export class TypeScriptBuilder { if (!tool.solutionBuilder) { //#region CONFIGURE const { duration: configureDurationMs, solutionBuilderHost } = measureSync('Configure', () => { - const _tsconfig: TTypescript.ParsedCommandLine = this._loadTsconfig(ts); + const _tsconfig: TTypescript.ParsedCommandLine = this._loadTsconfig(tool); this._validateTsconfig(ts, _tsconfig); const _solutionBuilderHost: TSolutionHost = this._buildSolutionBuilderHost(tool); @@ -918,19 +956,21 @@ export class TypeScriptBuilder { return `${outFolderName}:${jsExtensionOverride || '.js'}`; } - private _loadTsconfig(ts: ExtendedTypeScript): TTypescript.ParsedCommandLine { + private _loadTsconfig(tool: ITypeScriptTool): TTypescript.ParsedCommandLine { + const { ts, system } = tool; const parsedConfigFile: ReturnType = ts.readConfigFile( this._configuration.tsconfigPath, - ts.sys.readFile + system.readFile ); const currentFolder: string = path.dirname(this._configuration.tsconfigPath); const tsconfig: TTypescript.ParsedCommandLine = ts.parseJsonConfigFileContent( parsedConfigFile.config, { - fileExists: ts.sys.fileExists, - readFile: ts.sys.readFile, - readDirectory: ts.sys.readDirectory, + fileExists: system.fileExists, + readFile: system.readFile, + readDirectory: system.readDirectory, + realpath: system.realpath, useCaseSensitiveFileNames: true }, currentFolder, @@ -1050,11 +1090,11 @@ export class TypeScriptBuilder { // Do nothing }; - const { ts } = tool; + const { ts, system } = tool; const solutionBuilderHost: TTypescript.SolutionBuilderHost = ts.createSolutionBuilderHost( - ts.sys, + system, this._getCreateBuilderProgram(ts), tool.reportDiagnostic, reportSolutionBuilderStatus, @@ -1086,7 +1126,11 @@ export class TypeScriptBuilder { if (tsconfig.options.incremental) { compilerHost = ts.createIncrementalCompilerHost(tsconfig.options, system); } else { - compilerHost = ts.createCompilerHost(tsconfig.options, undefined, system); + compilerHost = (ts.createCompilerHostWorker ?? ts.createCompilerHost)( + tsconfig.options, + undefined, + system + ); } this._changeCompilerHostToUseCache(compilerHost, tool); @@ -1300,9 +1344,10 @@ export class TypeScriptBuilder { function getFilesToTranspileFromBuilderProgram( builderProgram: TTypescript.BuilderProgram ): Map { - const changedFilesSet: Set = ( - builderProgram as unknown as { getState(): { changedFilesSet: Set } } - ).getState().changedFilesSet; + const program: ExtendedBuilderProgram = builderProgram as unknown as ExtendedBuilderProgram; + // getState was removed in Typescript 5.6, replaced with state + const changedFilesSet: Set = (program.state ?? program.getState()).changedFilesSet; + const filesToTranspile: Map = new Map(); for (const fileName of changedFilesSet) { const sourceFile: TTypescript.SourceFile | undefined = builderProgram.getSourceFile(fileName); diff --git a/heft-plugins/heft-typescript-plugin/src/TypeScriptPlugin.ts b/heft-plugins/heft-typescript-plugin/src/TypeScriptPlugin.ts index 3f179429062..a347be9adf4 100644 --- a/heft-plugins/heft-typescript-plugin/src/TypeScriptPlugin.ts +++ b/heft-plugins/heft-typescript-plugin/src/TypeScriptPlugin.ts @@ -7,7 +7,7 @@ import type * as TTypescript from 'typescript'; import { SyncHook } from 'tapable'; import { FileSystem, Path } from '@rushstack/node-core-library'; import type { ITerminal } from '@rushstack/terminal'; -import { ConfigurationFile, InheritanceType, PathResolutionMethod } from '@rushstack/heft-config-file'; +import { ProjectConfigurationFile, InheritanceType, PathResolutionMethod } from '@rushstack/heft-config-file'; import type { HeftConfiguration, IHeftTaskSession, @@ -78,6 +78,12 @@ export interface ITypeScriptConfigurationJson { */ useTranspilerWorker?: boolean; + /** + * If true, the TypeScript compiler will only resolve symlinks to their targets if the links are in a node_modules folder. + * This significantly reduces file system operations in typical usage. + */ + onlyResolveSymlinksInNodeModules?: boolean; + /* * Specifies the tsconfig.json file that will be used for compilation. Equivalent to the "project" argument for the 'tsc' and 'tslint' command line tools. * @@ -121,7 +127,7 @@ export interface ITypeScriptPluginAccessor { readonly onChangedFilesHook: SyncHook; } -let _typeScriptConfigurationFileLoader: ConfigurationFile | undefined; +let _typeScriptConfigurationFileLoader: ProjectConfigurationFile | undefined; const _typeScriptConfigurationFilePromiseCache: Map< string, Promise @@ -143,7 +149,7 @@ export async function loadTypeScriptConfigurationFileAsync( if (!typescriptConfigurationFilePromise) { // Ensure that the file loader has been initialized. if (!_typeScriptConfigurationFileLoader) { - _typeScriptConfigurationFileLoader = new ConfigurationFile({ + _typeScriptConfigurationFileLoader = new ProjectConfigurationFile({ projectRelativeFilePath: 'config/typescript.json', jsonSchemaObject: typescriptConfigSchema, propertyInheritance: { @@ -167,7 +173,7 @@ export async function loadTypeScriptConfigurationFileAsync( return await typescriptConfigurationFilePromise; } -let _partialTsconfigFileLoader: ConfigurationFile | undefined; +let _partialTsconfigFileLoader: ProjectConfigurationFile | undefined; const _partialTsconfigFilePromiseCache: Map> = new Map(); function getTsconfigFilePath( @@ -207,7 +213,7 @@ export async function loadPartialTsconfigFileAsync( } else { // Ensure that the file loader has been initialized. if (!_partialTsconfigFileLoader) { - _partialTsconfigFileLoader = new ConfigurationFile({ + _partialTsconfigFileLoader = new ProjectConfigurationFile({ projectRelativeFilePath: typeScriptConfigurationJson?.project || 'tsconfig.json', jsonSchemaObject: anythingSchema, propertyInheritance: { @@ -365,6 +371,8 @@ export default class TypeScriptPlugin implements IHeftTaskPlugin { useTranspilerWorker: typeScriptConfigurationJson?.useTranspilerWorker, + onlyResolveSymlinksInNodeModules: typeScriptConfigurationJson?.onlyResolveSymlinksInNodeModules, + tsconfigPath: getTsconfigFilePath(heftConfiguration, typeScriptConfigurationJson), additionalModuleKindsToEmit: typeScriptConfigurationJson?.additionalModuleKindsToEmit, emitCjsExtensionForCommonJS: !!typeScriptConfigurationJson?.emitCjsExtensionForCommonJS, diff --git a/heft-plugins/heft-typescript-plugin/src/internalTypings/TypeScriptInternals.ts b/heft-plugins/heft-typescript-plugin/src/internalTypings/TypeScriptInternals.ts index cfcc643e8a3..2b002a00efe 100644 --- a/heft-plugins/heft-typescript-plugin/src/internalTypings/TypeScriptInternals.ts +++ b/heft-plugins/heft-typescript-plugin/src/internalTypings/TypeScriptInternals.ts @@ -9,6 +9,16 @@ export interface IExtendedSolutionBuilder invalidateProject(configFilePath: string, mode: 0 | 1 | 2): void; } +export interface ITypeScriptNodeSystem extends TTypescript.System { + /** + * https://github.com/microsoft/TypeScript/blob/d85767abfd83880cea17cea70f9913e9c4496dcc/src/compiler/sys.ts#L1438 + */ + getAccessibleFileSystemEntries?: (folderPath: string) => { + files: string[]; + directories: string[]; + }; +} + export interface IExtendedTypeScript { /** * https://github.com/microsoft/TypeScript/blob/5f597e69b2e3b48d788cb548df40bcb703c8adb1/src/compiler/performance.ts#L3 @@ -59,6 +69,12 @@ export interface IExtendedTypeScript { system?: TTypescript.System ): TTypescript.CompilerHost; + createCompilerHostWorker( + options: TTypescript.CompilerOptions, + setParentNodes?: boolean, + system?: TTypescript.System + ): TTypescript.CompilerHost; + /** * https://github.com/microsoft/TypeScript/blob/782c09d783e006a697b4ba6d1e7ec2f718ce8393/src/compiler/utilities.ts#L6540 */ @@ -98,3 +114,14 @@ export interface IExtendedTypeScript { } export type ExtendedTypeScript = typeof TTypescript & IExtendedTypeScript; + +export type ExtendedBuilderProgram = TTypescript.BuilderProgram & { + /** + * Typescript 5.6+ + */ + state?: { changedFilesSet: Set }; + /** + * Typescript < 5.6 + */ + getState(): { changedFilesSet: Set }; +}; diff --git a/heft-plugins/heft-typescript-plugin/src/schemas/typescript.schema.json b/heft-plugins/heft-typescript-plugin/src/schemas/typescript.schema.json index dd2e15d5bad..ff66372aa51 100644 --- a/heft-plugins/heft-typescript-plugin/src/schemas/typescript.schema.json +++ b/heft-plugins/heft-typescript-plugin/src/schemas/typescript.schema.json @@ -37,6 +37,11 @@ } }, + "onlyResolveSymlinksInNodeModules": { + "description": "If true, the TypeScript compiler will only resolve symlinks to their targets if the links are in a node_modules folder. This significantly reduces file system operations in typical usage.", + "type": "boolean" + }, + "emitCjsExtensionForCommonJS": { "description": "If true, emit CommonJS module output to the folder specified in the tsconfig \"outDir\" compiler option with the .cjs extension alongside (or instead of, if TSConfig specifies CommonJS) the default compilation output.", "type": "boolean" diff --git a/heft-plugins/heft-webpack4-plugin/CHANGELOG.json b/heft-plugins/heft-webpack4-plugin/CHANGELOG.json index bd40abcbc1f..30855b913d4 100644 --- a/heft-plugins/heft-webpack4-plugin/CHANGELOG.json +++ b/heft-plugins/heft-webpack4-plugin/CHANGELOG.json @@ -1,6 +1,264 @@ { "name": "@rushstack/heft-webpack4-plugin", "entries": [ + { + "version": "0.10.83", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.83", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.16`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.10.82", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.82", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.15`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.10.81", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.81", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.14`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.10.80", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.80", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.10.79", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.79", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.12`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.10.78", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.78", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.10.77", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.77", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.10.76", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.76", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.10.75", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.75", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.8`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.10.74", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.74", + "date": "Thu, 24 Oct 2024 00:15:47 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.10.73", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.73", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.10.72", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.72", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.10.71", + "tag": "@rushstack/heft-webpack4-plugin_v0.10.71", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.2` to `0.68.3`" + } + ] + } + }, { "version": "0.10.70", "tag": "@rushstack/heft-webpack4-plugin_v0.10.70", diff --git a/heft-plugins/heft-webpack4-plugin/CHANGELOG.md b/heft-plugins/heft-webpack4-plugin/CHANGELOG.md index a88f0b4befb..5b56ec1988a 100644 --- a/heft-plugins/heft-webpack4-plugin/CHANGELOG.md +++ b/heft-plugins/heft-webpack4-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/heft-webpack4-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.10.83 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.10.82 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.10.81 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.10.80 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.10.79 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.10.78 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.10.77 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 0.10.76 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.10.75 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.10.74 +Thu, 24 Oct 2024 00:15:47 GMT + +_Version update only_ + +## 0.10.73 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.10.72 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.10.71 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.10.70 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/heft-plugins/heft-webpack4-plugin/package.json b/heft-plugins/heft-webpack4-plugin/package.json index 41c10526f68..a2ebe9597c6 100644 --- a/heft-plugins/heft-webpack4-plugin/package.json +++ b/heft-plugins/heft-webpack4-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-webpack4-plugin", - "version": "0.10.70", + "version": "0.10.83", "description": "Heft plugin for Webpack 4", "repository": { "type": "git", @@ -23,7 +23,7 @@ } }, "peerDependencies": { - "@rushstack/heft": "^0.68.2", + "@rushstack/heft": "^0.68.15", "@types/webpack": "^4", "webpack": "~4.47.0" }, diff --git a/heft-plugins/heft-webpack5-plugin/CHANGELOG.json b/heft-plugins/heft-webpack5-plugin/CHANGELOG.json index 6568755f9e0..65ea7c90bb9 100644 --- a/heft-plugins/heft-webpack5-plugin/CHANGELOG.json +++ b/heft-plugins/heft-webpack5-plugin/CHANGELOG.json @@ -1,6 +1,264 @@ { "name": "@rushstack/heft-webpack5-plugin", "entries": [ + { + "version": "0.11.13", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.13", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.16`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.11.12", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.12", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.15`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.11.11", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.11", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.14`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.11.10", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.10", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.11.9", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.9", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.12`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.11.8", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.8", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.11.7", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.7", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.11.6", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.6", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.11.5", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.5", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.8`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.11.4", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.4", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.11.3", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.3", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.11.2", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.2", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.11.1", + "tag": "@rushstack/heft-webpack5-plugin_v0.11.1", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.4.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.2` to `0.68.3`" + } + ] + } + }, { "version": "0.11.0", "tag": "@rushstack/heft-webpack5-plugin_v0.11.0", diff --git a/heft-plugins/heft-webpack5-plugin/CHANGELOG.md b/heft-plugins/heft-webpack5-plugin/CHANGELOG.md index 83bf424d96a..2c7f8426ddf 100644 --- a/heft-plugins/heft-webpack5-plugin/CHANGELOG.md +++ b/heft-plugins/heft-webpack5-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/heft-webpack5-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.11.13 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.11.12 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.11.11 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.11.10 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.11.9 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.11.8 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.11.7 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.11.6 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.11.5 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.11.4 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.11.3 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.11.2 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.11.1 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.11.0 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/heft-plugins/heft-webpack5-plugin/package.json b/heft-plugins/heft-webpack5-plugin/package.json index 18fc8ae2e13..dfc82fe3aab 100644 --- a/heft-plugins/heft-webpack5-plugin/package.json +++ b/heft-plugins/heft-webpack5-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-webpack5-plugin", - "version": "0.11.0", + "version": "0.11.13", "description": "Heft plugin for Webpack 5", "repository": { "type": "git", @@ -18,7 +18,7 @@ "_phase:test": "heft run --only test -- --clean" }, "peerDependencies": { - "@rushstack/heft": "^0.68.2", + "@rushstack/heft": "^0.68.15", "webpack": "^5.82.1" }, "dependencies": { diff --git a/libraries/api-extractor-model/CHANGELOG.json b/libraries/api-extractor-model/CHANGELOG.json index c9768915067..d8d5aa8f64d 100644 --- a/libraries/api-extractor-model/CHANGELOG.json +++ b/libraries/api-extractor-model/CHANGELOG.json @@ -1,6 +1,66 @@ { "name": "@microsoft/api-extractor-model", "entries": [ + { + "version": "7.30.3", + "tag": "@microsoft/api-extractor-model_v7.30.3", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + } + ] + } + }, + { + "version": "7.30.2", + "tag": "@microsoft/api-extractor-model_v7.30.2", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + } + ] + } + }, + { + "version": "7.30.1", + "tag": "@microsoft/api-extractor-model_v7.30.1", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + } + ] + } + }, + { + "version": "7.30.0", + "tag": "@microsoft/api-extractor-model_v7.30.0", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "minor": [ + { + "comment": "Update TSDoc dependencies." + } + ] + } + }, + { + "version": "7.29.9", + "tag": "@microsoft/api-extractor-model_v7.29.9", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + } + ] + } + }, { "version": "7.29.8", "tag": "@microsoft/api-extractor-model_v7.29.8", diff --git a/libraries/api-extractor-model/CHANGELOG.md b/libraries/api-extractor-model/CHANGELOG.md index 999859b4a14..19b7996db63 100644 --- a/libraries/api-extractor-model/CHANGELOG.md +++ b/libraries/api-extractor-model/CHANGELOG.md @@ -1,6 +1,33 @@ # Change Log - @microsoft/api-extractor-model -This log was last generated on Fri, 13 Sep 2024 00:11:43 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 01:11:42 GMT and should not be manually modified. + +## 7.30.3 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 7.30.2 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 7.30.1 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 7.30.0 +Sat, 23 Nov 2024 01:18:55 GMT + +### Minor changes + +- Update TSDoc dependencies. + +## 7.29.9 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ ## 7.29.8 Fri, 13 Sep 2024 00:11:43 GMT diff --git a/libraries/api-extractor-model/package.json b/libraries/api-extractor-model/package.json index 3aea7cf5d38..07128fb3383 100644 --- a/libraries/api-extractor-model/package.json +++ b/libraries/api-extractor-model/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/api-extractor-model", - "version": "7.29.8", + "version": "7.30.3", "description": "A helper library for loading and saving the .api.json files created by API Extractor", "repository": { "type": "git", @@ -17,14 +17,14 @@ "_phase:test": "heft run --only test -- --clean" }, "dependencies": { - "@microsoft/tsdoc": "~0.15.0", - "@microsoft/tsdoc-config": "~0.17.0", + "@microsoft/tsdoc": "~0.15.1", + "@microsoft/tsdoc-config": "~0.17.1", "@rushstack/node-core-library": "workspace:*" }, "devDependencies": { "local-eslint-config": "workspace:*", - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15" } diff --git a/libraries/debug-certificate-manager/CHANGELOG.json b/libraries/debug-certificate-manager/CHANGELOG.json index 7abdf0d4452..d0bc1cfa49a 100644 --- a/libraries/debug-certificate-manager/CHANGELOG.json +++ b/libraries/debug-certificate-manager/CHANGELOG.json @@ -1,6 +1,186 @@ { "name": "@rushstack/debug-certificate-manager", "entries": [ + { + "version": "1.4.16", + "tag": "@rushstack/debug-certificate-manager_v1.4.16", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "1.4.15", + "tag": "@rushstack/debug-certificate-manager_v1.4.15", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "1.4.14", + "tag": "@rushstack/debug-certificate-manager_v1.4.14", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "1.4.13", + "tag": "@rushstack/debug-certificate-manager_v1.4.13", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "1.4.12", + "tag": "@rushstack/debug-certificate-manager_v1.4.12", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "1.4.11", + "tag": "@rushstack/debug-certificate-manager_v1.4.11", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "1.4.10", + "tag": "@rushstack/debug-certificate-manager_v1.4.10", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "1.4.9", + "tag": "@rushstack/debug-certificate-manager_v1.4.9", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "1.4.8", + "tag": "@rushstack/debug-certificate-manager_v1.4.8", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "1.4.7", + "tag": "@rushstack/debug-certificate-manager_v1.4.7", + "date": "Thu, 24 Oct 2024 00:15:47 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "1.4.6", + "tag": "@rushstack/debug-certificate-manager_v1.4.6", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "1.4.5", + "tag": "@rushstack/debug-certificate-manager_v1.4.5", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "1.4.4", + "tag": "@rushstack/debug-certificate-manager_v1.4.4", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "1.4.3", "tag": "@rushstack/debug-certificate-manager_v1.4.3", diff --git a/libraries/debug-certificate-manager/CHANGELOG.md b/libraries/debug-certificate-manager/CHANGELOG.md index 03d957bed54..87b802c05d1 100644 --- a/libraries/debug-certificate-manager/CHANGELOG.md +++ b/libraries/debug-certificate-manager/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/debug-certificate-manager -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 1.4.16 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 1.4.15 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 1.4.14 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 1.4.13 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 1.4.12 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 1.4.11 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 1.4.10 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 1.4.9 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 1.4.8 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 1.4.7 +Thu, 24 Oct 2024 00:15:47 GMT + +_Version update only_ + +## 1.4.6 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 1.4.5 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 1.4.4 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 1.4.3 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/libraries/debug-certificate-manager/package.json b/libraries/debug-certificate-manager/package.json index 3e8cf5f6f8a..8ef521973e8 100644 --- a/libraries/debug-certificate-manager/package.json +++ b/libraries/debug-certificate-manager/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/debug-certificate-manager", - "version": "1.4.3", + "version": "1.4.16", "description": "Cross-platform functionality to create debug ssl certificates.", "main": "lib/index.js", "typings": "dist/debug-certificate-manager.d.ts", diff --git a/libraries/heft-config-file/CHANGELOG.json b/libraries/heft-config-file/CHANGELOG.json index 78ec9177b44..fa4e29986df 100644 --- a/libraries/heft-config-file/CHANGELOG.json +++ b/libraries/heft-config-file/CHANGELOG.json @@ -1,6 +1,105 @@ { "name": "@rushstack/heft-config-file", "entries": [ + { + "version": "0.16.4", + "tag": "@rushstack/heft-config-file_v0.16.4", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + } + ] + } + }, + { + "version": "0.16.3", + "tag": "@rushstack/heft-config-file_v0.16.3", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + } + ] + } + }, + { + "version": "0.16.2", + "tag": "@rushstack/heft-config-file_v0.16.2", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + } + ] + } + }, + { + "version": "0.16.1", + "tag": "@rushstack/heft-config-file_v0.16.1", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "patch": [ + { + "comment": "Bump `jsonpath-plus` to `~10.2.0`." + } + ] + } + }, + { + "version": "0.16.0", + "tag": "@rushstack/heft-config-file_v0.16.0", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "minor": [ + { + "comment": "Add a new `NonProjectConfigurationFile` class that is designed to load absolute-pathed configuration files without rig support." + }, + { + "comment": "Rename `ConfigurationFile` to `ProjectConfigurationFile` and mark `ConfigurationFile` as `@deprecated`." + } + ] + } + }, + { + "version": "0.15.9", + "tag": "@rushstack/heft-config-file_v0.15.9", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + } + ] + } + }, + { + "version": "0.15.8", + "tag": "@rushstack/heft-config-file_v0.15.8", + "date": "Thu, 24 Oct 2024 00:15:47 GMT", + "comments": { + "patch": [ + { + "comment": "Update the `jsonpath-plus` dependency to mitigate CVE-2024-21534.\"" + } + ] + } + }, { "version": "0.15.7", "tag": "@rushstack/heft-config-file_v0.15.7", diff --git a/libraries/heft-config-file/CHANGELOG.md b/libraries/heft-config-file/CHANGELOG.md index d83e1cc5665..07970df6b79 100644 --- a/libraries/heft-config-file/CHANGELOG.md +++ b/libraries/heft-config-file/CHANGELOG.md @@ -1,6 +1,48 @@ # Change Log - @rushstack/heft-config-file -This log was last generated on Fri, 13 Sep 2024 00:11:43 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 01:11:42 GMT and should not be manually modified. + +## 0.16.4 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.16.3 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.16.2 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.16.1 +Mon, 09 Dec 2024 20:31:43 GMT + +### Patches + +- Bump `jsonpath-plus` to `~10.2.0`. + +## 0.16.0 +Tue, 03 Dec 2024 16:11:07 GMT + +### Minor changes + +- Add a new `NonProjectConfigurationFile` class that is designed to load absolute-pathed configuration files without rig support. +- Rename `ConfigurationFile` to `ProjectConfigurationFile` and mark `ConfigurationFile` as `@deprecated`. + +## 0.15.9 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.15.8 +Thu, 24 Oct 2024 00:15:47 GMT + +### Patches + +- Update the `jsonpath-plus` dependency to mitigate CVE-2024-21534." ## 0.15.7 Fri, 13 Sep 2024 00:11:43 GMT diff --git a/libraries/heft-config-file/package.json b/libraries/heft-config-file/package.json index cbe9a8f7eed..c15a6f00224 100644 --- a/libraries/heft-config-file/package.json +++ b/libraries/heft-config-file/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-config-file", - "version": "0.15.7", + "version": "0.16.4", "description": "Configuration file loader for @rushstack/heft", "repository": { "type": "git", @@ -24,12 +24,12 @@ "@rushstack/node-core-library": "workspace:*", "@rushstack/rig-package": "workspace:*", "@rushstack/terminal": "workspace:*", - "jsonpath-plus": "~4.0.0" + "jsonpath-plus": "~10.2.0" }, "devDependencies": { "local-eslint-config": "workspace:*", - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15" } diff --git a/libraries/heft-config-file/src/ConfigurationFile.ts b/libraries/heft-config-file/src/ConfigurationFileBase.ts similarity index 84% rename from libraries/heft-config-file/src/ConfigurationFile.ts rename to libraries/heft-config-file/src/ConfigurationFileBase.ts index 5f509e56306..448e2a5a38a 100644 --- a/libraries/heft-config-file/src/ConfigurationFile.ts +++ b/libraries/heft-config-file/src/ConfigurationFileBase.ts @@ -74,9 +74,11 @@ export enum PathResolutionMethod { } const CONFIGURATION_FILE_MERGE_BEHAVIOR_FIELD_REGEX: RegExp = /^\$([^\.]+)\.inheritanceType$/; -const CONFIGURATION_FILE_FIELD_ANNOTATION: unique symbol = Symbol('configuration-file-field-annotation'); +export const CONFIGURATION_FILE_FIELD_ANNOTATION: unique symbol = Symbol( + 'configuration-file-field-annotation' +); -interface IAnnotatedField { +export interface IAnnotatedField { [CONFIGURATION_FILE_FIELD_ANNOTATION]: IConfigurationFileFieldAnnotation; } @@ -208,11 +210,6 @@ export interface IJsonPathsMetadata { * @beta */ export interface IConfigurationFileOptionsBase { - /** - * A project root-relative path to the configuration file that should be loaded. - */ - projectRelativeFilePath: string; - /** * Use this property to specify how JSON nodes are postprocessed. */ @@ -234,33 +231,39 @@ export interface IConfigurationFileOptionsBase { /** * @beta */ -export interface IConfigurationFileOptionsWithJsonSchemaFilePath - extends IConfigurationFileOptionsBase { - /** - * The path to the schema for the configuration file. - */ - jsonSchemaPath: string; - jsonSchemaObject?: never; -} +export type IConfigurationFileOptionsWithJsonSchemaFilePath< + TConfigurationFile, + TExtraOptions extends {} +> = IConfigurationFileOptionsBase & + TExtraOptions & { + /** + * The path to the schema for the configuration file. + */ + jsonSchemaPath: string; + jsonSchemaObject?: never; + }; /** * @beta */ -export interface IConfigurationFileOptionsWithJsonSchemaObject - extends IConfigurationFileOptionsBase { - /** - * The schema for the configuration file. - */ - jsonSchemaObject: object; - jsonSchemaPath?: never; -} +export type IConfigurationFileOptionsWithJsonSchemaObject< + TConfigurationFile, + TExtraOptions extends {} +> = IConfigurationFileOptionsBase & + TExtraOptions & { + /** + * The schema for the configuration file. + */ + jsonSchemaObject: object; + jsonSchemaPath?: never; + }; /** * @beta */ -export type IConfigurationFileOptions = - | IConfigurationFileOptionsWithJsonSchemaFilePath - | IConfigurationFileOptionsWithJsonSchemaObject; +export type IConfigurationFileOptions = + | IConfigurationFileOptionsWithJsonSchemaFilePath + | IConfigurationFileOptionsWithJsonSchemaObject; interface IJsonPathCallbackObject { path: string; @@ -280,12 +283,9 @@ export interface IOriginalValueOptions { /** * @beta */ -export class ConfigurationFile { +export abstract class ConfigurationFileBase { private readonly _getSchema: () => JsonSchema; - /** {@inheritDoc IConfigurationFileOptionsBase.projectRelativeFilePath} */ - public readonly projectRelativeFilePath: string; - private readonly _jsonPathMetadata: IJsonPathsMetadata; private readonly _propertyInheritanceTypes: IPropertiesInheritance; private readonly _defaultPropertyInheritance: IPropertyInheritanceDefaults; @@ -302,9 +302,7 @@ export class ConfigurationFile { private readonly _configPromiseCache: Map> = new Map(); private readonly _packageJsonLookup: PackageJsonLookup = new PackageJsonLookup(); - public constructor(options: IConfigurationFileOptions) { - this.projectRelativeFilePath = options.projectRelativeFilePath; - + public constructor(options: IConfigurationFileOptions) { if (options.jsonSchemaObject) { this._getSchema = () => JsonSchema.fromLoadedObject(options.jsonSchemaObject); } else { @@ -316,82 +314,6 @@ export class ConfigurationFile { this._defaultPropertyInheritance = options.propertyInheritanceDefaults || {}; } - /** - * Find and return a configuration file for the specified project, automatically resolving - * `extends` properties and handling rigged configuration files. Will throw an error if a configuration - * file cannot be found in the rig or project config folder. - */ - public loadConfigurationFileForProject( - terminal: ITerminal, - projectPath: string, - rigConfig?: IRigConfig - ): TConfigurationFile { - const projectConfigurationFilePath: string = this._getConfigurationFilePathForProject(projectPath); - return this._loadConfigurationFileInnerWithCache( - terminal, - projectConfigurationFilePath, - new Set(), - rigConfig - ); - } - - /** - * Find and return a configuration file for the specified project, automatically resolving - * `extends` properties and handling rigged configuration files. Will throw an error if a configuration - * file cannot be found in the rig or project config folder. - */ - public async loadConfigurationFileForProjectAsync( - terminal: ITerminal, - projectPath: string, - rigConfig?: IRigConfig - ): Promise { - const projectConfigurationFilePath: string = this._getConfigurationFilePathForProject(projectPath); - return await this._loadConfigurationFileInnerWithCacheAsync( - terminal, - projectConfigurationFilePath, - new Set(), - rigConfig - ); - } - - /** - * This function is identical to {@link ConfigurationFile.loadConfigurationFileForProject}, except - * that it returns `undefined` instead of throwing an error if the configuration file cannot be found. - */ - public tryLoadConfigurationFileForProject( - terminal: ITerminal, - projectPath: string, - rigConfig?: IRigConfig - ): TConfigurationFile | undefined { - try { - return this.loadConfigurationFileForProject(terminal, projectPath, rigConfig); - } catch (e) { - if (FileSystem.isNotExistError(e as Error)) { - return undefined; - } - throw e; - } - } - - /** - * This function is identical to {@link ConfigurationFile.loadConfigurationFileForProjectAsync}, except - * that it returns `undefined` instead of throwing an error if the configuration file cannot be found. - */ - public async tryLoadConfigurationFileForProjectAsync( - terminal: ITerminal, - projectPath: string, - rigConfig?: IRigConfig - ): Promise { - try { - return await this.loadConfigurationFileForProjectAsync(terminal, projectPath, rigConfig); - } catch (e) { - if (FileSystem.isNotExistError(e as Error)) { - return undefined; - } - throw e; - } - } - /** * @internal */ @@ -430,14 +352,14 @@ export class ConfigurationFile { } } - private _loadConfigurationFileInnerWithCache( + protected _loadConfigurationFileInnerWithCache( terminal: ITerminal, resolvedConfigurationFilePath: string, visitedConfigurationFilePaths: Set, rigConfig: IRigConfig | undefined ): TConfigurationFile { if (visitedConfigurationFilePaths.has(resolvedConfigurationFilePath)) { - const resolvedConfigurationFilePathForLogging: string = ConfigurationFile._formatPathForLogging( + const resolvedConfigurationFilePathForLogging: string = ConfigurationFileBase._formatPathForLogging( resolvedConfigurationFilePath ); throw new Error( @@ -461,14 +383,14 @@ export class ConfigurationFile { return cacheEntry; } - private async _loadConfigurationFileInnerWithCacheAsync( + protected async _loadConfigurationFileInnerWithCacheAsync( terminal: ITerminal, resolvedConfigurationFilePath: string, visitedConfigurationFilePaths: Set, rigConfig: IRigConfig | undefined ): Promise { if (visitedConfigurationFilePaths.has(resolvedConfigurationFilePath)) { - const resolvedConfigurationFilePathForLogging: string = ConfigurationFile._formatPathForLogging( + const resolvedConfigurationFilePathForLogging: string = ConfigurationFileBase._formatPathForLogging( resolvedConfigurationFilePath ); throw new Error( @@ -497,6 +419,18 @@ export class ConfigurationFile { return await cacheEntryPromise; } + protected abstract _tryLoadConfigurationFileInRig( + terminal: ITerminal, + rigConfig: IRigConfig, + visitedConfigurationFilePaths: Set + ): TConfigurationFile | undefined; + + protected abstract _tryLoadConfigurationFileInRigAsync( + terminal: ITerminal, + rigConfig: IRigConfig, + visitedConfigurationFilePaths: Set + ): Promise; + private _parseAndResolveConfigurationFile( fileText: string, resolvedConfigurationFilePath: string, @@ -546,7 +480,7 @@ export class ConfigurationFile { visitedConfigurationFilePaths: Set, rigConfig: IRigConfig | undefined ): TConfigurationFile { - const resolvedConfigurationFilePathForLogging: string = ConfigurationFile._formatPathForLogging( + const resolvedConfigurationFilePathForLogging: string = ConfigurationFileBase._formatPathForLogging( resolvedConfigurationFilePath ); @@ -634,7 +568,7 @@ export class ConfigurationFile { visitedConfigurationFilePaths: Set, rigConfig: IRigConfig | undefined ): Promise { - const resolvedConfigurationFilePathForLogging: string = ConfigurationFile._formatPathForLogging( + const resolvedConfigurationFilePathForLogging: string = ConfigurationFileBase._formatPathForLogging( resolvedConfigurationFilePath ); @@ -713,76 +647,6 @@ export class ConfigurationFile { return result as TConfigurationFile; } - private _tryLoadConfigurationFileInRig( - terminal: ITerminal, - rigConfig: IRigConfig, - visitedConfigurationFilePaths: Set - ): TConfigurationFile | undefined { - if (rigConfig.rigFound) { - const rigProfileFolder: string = rigConfig.getResolvedProfileFolder(); - try { - return this._loadConfigurationFileInnerWithCache( - terminal, - nodeJsPath.resolve(rigProfileFolder, this.projectRelativeFilePath), - visitedConfigurationFilePaths, - undefined - ); - } catch (e) { - // Ignore cases where a configuration file doesn't exist in a rig - if (!FileSystem.isNotExistError(e as Error)) { - throw e; - } else { - terminal.writeDebugLine( - `Configuration file "${ - this.projectRelativeFilePath - }" not found in rig ("${ConfigurationFile._formatPathForLogging(rigProfileFolder)}")` - ); - } - } - } else { - terminal.writeDebugLine( - `No rig found for "${ConfigurationFile._formatPathForLogging(rigConfig.projectFolderPath)}"` - ); - } - - return undefined; - } - - private async _tryLoadConfigurationFileInRigAsync( - terminal: ITerminal, - rigConfig: IRigConfig, - visitedConfigurationFilePaths: Set - ): Promise { - if (rigConfig.rigFound) { - const rigProfileFolder: string = await rigConfig.getResolvedProfileFolderAsync(); - try { - return await this._loadConfigurationFileInnerWithCacheAsync( - terminal, - nodeJsPath.resolve(rigProfileFolder, this.projectRelativeFilePath), - visitedConfigurationFilePaths, - undefined - ); - } catch (e) { - // Ignore cases where a configuration file doesn't exist in a rig - if (!FileSystem.isNotExistError(e as Error)) { - throw e; - } else { - terminal.writeDebugLine( - `Configuration file "${ - this.projectRelativeFilePath - }" not found in rig ("${ConfigurationFile._formatPathForLogging(rigProfileFolder)}")` - ); - } - } - } else { - terminal.writeDebugLine( - `No rig found for "${ConfigurationFile._formatPathForLogging(rigConfig.projectFolderPath)}"` - ); - } - - return undefined; - } - private _annotateProperties(resolvedConfigurationFilePath: string, obj: TObject): void { if (!obj) { return; @@ -830,7 +694,7 @@ export class ConfigurationFile { this._packageJsonLookup.tryGetPackageFolderFor(configurationFilePath); if (!packageRoot) { throw new Error( - `Could not find a package root for path "${ConfigurationFile._formatPathForLogging( + `Could not find a package root for path "${ConfigurationFileBase._formatPathForLogging( configurationFilePath )}"` ); @@ -1121,8 +985,4 @@ export class ConfigurationFile { return result; } - - private _getConfigurationFilePathForProject(projectPath: string): string { - return nodeJsPath.resolve(projectPath, this.projectRelativeFilePath); - } } diff --git a/libraries/heft-config-file/src/NonProjectConfigurationFile.ts b/libraries/heft-config-file/src/NonProjectConfigurationFile.ts new file mode 100644 index 00000000000..d3a7bd23dcd --- /dev/null +++ b/libraries/heft-config-file/src/NonProjectConfigurationFile.ts @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { FileSystem } from '@rushstack/node-core-library'; +import type { ITerminal } from '@rushstack/terminal'; +import type { IRigConfig } from '@rushstack/rig-package'; + +import { ConfigurationFileBase } from './ConfigurationFileBase'; + +/** + * @beta + */ +export class NonProjectConfigurationFile extends ConfigurationFileBase< + TConfigurationFile, + {} +> { + /** + * Load the configuration file at the specified absolute path, automatically resolving + * `extends` properties. Will throw an error if the file cannot be found. + */ + public loadConfigurationFile(terminal: ITerminal, filePath: string): TConfigurationFile { + return this._loadConfigurationFileInnerWithCache(terminal, filePath, new Set(), undefined); + } + + /** + * Load the configuration file at the specified absolute path, automatically resolving + * `extends` properties. Will throw an error if the file cannot be found. + */ + public async loadConfigurationFileAsync( + terminal: ITerminal, + filePath: string + ): Promise { + return await this._loadConfigurationFileInnerWithCacheAsync( + terminal, + filePath, + new Set(), + undefined + ); + } + + /** + * This function is identical to {@link NonProjectConfigurationFile.loadConfigurationFile}, except + * that it returns `undefined` instead of throwing an error if the configuration file cannot be found. + */ + public tryLoadConfigurationFile(terminal: ITerminal, filePath: string): TConfigurationFile | undefined { + try { + return this.loadConfigurationFile(terminal, filePath); + } catch (e) { + if (FileSystem.isNotExistError(e as Error)) { + return undefined; + } + throw e; + } + } + + /** + * This function is identical to {@link NonProjectConfigurationFile.loadConfigurationFileAsync}, except + * that it returns `undefined` instead of throwing an error if the configuration file cannot be found. + */ + public async tryLoadConfigurationFileAsync( + terminal: ITerminal, + filePath: string + ): Promise { + try { + return await this.loadConfigurationFileAsync(terminal, filePath); + } catch (e) { + if (FileSystem.isNotExistError(e as Error)) { + return undefined; + } + throw e; + } + } + + protected _tryLoadConfigurationFileInRig( + terminal: ITerminal, + rigConfig: IRigConfig, + visitedConfigurationFilePaths: Set + ): TConfigurationFile | undefined { + // This is a no-op because we don't support rigging for non-project configuration files + return undefined; + } + + protected async _tryLoadConfigurationFileInRigAsync( + terminal: ITerminal, + rigConfig: IRigConfig, + visitedConfigurationFilePaths: Set + ): Promise { + // This is a no-op because we don't support rigging for non-project configuration files + return undefined; + } +} diff --git a/libraries/heft-config-file/src/ProjectConfigurationFile.ts b/libraries/heft-config-file/src/ProjectConfigurationFile.ts new file mode 100644 index 00000000000..066ed7a5327 --- /dev/null +++ b/libraries/heft-config-file/src/ProjectConfigurationFile.ts @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import * as nodeJsPath from 'path'; +import { FileSystem } from '@rushstack/node-core-library'; +import type { ITerminal } from '@rushstack/terminal'; +import type { IRigConfig } from '@rushstack/rig-package'; + +import { ConfigurationFileBase, type IConfigurationFileOptions } from './ConfigurationFileBase'; + +/** + * @beta + */ +export interface IProjectConfigurationFileOptions { + /** + * A project root-relative path to the configuration file that should be loaded. + */ + projectRelativeFilePath: string; +} + +/** + * @beta + */ +export class ProjectConfigurationFile extends ConfigurationFileBase< + TConfigurationFile, + IProjectConfigurationFileOptions +> { + /** {@inheritDoc IProjectConfigurationFileOptions.projectRelativeFilePath} */ + public readonly projectRelativeFilePath: string; + + public constructor( + options: IConfigurationFileOptions + ) { + super(options); + this.projectRelativeFilePath = options.projectRelativeFilePath; + } + + /** + * Find and return a configuration file for the specified project, automatically resolving + * `extends` properties and handling rigged configuration files. Will throw an error if a configuration + * file cannot be found in the rig or project config folder. + */ + public loadConfigurationFileForProject( + terminal: ITerminal, + projectPath: string, + rigConfig?: IRigConfig + ): TConfigurationFile { + const projectConfigurationFilePath: string = this._getConfigurationFilePathForProject(projectPath); + return this._loadConfigurationFileInnerWithCache( + terminal, + projectConfigurationFilePath, + new Set(), + rigConfig + ); + } + + /** + * Find and return a configuration file for the specified project, automatically resolving + * `extends` properties and handling rigged configuration files. Will throw an error if a configuration + * file cannot be found in the rig or project config folder. + */ + public async loadConfigurationFileForProjectAsync( + terminal: ITerminal, + projectPath: string, + rigConfig?: IRigConfig + ): Promise { + const projectConfigurationFilePath: string = this._getConfigurationFilePathForProject(projectPath); + return await this._loadConfigurationFileInnerWithCacheAsync( + terminal, + projectConfigurationFilePath, + new Set(), + rigConfig + ); + } + + /** + * This function is identical to {@link ProjectConfigurationFile.loadConfigurationFileForProject}, except + * that it returns `undefined` instead of throwing an error if the configuration file cannot be found. + */ + public tryLoadConfigurationFileForProject( + terminal: ITerminal, + projectPath: string, + rigConfig?: IRigConfig + ): TConfigurationFile | undefined { + try { + return this.loadConfigurationFileForProject(terminal, projectPath, rigConfig); + } catch (e) { + if (FileSystem.isNotExistError(e as Error)) { + return undefined; + } + throw e; + } + } + + /** + * This function is identical to {@link ProjectConfigurationFile.loadConfigurationFileForProjectAsync}, except + * that it returns `undefined` instead of throwing an error if the configuration file cannot be found. + */ + public async tryLoadConfigurationFileForProjectAsync( + terminal: ITerminal, + projectPath: string, + rigConfig?: IRigConfig + ): Promise { + try { + return await this.loadConfigurationFileForProjectAsync(terminal, projectPath, rigConfig); + } catch (e) { + if (FileSystem.isNotExistError(e as Error)) { + return undefined; + } + throw e; + } + } + + protected _tryLoadConfigurationFileInRig( + terminal: ITerminal, + rigConfig: IRigConfig, + visitedConfigurationFilePaths: Set + ): TConfigurationFile | undefined { + if (rigConfig.rigFound) { + const rigProfileFolder: string = rigConfig.getResolvedProfileFolder(); + try { + return this._loadConfigurationFileInnerWithCache( + terminal, + nodeJsPath.resolve(rigProfileFolder, this.projectRelativeFilePath), + visitedConfigurationFilePaths, + undefined + ); + } catch (e) { + // Ignore cases where a configuration file doesn't exist in a rig + if (!FileSystem.isNotExistError(e as Error)) { + throw e; + } else { + terminal.writeDebugLine( + `Configuration file "${ + this.projectRelativeFilePath + }" not found in rig ("${ConfigurationFileBase._formatPathForLogging(rigProfileFolder)}")` + ); + } + } + } else { + terminal.writeDebugLine( + `No rig found for "${ConfigurationFileBase._formatPathForLogging(rigConfig.projectFolderPath)}"` + ); + } + + return undefined; + } + + protected async _tryLoadConfigurationFileInRigAsync( + terminal: ITerminal, + rigConfig: IRigConfig, + visitedConfigurationFilePaths: Set + ): Promise { + if (rigConfig.rigFound) { + const rigProfileFolder: string = await rigConfig.getResolvedProfileFolderAsync(); + try { + return await this._loadConfigurationFileInnerWithCacheAsync( + terminal, + nodeJsPath.resolve(rigProfileFolder, this.projectRelativeFilePath), + visitedConfigurationFilePaths, + undefined + ); + } catch (e) { + // Ignore cases where a configuration file doesn't exist in a rig + if (!FileSystem.isNotExistError(e as Error)) { + throw e; + } else { + terminal.writeDebugLine( + `Configuration file "${ + this.projectRelativeFilePath + }" not found in rig ("${ConfigurationFileBase._formatPathForLogging(rigProfileFolder)}")` + ); + } + } + } else { + terminal.writeDebugLine( + `No rig found for "${ConfigurationFileBase._formatPathForLogging(rigConfig.projectFolderPath)}"` + ); + } + + return undefined; + } + + private _getConfigurationFilePathForProject(projectPath: string): string { + return nodeJsPath.resolve(projectPath, this.projectRelativeFilePath); + } +} diff --git a/libraries/heft-config-file/src/TestUtilities.ts b/libraries/heft-config-file/src/TestUtilities.ts new file mode 100644 index 00000000000..b51f3f455c0 --- /dev/null +++ b/libraries/heft-config-file/src/TestUtilities.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { CONFIGURATION_FILE_FIELD_ANNOTATION, type IAnnotatedField } from './ConfigurationFileBase'; + +/** + * Returns an object with investigative annotations stripped, useful for snapshot testing. + * + * @beta + */ +export function stripAnnotations(obj: TObject): TObject { + if (typeof obj !== 'object' || obj === null) { + return obj; + } else if (Array.isArray(obj)) { + const result: unknown[] = []; + for (const value of obj) { + result.push(stripAnnotations(value)); + } + + return result as TObject; + } else { + const clonedObj: TObject = { ...obj } as TObject; + delete (clonedObj as Partial>)[CONFIGURATION_FILE_FIELD_ANNOTATION]; + for (const [name, value] of Object.entries(clonedObj as object)) { + clonedObj[name as keyof TObject] = stripAnnotations( + value as TObject[keyof TObject] + ); + } + + return clonedObj; + } +} diff --git a/libraries/heft-config-file/src/index.ts b/libraries/heft-config-file/src/index.ts index 896fc44308a..4ae1fa97b9b 100644 --- a/libraries/heft-config-file/src/index.ts +++ b/libraries/heft-config-file/src/index.ts @@ -9,7 +9,7 @@ */ export { - ConfigurationFile, + ConfigurationFileBase, type IConfigurationFileOptionsBase, type IConfigurationFileOptionsWithJsonSchemaFilePath, type IConfigurationFileOptionsWithJsonSchemaObject, @@ -27,4 +27,24 @@ export { type IPropertyInheritanceDefaults, PathResolutionMethod, type PropertyInheritanceCustomFunction -} from './ConfigurationFile'; +} from './ConfigurationFileBase'; + +import { ProjectConfigurationFile } from './ProjectConfigurationFile'; + +/** + * @deprecated Use {@link ProjectConfigurationFile} instead. + * @beta + */ +export const ConfigurationFile: typeof ProjectConfigurationFile = ProjectConfigurationFile; + +/** + * @deprecated Use {@link ProjectConfigurationFile} instead. + * @beta + */ +// eslint-disable-next-line @typescript-eslint/no-redeclare +export type ConfigurationFile = ProjectConfigurationFile; + +export { ProjectConfigurationFile, type IProjectConfigurationFileOptions } from './ProjectConfigurationFile'; +export { NonProjectConfigurationFile } from './NonProjectConfigurationFile'; + +export * as TestUtilities from './TestUtilities'; diff --git a/libraries/heft-config-file/src/test/ConfigurationFile.test.ts b/libraries/heft-config-file/src/test/ConfigurationFile.test.ts index 985a5c10c55..a47516a7968 100644 --- a/libraries/heft-config-file/src/test/ConfigurationFile.test.ts +++ b/libraries/heft-config-file/src/test/ConfigurationFile.test.ts @@ -1,14 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. +/* eslint-disable max-lines */ + import * as nodeJsPath from 'path'; import { FileSystem, JsonFile, Path, Text } from '@rushstack/node-core-library'; import { StringBufferTerminalProvider, Terminal } from '@rushstack/terminal'; import { RigConfig } from '@rushstack/rig-package'; -import { ConfigurationFile, PathResolutionMethod, InheritanceType } from '../ConfigurationFile'; +import { ProjectConfigurationFile } from '../ProjectConfigurationFile'; +import { PathResolutionMethod, InheritanceType, ConfigurationFileBase } from '../ConfigurationFileBase'; +import { NonProjectConfigurationFile } from '../NonProjectConfigurationFile'; -describe(ConfigurationFile.name, () => { +describe('ConfigurationFile', () => { const projectRoot: string = nodeJsPath.resolve(__dirname, '..', '..'); let terminalProvider: StringBufferTerminalProvider; let terminal: Terminal; @@ -16,7 +20,7 @@ describe(ConfigurationFile.name, () => { beforeEach(() => { const formatPathForLogging: (path: string) => string = (path: string) => `/${Path.convertToSlashes(nodeJsPath.relative(projectRoot, path))}`; - jest.spyOn(ConfigurationFile, '_formatPathForLogging').mockImplementation(formatPathForLogging); + jest.spyOn(ConfigurationFileBase, '_formatPathForLogging').mockImplementation(formatPathForLogging); jest.spyOn(JsonFile, '_formatPathForError').mockImplementation(formatPathForLogging); terminalProvider = new StringBufferTerminalProvider(false); @@ -43,8 +47,8 @@ describe(ConfigurationFile.name, () => { } it('Correctly loads the config file', () => { - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, ...partialOptions }); @@ -64,8 +68,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly loads the config file async', async () => { - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, ...partialOptions }); @@ -83,8 +87,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly resolves paths relative to the config file', () => { - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, ...partialOptions, jsonPathMetadata: { @@ -110,8 +114,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly resolves paths relative to the config file async', async () => { - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, ...partialOptions, jsonPathMetadata: { @@ -135,8 +139,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly resolves paths relative to the project root', () => { - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, ...partialOptions, jsonPathMetadata: { @@ -162,8 +166,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly resolves paths relative to the project root async', async () => { - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, ...partialOptions, jsonPathMetadata: { @@ -185,6 +189,42 @@ describe(ConfigurationFile.name, () => { configFileLoader.getPropertyOriginalValue({ parentObject: loadedConfigFile, propertyName: 'thing' }) ).toEqual('A'); }); + + it(`The ${NonProjectConfigurationFile.name} version works correctly`, () => { + const configFileLoader: NonProjectConfigurationFile = + new NonProjectConfigurationFile(partialOptions); + const loadedConfigFile: ISimplestConfigFile = configFileLoader.loadConfigurationFile( + terminal, + `${__dirname}/${projectRelativeFilePath}` + ); + const expectedConfigFile: ISimplestConfigFile = { thing: 'A' }; + + expect(JSON.stringify(loadedConfigFile)).toEqual(JSON.stringify(expectedConfigFile)); + expect(configFileLoader.getObjectSourceFilePath(loadedConfigFile)).toEqual( + `${__dirname}/${projectRelativeFilePath}` + ); + expect( + configFileLoader.getPropertyOriginalValue({ parentObject: loadedConfigFile, propertyName: 'thing' }) + ).toEqual('A'); + }); + + it(`The ${NonProjectConfigurationFile.name} version works correctly async`, async () => { + const configFileLoader: NonProjectConfigurationFile = + new NonProjectConfigurationFile(partialOptions); + const loadedConfigFile: ISimplestConfigFile = await configFileLoader.loadConfigurationFileAsync( + terminal, + `${__dirname}/${projectRelativeFilePath}` + ); + const expectedConfigFile: ISimplestConfigFile = { thing: 'A' }; + + expect(JSON.stringify(loadedConfigFile)).toEqual(JSON.stringify(expectedConfigFile)); + expect(configFileLoader.getObjectSourceFilePath(loadedConfigFile)).toEqual( + `${__dirname}/${projectRelativeFilePath}` + ); + expect( + configFileLoader.getPropertyOriginalValue({ parentObject: loadedConfigFile, propertyName: 'thing' }) + ).toEqual('A'); + }); } describe('with a JSON schema path', () => { @@ -214,12 +254,11 @@ describe(ConfigurationFile.name, () => { } it('Correctly loads the config file', () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath - } - ); + }); const loadedConfigFile: ISimpleConfigFile = configFileLoader.loadConfigurationFileForProject( terminal, __dirname @@ -233,12 +272,11 @@ describe(ConfigurationFile.name, () => { }); it('Correctly loads the config file async', async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath - } - ); + }); const loadedConfigFile: ISimpleConfigFile = await configFileLoader.loadConfigurationFileForProjectAsync( terminal, __dirname @@ -252,8 +290,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly resolves paths relative to the config file', () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, jsonPathMetadata: { @@ -264,8 +302,7 @@ describe(ConfigurationFile.name, () => { pathResolutionMethod: PathResolutionMethod.resolvePathRelativeToConfigurationFile } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = configFileLoader.loadConfigurationFileForProject( terminal, __dirname @@ -286,8 +323,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly resolves paths relative to the config file async', async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, jsonPathMetadata: { @@ -298,8 +335,7 @@ describe(ConfigurationFile.name, () => { pathResolutionMethod: PathResolutionMethod.resolvePathRelativeToConfigurationFile } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = await configFileLoader.loadConfigurationFileForProjectAsync( terminal, __dirname @@ -320,8 +356,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly resolves paths relative to the project root', () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, jsonPathMetadata: { @@ -332,8 +368,7 @@ describe(ConfigurationFile.name, () => { pathResolutionMethod: PathResolutionMethod.resolvePathRelativeToProjectRoot } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = configFileLoader.loadConfigurationFileForProject( terminal, __dirname @@ -354,8 +389,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly resolves paths relative to the project root async', async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, jsonPathMetadata: { @@ -366,8 +401,7 @@ describe(ConfigurationFile.name, () => { pathResolutionMethod: PathResolutionMethod.resolvePathRelativeToProjectRoot } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = await configFileLoader.loadConfigurationFileForProjectAsync( terminal, __dirname @@ -404,46 +438,68 @@ describe(ConfigurationFile.name, () => { } it('Correctly loads the config file with default config meta', () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const expectedConfigFile: ISimpleConfigFile = { + things: ['A', 'B', 'C', 'D', 'E'], + thingsObj: { A: { D: 'E' }, F: { G: 'H' } }, + booleanProp: false + }; + + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath - } - ); + }); const loadedConfigFile: ISimpleConfigFile = configFileLoader.loadConfigurationFileForProject( terminal, __dirname ); + expect(JSON.stringify(loadedConfigFile)).toEqual(JSON.stringify(expectedConfigFile)); + + const nonProjectConfigFileLoader: NonProjectConfigurationFile = + new NonProjectConfigurationFile({ + jsonSchemaPath: schemaPath + }); + const nonProjectLoadedConfigFile: ISimpleConfigFile = nonProjectConfigFileLoader.loadConfigurationFile( + terminal, + `${__dirname}/${projectRelativeFilePath}` + ); + expect(JSON.stringify(nonProjectLoadedConfigFile)).toEqual(JSON.stringify(expectedConfigFile)); + }); + + it('Correctly loads the config file with default config meta async', async () => { const expectedConfigFile: ISimpleConfigFile = { things: ['A', 'B', 'C', 'D', 'E'], thingsObj: { A: { D: 'E' }, F: { G: 'H' } }, booleanProp: false }; - expect(JSON.stringify(loadedConfigFile)).toEqual(JSON.stringify(expectedConfigFile)); - }); - it('Correctly loads the config file with default config meta async', async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath - } - ); + }); const loadedConfigFile: ISimpleConfigFile = await configFileLoader.loadConfigurationFileForProjectAsync( terminal, __dirname ); - const expectedConfigFile: ISimpleConfigFile = { - things: ['A', 'B', 'C', 'D', 'E'], - thingsObj: { A: { D: 'E' }, F: { G: 'H' } }, - booleanProp: false - }; + expect(JSON.stringify(loadedConfigFile)).toEqual(JSON.stringify(expectedConfigFile)); + + const nonProjectConfigFileLoader: NonProjectConfigurationFile = + new NonProjectConfigurationFile({ + jsonSchemaPath: schemaPath + }); + const nonProjectLoadedConfigFile: ISimpleConfigFile = + await nonProjectConfigFileLoader.loadConfigurationFileAsync( + terminal, + `${__dirname}/${projectRelativeFilePath}` + ); + expect(JSON.stringify(nonProjectLoadedConfigFile)).toEqual(JSON.stringify(expectedConfigFile)); }); it('Correctly loads the config file with "append" and "merge" in config meta', () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, propertyInheritance: { @@ -454,8 +510,7 @@ describe(ConfigurationFile.name, () => { inheritanceType: InheritanceType.merge } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = configFileLoader.loadConfigurationFileForProject( terminal, __dirname @@ -469,8 +524,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly loads the config file with "append" and "merge" in config meta async', async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, propertyInheritance: { @@ -481,8 +536,7 @@ describe(ConfigurationFile.name, () => { inheritanceType: InheritanceType.merge } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = await configFileLoader.loadConfigurationFileForProjectAsync( terminal, __dirname @@ -496,8 +550,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly loads the config file with "replace" in config meta', () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, propertyInheritance: { @@ -508,8 +562,7 @@ describe(ConfigurationFile.name, () => { inheritanceType: InheritanceType.replace } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = configFileLoader.loadConfigurationFileForProject( terminal, __dirname @@ -523,8 +576,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly loads the config file with "replace" in config meta async', async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, propertyInheritance: { @@ -535,8 +588,7 @@ describe(ConfigurationFile.name, () => { inheritanceType: InheritanceType.replace } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = await configFileLoader.loadConfigurationFileForProjectAsync( terminal, __dirname @@ -550,16 +602,15 @@ describe(ConfigurationFile.name, () => { }); it('Correctly loads the config file with modified merge behaviors for arrays and objects', () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, propertyInheritanceDefaults: { array: { inheritanceType: InheritanceType.replace }, object: { inheritanceType: InheritanceType.merge } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = configFileLoader.loadConfigurationFileForProject( terminal, __dirname @@ -573,16 +624,15 @@ describe(ConfigurationFile.name, () => { }); it('Correctly loads the config file with modified merge behaviors for arrays and objects async', async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, propertyInheritanceDefaults: { array: { inheritanceType: InheritanceType.replace }, object: { inheritanceType: InheritanceType.merge } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = await configFileLoader.loadConfigurationFileForProjectAsync( terminal, __dirname @@ -596,8 +646,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly loads the config file with "custom" in config meta', () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, propertyInheritance: { @@ -617,8 +667,7 @@ describe(ConfigurationFile.name, () => { } } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = configFileLoader.loadConfigurationFileForProject( terminal, __dirname @@ -632,8 +681,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly loads the config file with "custom" in config meta async', async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, propertyInheritance: { @@ -653,8 +702,7 @@ describe(ConfigurationFile.name, () => { } } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = await configFileLoader.loadConfigurationFileForProjectAsync( terminal, __dirname @@ -668,8 +716,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly resolves paths relative to the config file', () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, jsonPathMetadata: { @@ -680,8 +728,7 @@ describe(ConfigurationFile.name, () => { pathResolutionMethod: PathResolutionMethod.resolvePathRelativeToConfigurationFile } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = configFileLoader.loadConfigurationFileForProject( terminal, __dirname @@ -711,8 +758,8 @@ describe(ConfigurationFile.name, () => { }); it('Correctly resolves paths relative to the config file async', async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile( - { + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath, jsonSchemaPath: schemaPath, jsonPathMetadata: { @@ -723,8 +770,7 @@ describe(ConfigurationFile.name, () => { pathResolutionMethod: PathResolutionMethod.resolvePathRelativeToConfigurationFile } } - } - ); + }); const loadedConfigFile: ISimpleConfigFile = await configFileLoader.loadConfigurationFileForProjectAsync( terminal, __dirname @@ -769,8 +815,8 @@ describe(ConfigurationFile.name, () => { ); const schemaPath: string = nodeJsPath.resolve(__dirname, 'complexConfigFile', 'plugins.schema.json'); - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath, jsonPathMetadata: { @@ -804,7 +850,7 @@ describe(ConfigurationFile.name, () => { }, { plugin: FileSystem.getRealPath( - nodeJsPath.resolve(projectRoot, 'node_modules', 'jsonpath-plus', 'dist', 'index-umd.js') + nodeJsPath.resolve(projectRoot, 'node_modules', 'jsonpath-plus', 'dist', 'index-node-cjs.cjs') ) } ] @@ -852,8 +898,8 @@ describe(ConfigurationFile.name, () => { ); const schemaPath: string = nodeJsPath.resolve(__dirname, 'complexConfigFile', 'plugins.schema.json'); - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath, jsonPathMetadata: { @@ -885,7 +931,7 @@ describe(ConfigurationFile.name, () => { }, { plugin: await FileSystem.getRealPathAsync( - nodeJsPath.resolve(projectRoot, 'node_modules', 'jsonpath-plus', 'dist', 'index-umd.js') + nodeJsPath.resolve(projectRoot, 'node_modules', 'jsonpath-plus', 'dist', 'index-node-cjs.cjs') ) } ] @@ -933,8 +979,8 @@ describe(ConfigurationFile.name, () => { ); const schemaPath: string = nodeJsPath.resolve(__dirname, 'complexConfigFile', 'plugins.schema.json'); - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath, jsonPathMetadata: { @@ -968,7 +1014,7 @@ describe(ConfigurationFile.name, () => { }, { plugin: FileSystem.getRealPath( - nodeJsPath.resolve(projectRoot, 'node_modules', 'jsonpath-plus', 'dist', 'index-umd.js') + nodeJsPath.resolve(projectRoot, 'node_modules', 'jsonpath-plus', 'dist', 'index-node-cjs.cjs') ) } ] @@ -1016,8 +1062,8 @@ describe(ConfigurationFile.name, () => { ); const schemaPath: string = nodeJsPath.resolve(__dirname, 'complexConfigFile', 'plugins.schema.json'); - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath, jsonPathMetadata: { @@ -1049,7 +1095,7 @@ describe(ConfigurationFile.name, () => { }, { plugin: await FileSystem.getRealPathAsync( - nodeJsPath.resolve(projectRoot, 'node_modules', 'jsonpath-plus', 'dist', 'index-umd.js') + nodeJsPath.resolve(projectRoot, 'node_modules', 'jsonpath-plus', 'dist', 'index-node-cjs.cjs') ) } ] @@ -1149,8 +1195,8 @@ describe(ConfigurationFile.name, () => { 'inheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath }); @@ -1241,8 +1287,8 @@ describe(ConfigurationFile.name, () => { 'inheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath }); @@ -1332,8 +1378,8 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath }); @@ -1378,7 +1424,7 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile', 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'simpleInheritanceTypeConfigFile/badInheritanceTypeConfigFileA.json', jsonSchemaPath: schemaPath }); @@ -1394,7 +1440,7 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile', 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'simpleInheritanceTypeConfigFile/badInheritanceTypeConfigFileA.json', jsonSchemaPath: schemaPath }); @@ -1410,7 +1456,7 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile', 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'simpleInheritanceTypeConfigFile/badInheritanceTypeConfigFileB.json', jsonSchemaPath: schemaPath }); @@ -1426,7 +1472,7 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile', 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'simpleInheritanceTypeConfigFile/badInheritanceTypeConfigFileB.json', jsonSchemaPath: schemaPath }); @@ -1442,7 +1488,7 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile', 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'simpleInheritanceTypeConfigFile/badInheritanceTypeConfigFileC.json', jsonSchemaPath: schemaPath }); @@ -1458,7 +1504,7 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile', 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'simpleInheritanceTypeConfigFile/badInheritanceTypeConfigFileC.json', jsonSchemaPath: schemaPath }); @@ -1474,7 +1520,7 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile', 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'simpleInheritanceTypeConfigFile/badInheritanceTypeConfigFileD.json', jsonSchemaPath: schemaPath }); @@ -1490,7 +1536,7 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile', 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'simpleInheritanceTypeConfigFile/badInheritanceTypeConfigFileD.json', jsonSchemaPath: schemaPath }); @@ -1506,7 +1552,7 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile', 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'simpleInheritanceTypeConfigFile/badInheritanceTypeConfigFileE.json', jsonSchemaPath: schemaPath }); @@ -1522,7 +1568,7 @@ describe(ConfigurationFile.name, () => { 'simpleInheritanceTypeConfigFile', 'simpleInheritanceTypeConfigFile.schema.json' ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'simpleInheritanceTypeConfigFile/badInheritanceTypeConfigFileE.json', jsonSchemaPath: schemaPath }); @@ -1549,8 +1595,8 @@ describe(ConfigurationFile.name, () => { it('correctly loads a config file inside a rig', () => { const projectRelativeFilePath: string = 'config/simplestConfigFile.json'; - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath }); @@ -1579,8 +1625,8 @@ describe(ConfigurationFile.name, () => { it('correctly loads a config file inside a rig async', async () => { const projectRelativeFilePath: string = 'config/simplestConfigFile.json'; - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath }); @@ -1606,8 +1652,8 @@ describe(ConfigurationFile.name, () => { it('correctly loads a config file inside a rig via tryLoadConfigurationFileForProject', () => { const projectRelativeFilePath: string = 'config/simplestConfigFile.json'; - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath }); @@ -1634,8 +1680,8 @@ describe(ConfigurationFile.name, () => { it('correctly loads a config file inside a rig via tryLoadConfigurationFileForProjectAsync', async () => { const projectRelativeFilePath: string = 'config/simplestConfigFile.json'; - const configFileLoader: ConfigurationFile = - new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, jsonSchemaPath: schemaPath }); @@ -1661,7 +1707,7 @@ describe(ConfigurationFile.name, () => { }); it("throws an error when a config file doesn't exist in a project referencing a rig, which also doesn't have the file", () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'config/notExist.json', jsonSchemaPath: schemaPath }); @@ -1672,7 +1718,7 @@ describe(ConfigurationFile.name, () => { }); it("throws an error when a config file doesn't exist in a project referencing a rig, which also doesn't have the file async", async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: 'config/notExist.json', jsonSchemaPath: schemaPath }); @@ -1688,7 +1734,7 @@ describe(ConfigurationFile.name, () => { it("throws an error when the file doesn't exist", () => { const errorCaseFolderName: string = 'invalidType'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/notExist.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1705,7 +1751,7 @@ describe(ConfigurationFile.name, () => { it("throws an error when the file doesn't exist async", async () => { const errorCaseFolderName: string = 'invalidType'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/notExist.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1722,7 +1768,7 @@ describe(ConfigurationFile.name, () => { it("returns undefined when the file doesn't exist for tryLoadConfigurationFileForProject", () => { const errorCaseFolderName: string = 'invalidType'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/notExist.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1737,7 +1783,7 @@ describe(ConfigurationFile.name, () => { it("returns undefined when the file doesn't exist for tryLoadConfigurationFileForProjectAsync", async () => { const errorCaseFolderName: string = 'invalidType'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/notExist.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1766,7 +1812,7 @@ describe(ConfigurationFile.name, () => { : Promise.reject(new Error('File not found')) ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: configFilePath, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1802,7 +1848,7 @@ describe(ConfigurationFile.name, () => { : Promise.reject(new Error('File not found')) ); - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: configFilePath, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1823,7 +1869,7 @@ describe(ConfigurationFile.name, () => { it("Throws an error for a file that doesn't match its schema", () => { const errorCaseFolderName: string = 'invalidType'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/config.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1840,7 +1886,7 @@ describe(ConfigurationFile.name, () => { it("Throws an error for a file that doesn't match its schema async", async () => { const errorCaseFolderName: string = 'invalidType'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/config.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1857,7 +1903,7 @@ describe(ConfigurationFile.name, () => { it('Throws an error when there is a circular reference in "extends" properties', () => { const errorCaseFolderName: string = 'circularReference'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/config1.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1874,7 +1920,7 @@ describe(ConfigurationFile.name, () => { it('Throws an error when there is a circular reference in "extends" properties async', async () => { const errorCaseFolderName: string = 'circularReference'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/config1.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1891,7 +1937,7 @@ describe(ConfigurationFile.name, () => { it('Throws an error when an "extends" property points to a file that cannot be resolved', () => { const errorCaseFolderName: string = 'extendsNotExist'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/config.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1908,7 +1954,7 @@ describe(ConfigurationFile.name, () => { it('Throws an error when an "extends" property points to a file that cannot be resolved async', async () => { const errorCaseFolderName: string = 'extendsNotExist'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/config.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1925,7 +1971,7 @@ describe(ConfigurationFile.name, () => { it("Throws an error when a combined config file doesn't match the schema", () => { const errorCaseFolderName: string = 'invalidCombinedFile'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/config1.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1942,7 +1988,7 @@ describe(ConfigurationFile.name, () => { it("Throws an error when a combined config file doesn't match the schema async", async () => { const errorCaseFolderName: string = 'invalidCombinedFile'; - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/${errorCaseFolderName}/config1.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1958,7 +2004,7 @@ describe(ConfigurationFile.name, () => { }); it("Throws an error when a requested file doesn't exist", () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/folderThatDoesntExist/config.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, @@ -1974,7 +2020,7 @@ describe(ConfigurationFile.name, () => { }); it("Throws an error when a requested file doesn't exist async", async () => { - const configFileLoader: ConfigurationFile = new ConfigurationFile({ + const configFileLoader: ProjectConfigurationFile = new ProjectConfigurationFile({ projectRelativeFilePath: `${errorCasesFolderName}/folderThatDoesntExist/config.json`, jsonSchemaPath: nodeJsPath.resolve( __dirname, diff --git a/libraries/heft-config-file/src/test/__snapshots__/ConfigurationFile.test.ts.snap b/libraries/heft-config-file/src/test/__snapshots__/ConfigurationFile.test.ts.snap index a6028298487..2dc578c2fa2 100644 --- a/libraries/heft-config-file/src/test/__snapshots__/ConfigurationFile.test.ts.snap +++ b/libraries/heft-config-file/src/test/__snapshots__/ConfigurationFile.test.ts.snap @@ -280,6 +280,26 @@ Object { } `; +exports[`ConfigurationFile A simple config file with a JSON schema object The NonProjectConfigurationFile version works correctly 1`] = ` +Object { + "debug": "", + "error": "", + "log": "", + "verbose": "", + "warning": "", +} +`; + +exports[`ConfigurationFile A simple config file with a JSON schema object The NonProjectConfigurationFile version works correctly async 1`] = ` +Object { + "debug": "", + "error": "", + "log": "", + "verbose": "", + "warning": "", +} +`; + exports[`ConfigurationFile A simple config file with a JSON schema path Correctly loads the config file 1`] = ` Object { "debug": "", @@ -340,6 +360,26 @@ Object { } `; +exports[`ConfigurationFile A simple config file with a JSON schema path The NonProjectConfigurationFile version works correctly 1`] = ` +Object { + "debug": "", + "error": "", + "log": "", + "verbose": "", + "warning": "", +} +`; + +exports[`ConfigurationFile A simple config file with a JSON schema path The NonProjectConfigurationFile version works correctly async 1`] = ` +Object { + "debug": "", + "error": "", + "log": "", + "verbose": "", + "warning": "", +} +`; + exports[`ConfigurationFile a complex file with inheritance type annotations Correctly loads a complex config file with a single inheritance type annotation 1`] = ` Object { "debug": "", diff --git a/libraries/load-themed-styles/CHANGELOG.json b/libraries/load-themed-styles/CHANGELOG.json index 9e37002516a..3460efce97a 100644 --- a/libraries/load-themed-styles/CHANGELOG.json +++ b/libraries/load-themed-styles/CHANGELOG.json @@ -1,6 +1,162 @@ { "name": "@microsoft/load-themed-styles", "entries": [ + { + "version": "2.0.158", + "tag": "@microsoft/load-themed-styles_v2.0.158", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "2.0.157", + "tag": "@microsoft/load-themed-styles_v2.0.157", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "2.0.156", + "tag": "@microsoft/load-themed-styles_v2.0.156", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "2.0.155", + "tag": "@microsoft/load-themed-styles_v2.0.155", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "2.0.154", + "tag": "@microsoft/load-themed-styles_v2.0.154", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "2.0.153", + "tag": "@microsoft/load-themed-styles_v2.0.153", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "2.0.152", + "tag": "@microsoft/load-themed-styles_v2.0.152", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "2.0.151", + "tag": "@microsoft/load-themed-styles_v2.0.151", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "2.0.150", + "tag": "@microsoft/load-themed-styles_v2.0.150", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "2.0.149", + "tag": "@microsoft/load-themed-styles_v2.0.149", + "date": "Thu, 24 Oct 2024 00:15:47 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "2.0.148", + "tag": "@microsoft/load-themed-styles_v2.0.148", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "2.0.147", + "tag": "@microsoft/load-themed-styles_v2.0.147", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "2.0.146", + "tag": "@microsoft/load-themed-styles_v2.0.146", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "2.0.145", "tag": "@microsoft/load-themed-styles_v2.0.145", diff --git a/libraries/load-themed-styles/CHANGELOG.md b/libraries/load-themed-styles/CHANGELOG.md index fe860ce4a3f..cd010095a2b 100644 --- a/libraries/load-themed-styles/CHANGELOG.md +++ b/libraries/load-themed-styles/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @microsoft/load-themed-styles -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 2.0.158 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 2.0.157 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 2.0.156 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 2.0.155 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 2.0.154 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 2.0.153 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 2.0.152 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 2.0.151 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 2.0.150 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 2.0.149 +Thu, 24 Oct 2024 00:15:47 GMT + +_Version update only_ + +## 2.0.148 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 2.0.147 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 2.0.146 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 2.0.145 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/libraries/load-themed-styles/package.json b/libraries/load-themed-styles/package.json index 8b87b2eb6ce..b215db59992 100644 --- a/libraries/load-themed-styles/package.json +++ b/libraries/load-themed-styles/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/load-themed-styles", - "version": "2.0.145", + "version": "2.0.158", "description": "Loads themed styles.", "license": "MIT", "repository": { diff --git a/libraries/localization-utilities/CHANGELOG.json b/libraries/localization-utilities/CHANGELOG.json index 14d12e6cecc..33655a6393a 100644 --- a/libraries/localization-utilities/CHANGELOG.json +++ b/libraries/localization-utilities/CHANGELOG.json @@ -1,6 +1,225 @@ { "name": "@rushstack/localization-utilities", "entries": [ + { + "version": "0.12.19", + "tag": "@rushstack/localization-utilities_v0.12.19", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.19`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.12.18", + "tag": "@rushstack/localization-utilities_v0.12.18", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.18`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.12.17", + "tag": "@rushstack/localization-utilities_v0.12.17", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.17`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.12.16", + "tag": "@rushstack/localization-utilities_v0.12.16", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.16`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.12.15", + "tag": "@rushstack/localization-utilities_v0.12.15", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.12.14", + "tag": "@rushstack/localization-utilities_v0.12.14", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.12.13", + "tag": "@rushstack/localization-utilities_v0.12.13", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.12.12", + "tag": "@rushstack/localization-utilities_v0.12.12", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.12.11", + "tag": "@rushstack/localization-utilities_v0.12.11", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.12.10", + "tag": "@rushstack/localization-utilities_v0.12.10", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.12.9", + "tag": "@rushstack/localization-utilities_v0.12.9", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.12.8", + "tag": "@rushstack/localization-utilities_v0.12.8", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.12.7", + "tag": "@rushstack/localization-utilities_v0.12.7", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.14.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.12.6", "tag": "@rushstack/localization-utilities_v0.12.6", diff --git a/libraries/localization-utilities/CHANGELOG.md b/libraries/localization-utilities/CHANGELOG.md index 80eec4793f3..865367429c6 100644 --- a/libraries/localization-utilities/CHANGELOG.md +++ b/libraries/localization-utilities/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/localization-utilities -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.12.19 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.12.18 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.12.17 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.12.16 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.12.15 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.12.14 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.12.13 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.12.12 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.12.11 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.12.10 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.12.9 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.12.8 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.12.7 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.12.6 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/libraries/localization-utilities/package.json b/libraries/localization-utilities/package.json index 6bee62a8e6a..0d4048a9894 100644 --- a/libraries/localization-utilities/package.json +++ b/libraries/localization-utilities/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/localization-utilities", - "version": "0.12.6", + "version": "0.12.19", "description": "This plugin contains some useful functions for localization.", "main": "lib/index.js", "typings": "dist/localization-utilities.d.ts", diff --git a/libraries/lookup-by-path/CHANGELOG.json b/libraries/lookup-by-path/CHANGELOG.json index 823ebd03164..fc24bb2d083 100644 --- a/libraries/lookup-by-path/CHANGELOG.json +++ b/libraries/lookup-by-path/CHANGELOG.json @@ -1,6 +1,186 @@ { "name": "@rushstack/lookup-by-path", "entries": [ + { + "version": "0.5.4", + "tag": "@rushstack/lookup-by-path_v0.5.4", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.5.3", + "tag": "@rushstack/lookup-by-path_v0.5.3", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.5.2", + "tag": "@rushstack/lookup-by-path_v0.5.2", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.5.1", + "tag": "@rushstack/lookup-by-path_v0.5.1", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.5.0", + "tag": "@rushstack/lookup-by-path_v0.5.0", + "date": "Wed, 18 Dec 2024 01:11:33 GMT", + "comments": { + "minor": [ + { + "comment": "Update all methods to accept optional override delimiters. Add `size`, `entries(), `get()`, `has()`, `removeItem()`. Make class iterable.\nExplicitly exclude `undefined` and `null` from the allowed types for the type parameter `TItem`." + } + ] + } + }, + { + "version": "0.4.7", + "tag": "@rushstack/lookup-by-path_v0.4.7", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.4.6", + "tag": "@rushstack/lookup-by-path_v0.4.6", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.4.5", + "tag": "@rushstack/lookup-by-path_v0.4.5", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.4.4", + "tag": "@rushstack/lookup-by-path_v0.4.4", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.4.3", + "tag": "@rushstack/lookup-by-path_v0.4.3", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.4.2", + "tag": "@rushstack/lookup-by-path_v0.4.2", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.4.1", + "tag": "@rushstack/lookup-by-path_v0.4.1", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.4.0", + "tag": "@rushstack/lookup-by-path_v0.4.0", + "date": "Thu, 17 Oct 2024 20:25:42 GMT", + "comments": { + "minor": [ + { + "comment": "Add `IReadonlyLookupByPath` interface to help unit tests for functions that consume `LookupByPath`." + } + ] + } + }, + { + "version": "0.3.2", + "tag": "@rushstack/lookup-by-path_v0.3.2", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.3.1", + "tag": "@rushstack/lookup-by-path_v0.3.1", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.3.0", "tag": "@rushstack/lookup-by-path_v0.3.0", diff --git a/libraries/lookup-by-path/CHANGELOG.md b/libraries/lookup-by-path/CHANGELOG.md index 9a7057f6c85..8043e6f41be 100644 --- a/libraries/lookup-by-path/CHANGELOG.md +++ b/libraries/lookup-by-path/CHANGELOG.md @@ -1,6 +1,86 @@ # Change Log - @rushstack/lookup-by-path -This log was last generated on Thu, 03 Oct 2024 15:11:00 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.5.4 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.5.3 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.5.2 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.5.1 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.5.0 +Wed, 18 Dec 2024 01:11:33 GMT + +### Minor changes + +- Update all methods to accept optional override delimiters. Add `size`, `entries(), `get()`, `has()`, `removeItem()`. Make class iterable. +Explicitly exclude `undefined` and `null` from the allowed types for the type parameter `TItem`. + +## 0.4.7 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.4.6 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.4.5 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.4.4 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.4.3 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.4.2 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.4.1 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.4.0 +Thu, 17 Oct 2024 20:25:42 GMT + +### Minor changes + +- Add `IReadonlyLookupByPath` interface to help unit tests for functions that consume `LookupByPath`. + +## 0.3.2 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.3.1 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.3.0 Thu, 03 Oct 2024 15:11:00 GMT diff --git a/libraries/lookup-by-path/package.json b/libraries/lookup-by-path/package.json index 4744f3859cf..c92493c06a5 100644 --- a/libraries/lookup-by-path/package.json +++ b/libraries/lookup-by-path/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/lookup-by-path", - "version": "0.3.0", + "version": "0.5.4", "description": "Strongly typed trie data structure for path and URL-like strings.", "main": "lib/index.js", "typings": "dist/lookup-by-path.d.ts", diff --git a/libraries/lookup-by-path/src/LookupByPath.ts b/libraries/lookup-by-path/src/LookupByPath.ts index 1f89630af01..63868c0a677 100644 --- a/libraries/lookup-by-path/src/LookupByPath.ts +++ b/libraries/lookup-by-path/src/LookupByPath.ts @@ -4,11 +4,12 @@ /** * A node in the path trie used in LookupByPath */ -interface IPathTrieNode { +interface IPathTrieNode { /** * The value that exactly matches the current relative path */ value: TItem | undefined; + /** * Child nodes by subfolder */ @@ -20,6 +21,7 @@ interface IPrefixEntry { * The prefix that was matched */ prefix: string; + /** * The index of the first character after the matched prefix */ @@ -31,21 +33,136 @@ interface IPrefixEntry { * * @beta */ -export interface IPrefixMatch { +export interface IPrefixMatch { /** * The item that matched the prefix */ value: TItem; + /** * The index of the first character after the matched prefix */ index: number; + /** * The last match found (with a shorter prefix), if any */ lastMatch?: IPrefixMatch; } +/** + * The readonly component of `LookupByPath`, to simplify unit testing. + * + * @beta + */ +export interface IReadonlyLookupByPath extends Iterable<[string, TItem]> { + /** + * Searches for the item associated with `childPath`, or the nearest ancestor of that path that + * has an associated item. + * + * @returns the found item, or `undefined` if no item was found + * + * @example + * ```ts + * const trie = new LookupByPath([['foo', 1], ['foo/bar', 2]]); + * trie.findChildPath('foo/baz'); // returns 1 + * trie.findChildPath('foo/bar/baz'); // returns 2 + * ``` + */ + findChildPath(childPath: string, delimiter?: string): TItem | undefined; + + /** + * Searches for the item for which the recorded prefix is the longest matching prefix of `query`. + * Obtains both the item and the length of the matched prefix, so that the remainder of the path can be + * extracted. + * + * @returns the found item and the length of the matched prefix, or `undefined` if no item was found + * + * @example + * ```ts + * const trie = new LookupByPath([['foo', 1], ['foo/bar', 2]]); + * trie.findLongestPrefixMatch('foo/baz'); // returns { item: 1, index: 3 } + * trie.findLongestPrefixMatch('foo/bar/baz'); // returns { item: 2, index: 7 } + * ``` + */ + findLongestPrefixMatch(query: string, delimiter?: string): IPrefixMatch | undefined; + + /** + * Searches for the item associated with `childPathSegments`, or the nearest ancestor of that path that + * has an associated item. + * + * @returns the found item, or `undefined` if no item was found + * + * @example + * ```ts + * const trie = new LookupByPath([['foo', 1], ['foo/bar', 2]]); + * trie.findChildPathFromSegments(['foo', 'baz']); // returns 1 + * trie.findChildPathFromSegments(['foo','bar', 'baz']); // returns 2 + * ``` + */ + findChildPathFromSegments(childPathSegments: Iterable): TItem | undefined; + + /** + * Determines if an entry exists exactly at the specified path. + * + * @returns `true` if an entry exists at the specified path, `false` otherwise + */ + has(query: string, delimiter?: string): boolean; + + /** + * Retrieves the entry that exists exactly at the specified path, if any. + * + * @returns The entry that exists exactly at the specified path, or `undefined` if no entry exists. + */ + get(query: string, delimiter?: string): TItem | undefined; + + /** + * Gets the number of entries in this trie. + * + * @returns The number of entries in this trie. + */ + get size(): number; + + /** + * Iterates over the entries in this trie. + * + * @param query - An optional query. If specified only entries that start with the query will be returned. + * + * @returns An iterator over the entries under the specified query (or the root if no query is specified). + * @remarks + * Keys in the returned iterator use the provided delimiter to join segments. + * Iteration order is not specified. + * @example + * ```ts + * const trie = new LookupByPath([['foo', 1], ['foo/bar', 2]]); + * [...trie.entries(undefined, ',')); // returns [['foo', 1], ['foo,bar', 2]] + * ``` + */ + entries(query?: string, delimiter?: string): IterableIterator<[string, TItem]>; + + /** + * Iterates over the entries in this trie. + * + * @param query - An optional query. If specified only entries that start with the query will be returned. + * + * @returns An iterator over the entries under the specified query (or the root if no query is specified). + * @remarks + * Keys in the returned iterator use the provided delimiter to join segments. + * Iteration order is not specified. + */ + [Symbol.iterator](query?: string, delimiter?: string): IterableIterator<[string, TItem]>; + + /** + * Groups the provided map of info by the nearest entry in the trie that contains the path. If the path + * is not found in the trie, the info is ignored. + * + * @returns The grouped info, grouped by the nearest entry in the trie that contains the path + * + * @param infoByPath - The info to be grouped, keyed by path + */ + groupByChild(infoByPath: Map, delimiter?: string): Map>; +} + /** * This class is used to associate path-like-strings, such as those returned by `git` commands, * with entities that correspond with ancestor folders, such as Rush Projects or npm packages. @@ -66,16 +183,22 @@ export interface IPrefixMatch { * ``` * @beta */ -export class LookupByPath { +export class LookupByPath implements IReadonlyLookupByPath { /** * The delimiter used to split paths */ public readonly delimiter: string; + /** * The root node of the trie, corresponding to the path '' */ private readonly _root: IPathTrieNode; + /** + * The number of entries in this trie. + */ + private _size: number; + /** * Constructs a new `LookupByPath` * @@ -88,6 +211,7 @@ export class LookupByPath { }; this.delimiter = delimiter ?? '/'; + this._size = 0; if (entries) { for (const [path, item] of entries) { @@ -138,14 +262,52 @@ export class LookupByPath { } } + /** + * {@inheritdoc IReadonlyLookupByPath} + */ + public get size(): number { + return this._size; + } + + /** + * Deletes all entries from this `LookupByPath` instance. + * + * @returns this, for chained calls + */ + public clear(): this { + this._root.value = undefined; + this._root.children = undefined; + this._size = 0; + return this; + } + /** * Associates the value with the specified serialized path. * If a value is already associated, will overwrite. * * @returns this, for chained calls */ - public setItem(serializedPath: string, value: TItem): this { - return this.setItemFromSegments(LookupByPath.iteratePathSegments(serializedPath, this.delimiter), value); + public setItem(serializedPath: string, value: TItem, delimiter: string = this.delimiter): this { + return this.setItemFromSegments(LookupByPath.iteratePathSegments(serializedPath, delimiter), value); + } + + /** + * Deletes an item if it exists. + * @param query - The path to the item to delete + * @param delimeter - Optional override delimeter for parsing the query + * @returns `true` if the item was found and deleted, `false` otherwise + * @remarks + * If the node has children with values, they will be retained. + */ + public deleteItem(query: string, delimeter: string = this.delimiter): boolean { + const node: IPathTrieNode | undefined = this._findNodeAtPrefix(query, delimeter); + if (node?.value !== undefined) { + node.value = undefined; + this._size--; + return true; + } + + return false; } /** @@ -172,58 +334,33 @@ export class LookupByPath { } node = child; } + if (node.value === undefined) { + this._size++; + } node.value = value; return this; } /** - * Searches for the item associated with `childPath`, or the nearest ancestor of that path that - * has an associated item. - * - * @returns the found item, or `undefined` if no item was found - * - * @example - * ```ts - * const trie = new LookupByPath([['foo', 1], ['foo/bar', 2]]); - * trie.findChildPath('foo/baz'); // returns 1 - * trie.findChildPath('foo/bar/baz'); // returns 2 - * ``` + * {@inheritdoc IReadonlyLookupByPath} */ - public findChildPath(childPath: string): TItem | undefined { - return this.findChildPathFromSegments(LookupByPath.iteratePathSegments(childPath, this.delimiter)); + public findChildPath(childPath: string, delimiter: string = this.delimiter): TItem | undefined { + return this.findChildPathFromSegments(LookupByPath.iteratePathSegments(childPath, delimiter)); } /** - * Searches for the item for which the recorded prefix is the longest matching prefix of `query`. - * Obtains both the item and the length of the matched prefix, so that the remainder of the path can be - * extracted. - * - * @returns the found item and the length of the matched prefix, or `undefined` if no item was found - * - * @example - * ```ts - * const trie = new LookupByPath([['foo', 1], ['foo/bar', 2]]); - * trie.findLongestPrefixMatch('foo/baz'); // returns { item: 1, index: 3 } - * trie.findLongestPrefixMatch('foo/bar/baz'); // returns { item: 2, index: 7 } - * ``` + * {@inheritdoc IReadonlyLookupByPath} */ - public findLongestPrefixMatch(query: string): IPrefixMatch | undefined { - return this._findLongestPrefixMatch(LookupByPath._iteratePrefixes(query, this.delimiter)); + public findLongestPrefixMatch( + query: string, + delimiter: string = this.delimiter + ): IPrefixMatch | undefined { + return this._findLongestPrefixMatch(LookupByPath._iteratePrefixes(query, delimiter)); } /** - * Searches for the item associated with `childPathSegments`, or the nearest ancestor of that path that - * has an associated item. - * - * @returns the found item, or `undefined` if no item was found - * - * @example - * ```ts - * const trie = new LookupByPath([['foo', 1], ['foo/bar', 2]]); - * trie.findChildPathFromSegments(['foo', 'baz']); // returns 1 - * trie.findChildPathFromSegments(['foo','bar', 'baz']); // returns 2 - * ``` + * {@inheritdoc IReadonlyLookupByPath} */ public findChildPathFromSegments(childPathSegments: Iterable): TItem | undefined { let node: IPathTrieNode = this._root; @@ -247,18 +384,32 @@ export class LookupByPath { } /** - * Groups the provided map of info by the nearest entry in the trie that contains the path. If the path - * is not found in the trie, the info is ignored. - * - * @returns The grouped info, grouped by the nearest entry in the trie that contains the path - * - * @param infoByPath - The info to be grouped, keyed by path + * {@inheritdoc IReadonlyLookupByPath} */ - public groupByChild(infoByPath: Map): Map> { + public has(key: string, delimiter: string = this.delimiter): boolean { + const match: IPrefixMatch | undefined = this.findLongestPrefixMatch(key, delimiter); + return match?.index === key.length; + } + + /** + * {@inheritdoc IReadonlyLookupByPath} + */ + public get(key: string, delimiter: string = this.delimiter): TItem | undefined { + const match: IPrefixMatch | undefined = this.findLongestPrefixMatch(key, delimiter); + return match?.index === key.length ? match.value : undefined; + } + + /** + * {@inheritdoc IReadonlyLookupByPath} + */ + public groupByChild( + infoByPath: Map, + delimiter: string = this.delimiter + ): Map> { const groupedInfoByChild: Map> = new Map(); for (const [path, info] of infoByPath) { - const child: TItem | undefined = this.findChildPath(path); + const child: TItem | undefined = this.findChildPath(path, delimiter); if (child === undefined) { continue; } @@ -273,6 +424,45 @@ export class LookupByPath { return groupedInfoByChild; } + /** + * {@inheritdoc IReadonlyLookupByPath} + */ + public *entries(query?: string, delimiter: string = this.delimiter): IterableIterator<[string, TItem]> { + let root: IPathTrieNode | undefined; + if (query) { + root = this._findNodeAtPrefix(query, delimiter); + if (!root) { + return; + } + } else { + root = this._root; + } + + const stack: [string, IPathTrieNode][] = [[query ?? '', root]]; + while (stack.length > 0) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const [prefix, node] = stack.pop()!; + if (node.value !== undefined) { + yield [prefix, node.value]; + } + if (node.children) { + for (const [segment, child] of node.children) { + stack.push([prefix ? `${prefix}${delimiter}${segment}` : segment, child]); + } + } + } + } + + /** + * {@inheritdoc IReadonlyLookupByPath} + */ + public [Symbol.iterator]( + query?: string, + delimiter: string = this.delimiter + ): IterableIterator<[string, TItem]> { + return this.entries(query, delimiter); + } + /** * Iterates through progressively longer prefixes of a given string and returns as soon * as the number of candidate items that match the prefix are 1 or 0. @@ -313,4 +503,28 @@ export class LookupByPath { return best; } + + /** + * Finds the node at the specified path, or `undefined` if no node was found. + * + * @param query - The path to the node to search for + * @returns The trie node at the specified path, or `undefined` if no node was found + */ + private _findNodeAtPrefix( + query: string, + delimiter: string = this.delimiter + ): IPathTrieNode | undefined { + let node: IPathTrieNode = this._root; + for (const { prefix } of LookupByPath._iteratePrefixes(query, delimiter)) { + if (!node.children) { + return undefined; + } + const child: IPathTrieNode | undefined = node.children.get(prefix); + if (!child) { + return undefined; + } + node = child; + } + return node; + } } diff --git a/libraries/lookup-by-path/src/index.ts b/libraries/lookup-by-path/src/index.ts index 7cc91e2647e..1beccb0d9ec 100644 --- a/libraries/lookup-by-path/src/index.ts +++ b/libraries/lookup-by-path/src/index.ts @@ -7,5 +7,5 @@ * @packageDocumentation */ -export type { IPrefixMatch } from './LookupByPath'; +export type { IPrefixMatch, IReadonlyLookupByPath } from './LookupByPath'; export { LookupByPath } from './LookupByPath'; diff --git a/libraries/lookup-by-path/src/test/LookupByPath.test.ts b/libraries/lookup-by-path/src/test/LookupByPath.test.ts index 3d3aa341080..369de61d4f2 100644 --- a/libraries/lookup-by-path/src/test/LookupByPath.test.ts +++ b/libraries/lookup-by-path/src/test/LookupByPath.test.ts @@ -26,6 +26,339 @@ describe(LookupByPath.iteratePathSegments.name, () => { }); }); +describe('size', () => { + it('returns 0 for an empty tree', () => { + expect(new LookupByPath().size).toEqual(0); + }); + + it('returns the number of nodes for a non-empty tree', () => { + const lookup: LookupByPath = new LookupByPath([['foo', 1]]); + expect(lookup.size).toEqual(1); + lookup.setItem('bar', 2); + expect(lookup.size).toEqual(2); + lookup.setItem('bar', 4); + expect(lookup.size).toEqual(2); + lookup.setItem('bar/baz', 1); + expect(lookup.size).toEqual(3); + lookup.setItem('foo/bar/qux/quux', 1); + expect(lookup.size).toEqual(4); + }); +}); + +describe(LookupByPath.prototype.get.name, () => { + it('returns undefined for an empty tree', () => { + expect(new LookupByPath().get('foo')).toEqual(undefined); + }); + + it('returns the matching node for a trivial tree', () => { + expect(new LookupByPath([['foo', 1]]).get('foo')).toEqual(1); + }); + + it('returns undefined for non-matching paths in a single-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['bar', 2], + ['baz', 3] + ]); + + expect(tree.get('buzz')).toEqual(undefined); + expect(tree.get('foo/bar')).toEqual(undefined); + }); + + it('returns the matching node for a multi-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['foo/bar', 2], + ['foo/bar/baz', 3] + ]); + + expect(tree.get('foo')).toEqual(1); + expect(tree.get('foo/bar')).toEqual(2); + expect(tree.get('foo/bar/baz')).toEqual(3); + + expect(tree.get('foo')).toEqual(1); + expect(tree.get('foo,bar', ',')).toEqual(2); + expect(tree.get('foo\0bar\0baz', '\0')).toEqual(3); + }); + + it('returns undefined for non-matching paths in a multi-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['foo/bar', 2], + ['foo/bar/baz', 3] + ]); + + expect(tree.get('foo/baz')).toEqual(undefined); + expect(tree.get('foo/bar/baz/qux')).toEqual(undefined); + }); +}); + +describe(LookupByPath.prototype.has.name, () => { + it('returns false for an empty tree', () => { + expect(new LookupByPath().has('foo')).toEqual(false); + }); + + it('returns true for the matching node in a trivial tree', () => { + expect(new LookupByPath([['foo', 1]]).has('foo')).toEqual(true); + }); + + it('returns false for non-matching paths in a single-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['bar', 2], + ['baz', 3] + ]); + + expect(tree.has('buzz')).toEqual(false); + expect(tree.has('foo/bar')).toEqual(false); + }); + + it('returns true for the matching node in a multi-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['foo/bar', 2], + ['foo/bar/baz', 3] + ]); + + expect(tree.has('foo')).toEqual(true); + expect(tree.has('foo/bar')).toEqual(true); + expect(tree.has('foo/bar/baz')).toEqual(true); + + expect(tree.has('foo')).toEqual(true); + expect(tree.has('foo,bar', ',')).toEqual(true); + expect(tree.has('foo\0bar\0baz', '\0')).toEqual(true); + }); + + it('returns false for non-matching paths in a multi-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['foo/bar', 2], + ['foo/bar/baz', 3] + ]); + + expect(tree.has('foo/baz')).toEqual(false); + expect(tree.has('foo/bar/baz/qux')).toEqual(false); + }); +}); + +describe(LookupByPath.prototype.clear.name, () => { + it('clears an empty tree', () => { + const tree = new LookupByPath(); + tree.clear(); + expect(tree.size).toEqual(0); + }); + + it('clears a single-layer tree', () => { + const tree = new LookupByPath([['foo', 1]]); + expect(tree.size).toEqual(1); + tree.clear(); + expect(tree.size).toEqual(0); + }); + + it('clears a multi-layer tree', () => { + const tree = new LookupByPath([ + ['foo', 1], + ['foo/bar', 2], + ['foo/bar/baz', 3] + ]); + expect(tree.size).toEqual(3); + tree.clear(); + expect(tree.size).toEqual(0); + }); + + it('clears a tree with custom delimiters', () => { + const tree = new LookupByPath( + [ + ['foo,bar', 1], + ['foo,bar,baz', 2] + ], + ',' + ); + expect(tree.size).toEqual(2); + tree.clear(); + expect(tree.size).toEqual(0); + }); +}); + +describe(LookupByPath.prototype.entries.name, () => { + it('returns an empty iterator for an empty tree', () => { + const tree = new LookupByPath(); + const result = [...tree]; + expect(result).toEqual([]); + }); + + it('returns an iterator for a single-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['bar', 2], + ['baz', 3] + ]); + + const result = [...tree]; + expect(result.length).toEqual(tree.size); + expect(Object.fromEntries(result)).toEqual({ + foo: 1, + bar: 2, + baz: 3 + }); + }); + + it('returns an iterator for a multi-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['foo/bar', 2], + ['foo/bar/baz', 3] + ]); + + const result = [...tree]; + expect(result.length).toEqual(tree.size); + expect(Object.fromEntries(result)).toEqual({ + foo: 1, + 'foo/bar': 2, + 'foo/bar/baz': 3 + }); + }); + + it('only includes non-empty nodes', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo/bar/baz', 1], + ['foo/bar/baz/qux/quux', 2] + ]); + + const result = [...tree]; + expect(result.length).toEqual(tree.size); + expect(Object.fromEntries(result)).toEqual({ + 'foo/bar/baz': 1, + 'foo/bar/baz/qux/quux': 2 + }); + }); + + it('returns an iterator for a tree with custom delimiters', () => { + const tree: LookupByPath = new LookupByPath( + [ + ['foo,bar', 1], + ['foo,bar,baz', 2] + ], + ',' + ); + + const result = [...tree]; + expect(result.length).toEqual(tree.size); + expect(Object.fromEntries(result)).toEqual({ + 'foo,bar': 1, + 'foo,bar,baz': 2 + }); + }); + + it('returns an iterator for a subtree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['foo/bar', 2], + ['foo/bar/baz', 3], + ['bar', 4], + ['bar/baz', 5] + ]); + + const result = [...tree.entries('foo')]; + expect(result.length).toEqual(3); + expect(Object.fromEntries(result)).toEqual({ + foo: 1, + 'foo/bar': 2, + 'foo/bar/baz': 3 + }); + }); + + it('returns an iterator for a subtree with custom delimiters', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo/bar', 1], + ['foo/bar/baz', 2], + ['bar/baz', 3] + ]); + + const result = [...tree.entries('foo', ',')]; + expect(result.length).toEqual(2); + expect(Object.fromEntries(result)).toEqual({ + 'foo,bar': 1, + 'foo,bar,baz': 2 + }); + }); +}); + +describe(LookupByPath.prototype.deleteItem.name, () => { + it('returns false for an empty tree', () => { + expect(new LookupByPath().deleteItem('foo')).toEqual(false); + }); + + it('deletes the matching node in a trivial tree', () => { + const tree = new LookupByPath([['foo', 1]]); + expect(tree.deleteItem('foo')).toEqual(true); + expect(tree.size).toEqual(0); + expect(tree.get('foo')).toEqual(undefined); + }); + + it('returns false for non-matching paths in a single-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['bar', 2], + ['baz', 3] + ]); + + expect(tree.deleteItem('buzz')).toEqual(false); + expect(tree.size).toEqual(3); + }); + + it('deletes the matching node in a single-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['bar', 2], + ['baz', 3] + ]); + + expect(tree.deleteItem('bar')).toEqual(true); + expect(tree.size).toEqual(2); + expect(tree.get('bar')).toEqual(undefined); + }); + + it('deletes the matching node in a multi-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['foo/bar', 2], + ['foo/bar/baz', 3] + ]); + + expect(tree.deleteItem('foo/bar')).toEqual(true); + expect(tree.size).toEqual(2); + expect(tree.get('foo/bar')).toEqual(undefined); + expect(tree.get('foo/bar/baz')).toEqual(3); // child nodes are retained + }); + + it('returns false for non-matching paths in a multi-layer tree', () => { + const tree: LookupByPath = new LookupByPath([ + ['foo', 1], + ['foo/bar', 2], + ['foo/bar/baz', 3] + ]); + + expect(tree.deleteItem('foo/baz')).toEqual(false); + expect(tree.size).toEqual(3); + }); + + it('handles custom delimiters', () => { + const tree: LookupByPath = new LookupByPath( + [ + ['foo,bar', 1], + ['foo,bar,baz', 2] + ], + ',' + ); + + expect(tree.deleteItem('foo\0bar', '\0')).toEqual(true); + expect(tree.size).toEqual(1); + expect(tree.get('foo\0bar', '\0')).toEqual(undefined); + expect(tree.get('foo\0bar\0baz', '\0')).toEqual(2); // child nodes are retained + }); +}); + describe(LookupByPath.prototype.findChildPath.name, () => { it('returns empty for an empty tree', () => { expect(new LookupByPath().findChildPath('foo')).toEqual(undefined); @@ -101,6 +434,8 @@ describe(LookupByPath.prototype.findChildPath.name, () => { ); expect(tree.findChildPath('foo/bar,baz')).toEqual(2); + expect(tree.findChildPath('foo,bar,baz', ',')).toEqual(1); + expect(tree.findChildPath('foo\0bar\0baz', '\0')).toEqual(1); expect(tree.findChildPath('foo,bar/baz')).toEqual(undefined); expect(tree.findChildPathFromSegments(['foo', 'bar', 'baz'])).toEqual(1); }); @@ -180,6 +515,37 @@ describe(LookupByPath.prototype.groupByChild.name, () => { expect(lookup.groupByChild(infoByPath)).toEqual(expected); }); + it('groups items by the closest group that contains the file path with custom delimiter', () => { + const customLookup: LookupByPath = new LookupByPath( + [ + ['foo,bar', 'bar'], + ['foo,bar,baz', 'baz'] + ], + ',' + ); + + const infoByPath: Map = new Map([ + ['foo\0bar', 'bar'], + ['foo\0bar\0baz', 'baz'], + ['foo\0bar\0baz\0qux', 'qux'], + ['foo\0bar\0baz\0qux\0quux', 'quux'] + ]); + + const expected: Map> = new Map([ + ['bar', new Map([['foo\0bar', 'bar']])], + [ + 'baz', + new Map([ + ['foo\0bar\0baz', 'baz'], + ['foo\0bar\0baz\0qux', 'qux'], + ['foo\0bar\0baz\0qux\0quux', 'quux'] + ]) + ] + ]); + + expect(customLookup.groupByChild(infoByPath, '\0')).toEqual(expected); + }); + it('ignores items that do not exist in the lookup', () => { const infoByPath: Map = new Map([ ['foo', 'foo'], diff --git a/libraries/module-minifier/CHANGELOG.json b/libraries/module-minifier/CHANGELOG.json index 77a7feba3d5..145e1423356 100644 --- a/libraries/module-minifier/CHANGELOG.json +++ b/libraries/module-minifier/CHANGELOG.json @@ -1,6 +1,223 @@ { "name": "@rushstack/module-minifier", "entries": [ + { + "version": "0.7.2", + "tag": "@rushstack/module-minifier_v0.7.2", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "patch": [ + { + "comment": "Prefer `os.availableParallelism()` to `os.cpus().length`." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.5.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.7.1", + "tag": "@rushstack/module-minifier_v0.7.1", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.5.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.7.0", + "tag": "@rushstack/module-minifier_v0.7.0", + "date": "Wed, 22 Jan 2025 03:03:47 GMT", + "comments": { + "minor": [ + { + "comment": "Add a `workerResourceLimits` option to the `WorkerPoolMinifier` constructor to control the available resources to the workers." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.5.0`" + } + ] + } + }, + { + "version": "0.6.36", + "tag": "@rushstack/module-minifier_v0.6.36", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.81`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.6.35", + "tag": "@rushstack/module-minifier_v0.6.35", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.80`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.6.34", + "tag": "@rushstack/module-minifier_v0.6.34", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.79`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.6.33", + "tag": "@rushstack/module-minifier_v0.6.33", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.78`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.6.32", + "tag": "@rushstack/module-minifier_v0.6.32", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.77`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.6.31", + "tag": "@rushstack/module-minifier_v0.6.31", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.76`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.6.30", + "tag": "@rushstack/module-minifier_v0.6.30", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.75`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.6.29", + "tag": "@rushstack/module-minifier_v0.6.29", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.74`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.6.28", + "tag": "@rushstack/module-minifier_v0.6.28", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.73`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.6.27", + "tag": "@rushstack/module-minifier_v0.6.27", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.72`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.6.26", + "tag": "@rushstack/module-minifier_v0.6.26", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.71`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.6.25", "tag": "@rushstack/module-minifier_v0.6.25", diff --git a/libraries/module-minifier/CHANGELOG.md b/libraries/module-minifier/CHANGELOG.md index 09c82fd357b..3a17b084c22 100644 --- a/libraries/module-minifier/CHANGELOG.md +++ b/libraries/module-minifier/CHANGELOG.md @@ -1,6 +1,80 @@ # Change Log - @rushstack/module-minifier -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.7.2 +Thu, 30 Jan 2025 16:10:36 GMT + +### Patches + +- Prefer `os.availableParallelism()` to `os.cpus().length`. + +## 0.7.1 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.7.0 +Wed, 22 Jan 2025 03:03:47 GMT + +### Minor changes + +- Add a `workerResourceLimits` option to the `WorkerPoolMinifier` constructor to control the available resources to the workers. + +## 0.6.36 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.6.35 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.6.34 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.6.33 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.6.32 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.6.31 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.6.30 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.6.29 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.6.28 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.6.27 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.6.26 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.6.25 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/libraries/module-minifier/package.json b/libraries/module-minifier/package.json index 11081432d0e..3b39866a0bf 100644 --- a/libraries/module-minifier/package.json +++ b/libraries/module-minifier/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/module-minifier", - "version": "0.6.25", + "version": "0.7.2", "description": "Wrapper for terser to support bulk parallel minification.", "main": "lib/index.js", "typings": "dist/module-minifier.d.ts", diff --git a/libraries/module-minifier/src/WorkerPoolMinifier.ts b/libraries/module-minifier/src/WorkerPoolMinifier.ts index 12945faa946..7dee034a867 100644 --- a/libraries/module-minifier/src/WorkerPoolMinifier.ts +++ b/libraries/module-minifier/src/WorkerPoolMinifier.ts @@ -2,7 +2,8 @@ // See LICENSE in the project root for license information. import { createHash } from 'crypto'; -import { cpus } from 'os'; +import os from 'os'; +import type { ResourceLimits } from 'worker_threads'; import serialize from 'serialize-javascript'; import type { MinifyOptions } from 'terser'; @@ -23,7 +24,7 @@ import type { export interface IWorkerPoolMinifierOptions { /** * Maximum number of worker threads to use. Will never use more than there are modules to process. - * Defaults to os.cpus().length + * Defaults to os.availableParallelism() */ maxThreads?: number; /** @@ -36,6 +37,11 @@ export interface IWorkerPoolMinifierOptions { * If true, log to the console about the minification results. */ verbose?: boolean; + + /** + * Optional resource limits for the workers. + */ + workerResourceLimits?: ResourceLimits; } /** @@ -55,7 +61,12 @@ export class WorkerPoolMinifier implements IModuleMinifier { private readonly _activeRequests: Map; public constructor(options: IWorkerPoolMinifierOptions) { - const { maxThreads = cpus().length, terserOptions = {}, verbose = false } = options || {}; + const { + maxThreads = os.availableParallelism?.() ?? os.cpus().length, + terserOptions = {}, + verbose = false, + workerResourceLimits + } = options || {}; const activeRequests: Map = new Map(); const resultCache: Map = new Map(); @@ -63,7 +74,8 @@ export class WorkerPoolMinifier implements IModuleMinifier { id: 'Minifier', maxWorkers: maxThreads, workerData: terserOptions, - workerScriptPath: require.resolve('./MinifierWorker') + workerScriptPath: require.resolve('./MinifierWorker'), + workerResourceLimits }); const { version: terserVersion } = require('terser/package.json'); diff --git a/libraries/node-core-library/CHANGELOG.json b/libraries/node-core-library/CHANGELOG.json index fad004c5fb2..61121dc1dcc 100644 --- a/libraries/node-core-library/CHANGELOG.json +++ b/libraries/node-core-library/CHANGELOG.json @@ -1,6 +1,54 @@ { "name": "@rushstack/node-core-library", "entries": [ + { + "version": "5.11.0", + "tag": "@rushstack/node-core-library_v5.11.0", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "minor": [ + { + "comment": "Update fs-extra to 11.3.0." + } + ] + } + }, + { + "version": "5.10.2", + "tag": "@rushstack/node-core-library_v5.10.2", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "patch": [ + { + "comment": "Provide the `retryCount` parameter to actions executed using `Async.runWithRetriesAsync`" + } + ] + } + }, + { + "version": "5.10.1", + "tag": "@rushstack/node-core-library_v5.10.1", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "patch": [ + { + "comment": "Fix handling of trailing slashes and relative paths in RealNodeModulePath to match semantics of `fs.realpathSync.native`." + } + ] + } + }, + { + "version": "5.10.0", + "tag": "@rushstack/node-core-library_v5.10.0", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "minor": [ + { + "comment": "Add `RealNodeModulePathResolver` class to get equivalent behavior to `realpath` with fewer system calls (and therefore higher performance) in the typical scenario where the only symlinks in the repository are inside of `node_modules` folders and are links to package folders." + } + ] + } + }, { "version": "5.9.0", "tag": "@rushstack/node-core-library_v5.9.0", diff --git a/libraries/node-core-library/CHANGELOG.md b/libraries/node-core-library/CHANGELOG.md index 04de79033fe..994e0cabce5 100644 --- a/libraries/node-core-library/CHANGELOG.md +++ b/libraries/node-core-library/CHANGELOG.md @@ -1,6 +1,34 @@ # Change Log - @rushstack/node-core-library -This log was last generated on Fri, 13 Sep 2024 00:11:42 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 01:11:42 GMT and should not be manually modified. + +## 5.11.0 +Thu, 30 Jan 2025 01:11:42 GMT + +### Minor changes + +- Update fs-extra to 11.3.0. + +## 5.10.2 +Thu, 09 Jan 2025 01:10:10 GMT + +### Patches + +- Provide the `retryCount` parameter to actions executed using `Async.runWithRetriesAsync` + +## 5.10.1 +Sat, 14 Dec 2024 01:11:07 GMT + +### Patches + +- Fix handling of trailing slashes and relative paths in RealNodeModulePath to match semantics of `fs.realpathSync.native`. + +## 5.10.0 +Fri, 22 Nov 2024 01:10:43 GMT + +### Minor changes + +- Add `RealNodeModulePathResolver` class to get equivalent behavior to `realpath` with fewer system calls (and therefore higher performance) in the typical scenario where the only symlinks in the repository are inside of `node_modules` folders and are links to package folders. ## 5.9.0 Fri, 13 Sep 2024 00:11:42 GMT diff --git a/libraries/node-core-library/package.json b/libraries/node-core-library/package.json index 6761e383b8b..8b77fead18a 100644 --- a/libraries/node-core-library/package.json +++ b/libraries/node-core-library/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/node-core-library", - "version": "5.9.0", + "version": "5.11.0", "description": "Core libraries that every NodeJS toolchain project should use", "main": "lib/index.js", "typings": "dist/node-core-library.d.ts", @@ -16,7 +16,7 @@ "_phase:test": "heft run --only test -- --clean" }, "dependencies": { - "fs-extra": "~7.0.1", + "fs-extra": "~11.3.0", "import-lazy": "~4.0.0", "jju": "~1.4.0", "resolve": "~1.22.1", @@ -27,8 +27,8 @@ }, "devDependencies": { "local-eslint-config": "workspace:*", - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", "@types/fs-extra": "7.0.0", "@types/heft-jest": "1.0.1", "@types/jju": "1.4.1", diff --git a/libraries/node-core-library/src/Async.ts b/libraries/node-core-library/src/Async.ts index 227dd2480e9..3451b48f101 100644 --- a/libraries/node-core-library/src/Async.ts +++ b/libraries/node-core-library/src/Async.ts @@ -32,8 +32,20 @@ export interface IAsyncParallelismOptions { * @public */ export interface IRunWithRetriesOptions { - action: () => Promise | TResult; + /** + * The action to be performed. The action is repeatedly executed until it completes without throwing or the + * maximum number of retries is reached. + * + * @param retryCount - The number of times the action has been retried. + */ + action: (retryCount: number) => Promise | TResult; + /** + * The maximum number of times the action should be retried. + */ maxRetries: number; + /** + * The delay in milliseconds between retries. + */ retryDelayMs?: number; } @@ -313,13 +325,13 @@ export class Async { maxRetries, retryDelayMs = 0 }: IRunWithRetriesOptions): Promise { - let retryCounter: number = 0; + let retryCount: number = 0; // eslint-disable-next-line no-constant-condition while (true) { try { - return await action(); + return await action(retryCount); } catch (e) { - if (++retryCounter > maxRetries) { + if (++retryCount > maxRetries) { throw e; } else if (retryDelayMs > 0) { await Async.sleepAsync(retryDelayMs); diff --git a/libraries/node-core-library/src/RealNodeModulePath.ts b/libraries/node-core-library/src/RealNodeModulePath.ts new file mode 100644 index 00000000000..85e85d5aebc --- /dev/null +++ b/libraries/node-core-library/src/RealNodeModulePath.ts @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import * as nodeFs from 'fs'; +import * as nodePath from 'path'; + +/** + * Arguments used to create a function that resolves symlinked node_modules in a path + * @public + */ +export interface IRealNodeModulePathResolverOptions { + fs?: Partial>; + path?: Partial>; +} + +/** + * This class encapsulates a caching resolver for symlinks in node_modules directories. + * It assumes that the only symlinks that exist in input paths are those that correspond to + * npm packages. + * + * @remarks + * In a repository with a symlinked node_modules installation, some symbolic links need to be mapped for + * node module resolution to produce correct results. However, calling `fs.realpathSync.native` on every path, + * as is commonly done by most resolvers, involves an enormous number of file system operations (for reference, + * each invocation of `fs.realpathSync.native` involves a series of `fs.readlinkSync` calls, up to one for each + * path segment in the input). + * + * @public + */ +export class RealNodeModulePathResolver { + /** + * Similar in function to `fs.realpathSync.native`, but assumes the only symlinks present are npm packages. + * + * @param input - A path to a file or directory, where the path separator is `${require('node:path').sep}` + * @returns The real path to the input, resolving the node_modules symlinks in the path + * @public + */ + public readonly realNodeModulePath: (input: string) => string; + + private readonly _cache: Map; + private readonly _fs: Required>; + private readonly _path: Required>; + + public constructor(options: IRealNodeModulePathResolverOptions = {}) { + const { + fs: { lstatSync = nodeFs.lstatSync, readlinkSync = nodeFs.readlinkSync } = nodeFs, + path: { + isAbsolute = nodePath.isAbsolute, + join = nodePath.join, + resolve = nodePath.resolve, + sep = nodePath.sep + } = nodePath + } = options; + const cache: Map = (this._cache = new Map()); + this._fs = { + lstatSync, + readlinkSync + }; + this._path = { + isAbsolute, + join, + resolve, + sep + }; + + const nodeModulesToken: string = `${sep}node_modules${sep}`; + const self: this = this; + + function realNodeModulePathInternal(input: string): string { + // Find the last node_modules path segment + const nodeModulesIndex: number = input.lastIndexOf(nodeModulesToken); + if (nodeModulesIndex < 0) { + // No node_modules in path, so we assume it is already the real path + return input; + } + + // First assume that the next path segment after node_modules is a symlink + let linkStart: number = nodeModulesIndex + nodeModulesToken.length - 1; + let linkEnd: number = input.indexOf(sep, linkStart + 1); + // If the path segment starts with a '@', then it is a scoped package + const isScoped: boolean = input.charAt(linkStart + 1) === '@'; + if (isScoped) { + // For a scoped package, the scope is an ordinary directory, so we need to find the next path segment + if (linkEnd < 0) { + // Symlink missing, so see if anything before the last node_modules needs resolving, + // and preserve the rest of the path + return join( + realNodeModulePathInternal(input.slice(0, nodeModulesIndex)), + input.slice(nodeModulesIndex + 1), + // Joining to `.` will clean up any extraneous trailing slashes + '.' + ); + } + + linkStart = linkEnd; + linkEnd = input.indexOf(sep, linkStart + 1); + } + + // No trailing separator, so the link is the last path segment + if (linkEnd < 0) { + linkEnd = input.length; + } + + const linkCandidate: string = input.slice(0, linkEnd); + // Check if the link is a symlink + const linkTarget: string | undefined = self._tryReadLink(linkCandidate); + if (linkTarget && isAbsolute(linkTarget)) { + // Absolute path, combine the link target with any remaining path segments + // Cache the resolution to avoid the readlink call in subsequent calls + cache.set(linkCandidate, linkTarget); + cache.set(linkTarget, linkTarget); + // Joining to `.` will clean up any extraneous trailing slashes + return join(linkTarget, input.slice(linkEnd + 1), '.'); + } + + // Relative path or does not exist + // Either way, the path before the last node_modules could itself be in a node_modules folder + // So resolve the base path to find out what paths are relative to + const realpathBeforeNodeModules: string = realNodeModulePathInternal(input.slice(0, nodeModulesIndex)); + if (linkTarget) { + // Relative path in symbolic link. Should be resolved relative to real path of base path. + const resolvedTarget: string = resolve( + realpathBeforeNodeModules, + input.slice(nodeModulesIndex + 1, linkStart), + linkTarget + ); + // Cache the result of the combined resolution to avoid the readlink call in subsequent calls + cache.set(linkCandidate, resolvedTarget); + cache.set(resolvedTarget, resolvedTarget); + // Joining to `.` will clean up any extraneous trailing slashes + return join(resolvedTarget, input.slice(linkEnd + 1), '.'); + } + + // No symlink, so just return the real path before the last node_modules combined with the + // subsequent path segments + // Joining to `.` will clean up any extraneous trailing slashes + return join(realpathBeforeNodeModules, input.slice(nodeModulesIndex + 1), '.'); + } + + this.realNodeModulePath = (input: string) => { + return realNodeModulePathInternal(resolve(input)); + }; + } + + /** + * Clears the cache of resolved symlinks. + * @public + */ + public clearCache(): void { + this._cache.clear(); + } + + /** + * Tries to read a symbolic link at the specified path. + * If the input is not a symbolic link, returns undefined. + * @param link - The link to try to read + * @returns The target of the symbolic link, or undefined if the input is not a symbolic link + */ + private _tryReadLink(link: string): string | undefined { + const cached: string | undefined = this._cache.get(link); + if (cached) { + return cached; + } + + // On Windows, calling `readlink` on a directory throws an EUNKOWN, not EINVAL, so just pay the cost + // of an lstat call. + const stat: nodeFs.Stats | undefined = this._fs.lstatSync(link); + if (stat.isSymbolicLink()) { + // path.join(x, '.') will trim trailing slashes, if applicable + const result: string = this._path.join(this._fs.readlinkSync(link, 'utf8'), '.'); + return result; + } + } +} diff --git a/libraries/node-core-library/src/index.ts b/libraries/node-core-library/src/index.ts index 54fb6509b7a..531805cfe6b 100644 --- a/libraries/node-core-library/src/index.ts +++ b/libraries/node-core-library/src/index.ts @@ -93,6 +93,7 @@ export { type IPathFormatFileLocationOptions, type IPathFormatConciselyOptions } from './Path'; +export { RealNodeModulePathResolver, type IRealNodeModulePathResolverOptions } from './RealNodeModulePath'; export { Encoding, Text, NewlineKind, type IReadLinesFromIterableOptions } from './Text'; export { Sort } from './Sort'; export { diff --git a/libraries/node-core-library/src/test/LockFile.test.ts b/libraries/node-core-library/src/test/LockFile.test.ts index 80eb1f6fd69..f2ac754e064 100644 --- a/libraries/node-core-library/src/test/LockFile.test.ts +++ b/libraries/node-core-library/src/test/LockFile.test.ts @@ -346,14 +346,13 @@ describe(LockFile.name, () => { // create an open lockfile const resourceName: string = 'test'; - const lockFileName: string = LockFile.getLockFilePath(testFolder, resourceName); - const lockFileHandle: FileWriter = FileWriter.open(lockFileName, { exclusive: true }); + const lockFileHandle: LockFile | undefined = LockFile.tryAcquire(testFolder, resourceName); + expect(lockFileHandle).toBeDefined(); const lock: LockFile | undefined = LockFile.tryAcquire(testFolder, resourceName); - // this lock should be undefined since there is an existing lock expect(lock).toBeUndefined(); - lockFileHandle.close(); + lockFileHandle!.release(); }); test('can acquire and close a dirty lockfile', () => { diff --git a/libraries/node-core-library/src/test/RealNodeModulePath.test.ts b/libraries/node-core-library/src/test/RealNodeModulePath.test.ts new file mode 100644 index 00000000000..eaafd593db6 --- /dev/null +++ b/libraries/node-core-library/src/test/RealNodeModulePath.test.ts @@ -0,0 +1,336 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import type * as fs from 'fs'; +import * as path from 'path'; + +import { type IRealNodeModulePathResolverOptions, RealNodeModulePathResolver } from '../RealNodeModulePath'; + +const mocklstatSync: jest.Mock, Parameters> = jest.fn(); +const lstatSync: typeof fs.lstatSync = mocklstatSync as unknown as typeof fs.lstatSync; +const mockReadlinkSync: jest.Mock< + ReturnType, + Parameters +> = jest.fn(); +const readlinkSync: typeof fs.readlinkSync = mockReadlinkSync as unknown as typeof fs.readlinkSync; + +const mockFs: IRealNodeModulePathResolverOptions['fs'] = { + lstatSync, + readlinkSync +}; + +describe('realNodeModulePath', () => { + beforeEach(() => { + jest.resetAllMocks(); + }); + + describe('POSIX paths', () => { + const resolver: RealNodeModulePathResolver = new RealNodeModulePathResolver({ + fs: mockFs, + path: path.posix + }); + const { realNodeModulePath } = resolver; + + beforeEach(() => { + resolver.clearCache(); + }); + + it('should return the input path if it is absolute and does not contain node_modules', () => { + for (const input of ['/foo/bar', '/']) { + expect(realNodeModulePath(input)).toBe(input); + + expect(mocklstatSync).not.toHaveBeenCalled(); + expect(mockReadlinkSync).not.toHaveBeenCalled(); + } + }); + + it('should return the input path if it is not a symbolic link', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => false } as unknown as fs.Stats); + + expect(realNodeModulePath('/foo/node_modules/foo')).toBe('/foo/node_modules/foo'); + + expect(mocklstatSync).toHaveBeenCalledWith('/foo/node_modules/foo'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledTimes(0); + }); + + it('should trim a trailing slash from the input path if it is not a symbolic link', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => false } as unknown as fs.Stats); + + expect(realNodeModulePath('/foo/node_modules/foo/')).toBe('/foo/node_modules/foo'); + + expect(mocklstatSync).toHaveBeenCalledWith('/foo/node_modules/foo'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledTimes(0); + }); + + it('Should handle absolute link targets', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('/link/target'); + + expect(realNodeModulePath('/foo/node_modules/link')).toBe('/link/target'); + + expect(mocklstatSync).toHaveBeenCalledWith('/foo/node_modules/link'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledWith('/foo/node_modules/link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(1); + }); + + it('Should trim trailing slash from absolute link targets', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('/link/target/'); + + expect(realNodeModulePath('/foo/node_modules/link/bar')).toBe('/link/target/bar'); + + expect(mocklstatSync).toHaveBeenCalledWith('/foo/node_modules/link'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledWith('/foo/node_modules/link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(1); + }); + + it('Caches resolved symlinks', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('/link/target'); + + expect(realNodeModulePath('/foo/node_modules/link')).toBe('/link/target'); + expect(realNodeModulePath('/foo/node_modules/link/bar')).toBe('/link/target/bar'); + expect(realNodeModulePath('/foo/node_modules/link/')).toBe('/link/target'); + + expect(mocklstatSync).toHaveBeenCalledWith('/foo/node_modules/link'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledWith('/foo/node_modules/link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(1); + }); + + it('Should stop after a single absolute link target', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('/link/target'); + + expect(realNodeModulePath('/node_modules/foo/node_modules/link')).toBe('/link/target'); + + expect(mocklstatSync).toHaveBeenCalledWith('/node_modules/foo/node_modules/link'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledWith('/node_modules/foo/node_modules/link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(1); + }); + + it('Should handle relative link targets', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('../../link/target'); + + expect(realNodeModulePath('/foo/node_modules/link')).toBe('/link/target'); + + expect(mocklstatSync).toHaveBeenCalledWith('/foo/node_modules/link'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledWith('/foo/node_modules/link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(1); + }); + + it('Should recursively handle relative link targets', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('../../link'); + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('/other/root/bar'); + + expect(realNodeModulePath('/foo/1/2/3/node_modules/bar/node_modules/link/4/5/6')).toBe( + '/other/root/link/4/5/6' + ); + + expect(mocklstatSync).toHaveBeenCalledWith('/foo/1/2/3/node_modules/bar/node_modules/link'); + expect(mocklstatSync).toHaveBeenCalledWith('/foo/1/2/3/node_modules/bar'); + expect(mocklstatSync).toHaveBeenCalledTimes(2); + expect(mockReadlinkSync).toHaveBeenCalledWith('/foo/1/2/3/node_modules/bar/node_modules/link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledWith('/foo/1/2/3/node_modules/bar', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(2); + }); + + it('Caches multi-layer resolution', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('../../link'); + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('/other/root/bar'); + + expect(realNodeModulePath('/foo/1/2/3/node_modules/bar/node_modules/link/4/5/6')).toBe( + '/other/root/link/4/5/6' + ); + expect(realNodeModulePath('/foo/1/2/3/node_modules/bar/node_modules/link/a/b')).toBe( + '/other/root/link/a/b' + ); + expect(realNodeModulePath('/foo/1/2/3/node_modules/bar/a/b')).toBe('/other/root/bar/a/b'); + + expect(mocklstatSync).toHaveBeenCalledWith('/foo/1/2/3/node_modules/bar/node_modules/link'); + expect(mocklstatSync).toHaveBeenCalledWith('/foo/1/2/3/node_modules/bar'); + expect(mocklstatSync).toHaveBeenCalledTimes(2); + expect(mockReadlinkSync).toHaveBeenCalledWith('/foo/1/2/3/node_modules/bar/node_modules/link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledWith('/foo/1/2/3/node_modules/bar', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(2); + }); + }); + + describe('Windows paths', () => { + const resolver: RealNodeModulePathResolver = new RealNodeModulePathResolver({ + fs: mockFs, + path: path.win32 + }); + const { realNodeModulePath } = resolver; + + beforeEach(() => { + resolver.clearCache(); + }); + + it('should return the input path if it is absolute and does not contain node_modules', () => { + for (const input of ['C:\\foo\\bar', 'C:\\']) { + expect(realNodeModulePath(input)).toBe(input); + + expect(mocklstatSync).not.toHaveBeenCalled(); + expect(mockReadlinkSync).not.toHaveBeenCalled(); + } + }); + + it('should trim extra trailing separators from the root', () => { + expect(realNodeModulePath('C:////')).toBe('C:\\'); + + expect(mocklstatSync).not.toHaveBeenCalled(); + expect(mockReadlinkSync).not.toHaveBeenCalled(); + }); + + it('should return the resolved input path if it is absolute and does not contain node_modules', () => { + for (const input of ['C:/foo/bar', 'C:/', 'ab', '../b/c/d']) { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + + expect(realNodeModulePath(input)).toBe(path.win32.resolve(input)); + + expect(mocklstatSync).not.toHaveBeenCalled(); + expect(mockReadlinkSync).not.toHaveBeenCalled(); + } + }); + + it('Should return the input path if the target is not a symbolic link', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => false } as unknown as fs.Stats); + + expect(realNodeModulePath('C:\\foo\\node_modules\\foo')).toBe('C:\\foo\\node_modules\\foo'); + + expect(mocklstatSync).toHaveBeenCalledWith('C:\\foo\\node_modules\\foo'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledTimes(0); + }); + + it('Should trim a trailing path separator if the target is not a symbolic link', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => false } as unknown as fs.Stats); + + expect(realNodeModulePath('C:\\foo\\node_modules\\foo\\')).toBe('C:\\foo\\node_modules\\foo'); + + expect(mocklstatSync).toHaveBeenCalledWith('C:\\foo\\node_modules\\foo'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledTimes(0); + }); + + it('Should handle absolute link targets', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('C:\\link\\target'); + + expect(realNodeModulePath('C:\\foo\\node_modules\\link\\relative')).toBe('C:\\link\\target\\relative'); + + expect(mocklstatSync).toHaveBeenCalledWith('C:\\foo\\node_modules\\link'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledWith('C:\\foo\\node_modules\\link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(1); + }); + + it('Should trim a trailing path separator from an absolute link target', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('C:\\link\\target\\'); + + expect(realNodeModulePath('C:\\foo\\node_modules\\link\\relative')).toBe('C:\\link\\target\\relative'); + + expect(mocklstatSync).toHaveBeenCalledWith('C:\\foo\\node_modules\\link'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledWith('C:\\foo\\node_modules\\link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(1); + }); + + it('Should normalize input', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('C:\\link\\target'); + + expect(realNodeModulePath('C:\\foo\\node_modules\\link')).toBe('C:\\link\\target'); + + expect(mocklstatSync).toHaveBeenCalledWith('C:\\foo\\node_modules\\link'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledWith('C:\\foo\\node_modules\\link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(1); + }); + + it('Should stop after a single absolute link target', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('D:\\link\\target'); + + expect(realNodeModulePath('C:\\node_modules\\foo\\node_modules\\link')).toBe('D:\\link\\target'); + + expect(mocklstatSync).toHaveBeenCalledWith('C:\\node_modules\\foo\\node_modules\\link'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledWith('C:\\node_modules\\foo\\node_modules\\link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(1); + }); + + it('Should handle relative link targets', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('..\\..\\link\\target'); + + expect(realNodeModulePath('C:\\foo\\node_modules\\link')).toBe('C:\\link\\target'); + + expect(mocklstatSync).toHaveBeenCalledWith('C:\\foo\\node_modules\\link'); + expect(mocklstatSync).toHaveBeenCalledTimes(1); + expect(mockReadlinkSync).toHaveBeenCalledWith('C:\\foo\\node_modules\\link', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(1); + }); + + it('Should recursively handle relative link targets', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('..\\..\\link'); + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('D:\\other\\root\\bar'); + + expect(realNodeModulePath('C:\\foo\\1\\2\\3\\node_modules\\bar\\node_modules\\link\\4\\5\\6')).toBe( + 'D:\\other\\root\\link\\4\\5\\6' + ); + + expect(mocklstatSync).toHaveBeenCalledWith('C:\\foo\\1\\2\\3\\node_modules\\bar\\node_modules\\link'); + expect(mocklstatSync).toHaveBeenCalledWith('C:\\foo\\1\\2\\3\\node_modules\\bar'); + expect(mocklstatSync).toHaveBeenCalledTimes(2); + expect(mockReadlinkSync).toHaveBeenCalledWith( + 'C:\\foo\\1\\2\\3\\node_modules\\bar\\node_modules\\link', + 'utf8' + ); + expect(mockReadlinkSync).toHaveBeenCalledWith('C:\\foo\\1\\2\\3\\node_modules\\bar', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(2); + }); + + it('Caches multi-layer resolution', () => { + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('..\\..\\link'); + mocklstatSync.mockReturnValueOnce({ isSymbolicLink: () => true } as unknown as fs.Stats); + mockReadlinkSync.mockReturnValueOnce('D:\\other\\root\\bar'); + + expect(realNodeModulePath('C:\\foo\\1\\2\\3\\node_modules\\bar\\node_modules\\link\\4\\5\\6')).toBe( + 'D:\\other\\root\\link\\4\\5\\6' + ); + expect(realNodeModulePath('C:\\foo\\1\\2\\3\\node_modules\\bar\\node_modules\\link\\a\\b')).toBe( + 'D:\\other\\root\\link\\a\\b' + ); + expect(realNodeModulePath('C:\\foo\\1\\2\\3\\node_modules\\bar\\a\\b')).toBe( + 'D:\\other\\root\\bar\\a\\b' + ); + + expect(mocklstatSync).toHaveBeenCalledWith('C:\\foo\\1\\2\\3\\node_modules\\bar\\node_modules\\link'); + expect(mocklstatSync).toHaveBeenCalledWith('C:\\foo\\1\\2\\3\\node_modules\\bar'); + expect(mocklstatSync).toHaveBeenCalledTimes(2); + expect(mockReadlinkSync).toHaveBeenCalledWith( + 'C:\\foo\\1\\2\\3\\node_modules\\bar\\node_modules\\link', + 'utf8' + ); + expect(mockReadlinkSync).toHaveBeenCalledWith('C:\\foo\\1\\2\\3\\node_modules\\bar', 'utf8'); + expect(mockReadlinkSync).toHaveBeenCalledTimes(2); + }); + }); +}); diff --git a/libraries/operation-graph/CHANGELOG.json b/libraries/operation-graph/CHANGELOG.json index 805243faa8f..ab4537c8ac1 100644 --- a/libraries/operation-graph/CHANGELOG.json +++ b/libraries/operation-graph/CHANGELOG.json @@ -1,6 +1,66 @@ { "name": "@rushstack/operation-graph", "entries": [ + { + "version": "0.2.37", + "tag": "@rushstack/operation-graph_v0.2.37", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + } + ] + } + }, + { + "version": "0.2.36", + "tag": "@rushstack/operation-graph_v0.2.36", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + } + ] + } + }, + { + "version": "0.2.35", + "tag": "@rushstack/operation-graph_v0.2.35", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + } + ] + } + }, + { + "version": "0.2.34", + "tag": "@rushstack/operation-graph_v0.2.34", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + } + ] + } + }, { "version": "0.2.33", "tag": "@rushstack/operation-graph_v0.2.33", diff --git a/libraries/operation-graph/CHANGELOG.md b/libraries/operation-graph/CHANGELOG.md index 63bf5e622fd..fad1fbcab3f 100644 --- a/libraries/operation-graph/CHANGELOG.md +++ b/libraries/operation-graph/CHANGELOG.md @@ -1,6 +1,26 @@ # Change Log - @rushstack/operation-graph -This log was last generated on Fri, 13 Sep 2024 00:11:43 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 01:11:42 GMT and should not be manually modified. + +## 0.2.37 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.2.36 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.2.35 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.2.34 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ ## 0.2.33 Fri, 13 Sep 2024 00:11:43 GMT diff --git a/libraries/operation-graph/package.json b/libraries/operation-graph/package.json index 35bbadd3c19..a982e36a140 100644 --- a/libraries/operation-graph/package.json +++ b/libraries/operation-graph/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/operation-graph", - "version": "0.2.33", + "version": "0.2.37", "description": "Library for managing and executing operations in a directed acyclic graph.", "main": "lib/index.js", "typings": "dist/operation-graph.d.ts", @@ -21,8 +21,8 @@ }, "devDependencies": { "local-eslint-config": "workspace:*", - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15" }, diff --git a/libraries/package-deps-hash/CHANGELOG.json b/libraries/package-deps-hash/CHANGELOG.json index c45666c53a1..a4354bdbb24 100644 --- a/libraries/package-deps-hash/CHANGELOG.json +++ b/libraries/package-deps-hash/CHANGELOG.json @@ -1,6 +1,186 @@ { "name": "@rushstack/package-deps-hash", "entries": [ + { + "version": "4.3.5", + "tag": "@rushstack/package-deps-hash_v4.3.5", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "4.3.4", + "tag": "@rushstack/package-deps-hash_v4.3.4", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "4.3.3", + "tag": "@rushstack/package-deps-hash_v4.3.3", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "4.3.2", + "tag": "@rushstack/package-deps-hash_v4.3.2", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "4.3.1", + "tag": "@rushstack/package-deps-hash_v4.3.1", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "4.3.0", + "tag": "@rushstack/package-deps-hash_v4.3.0", + "date": "Thu, 12 Dec 2024 01:37:09 GMT", + "comments": { + "minor": [ + { + "comment": "Add a new optional parameter `filterPath` to `getRepoStateAsync` that limits the scope of the git query to only the specified subpaths. This can significantly improve the performance of the function when only part of the full repo data is necessary." + } + ] + } + }, + { + "version": "4.2.11", + "tag": "@rushstack/package-deps-hash_v4.2.11", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "4.2.10", + "tag": "@rushstack/package-deps-hash_v4.2.10", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "4.2.9", + "tag": "@rushstack/package-deps-hash_v4.2.9", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "4.2.8", + "tag": "@rushstack/package-deps-hash_v4.2.8", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "4.2.7", + "tag": "@rushstack/package-deps-hash_v4.2.7", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "4.2.6", + "tag": "@rushstack/package-deps-hash_v4.2.6", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "4.2.5", + "tag": "@rushstack/package-deps-hash_v4.2.5", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "4.2.4", + "tag": "@rushstack/package-deps-hash_v4.2.4", + "date": "Tue, 15 Oct 2024 00:12:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "4.2.3", "tag": "@rushstack/package-deps-hash_v4.2.3", diff --git a/libraries/package-deps-hash/CHANGELOG.md b/libraries/package-deps-hash/CHANGELOG.md index 55b2dff46c3..9df1acb861e 100644 --- a/libraries/package-deps-hash/CHANGELOG.md +++ b/libraries/package-deps-hash/CHANGELOG.md @@ -1,6 +1,78 @@ # Change Log - @rushstack/package-deps-hash -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 4.3.5 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 4.3.4 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 4.3.3 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 4.3.2 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 4.3.1 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 4.3.0 +Thu, 12 Dec 2024 01:37:09 GMT + +### Minor changes + +- Add a new optional parameter `filterPath` to `getRepoStateAsync` that limits the scope of the git query to only the specified subpaths. This can significantly improve the performance of the function when only part of the full repo data is necessary. + +## 4.2.11 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 4.2.10 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 4.2.9 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 4.2.8 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 4.2.7 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 4.2.6 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 4.2.5 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 4.2.4 +Tue, 15 Oct 2024 00:12:32 GMT + +_Version update only_ ## 4.2.3 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/libraries/package-deps-hash/package.json b/libraries/package-deps-hash/package.json index c711e9c398b..576b0c1064c 100644 --- a/libraries/package-deps-hash/package.json +++ b/libraries/package-deps-hash/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/package-deps-hash", - "version": "4.2.3", + "version": "4.3.5", "description": "", "main": "lib/index.js", "typings": "dist/package-deps-hash.d.ts", diff --git a/libraries/package-deps-hash/src/getRepoState.ts b/libraries/package-deps-hash/src/getRepoState.ts index c8992ac275d..4b9bdcb57cc 100644 --- a/libraries/package-deps-hash/src/getRepoState.ts +++ b/libraries/package-deps-hash/src/getRepoState.ts @@ -364,7 +364,8 @@ export async function hashFilesAsync( export async function getRepoStateAsync( rootDirectory: string, additionalRelativePathsToHash?: string[], - gitPath?: string + gitPath?: string, + filterPath?: string[] ): Promise> { const statePromise: Promise = spawnGitAsync( gitPath, @@ -378,7 +379,8 @@ export async function getRepoStateAsync( '--full-name', // As of last commit 'HEAD', - '--' + '--', + ...(filterPath ?? []) ]), rootDirectory ).then(parseGitLsTree); @@ -396,7 +398,8 @@ export async function getRepoStateAsync( '--ignore-submodules', // Don't compare against the remote '--no-ahead-behind', - '--' + '--', + ...(filterPath ?? []) ]), rootDirectory ).then(parseGitStatus); diff --git a/libraries/package-extractor/CHANGELOG.json b/libraries/package-extractor/CHANGELOG.json index 39282b72273..edcc8dcabb7 100644 --- a/libraries/package-extractor/CHANGELOG.json +++ b/libraries/package-extractor/CHANGELOG.json @@ -1,6 +1,305 @@ { "name": "@rushstack/package-extractor", "entries": [ + { + "version": "0.10.9", + "tag": "@rushstack/package-extractor_v0.10.9", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "patch": [ + { + "comment": "Prefer `os.availableParallelism()` to `os.cpus().length`." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.82`" + } + ] + } + }, + { + "version": "0.10.8", + "tag": "@rushstack/package-extractor_v0.10.8", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.81`" + } + ] + } + }, + { + "version": "0.10.7", + "tag": "@rushstack/package-extractor_v0.10.7", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.80`" + } + ] + } + }, + { + "version": "0.10.6", + "tag": "@rushstack/package-extractor_v0.10.6", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.79`" + } + ] + } + }, + { + "version": "0.10.5", + "tag": "@rushstack/package-extractor_v0.10.5", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.78`" + } + ] + } + }, + { + "version": "0.10.4", + "tag": "@rushstack/package-extractor_v0.10.4", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.77`" + } + ] + } + }, + { + "version": "0.10.3", + "tag": "@rushstack/package-extractor_v0.10.3", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.76`" + } + ] + } + }, + { + "version": "0.10.2", + "tag": "@rushstack/package-extractor_v0.10.2", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.75`" + } + ] + } + }, + { + "version": "0.10.1", + "tag": "@rushstack/package-extractor_v0.10.1", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.23.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.74`" + } + ] + } + }, + { + "version": "0.10.0", + "tag": "@rushstack/package-extractor_v0.10.0", + "date": "Thu, 24 Oct 2024 15:11:19 GMT", + "comments": { + "minor": [ + { + "comment": "Add bin linking support when calling the create-links.js script with the \"--link-bins\" parameter" + } + ] + } + }, + { + "version": "0.9.9", + "tag": "@rushstack/package-extractor_v0.9.9", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.73`" + } + ] + } + }, + { + "version": "0.9.8", + "tag": "@rushstack/package-extractor_v0.9.8", + "date": "Tue, 22 Oct 2024 22:12:40 GMT", + "comments": { + "patch": [ + { + "comment": "Fix an issue where the `node_modules/.bin` folder symlinks were not created for extracted packages when using the \"default\" link creation mode" + } + ] + } + }, + { + "version": "0.9.7", + "tag": "@rushstack/package-extractor_v0.9.7", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.72`" + } + ] + } + }, + { + "version": "0.9.6", + "tag": "@rushstack/package-extractor_v0.9.6", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.71`" + } + ] + } + }, + { + "version": "0.9.5", + "tag": "@rushstack/package-extractor_v0.9.5", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.11.70`" + } + ] + } + }, { "version": "0.9.4", "tag": "@rushstack/package-extractor_v0.9.4", diff --git a/libraries/package-extractor/CHANGELOG.md b/libraries/package-extractor/CHANGELOG.md index 69237429a9d..2a5ff648a83 100644 --- a/libraries/package-extractor/CHANGELOG.md +++ b/libraries/package-extractor/CHANGELOG.md @@ -1,6 +1,87 @@ # Change Log - @rushstack/package-extractor -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.10.9 +Thu, 30 Jan 2025 16:10:36 GMT + +### Patches + +- Prefer `os.availableParallelism()` to `os.cpus().length`. + +## 0.10.8 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.10.7 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.10.6 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.10.5 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.10.4 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.10.3 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.10.2 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.10.1 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.10.0 +Thu, 24 Oct 2024 15:11:19 GMT + +### Minor changes + +- Add bin linking support when calling the create-links.js script with the "--link-bins" parameter + +## 0.9.9 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.9.8 +Tue, 22 Oct 2024 22:12:40 GMT + +### Patches + +- Fix an issue where the `node_modules/.bin` folder symlinks were not created for extracted packages when using the "default" link creation mode + +## 0.9.7 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.9.6 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.9.5 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.9.4 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/libraries/package-extractor/package.json b/libraries/package-extractor/package.json index 013513f6afd..b8bb4a01edd 100644 --- a/libraries/package-extractor/package.json +++ b/libraries/package-extractor/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/package-extractor", - "version": "0.9.4", + "version": "0.10.9", "description": "A library for bundling selected files and dependencies into a deployable package.", "main": "lib/index.js", "typings": "dist/package-extractor.d.ts", @@ -20,6 +20,7 @@ "@pnpm/link-bins": "~5.3.7", "@rushstack/node-core-library": "workspace:*", "@rushstack/terminal": "workspace:*", + "@rushstack/ts-command-line": "workspace:*", "ignore": "~5.1.6", "jszip": "~3.8.0", "minimatch": "~3.0.3", diff --git a/libraries/package-extractor/src/AssetHandler.ts b/libraries/package-extractor/src/AssetHandler.ts index d565bb9a3f0..a043d93dc6e 100644 --- a/libraries/package-extractor/src/AssetHandler.ts +++ b/libraries/package-extractor/src/AssetHandler.ts @@ -38,6 +38,10 @@ export interface IAssetHandlerOptions extends IExtractorOptions { symlinkAnalyzer: SymlinkAnalyzer; } +export interface IFinalizeOptions { + onAfterExtractSymlinksAsync: () => Promise; +} + export class AssetHandler { private readonly _terminal: ITerminal; private readonly _sourceRootFolder: string; @@ -148,7 +152,9 @@ export class AssetHandler { return [...this._includedAssetPaths]; } - public async finalizeAsync(): Promise { + public async finalizeAsync(options?: IFinalizeOptions): Promise { + const { onAfterExtractSymlinksAsync } = options ?? {}; + if (this._isFinalized) { throw new Error('finalizeAsync() has already been called'); } @@ -161,6 +167,8 @@ export class AssetHandler { }); } + await onAfterExtractSymlinksAsync?.(); + if (this._archiveManager && this._archiveFilePath) { this._terminal.writeLine(`Creating archive at "${this._archiveFilePath}"`); await this._archiveManager.createArchiveAsync(this._archiveFilePath); diff --git a/libraries/package-extractor/src/PackageExtractor.ts b/libraries/package-extractor/src/PackageExtractor.ts index 1c8b4615a07..e79ff048b8f 100644 --- a/libraries/package-extractor/src/PackageExtractor.ts +++ b/libraries/package-extractor/src/PackageExtractor.ts @@ -5,7 +5,6 @@ import * as path from 'path'; import { type IMinimatch, Minimatch } from 'minimatch'; import semver from 'semver'; import npmPacklist from 'npm-packlist'; -import pnpmLinkBins from '@pnpm/link-bins'; import ignore, { type Ignore } from 'ignore'; import { Async, @@ -20,8 +19,18 @@ import { Colorize, type ITerminal } from '@rushstack/terminal'; import { SymlinkAnalyzer, type ILinkInfo, type PathNode } from './SymlinkAnalyzer'; import { AssetHandler } from './AssetHandler'; -import { matchesWithStar, remapSourcePathForTargetFolder, remapPathForExtractorMetadata } from './Utils'; -import { createLinksScriptFilename, scriptsFolderPath } from './PathConstants'; +import { + matchesWithStar, + remapSourcePathForTargetFolder, + remapPathForExtractorMetadata, + makeBinLinksAsync +} from './Utils'; +import { + CREATE_LINKS_SCRIPT_FILENAME, + EXTRACTOR_METADATA_FILENAME, + SCRIPTS_FOLDER_PATH +} from './PathConstants'; +import { MAX_CONCURRENCY } from './scripts/createLinks/utilities/constants'; // (@types/npm-packlist is missing this API) declare module 'npm-packlist' { @@ -338,7 +347,8 @@ export class PackageExtractor { targetRootFolder, mainProjectName, overwriteExisting, - dependencyConfigurations + dependencyConfigurations, + linkCreation } = options; terminal.writeLine(Colorize.cyan(`Extracting to target folder: ${targetRootFolder}`)); @@ -383,7 +393,21 @@ export class PackageExtractor { } await this._performExtractionAsync(options, state); - await state.assetHandler.finalizeAsync(); + await state.assetHandler.finalizeAsync({ + onAfterExtractSymlinksAsync: async () => { + // We need the symlinks to be created before attempting to create the bin links, since it requires + // the node_modules folder to be realized. While we're here, we may as well perform some specific + // link creation tasks and write the extractor-metadata.json file before the asset handler finalizes. + if (linkCreation === 'default') { + await this._makeBinLinksAsync(options, state); + } else if (linkCreation === 'script') { + await this._writeCreateLinksScriptAsync(options, state); + } + + terminal.writeLine('Creating extractor-metadata.json'); + await this._writeExtractorMetadataAsync(options, state); + } + }); } private static _normalizeOptions(options: IExtractorOptions): IExtractorOptions { @@ -423,7 +447,6 @@ export class PackageExtractor { sourceRootFolder, targetRootFolder, folderToCopy: additionalFolderToCopy, - linkCreation, createArchiveOnly } = options; const { projectConfigurationsByName, foldersToCopy } = state; @@ -465,7 +488,7 @@ export class PackageExtractor { await this._extractFolderAsync(folderToCopy, options, state); }, { - concurrency: 10 + concurrency: MAX_CONCURRENCY } ); @@ -480,15 +503,6 @@ export class PackageExtractor { }; await this._extractFolderAsync(additionalFolderPath, additionalFolderExtractorOptions, state); } - - if (linkCreation === 'default') { - await this._makeBinLinksAsync(options, state); - } else if (linkCreation === 'script') { - await this._writeCreateLinksScriptAsync(options, state); - } - - terminal.writeLine('Creating extractor-metadata.json'); - await this._writeExtractorMetadataAsync(options, state); } /** @@ -635,7 +649,7 @@ export class PackageExtractor { callback(); }, { - concurrency: 10 + concurrency: MAX_CONCURRENCY } ); } @@ -794,7 +808,7 @@ export class PackageExtractor { } }, { - concurrency: 10 + concurrency: MAX_CONCURRENCY } ); } else { @@ -862,7 +876,7 @@ export class PackageExtractor { callback(); }, { - concurrency: 10 + concurrency: MAX_CONCURRENCY } ); } @@ -879,14 +893,13 @@ export class PackageExtractor { options; const { projectConfigurationsByPath } = state; - const extractorMetadataFileName: string = 'extractor-metadata.json'; const extractorMetadataFolderPath: string = linkCreation === 'script' && linkCreationScriptPath ? path.dirname(path.resolve(targetRootFolder, linkCreationScriptPath)) : targetRootFolder; const extractorMetadataFilePath: string = path.join( extractorMetadataFolderPath, - extractorMetadataFileName + EXTRACTOR_METADATA_FILENAME ); const extractorMetadataJson: IExtractorMetadataJson = { mainProjectName, @@ -927,41 +940,21 @@ export class PackageExtractor { private async _makeBinLinksAsync(options: IExtractorOptions, state: IExtractorState): Promise { const { terminal } = options; - const extractedProjectFolders: string[] = Array.from(state.projectConfigurationsByPath.keys()).filter( - (folderPath: string) => state.foldersToCopy.has(folderPath) - ); - - await Async.forEachAsync( - extractedProjectFolders, - async (projectFolder: string) => { - const extractedProjectFolder: string = remapSourcePathForTargetFolder({ - ...options, - sourcePath: projectFolder - }); - const extractedProjectNodeModulesFolder: string = path.join(extractedProjectFolder, 'node_modules'); - const extractedProjectBinFolder: string = path.join(extractedProjectNodeModulesFolder, '.bin'); - - const linkedBinPackageNames: string[] = await pnpmLinkBins( - extractedProjectNodeModulesFolder, - extractedProjectBinFolder, - { - warn: (msg: string) => terminal.writeLine(Colorize.yellow(msg)) - } + const extractedProjectFolderPaths: string[] = []; + for (const folderPath of state.projectConfigurationsByPath.keys()) { + if (state.foldersToCopy.has(folderPath)) { + extractedProjectFolderPaths.push( + remapSourcePathForTargetFolder({ ...options, sourcePath: folderPath }) ); + } + } - if (linkedBinPackageNames.length) { - const binFolderItems: string[] = - await FileSystem.readFolderItemNamesAsync(extractedProjectBinFolder); - for (const binFolderItem of binFolderItems) { - const binFilePath: string = path.resolve(extractedProjectBinFolder, binFolderItem); - await state.assetHandler.includeAssetAsync({ - targetFilePath: binFilePath - }); - } - } - }, + const binFilePaths: string[] = await makeBinLinksAsync(terminal, extractedProjectFolderPaths); + await Async.forEachAsync( + binFilePaths, + (targetFilePath: string) => state.assetHandler.includeAssetAsync({ targetFilePath }), { - concurrency: 10 + concurrency: MAX_CONCURRENCY } ); } @@ -973,11 +966,11 @@ export class PackageExtractor { const { terminal, targetRootFolder, linkCreationScriptPath } = options; const { assetHandler } = state; - terminal.writeLine(`Creating ${createLinksScriptFilename}`); - const createLinksSourceFilePath: string = `${scriptsFolderPath}/${createLinksScriptFilename}`; + terminal.writeLine(`Creating ${CREATE_LINKS_SCRIPT_FILENAME}`); + const createLinksSourceFilePath: string = `${SCRIPTS_FOLDER_PATH}/${CREATE_LINKS_SCRIPT_FILENAME}`; const createLinksTargetFilePath: string = path.resolve( targetRootFolder, - linkCreationScriptPath || createLinksScriptFilename + linkCreationScriptPath || CREATE_LINKS_SCRIPT_FILENAME ); let createLinksScriptContent: string = await FileSystem.readFileAsync(createLinksSourceFilePath); createLinksScriptContent = createLinksScriptContent.replace( diff --git a/libraries/package-extractor/src/PathConstants.ts b/libraries/package-extractor/src/PathConstants.ts index f2bcadffd63..51239dabb66 100644 --- a/libraries/package-extractor/src/PathConstants.ts +++ b/libraries/package-extractor/src/PathConstants.ts @@ -3,6 +3,9 @@ import { PackageJsonLookup } from '@rushstack/node-core-library'; +export const CREATE_LINKS_SCRIPT_FILENAME: 'create-links.js' = 'create-links.js'; + +export const EXTRACTOR_METADATA_FILENAME: 'extractor-metadata.json' = 'extractor-metadata.json'; + const packageExtractorFolderRootPath: string = PackageJsonLookup.instance.tryGetPackageFolderFor(__dirname)!; -export const createLinksScriptFilename: 'create-links.js' = 'create-links.js'; -export const scriptsFolderPath: string = `${packageExtractorFolderRootPath}/dist/scripts`; +export const SCRIPTS_FOLDER_PATH: string = `${packageExtractorFolderRootPath}/dist/scripts`; diff --git a/libraries/package-extractor/src/Utils.ts b/libraries/package-extractor/src/Utils.ts index ed3eeae2df7..0a76e1ce4d7 100644 --- a/libraries/package-extractor/src/Utils.ts +++ b/libraries/package-extractor/src/Utils.ts @@ -2,7 +2,10 @@ // See LICENSE in the project root for license information. import path from 'node:path'; -import { Path, Text } from '@rushstack/node-core-library'; +import pnpmLinkBins from '@pnpm/link-bins'; +import { Async, FileSystem, Path, Text } from '@rushstack/node-core-library'; +import { Colorize, type ITerminal } from '@rushstack/terminal'; +import { MAX_CONCURRENCY } from './scripts/createLinks/utilities/constants'; export function matchesWithStar(patternWithStar: string, input: string): boolean { // Map "@types/*" --> "^\@types\/.*$" @@ -54,3 +57,47 @@ export function remapPathForExtractorMetadata(folderPath: string, filePath: stri } return Path.convertToSlashes(relativePath); } + +/** + * Creates the .bin files for the extracted projects and returns the paths to the created .bin files. + * + * @param terminal - The terminal to write to + * @param extractedProjectFolderPaths - The paths to the extracted projects + */ +export async function makeBinLinksAsync( + terminal: ITerminal, + extractedProjectFolderPaths: string[] +): Promise { + const binFilePaths: string[] = []; + await Async.forEachAsync( + extractedProjectFolderPaths, + async (extractedProjectFolderPath: string) => { + const extractedProjectNodeModulesFolderPath: string = `${extractedProjectFolderPath}/node_modules`; + const extractedProjectBinFolderPath: string = `${extractedProjectNodeModulesFolderPath}/.bin`; + + const linkedBinPackageNames: string[] = await pnpmLinkBins( + extractedProjectNodeModulesFolderPath, + extractedProjectBinFolderPath, + { + warn: (msg: string) => terminal.writeLine(Colorize.yellow(msg)) + } + ); + + if (linkedBinPackageNames.length) { + const binFolderItems: string[] = await FileSystem.readFolderItemNamesAsync( + extractedProjectBinFolderPath + ); + for (const binFolderItem of binFolderItems) { + const binFilePath: string = `${extractedProjectBinFolderPath}/${binFolderItem}`; + terminal.writeVerboseLine(`Created .bin file: ${binFilePath}`); + binFilePaths.push(binFilePath); + } + } + }, + { + concurrency: MAX_CONCURRENCY + } + ); + + return binFilePaths; +} diff --git a/libraries/package-extractor/src/scripts/create-links.ts b/libraries/package-extractor/src/scripts/create-links.ts deleted file mode 100644 index 5d71eb5c8b5..00000000000 --- a/libraries/package-extractor/src/scripts/create-links.ts +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See LICENSE in the project root for license information. - -// THIS SCRIPT IS GENERATED BY THE "rush deploy" COMMAND. - -import os from 'node:os'; -import fs from 'node:fs'; -import path from 'node:path'; -import { Async, FileSystem, Path } from '@rushstack/node-core-library'; -import { Terminal, ConsoleTerminalProvider } from '@rushstack/terminal'; -import type { - TARGET_ROOT_SCRIPT_RELATIVE_PATH_TEMPLATE_STRING as TargetRootScriptRelativePathTemplateString, - IExtractorMetadataJson -} from '../PackageExtractor'; - -const MAX_CONCURRENCY: number = os.cpus().length * 2; -const CREATE_ACTION_NAME: 'create' = 'create'; -const REMOVE_ACTION_NAME: 'remove' = 'remove'; -const REALIZE_FILES_OPTION_NAME: '--realize-files' = '--realize-files'; - -const TARGET_ROOT_SCRIPT_RELATIVE_PATH: typeof TargetRootScriptRelativePathTemplateString = - '{TARGET_ROOT_SCRIPT_RELATIVE_PATH}'; -const TARGET_ROOT_FOLDER: string = path.resolve(__dirname, TARGET_ROOT_SCRIPT_RELATIVE_PATH); - -async function removeLinksAsync( - terminal: Terminal, - targetRootFolder: string, - extractorMetadataObject: IExtractorMetadataJson -): Promise { - await Async.forEachAsync( - extractorMetadataObject.links, - async ({ linkPath }) => { - const newLinkPath: string = `${targetRootFolder}/${linkPath}`; - terminal.writeVerboseLine(`Removing link at path "${newLinkPath}"`); - await FileSystem.deleteFileAsync(newLinkPath, { throwIfNotExists: false }); - }, - { concurrency: MAX_CONCURRENCY } - ); -} - -async function createLinksAsync( - terminal: Terminal, - targetRootFolder: string, - extractorMetadataObject: IExtractorMetadataJson -): Promise { - await Async.forEachAsync( - extractorMetadataObject.links, - async (linkInfo) => { - // Link to the relative path for symlinks - const newLinkPath: string = `${targetRootFolder}/${linkInfo.linkPath}`; - const linkTargetPath: string = `${targetRootFolder}/${linkInfo.targetPath}`; - - // Make sure the containing folder exists - await FileSystem.ensureFolderAsync(path.dirname(newLinkPath)); - - // NOTE: This logic is based on NpmLinkManager._createSymlink() - if (linkInfo.kind === 'folderLink') { - terminal.writeVerboseLine(`Creating linked folder at path "${newLinkPath}"`); - await FileSystem.createSymbolicLinkJunctionAsync({ newLinkPath, linkTargetPath }); - } else if (linkInfo.kind === 'fileLink') { - // Use hardlinks for Windows and symlinks for other platforms since creating a symbolic link - // requires administrator permission on Windows. This may cause unexpected behaviour for consumers - // of the hardlinked files. If this becomes an issue, we may need to revisit this. - terminal.writeVerboseLine(`Creating linked file at path "${newLinkPath}"`); - if (process.platform === 'win32') { - await FileSystem.createHardLinkAsync({ newLinkPath, linkTargetPath }); - } else { - await FileSystem.createSymbolicLinkFileAsync({ newLinkPath, linkTargetPath }); - } - } - }, - { concurrency: MAX_CONCURRENCY } - ); -} - -async function realizeFilesAsync( - terminal: Terminal, - targetRootFolder: string, - extractorMetadataObject: IExtractorMetadataJson -): Promise { - await Async.forEachAsync( - extractorMetadataObject.files, - async (relativeFilePath) => { - const filePath: string = `${targetRootFolder}/${relativeFilePath}`; - const realFilePath: string = await FileSystem.getRealPathAsync(filePath); - if (!Path.isEqual(realFilePath, filePath)) { - await FileSystem.deleteFileAsync(filePath); - - // Hard links seem to cause build failures on Mac, so for all other operating - // systems we copy files. - terminal.writeVerboseLine(`Realizing file at path "${filePath}"`); - if (process.platform === 'win32') { - await FileSystem.createHardLinkAsync({ newLinkPath: filePath, linkTargetPath: realFilePath }); - } else { - await FileSystem.copyFileAsync({ sourcePath: realFilePath, destinationPath: filePath }); - } - } - }, - { concurrency: MAX_CONCURRENCY } - ); -} - -function showUsage(terminal: Terminal): void { - terminal.writeLine('Usage:'); - terminal.writeLine(` node create-links.js ${CREATE_ACTION_NAME} [${REALIZE_FILES_OPTION_NAME}]`); - terminal.writeLine(` node create-links.js ${REMOVE_ACTION_NAME}`); - terminal.writeLine(''); - terminal.writeLine('Creates or removes the symlinks for the output folder created by "rush deploy".'); - terminal.writeLine('The link information is read from "extractor-metadata.json" in the same folder.'); -} - -async function runAsync(terminal: Terminal): Promise { - // Example: [ "node.exe", "create-links.js", ""create" ] - const args: string[] = process.argv.slice(2); - if ( - (args[0] !== CREATE_ACTION_NAME && args[0] !== REMOVE_ACTION_NAME) || - (args[0] === CREATE_ACTION_NAME && args[1] && args[1] !== REALIZE_FILES_OPTION_NAME) || - (args[0] === REMOVE_ACTION_NAME && args[1]) - ) { - showUsage(terminal); - return false; - } - - const extractorMetadataPath: string = `${__dirname}/extractor-metadata.json`; - if (!fs.existsSync(extractorMetadataPath)) { - throw new Error('Input file not found: ' + extractorMetadataPath); - } - - const extractorMetadataJson: string = fs.readFileSync(extractorMetadataPath).toString(); - const extractorMetadataObject: IExtractorMetadataJson = JSON.parse(extractorMetadataJson); - - if (args[0] === 'create') { - const realizeFiles: boolean = args[1] === '--realize-files'; - terminal.writeLine(`Creating links for extraction at path "${TARGET_ROOT_FOLDER}"`); - await removeLinksAsync(terminal, TARGET_ROOT_FOLDER, extractorMetadataObject); - await createLinksAsync(terminal, TARGET_ROOT_FOLDER, extractorMetadataObject); - if (realizeFiles) { - await realizeFilesAsync(terminal, TARGET_ROOT_FOLDER, extractorMetadataObject); - } - } else if (args[0] === 'remove') { - terminal.writeLine(`Removing links for extraction at path "${TARGET_ROOT_FOLDER}"`); - await removeLinksAsync(terminal, TARGET_ROOT_FOLDER, extractorMetadataObject); - } - - terminal.writeLine('The operation completed successfully.'); - return true; -} - -process.exitCode = 1; -const terminal: Terminal = new Terminal(new ConsoleTerminalProvider()); -runAsync(terminal) - .then((result) => { - process.exitCode = result ? 0 : 1; - }) - .catch((error) => { - terminal.writeErrorLine('ERROR: ' + error); - }); diff --git a/libraries/package-extractor/src/scripts/createLinks/cli/CreateLinksCommandLineParser.ts b/libraries/package-extractor/src/scripts/createLinks/cli/CreateLinksCommandLineParser.ts new file mode 100644 index 00000000000..4b8e2bf74d7 --- /dev/null +++ b/libraries/package-extractor/src/scripts/createLinks/cli/CreateLinksCommandLineParser.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { CommandLineParser } from '@rushstack/ts-command-line'; +import { AlreadyReportedError } from '@rushstack/node-core-library'; +import type { ITerminal } from '@rushstack/terminal'; + +import { CreateLinksAction } from './actions/CreateLinksAction'; +import { RemoveLinksAction } from './actions/RemoveLinksAction'; + +export class CreateLinksCommandLineParser extends CommandLineParser { + private readonly _terminal: ITerminal; + + public constructor(terminal: ITerminal) { + super({ + toolFilename: 'create-links', + toolDescription: 'Create or remove symlinks for the extracted packages' + }); + + this._terminal = terminal; + + this.addAction(new CreateLinksAction(this._terminal)); + this.addAction(new RemoveLinksAction(this._terminal)); + } + + protected async onExecute(): Promise { + // override + process.exitCode = 1; + + try { + await super.onExecute(); + process.exitCode = 0; + } catch (error) { + if (!(error instanceof AlreadyReportedError)) { + this._terminal.writeErrorLine(); + this._terminal.writeErrorLine('ERROR: ' + error.message.trim()); + } + } + } +} diff --git a/libraries/package-extractor/src/scripts/createLinks/cli/actions/CreateLinksAction.ts b/libraries/package-extractor/src/scripts/createLinks/cli/actions/CreateLinksAction.ts new file mode 100644 index 00000000000..53ac2d44dfc --- /dev/null +++ b/libraries/package-extractor/src/scripts/createLinks/cli/actions/CreateLinksAction.ts @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import path from 'node:path'; +import { Async, FileSystem, Path } from '@rushstack/node-core-library'; +import type { ITerminal } from '@rushstack/terminal'; +import { CommandLineAction, type CommandLineFlagParameter } from '@rushstack/ts-command-line'; +import type { IExtractorMetadataJson, IProjectInfoJson } from '../../../../PackageExtractor'; +import { makeBinLinksAsync } from '../../../../Utils'; +import { getExtractorMetadataAsync } from '../../utilities/CreateLinksUtilities'; +import { + TARGET_ROOT_FOLDER, + REALIZE_FILES_PARAMETER_NAME, + LINK_BINS_PARAMETER_NAME, + MAX_CONCURRENCY +} from '../../utilities/constants'; +import { removeLinksAsync } from './RemoveLinksAction'; + +async function createLinksAsync( + terminal: ITerminal, + targetRootFolder: string, + extractorMetadataObject: IExtractorMetadataJson +): Promise { + await Async.forEachAsync( + extractorMetadataObject.links, + async (linkInfo) => { + // Link to the relative path for symlinks + const newLinkPath: string = path.join(targetRootFolder, linkInfo.linkPath); + const linkTargetPath: string = path.join(targetRootFolder, linkInfo.targetPath); + + // Make sure the containing folder exists + await FileSystem.ensureFolderAsync(path.dirname(newLinkPath)); + + // NOTE: This logic is based on NpmLinkManager._createSymlink() + if (linkInfo.kind === 'folderLink') { + terminal.writeVerboseLine(`Creating linked folder at path "${newLinkPath}"`); + await FileSystem.createSymbolicLinkJunctionAsync({ newLinkPath, linkTargetPath }); + } else if (linkInfo.kind === 'fileLink') { + // Use hardlinks for Windows and symlinks for other platforms since creating a symbolic link + // requires administrator permission on Windows. This may cause unexpected behaviour for consumers + // of the hardlinked files. If this becomes an issue, we may need to revisit this. + terminal.writeVerboseLine(`Creating linked file at path "${newLinkPath}"`); + if (process.platform === 'win32') { + await FileSystem.createHardLinkAsync({ newLinkPath, linkTargetPath }); + } else { + await FileSystem.createSymbolicLinkFileAsync({ newLinkPath, linkTargetPath }); + } + } + }, + { concurrency: MAX_CONCURRENCY } + ); +} + +async function realizeFilesAsync( + terminal: ITerminal, + targetRootFolder: string, + extractorMetadataObject: IExtractorMetadataJson +): Promise { + await Async.forEachAsync( + extractorMetadataObject.files, + async (relativeFilePath) => { + const filePath: string = `${targetRootFolder}/${relativeFilePath}`; + const realFilePath: string = await FileSystem.getRealPathAsync(filePath); + if (!Path.isEqual(realFilePath, filePath)) { + // Delete the existing symlink and create a hardlink to the real file, since creating hardlinks + // is less overhead than copying the file. + terminal.writeVerboseLine(`Realizing file at path "${filePath}"`); + await FileSystem.deleteFileAsync(filePath); + await FileSystem.createHardLinkAsync({ newLinkPath: filePath, linkTargetPath: realFilePath }); + } + }, + { concurrency: MAX_CONCURRENCY } + ); +} + +export class CreateLinksAction extends CommandLineAction { + private _terminal: ITerminal; + private _realizeFilesParameter: CommandLineFlagParameter; + private _linkBinsParameter: CommandLineFlagParameter; + + public constructor(terminal: ITerminal) { + super({ + actionName: 'create', + summary: 'Create symlinks for extraction', + documentation: 'This action creates symlinks for the extraction process.' + }); + + this._terminal = terminal; + + this._realizeFilesParameter = this.defineFlagParameter({ + parameterLongName: REALIZE_FILES_PARAMETER_NAME, + description: 'Realize files instead of creating symlinks' + }); + + this._linkBinsParameter = this.defineFlagParameter({ + parameterLongName: LINK_BINS_PARAMETER_NAME, + description: 'Create the .bin files for extracted packages' + }); + } + + protected async onExecute(): Promise { + const extractorMetadataObject: IExtractorMetadataJson = await getExtractorMetadataAsync(); + const realizeFiles: boolean = this._realizeFilesParameter.value; + const linkBins: boolean = this._linkBinsParameter.value; + + this._terminal.writeLine(`Creating links for extraction at path "${TARGET_ROOT_FOLDER}"`); + await removeLinksAsync(this._terminal, TARGET_ROOT_FOLDER, extractorMetadataObject); + await createLinksAsync(this._terminal, TARGET_ROOT_FOLDER, extractorMetadataObject); + + if (realizeFiles) { + this._terminal.writeLine(`Realizing files for extraction at path "${TARGET_ROOT_FOLDER}"`); + await realizeFilesAsync(this._terminal, TARGET_ROOT_FOLDER, extractorMetadataObject); + } + + if (linkBins) { + this._terminal.writeLine(`Linking bins for extraction at path "${TARGET_ROOT_FOLDER}"`); + const extractedProjectFolderPaths: string[] = extractorMetadataObject.projects.map( + (project: IProjectInfoJson) => path.join(TARGET_ROOT_FOLDER, project.path) + ); + await makeBinLinksAsync(this._terminal, extractedProjectFolderPaths); + } + } +} diff --git a/libraries/package-extractor/src/scripts/createLinks/cli/actions/RemoveLinksAction.ts b/libraries/package-extractor/src/scripts/createLinks/cli/actions/RemoveLinksAction.ts new file mode 100644 index 00000000000..6ee24369c57 --- /dev/null +++ b/libraries/package-extractor/src/scripts/createLinks/cli/actions/RemoveLinksAction.ts @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import path from 'node:path'; +import { Async, FileSystem } from '@rushstack/node-core-library'; +import type { ITerminal } from '@rushstack/terminal'; +import { CommandLineAction } from '@rushstack/ts-command-line'; +import type { IExtractorMetadataJson } from '../../../../PackageExtractor'; +import { getExtractorMetadataAsync } from '../../utilities/CreateLinksUtilities'; +import { TARGET_ROOT_FOLDER, MAX_CONCURRENCY } from '../../utilities/constants'; + +export async function removeLinksAsync( + terminal: ITerminal, + targetRootFolder: string, + extractorMetadataObject: IExtractorMetadataJson +): Promise { + await Async.forEachAsync( + extractorMetadataObject.links, + async ({ linkPath }) => { + const newLinkPath: string = path.join(targetRootFolder, linkPath); + terminal.writeVerboseLine(`Removing link at path "${newLinkPath}"`); + await FileSystem.deleteFileAsync(newLinkPath, { throwIfNotExists: false }); + }, + { concurrency: MAX_CONCURRENCY } + ); +} + +export class RemoveLinksAction extends CommandLineAction { + private _terminal: ITerminal; + + public constructor(terminal: ITerminal) { + super({ + actionName: 'remove', + summary: 'Remove symlinks created by the "create" action', + documentation: 'This action removes the symlinks created by the "create" action.' + }); + + this._terminal = terminal; + } + + protected async onExecute(): Promise { + const extractorMetadataObject: IExtractorMetadataJson = await getExtractorMetadataAsync(); + + this._terminal.writeLine(`Removing links for extraction at path "${TARGET_ROOT_FOLDER}"`); + await removeLinksAsync(this._terminal, TARGET_ROOT_FOLDER, extractorMetadataObject); + } +} diff --git a/libraries/package-extractor/src/scripts/createLinks/start.ts b/libraries/package-extractor/src/scripts/createLinks/start.ts new file mode 100644 index 00000000000..d03d9f6e5c9 --- /dev/null +++ b/libraries/package-extractor/src/scripts/createLinks/start.ts @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { Terminal, ConsoleTerminalProvider } from '@rushstack/terminal'; + +import { CreateLinksCommandLineParser } from './cli/CreateLinksCommandLineParser'; + +const terminal: Terminal = new Terminal(new ConsoleTerminalProvider({ verboseEnabled: true })); + +const parser: CreateLinksCommandLineParser = new CreateLinksCommandLineParser(terminal); +parser.executeAsync().catch(terminal.writeErrorLine); diff --git a/libraries/package-extractor/src/scripts/createLinks/utilities/CreateLinksUtilities.ts b/libraries/package-extractor/src/scripts/createLinks/utilities/CreateLinksUtilities.ts new file mode 100644 index 00000000000..2fe01d34b7b --- /dev/null +++ b/libraries/package-extractor/src/scripts/createLinks/utilities/CreateLinksUtilities.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { FileSystem } from '@rushstack/node-core-library'; +import type { IExtractorMetadataJson } from '../../../PackageExtractor'; +import { EXTRACTOR_METADATA_FILENAME } from '../../../PathConstants'; + +export async function getExtractorMetadataAsync(): Promise { + const extractorMetadataPath: string = `${__dirname}/${EXTRACTOR_METADATA_FILENAME}`; + const extractorMetadataJson: string = await FileSystem.readFileAsync(extractorMetadataPath); + const extractorMetadataObject: IExtractorMetadataJson = JSON.parse(extractorMetadataJson); + return extractorMetadataObject; +} diff --git a/libraries/package-extractor/src/scripts/createLinks/utilities/constants.ts b/libraries/package-extractor/src/scripts/createLinks/utilities/constants.ts new file mode 100644 index 00000000000..941b9a423ba --- /dev/null +++ b/libraries/package-extractor/src/scripts/createLinks/utilities/constants.ts @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import os from 'node:os'; +import path from 'node:path'; +import type { TARGET_ROOT_SCRIPT_RELATIVE_PATH_TEMPLATE_STRING as TargetRootScriptRelativePathTemplateString } from '../../../PackageExtractor'; + +/** + * The maximum number of concurrent operations to perform. + */ +export const MAX_CONCURRENCY: number = (os.availableParallelism?.() ?? os.cpus().length) * 2; + +/** + * The name of the action to create symlinks. + */ +export const CREATE_ACTION_NAME: 'create' = 'create'; + +/** + * The name of the action to remove symlinks. + */ +export const REMOVE_ACTION_NAME: 'remove' = 'remove'; + +/** + * The name of the parameter to realize files when creating symlinks. + */ +export const REALIZE_FILES_PARAMETER_NAME: '--realize-files' = '--realize-files'; + +/** + * The name of the parameter to link bins when creating symlinks. + */ +export const LINK_BINS_PARAMETER_NAME: '--link-bins' = '--link-bins'; + +/** + * The name of the parameter to link packages when creating symlinks. The actual value of this + * export is modified after bundling the script to ensure that the extracted version of the script + * contains the relative path from the extraction target folder to the script. Generally, this + * value should not be used directly, but rather the `TARGET_ROOT_FOLDER` export should be used + * instead. + */ +export const TARGET_ROOT_SCRIPT_RELATIVE_PATH: typeof TargetRootScriptRelativePathTemplateString = + '{TARGET_ROOT_SCRIPT_RELATIVE_PATH}'; + +/** + * The path to the root folder where symlinks are created. + */ +export const TARGET_ROOT_FOLDER: string = path.resolve(__dirname, TARGET_ROOT_SCRIPT_RELATIVE_PATH); diff --git a/libraries/package-extractor/webpack.config.js b/libraries/package-extractor/webpack.config.js index a3aa1698dd3..89a6ddf1d87 100644 --- a/libraries/package-extractor/webpack.config.js +++ b/libraries/package-extractor/webpack.config.js @@ -2,7 +2,7 @@ const webpack = require('webpack'); const { PreserveDynamicRequireWebpackPlugin } = require('@rushstack/webpack-preserve-dynamic-require-plugin'); -const PathConstants = require('./lib/PathConstants'); +const { CREATE_LINKS_SCRIPT_FILENAME, SCRIPTS_FOLDER_PATH } = require('./lib/PathConstants'); module.exports = () => { return { @@ -10,13 +10,13 @@ module.exports = () => { mode: 'development', // So the output isn't minified devtool: 'source-map', entry: { - [PathConstants.createLinksScriptFilename]: { - import: `${__dirname}/lib-esnext/scripts/create-links.js`, + [CREATE_LINKS_SCRIPT_FILENAME]: { + import: `${__dirname}/lib-esnext/scripts/createLinks/start.js`, filename: `[name]` } }, output: { - path: PathConstants.scriptsFolderPath, + path: SCRIPTS_FOLDER_PATH, filename: '[name].js', chunkFilename: 'chunks/[name].js', // TODO: Don't allow any chunks to be created library: { @@ -29,6 +29,10 @@ module.exports = () => { new webpack.ids.DeterministicModuleIdsPlugin({ maxLength: 6 }) + ], + ignoreWarnings: [ + // This is included by the 'mz' package which is a dependency of '@pnpm/link-bins' but is unused + /Module not found: Error: Can't resolve 'graceful-fs'/ ] }; }; diff --git a/libraries/rig-package/package.json b/libraries/rig-package/package.json index c47d92c5f1d..67f75b5cf31 100644 --- a/libraries/rig-package/package.json +++ b/libraries/rig-package/package.json @@ -21,8 +21,8 @@ }, "devDependencies": { "local-eslint-config": "workspace:*", - "@rushstack/heft-node-rig": "2.6.31", - "@rushstack/heft": "0.67.2", + "@rushstack/heft-node-rig": "2.6.48", + "@rushstack/heft": "0.68.12", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15", "@types/resolve": "1.20.2", diff --git a/libraries/rush-lib/assets/rush-init/common/config/rush/build-cache.json b/libraries/rush-lib/assets/rush-init/common/config/rush/build-cache.json index 959c69d4ba2..072e9f7d497 100644 --- a/libraries/rush-lib/assets/rush-init/common/config/rush/build-cache.json +++ b/libraries/rush-lib/assets/rush-init/common/config/rush/build-cache.json @@ -34,6 +34,11 @@ */ // "cacheEntryNamePattern": "[projectName:normalize]-[phaseName:normalize]-[hash]" + /** + * (Optional) Salt to inject during calculation of the cache key. This can be used to invalidate the cache for all projects when the salt changes. + */ + // "cacheHashSalt": "1", + /** * Use this configuration with "cacheProvider"="azure-blob-storage" */ @@ -63,7 +68,17 @@ /** * If set to true, allow writing to the cache. Defaults to false. */ - // "isCacheWriteAllowed": true + // "isCacheWriteAllowed": true, + + /** + * The Entra ID login flow to use. Defaults to 'AdoCodespacesAuth' on GitHub Codespaces, 'InteractiveBrowser' otherwise. + */ + // "loginFlow": "InteractiveBrowser", + + /** + * If set to true, reading the cache requires authentication. Defaults to false. + */ + // "readRequiresAuthentication": true }, /** diff --git a/libraries/rush-lib/assets/rush-init/common/config/rush/experiments.json b/libraries/rush-lib/assets/rush-init/common/config/rush/experiments.json index 8bc016fb1d2..605e320a4c9 100644 --- a/libraries/rush-lib/assets/rush-init/common/config/rush/experiments.json +++ b/libraries/rush-lib/assets/rush-init/common/config/rush/experiments.json @@ -102,5 +102,20 @@ /** * When using cobuilds, this experiment allows uncacheable operations to benefit from cobuild orchestration without using the build cache. */ - /*[LINE "HYPOTHETICAL"]*/ "allowCobuildWithoutCache": true + /*[LINE "HYPOTHETICAL"]*/ "allowCobuildWithoutCache": true, + + /** + * By default, rush perform a full scan of the entire repository. For example, Rush runs `git status` to check for local file changes. + * When this toggle is enabled, Rush will only scan specific paths, significantly speeding up Git operations. + */ + /*[LINE "HYPOTHETICAL"]*/ "enableSubpathScan": true, + + /** + * Rush has a policy that normally requires Rush projects to specify `workspace:*` in package.json when depending + * on other projects in the workspace, unless they are explicitly declared as `decoupledLocalDependencies` + * in rush.json. Enabling this experiment will remove that requirement for dependencies belonging to a different + * subspace. This is useful for large product groups who work in separate subspaces and generally prefer to consume + * each other's packages via the NPM registry. + */ + /*[LINE "HYPOTHETICAL"]*/ "exemptDecoupledDependenciesBetweenSubspaces": false } diff --git a/libraries/rush-lib/assets/rush-init/common/config/rush/pnpm-config.json b/libraries/rush-lib/assets/rush-init/common/config/rush/pnpm-config.json index 1e8df292ef2..1f9e1ab6065 100644 --- a/libraries/rush-lib/assets/rush-init/common/config/rush/pnpm-config.json +++ b/libraries/rush-lib/assets/rush-init/common/config/rush/pnpm-config.json @@ -1,6 +1,11 @@ /** * This configuration file provides settings specific to the PNPM package manager. * More documentation is available on the Rush website: https://rushjs.io + * + * Rush normally looks for this file in `common/config/rush/pnpm-config.json`. However, + * if `subspacesEnabled` is true in subspaces.json, then Rush will instead first look + * for `common/config/subspaces//pnpm-config.json`. (If the file exists in both places, + * then the file under `common/config/rush` is ignored.) */ { "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/pnpm-config.schema.json", @@ -269,6 +274,21 @@ /*[LINE "HYPOTHETICAL"]*/ "fsevents" ], + /** + * The `globalIgnoredOptionalDependencies` setting suppresses the installation of optional NPM + * dependencies specified in the list. This is useful when certain optional dependencies are + * not needed in your environment, such as platform-specific packages or dependencies that + * fail during installation but are not critical to your project. + * These settings are copied into the `pnpm.overrides` field of the `common/temp/package.json` + * file that is generated by Rush during installation, instructing PNPM to ignore the specified + * optional dependencies. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmignoredoptionaldependencies + */ + "globalIgnoredOptionalDependencies": [ + /*[LINE "HYPOTHETICAL"]*/ "fsevents" + ], + /** * The `globalAllowedDeprecatedVersions` setting suppresses installation warnings for package * versions that the NPM registry reports as being deprecated. This is useful if the diff --git a/libraries/rush-lib/package.json b/libraries/rush-lib/package.json index ae8eef33315..4b51937657f 100644 --- a/libraries/rush-lib/package.json +++ b/libraries/rush-lib/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/rush-lib", - "version": "5.138.0", + "version": "5.148.0", "description": "A library for writing scripts that interact with the Rush tool", "repository": { "type": "git", @@ -29,7 +29,8 @@ }, "license": "MIT", "dependencies": { - "@pnpm/dependency-path": "~2.1.2", + "@pnpm/dependency-path-lockfile-pre-v9": "npm:@pnpm/dependency-path@~2.1.2", + "@pnpm/dependency-path": "~5.1.7", "@pnpm/link-bins": "~5.3.7", "@rushstack/heft-config-file": "workspace:*", "@rushstack/lookup-by-path": "workspace:*", @@ -40,7 +41,6 @@ "@rushstack/stream-collator": "workspace:*", "@rushstack/terminal": "workspace:*", "@rushstack/ts-command-line": "workspace:*", - "@types/node-fetch": "2.6.2", "@yarnpkg/lockfile": "~1.0.2", "builtin-modules": "~3.1.0", "cli-table": "~0.3.1", @@ -53,7 +53,6 @@ "ignore": "~5.1.6", "inquirer": "~7.3.3", "js-yaml": "~3.13.1", - "node-fetch": "2.6.7", "npm-check": "~6.0.1", "npm-package-arg": "~6.1.0", "read-package-tree": "~5.1.5", @@ -68,6 +67,7 @@ "pnpm-sync-lib": "0.2.9" }, "devDependencies": { + "@pnpm/lockfile.types": "~1.0.3", "@pnpm/logger": "4.0.0", "local-node-rig": "workspace:*", "@rushstack/heft-webpack5-plugin": "workspace:*", diff --git a/libraries/rush-lib/src/api/BuildCacheConfiguration.ts b/libraries/rush-lib/src/api/BuildCacheConfiguration.ts index c90a1aecce4..57c47661b33 100644 --- a/libraries/rush-lib/src/api/BuildCacheConfiguration.ts +++ b/libraries/rush-lib/src/api/BuildCacheConfiguration.ts @@ -42,6 +42,10 @@ export interface IBaseBuildCacheJson { * The token parser is in CacheEntryId.ts */ cacheEntryNamePattern?: string; + /** + * An optional salt to inject during calculation of the cache key. This can be used to invalidate the cache for all projects when the salt changes. + */ + cacheHashSalt?: string; } /** @@ -102,6 +106,10 @@ export class BuildCacheConfiguration { * The provider for interacting with the cloud build cache, if configured. */ public readonly cloudCacheProvider: ICloudBuildCacheProvider | undefined; + /** + * An optional salt to inject during calculation of the cache key. This can be used to invalidate the cache for all projects when the salt changes. + */ + public readonly cacheHashSalt: string | undefined; private constructor({ getCacheEntryId, @@ -120,6 +128,7 @@ export class BuildCacheConfiguration { rushConfiguration: rushConfiguration }); this.cloudCacheProvider = cloudCacheProvider; + this.cacheHashSalt = buildCacheJson.cacheHashSalt; } /** diff --git a/libraries/rush-lib/src/api/ExperimentsConfiguration.ts b/libraries/rush-lib/src/api/ExperimentsConfiguration.ts index e9a6f46bec0..505aaf8a044 100644 --- a/libraries/rush-lib/src/api/ExperimentsConfiguration.ts +++ b/libraries/rush-lib/src/api/ExperimentsConfiguration.ts @@ -113,6 +113,21 @@ export interface IExperimentsJson { * This is useful when you want to speed up operations that can't (or shouldn't) be cached. */ allowCobuildWithoutCache?: boolean; + + /** + * By default, rush perform a full scan of the entire repository. For example, Rush runs `git status` to check for local file changes. + * When this toggle is enabled, Rush will only scan specific paths, significantly speeding up Git operations. + */ + enableSubpathScan?: boolean; + + /** + * Rush has a policy that normally requires Rush projects to specify `workspace:*` in package.json when depending + * on other projects in the workspace, unless they are explicitly declared as `decoupledLocalDependencies` + * in rush.json. Enabling this experiment will remove that requirement for dependencies belonging to a different + * subspace. This is useful for large product groups who work in separate subspaces and generally prefer to consume + * each other's packages via the NPM registry. + */ + exemptDecoupledDependenciesBetweenSubspaces?: boolean; } const _EXPERIMENTS_JSON_SCHEMA: JsonSchema = JsonSchema.fromLoadedObject(schemaJson); diff --git a/libraries/rush-lib/src/api/RushConfiguration.ts b/libraries/rush-lib/src/api/RushConfiguration.ts index deee29cb4ae..feac52b0c18 100644 --- a/libraries/rush-lib/src/api/RushConfiguration.ts +++ b/libraries/rush-lib/src/api/RushConfiguration.ts @@ -251,6 +251,11 @@ export class RushConfiguration { */ public readonly packageManager!: PackageManagerName; + /** + * If true, the repository is using PNPM as its package manager. + */ + public readonly isPnpm!: boolean; + /** * {@inheritdoc PackageManager} * @@ -698,16 +703,20 @@ export class RushConfiguration { // TODO: Add an actual "packageManager" field in rush.json const packageManagerFields: string[] = []; + this.isPnpm = false; if (rushConfigurationJson.npmVersion) { this.packageManager = 'npm'; this.packageManagerOptions = this.npmOptions; packageManagerFields.push('npmVersion'); } + if (rushConfigurationJson.pnpmVersion) { this.packageManager = 'pnpm'; + this.isPnpm = true; this.packageManagerOptions = this.pnpmOptions; packageManagerFields.push('pnpmVersion'); } + if (rushConfigurationJson.yarnVersion) { this.packageManager = 'yarn'; this.packageManagerOptions = this.yarnOptions; diff --git a/libraries/rush-lib/src/api/RushProjectConfiguration.ts b/libraries/rush-lib/src/api/RushProjectConfiguration.ts index 5c6b60ff73b..be7af0597a4 100644 --- a/libraries/rush-lib/src/api/RushProjectConfiguration.ts +++ b/libraries/rush-lib/src/api/RushProjectConfiguration.ts @@ -3,7 +3,7 @@ import { AlreadyReportedError, Async, Path } from '@rushstack/node-core-library'; import type { ITerminal } from '@rushstack/terminal'; -import { ConfigurationFile, InheritanceType } from '@rushstack/heft-config-file'; +import { ProjectConfigurationFile, InheritanceType } from '@rushstack/heft-config-file'; import { RigConfig } from '@rushstack/rig-package'; import type { RushConfigurationProject } from './RushConfigurationProject'; @@ -147,8 +147,8 @@ interface IOldRushProjectJson { buildCacheOptions?: unknown; } -const RUSH_PROJECT_CONFIGURATION_FILE: ConfigurationFile = - new ConfigurationFile({ +const RUSH_PROJECT_CONFIGURATION_FILE: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: `config/${RushConstants.rushProjectConfigFilename}`, jsonSchemaObject: schemaJson, propertyInheritance: { @@ -230,8 +230,8 @@ const RUSH_PROJECT_CONFIGURATION_FILE: ConfigurationFile = } }); -const OLD_RUSH_PROJECT_CONFIGURATION_FILE: ConfigurationFile = - new ConfigurationFile({ +const OLD_RUSH_PROJECT_CONFIGURATION_FILE: ProjectConfigurationFile = + new ProjectConfigurationFile({ projectRelativeFilePath: RUSH_PROJECT_CONFIGURATION_FILE.projectRelativeFilePath, jsonSchemaObject: anythingSchemaJson }); diff --git a/libraries/rush-lib/src/api/Subspace.ts b/libraries/rush-lib/src/api/Subspace.ts index 0d08f19489f..34476e5046c 100644 --- a/libraries/rush-lib/src/api/Subspace.ts +++ b/libraries/rush-lib/src/api/Subspace.ts @@ -75,11 +75,10 @@ export class Subspace { public getPnpmOptions(): PnpmOptionsConfiguration | undefined { if (!this._cachedPnpmOptionsInitialized) { // Calculate these outside the try/catch block since their error messages shouldn't be annotated: - const subspaceConfigFolder: string = this.getSubspaceConfigFolderPath(); const subspaceTempFolder: string = this.getSubspaceTempFolderPath(); try { this._cachedPnpmOptions = PnpmOptionsConfiguration.loadFromJsonFileOrThrow( - `${subspaceConfigFolder}/${RushConstants.pnpmConfigFilename}`, + this.getPnpmConfigFilePath(), subspaceTempFolder ); this._cachedPnpmOptionsInitialized = true; @@ -207,7 +206,6 @@ export class Subspace { * - Lockfiles: (i.e. - `pnpm-lock.yaml`, `npm-shrinkwrap.json`, `yarn.lock`, etc) * - 'common-versions.json' * - 'pnpmfile.js'/'.pnpmfile.cjs' - * - 'pnpm-config.js' */ public getVariantDependentSubspaceConfigFolderPath(variant: string | undefined): string { const subspaceConfigFolderPath: string = this.getSubspaceConfigFolderPath(); @@ -303,8 +301,8 @@ export class Subspace { * Example: `C:\MyRepo\common\subspaces\my-subspace\pnpm-config.json` * @beta */ - public getPnpmConfigFilePath(variant?: string): string { - return this.getVariantDependentSubspaceConfigFolderPath(variant) + '/' + RushConstants.pnpmConfigFilename; + public getPnpmConfigFilePath(): string { + return this.getSubspaceConfigFolderPath() + '/' + RushConstants.pnpmConfigFilename; } /** @@ -328,16 +326,14 @@ export class Subspace { * @beta */ public shouldEnsureConsistentVersions(variant?: string): boolean { - // If the subspaces feature is enabled, or the ensureConsistentVersions field is defined, return the value of the field - if (this._rushConfiguration.subspacesFeatureEnabled) { - const commonVersions: CommonVersionsConfiguration = this.getCommonVersions(variant); - if (commonVersions.ensureConsistentVersions !== undefined) { - return commonVersions.ensureConsistentVersions; - } + // If the ensureConsistentVersions field is defined, return the value of the field + const commonVersions: CommonVersionsConfiguration = this.getCommonVersions(variant); + if (commonVersions.ensureConsistentVersions !== undefined) { + return commonVersions.ensureConsistentVersions; } - // Fallback to ensureConsistentVersions in rush.json if subspaces is not enabled, - // or if the setting is not defined in the common-versions.json file + // Fallback to ensureConsistentVersions in rush.json if the setting is not defined in + // the common-versions.json file return this._rushConfiguration.ensureConsistentVersions; } diff --git a/libraries/rush-lib/src/cli/RushXCommandLine.ts b/libraries/rush-lib/src/cli/RushXCommandLine.ts index ee7ddad1115..a5a49f964fc 100644 --- a/libraries/rush-lib/src/cli/RushXCommandLine.ts +++ b/libraries/rush-lib/src/cli/RushXCommandLine.ts @@ -224,7 +224,7 @@ export class RushXCommandLine { }); const terminal: ITerminal = new Terminal(terminalProvider); - if (rushConfiguration?.packageManager === 'pnpm' && rushConfiguration?.experimentsConfiguration) { + if (rushConfiguration?.isPnpm && rushConfiguration?.experimentsConfiguration) { const { configuration: experiments } = rushConfiguration?.experimentsConfiguration; if (experiments?.usePnpmSyncForInjectedDependencies) { diff --git a/libraries/rush-lib/src/cli/actions/BaseInstallAction.ts b/libraries/rush-lib/src/cli/actions/BaseInstallAction.ts index 82865908a69..45b9507d710 100644 --- a/libraries/rush-lib/src/cli/actions/BaseInstallAction.ts +++ b/libraries/rush-lib/src/cli/actions/BaseInstallAction.ts @@ -244,6 +244,7 @@ export abstract class BaseInstallAction extends BaseRushAction { console.log(Colorize.green(`Installing for subspace: ${subspace.subspaceName}`)); let installManagerOptionsForInstall: IInstallManagerOptions; if (subspaceInstallationData) { + // This will install the selected of projects in the subspace const { selectedProjects, pnpmFilterArgumentValues } = subspaceInstallationData; installManagerOptionsForInstall = { ...installManagerOptions, @@ -262,8 +263,10 @@ export abstract class BaseInstallAction extends BaseRushAction { subspace }; } else { + // This will install all projects in the subspace installManagerOptionsForInstall = { ...installManagerOptions, + pnpmFilterArgumentValues: [], subspace }; } diff --git a/libraries/rush-lib/src/cli/actions/DeployAction.ts b/libraries/rush-lib/src/cli/actions/DeployAction.ts index c254184840e..5f67445dc8a 100644 --- a/libraries/rush-lib/src/cli/actions/DeployAction.ts +++ b/libraries/rush-lib/src/cli/actions/DeployAction.ts @@ -159,7 +159,7 @@ export class DeployAction extends BaseRushAction { } const projects: RushConfigurationProject[] = this.rushConfiguration.projects; - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { const currentlyInstalledVariant: string | undefined = await this.rushConfiguration.getCurrentlyInstalledVariantAsync(); for (const project of projects) { diff --git a/libraries/rush-lib/src/cli/actions/InstallAction.ts b/libraries/rush-lib/src/cli/actions/InstallAction.ts index 945c12337ca..51835887cd0 100644 --- a/libraries/rush-lib/src/cli/actions/InstallAction.ts +++ b/libraries/rush-lib/src/cli/actions/InstallAction.ts @@ -49,7 +49,7 @@ export class InstallAction extends BaseInstallAction { description: `Only check the validity of the shrinkwrap file without performing an install.` }); - if (this.rushConfiguration?.packageManager === 'pnpm') { + if (this.rushConfiguration?.isPnpm) { this._resolutionOnlyParameter = this.defineFlagParameter({ parameterLongName: '--resolution-only', description: `Only perform dependency resolution, useful for ensuring peer dependendencies are up to date. Note that this flag is only supported when using the pnpm package manager.` diff --git a/libraries/rush-lib/src/cli/actions/PublishAction.ts b/libraries/rush-lib/src/cli/actions/PublishAction.ts index 12170823a0f..1f3cf062a7b 100644 --- a/libraries/rush-lib/src/cli/actions/PublishAction.ts +++ b/libraries/rush-lib/src/cli/actions/PublishAction.ts @@ -239,7 +239,7 @@ export class PublishAction extends BaseRushAction { this._validate(); - this._addNpmPublishHome(); + this._addNpmPublishHome(this.rushConfiguration.isPnpm); const git: Git = new Git(this.rushConfiguration); const publishGit: PublishGit = new PublishGit(git, this._targetBranch.value); @@ -455,7 +455,7 @@ export class PublishAction extends BaseRushAction { args.push(`--access`, this._npmAccessLevel.value); } - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { // PNPM 4.11.0 introduced a feature that may interrupt publishing and prompt the user for input. // See this issue for details: https://github.com/microsoft/rushstack/issues/1940 args.push('--no-git-checks'); @@ -582,7 +582,7 @@ export class PublishAction extends BaseRushAction { } } - private _addNpmPublishHome(): void { + private _addNpmPublishHome(supportEnvVarFallbackSyntax: boolean): void { // Create "common\temp\publish-home" folder, if it doesn't exist Utilities.createFolderWithRetry(this._targetNpmrcPublishFolder); @@ -590,7 +590,8 @@ export class PublishAction extends BaseRushAction { Utilities.syncNpmrc({ sourceNpmrcFolder: this.rushConfiguration.commonRushConfigFolder, targetNpmrcFolder: this._targetNpmrcPublishFolder, - useNpmrcPublish: true + useNpmrcPublish: true, + supportEnvVarFallbackSyntax }); } diff --git a/libraries/rush-lib/src/cli/actions/VersionAction.ts b/libraries/rush-lib/src/cli/actions/VersionAction.ts index 54070750902..b9300c30871 100644 --- a/libraries/rush-lib/src/cli/actions/VersionAction.ts +++ b/libraries/rush-lib/src/cli/actions/VersionAction.ts @@ -216,8 +216,8 @@ export class VersionAction extends BaseRushAction { // Validate result of all subspaces for (const subspace of rushConfig.subspaces) { // Respect the `ensureConsistentVersions` field in rush.json - if (!subspace.shouldEnsureConsistentVersions) { - return; + if (!subspace.shouldEnsureConsistentVersions(variant)) { + continue; } const mismatchFinder: VersionMismatchFinder = VersionMismatchFinder.getMismatches(rushConfig, { diff --git a/libraries/rush-lib/src/cli/parsing/ParseParallelism.ts b/libraries/rush-lib/src/cli/parsing/ParseParallelism.ts index f89216f8307..ea2aed70e35 100644 --- a/libraries/rush-lib/src/cli/parsing/ParseParallelism.ts +++ b/libraries/rush-lib/src/cli/parsing/ParseParallelism.ts @@ -9,7 +9,7 @@ import * as os from 'os'; */ export function parseParallelism( rawParallelism: string | undefined, - numberOfCores: number = os.cpus().length + numberOfCores: number = os.availableParallelism?.() ?? os.cpus().length ): number { if (rawParallelism) { if (rawParallelism === 'max') { diff --git a/libraries/rush-lib/src/cli/scriptActions/PhasedScriptAction.ts b/libraries/rush-lib/src/cli/scriptActions/PhasedScriptAction.ts index e37701e73a0..0cb0b85ccff 100644 --- a/libraries/rush-lib/src/cli/scriptActions/PhasedScriptAction.ts +++ b/libraries/rush-lib/src/cli/scriptActions/PhasedScriptAction.ts @@ -38,12 +38,16 @@ import { ShellOperationRunnerPlugin } from '../../logic/operations/ShellOperatio import { Event } from '../../api/EventHooks'; import { ProjectChangeAnalyzer } from '../../logic/ProjectChangeAnalyzer'; import { OperationStatus } from '../../logic/operations/OperationStatus'; -import type { IExecutionResult } from '../../logic/operations/IOperationExecutionResult'; +import type { + IExecutionResult, + IOperationExecutionResult +} from '../../logic/operations/IOperationExecutionResult'; import { OperationResultSummarizerPlugin } from '../../logic/operations/OperationResultSummarizerPlugin'; import type { ITelemetryData, ITelemetryOperationResult } from '../../logic/Telemetry'; import { parseParallelism } from '../parsing/ParseParallelism'; import { CobuildConfiguration } from '../../api/CobuildConfiguration'; import { CacheableOperationPlugin } from '../../logic/operations/CacheableOperationPlugin'; +import type { IInputsSnapshot, GetInputsSnapshotAsyncFn } from '../../logic/incremental/InputsSnapshot'; import { RushProjectConfiguration } from '../../api/RushProjectConfiguration'; import { LegacySkipPlugin } from '../../logic/operations/LegacySkipPlugin'; import { ValidateOperationsPlugin } from '../../logic/operations/ValidateOperationsPlugin'; @@ -52,6 +56,7 @@ import type { ProjectWatcher } from '../../logic/ProjectWatcher'; import { FlagFile } from '../../api/FlagFile'; import { WeightedOperationPlugin } from '../../logic/operations/WeightedOperationPlugin'; import { getVariantAsync, VARIANT_PARAMETER } from '../../api/Variants'; +import { Selection } from '../../logic/Selection'; /** * Constructor parameters for PhasedScriptAction. @@ -80,7 +85,8 @@ interface IInitialRunPhasesOptions { } interface IRunPhasesOptions extends IInitialRunPhasesOptions { - initialState: ProjectChangeAnalyzer; + getInputsSnapshotAsync: GetInputsSnapshotAsyncFn | undefined; + initialSnapshot: IInputsSnapshot | undefined; executionManagerOptions: IOperationExecutionManagerOptions; } @@ -189,13 +195,13 @@ export class PhasedScriptAction extends BaseScriptAction { ' to specify a count that is equal to the number of CPU cores. If this parameter is omitted,' + ' then the default value depends on the operating system and number of CPU cores.' }); - this._timelineParameter = this.defineFlagParameter({ - parameterLongName: '--timeline', - description: - 'After the build is complete, print additional statistics and CPU usage information,' + - ' including an ASCII chart of the start and stop times for each operation.' - }); } + this._timelineParameter = this.defineFlagParameter({ + parameterLongName: '--timeline', + description: + 'After the build is complete, print additional statistics and CPU usage information,' + + ' including an ASCII chart of the start and stop times for each operation.' + }); this._cobuildPlanParameter = this.defineFlagParameter({ parameterLongName: '--log-cobuild-plan', description: @@ -460,20 +466,20 @@ export class PhasedScriptAction extends BaseScriptAction { } const { configuration: experiments } = this.rushConfiguration.experimentsConfiguration; - if ( - this.rushConfiguration?.packageManager === 'pnpm' && - experiments?.usePnpmSyncForInjectedDependencies - ) { + if (this.rushConfiguration?.isPnpm && experiments?.usePnpmSyncForInjectedDependencies) { const { PnpmSyncCopyOperationPlugin } = await import( '../../logic/operations/PnpmSyncCopyOperationPlugin' ); new PnpmSyncCopyOperationPlugin(terminal).apply(this.hooks); } + const relevantProjects: Set = + Selection.expandAllDependencies(projectSelection); + const projectConfigurations: ReadonlyMap = this ._runsBeforeInstall ? new Map() - : await RushProjectConfiguration.tryLoadForProjectsAsync(projectSelection, terminal); + : await RushProjectConfiguration.tryLoadForProjectsAsync(relevantProjects, terminal); const initialCreateOperationsContext: ICreateOperationsContext = { buildCacheConfiguration, @@ -536,24 +542,35 @@ export class PhasedScriptAction extends BaseScriptAction { terminal } = options; + const { projectConfigurations } = initialCreateOperationsContext; + const { projectSelection } = initialCreateOperationsContext; + const operations: Set = await this.hooks.createOperations.promise( new Set(), initialCreateOperationsContext ); - const projectChangeAnalyzer: ProjectChangeAnalyzer = new ProjectChangeAnalyzer(this.rushConfiguration); - terminal.write('Analyzing repo state... '); const repoStateStopwatch: Stopwatch = new Stopwatch(); repoStateStopwatch.start(); - await projectChangeAnalyzer._ensureInitializedAsync(terminal); + + const analyzer: ProjectChangeAnalyzer = new ProjectChangeAnalyzer(this.rushConfiguration); + const getInputsSnapshotAsync: GetInputsSnapshotAsyncFn | undefined = + await analyzer._tryGetSnapshotProviderAsync( + projectConfigurations, + terminal, + // We need to include all dependencies, otherwise build cache id calculation will be incorrect + Selection.expandAllDependencies(projectSelection) + ); + const initialSnapshot: IInputsSnapshot | undefined = await getInputsSnapshotAsync?.(); + repoStateStopwatch.stop(); terminal.writeLine(`DONE (${repoStateStopwatch.toString()})`); terminal.writeLine(); const initialExecuteOperationsContext: IExecuteOperationsContext = { ...initialCreateOperationsContext, - projectChangeAnalyzer + inputsSnapshot: initialSnapshot }; const executionManagerOptions: IOperationExecutionManagerOptions = { @@ -577,7 +594,8 @@ export class PhasedScriptAction extends BaseScriptAction { return { ...options, executionManagerOptions, - initialState: projectChangeAnalyzer + getInputsSnapshotAsync, + initialSnapshot }; } @@ -652,26 +670,40 @@ export class PhasedScriptAction extends BaseScriptAction { * 3) Goto (1) */ private async _runWatchPhasesAsync(options: IRunPhasesOptions): Promise { - const { initialState, initialCreateOperationsContext, executionManagerOptions, stopwatch, terminal } = - options; + const { + getInputsSnapshotAsync, + initialSnapshot, + initialCreateOperationsContext, + executionManagerOptions, + stopwatch, + terminal + } = options; const phaseOriginal: Set = new Set(this._watchPhases); const phaseSelection: Set = new Set(this._watchPhases); const { projectSelection: projectsToWatch } = initialCreateOperationsContext; + if (!getInputsSnapshotAsync || !initialSnapshot) { + terminal.writeErrorLine( + `Cannot watch for changes if the Rush repo is not in a Git repository, exiting.` + ); + throw new AlreadyReportedError(); + } + // Use async import so that we don't pay the cost for sync builds const { ProjectWatcher } = await import( /* webpackChunkName: 'ProjectWatcher' */ '../../logic/ProjectWatcher' ); - const projectWatcher: ProjectWatcher = new ProjectWatcher({ + const projectWatcher: typeof ProjectWatcher.prototype = new ProjectWatcher({ + getInputsSnapshotAsync, + initialSnapshot, debounceMs: this._watchDebounceMs, rushConfiguration: this.rushConfiguration, projectsToWatch, - terminal, - initialState + terminal }); // Ensure process.stdin allows interactivity before using TTY-only APIs @@ -704,7 +736,8 @@ export class PhasedScriptAction extends BaseScriptAction { // eslint-disable-next-line no-constant-condition while (true) { // On the initial invocation, this promise will return immediately with the full set of projects - const { changedProjects, state } = await projectWatcher.waitForChangeAsync(onWaitingForChanges); + const { changedProjects, inputsSnapshot: state } = + await projectWatcher.waitForChangeAsync(onWaitingForChanges); if (stopwatch.state === StopwatchState.Stopped) { // Clear and reset the stopwatch so that we only report time from a single execution at a time @@ -724,7 +757,7 @@ export class PhasedScriptAction extends BaseScriptAction { const executeOperationsContext: IExecuteOperationsContext = { ...initialCreateOperationsContext, isInitial: false, - projectChangeAnalyzer: state, + inputsSnapshot: state, projectsInUnknownState: changedProjects, phaseOriginal, phaseSelection, @@ -774,7 +807,7 @@ export class PhasedScriptAction extends BaseScriptAction { executionManagerOptions ); - const { isInitial, isWatch } = options.executeOperationsContext; + const { isInitial, isWatch, cobuildConfiguration } = options.executeOperationsContext; let success: boolean = false; let result: IExecutionResult | undefined; @@ -817,7 +850,7 @@ export class PhasedScriptAction extends BaseScriptAction { } if (this.parser.telemetry) { - const operationResults: Record = {}; + const jsonOperationResults: Record = {}; const extraData: IPhasedCommandTelemetry = { // Fields preserved across the command invocation @@ -838,6 +871,8 @@ export class PhasedScriptAction extends BaseScriptAction { }; if (result) { + const { operationResults } = result; + const nonSilentDependenciesByOperation: Map> = new Map(); function getNonSilentDependencies(operation: Operation): ReadonlySet { let realDependencies: Set | undefined = nonSilentDependenciesByOperation.get(operation); @@ -845,7 +880,9 @@ export class PhasedScriptAction extends BaseScriptAction { realDependencies = new Set(); nonSilentDependenciesByOperation.set(operation, realDependencies); for (const dependency of operation.dependencies) { - if (dependency.runner!.silent) { + const dependencyRecord: IOperationExecutionResult | undefined = + operationResults.get(dependency); + if (dependencyRecord?.silent) { for (const deepDependency of getNonSilentDependencies(dependency)) { realDependencies.add(deepDependency); } @@ -857,17 +894,20 @@ export class PhasedScriptAction extends BaseScriptAction { return realDependencies; } - for (const [operation, operationResult] of result.operationResults) { - if (operation.runner?.silent) { + for (const [operation, operationResult] of operationResults) { + if (operationResult.silent) { // Architectural operation. Ignore. continue; } const { startTime, endTime } = operationResult.stopwatch; - operationResults[operation.name!] = { + jsonOperationResults[operation.name!] = { startTimestampMs: startTime, endTimestampMs: endTime, nonCachedDurationMs: operationResult.nonCachedDurationMs, + wasExecutedOnThisMachine: + !operationResult.cobuildRunnerId || + operationResult.cobuildRunnerId === cobuildConfiguration?.cobuildRunnerId, result: operationResult.status, dependencies: Array.from(getNonSilentDependencies(operation)).sort() }; @@ -907,7 +947,7 @@ export class PhasedScriptAction extends BaseScriptAction { durationInSeconds: stopwatch.duration, result: success ? 'Succeeded' : 'Failed', extraData, - operationResults + operationResults: jsonOperationResults }; this.hooks.beforeLog.call(logEntry); diff --git a/libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts b/libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts index b14510c8dee..6316c8fe6ce 100644 --- a/libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts +++ b/libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts @@ -7,10 +7,16 @@ jest.mock(`@rushstack/package-deps-hash`, () => { return dir; }, getRepoStateAsync(): ReadonlyMap { - return new Map(); + return new Map([['common/config/rush/npm-shrinkwrap.json', 'hash']]); }, getRepoChangesAsync(): ReadonlyMap { return new Map(); + }, + getGitHashForFiles(filePaths: Iterable): ReadonlyMap { + return new Map(Array.from(filePaths, (filePath: string) => [filePath, filePath])); + }, + hashFilesAsync(rootDirectory: string, filePaths: Iterable): ReadonlyMap { + return new Map(Array.from(filePaths, (filePath: string) => [filePath, filePath])); } }; }); diff --git a/libraries/rush-lib/src/index.ts b/libraries/rush-lib/src/index.ts index f7d2e9a2278..e3c5e19c20e 100644 --- a/libraries/rush-lib/src/index.ts +++ b/libraries/rush-lib/src/index.ts @@ -121,11 +121,12 @@ export { CustomTipType } from './api/CustomTipsConfiguration'; -export { - ProjectChangeAnalyzer, - type IGetChangedProjectsOptions, - type IRawRepoState as _IRawRepoState -} from './logic/ProjectChangeAnalyzer'; +export { ProjectChangeAnalyzer, type IGetChangedProjectsOptions } from './logic/ProjectChangeAnalyzer'; +export type { + IInputsSnapshot, + GetInputsSnapshotAsyncFn as GetInputsSnapshotAsyncFn, + IRushConfigurationProjectForSnapshot +} from './logic/incremental/InputsSnapshot'; export type { IOperationRunner, IOperationRunnerContext } from './logic/operations/IOperationRunner'; export type { diff --git a/libraries/rush-lib/src/logic/Autoinstaller.ts b/libraries/rush-lib/src/logic/Autoinstaller.ts index 3b04e6c0cca..8dd5b0e4dbf 100644 --- a/libraries/rush-lib/src/logic/Autoinstaller.ts +++ b/libraries/rush-lib/src/logic/Autoinstaller.ts @@ -137,7 +137,8 @@ export class Autoinstaller { // Copy: .../common/autoinstallers/my-task/.npmrc Utilities.syncNpmrc({ sourceNpmrcFolder: this._rushConfiguration.commonRushConfigFolder, - targetNpmrcFolder: autoinstallerFullPath + targetNpmrcFolder: autoinstallerFullPath, + supportEnvVarFallbackSyntax: this._rushConfiguration.isPnpm }); this._logIfConsoleOutputIsNotRestricted( @@ -193,7 +194,7 @@ export class Autoinstaller { oldFileContents = FileSystem.readFile(this.shrinkwrapFilePath, { convertLineEndings: NewlineKind.Lf }); this._logIfConsoleOutputIsNotRestricted('Deleting ' + this.shrinkwrapFilePath); await FileSystem.deleteFileAsync(this.shrinkwrapFilePath); - if (this._rushConfiguration.packageManager === 'pnpm') { + if (this._rushConfiguration.isPnpm) { // Workaround for https://github.com/pnpm/pnpm/issues/1890 // // When "rush update-autoinstaller" is run, Rush deletes "common/autoinstallers/my-task/pnpm-lock.yaml" @@ -222,7 +223,8 @@ export class Autoinstaller { Utilities.syncNpmrc({ sourceNpmrcFolder: this._rushConfiguration.commonRushConfigFolder, - targetNpmrcFolder: this.folderFullPath + targetNpmrcFolder: this.folderFullPath, + supportEnvVarFallbackSyntax: this._rushConfiguration.isPnpm }); await Utilities.executeCommandAsync({ diff --git a/libraries/rush-lib/src/logic/InstallManagerFactory.ts b/libraries/rush-lib/src/logic/InstallManagerFactory.ts index 1bb46cb9d9d..f68de2d8c0c 100644 --- a/libraries/rush-lib/src/logic/InstallManagerFactory.ts +++ b/libraries/rush-lib/src/logic/InstallManagerFactory.ts @@ -17,7 +17,7 @@ export class InstallManagerFactory { options: IInstallManagerOptions ): Promise { if ( - rushConfiguration.packageManager === 'pnpm' && + rushConfiguration.isPnpm && rushConfiguration.pnpmOptions && rushConfiguration.pnpmOptions.useWorkspaces ) { diff --git a/libraries/rush-lib/src/logic/NodeJsCompatibility.ts b/libraries/rush-lib/src/logic/NodeJsCompatibility.ts index c103181d7d2..5290f454ee6 100644 --- a/libraries/rush-lib/src/logic/NodeJsCompatibility.ts +++ b/libraries/rush-lib/src/logic/NodeJsCompatibility.ts @@ -16,7 +16,7 @@ import { RushConstants } from './RushConstants'; * LTS schedule: https://nodejs.org/en/about/releases/ * LTS versions: https://nodejs.org/en/download/releases/ */ -const UPCOMING_NODE_LTS_VERSION: number = 20; +const UPCOMING_NODE_LTS_VERSION: number = 22; const nodeVersion: string = process.versions.node; const nodeMajorVersion: number = semver.major(nodeVersion); diff --git a/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts b/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts index acda3b3ccd8..a2adc060d5b 100644 --- a/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts +++ b/libraries/rush-lib/src/logic/ProjectChangeAnalyzer.ts @@ -2,27 +2,31 @@ // See LICENSE in the project root for license information. import * as path from 'path'; -import * as crypto from 'crypto'; import ignore, { type Ignore } from 'ignore'; +import type { IReadonlyLookupByPath, LookupByPath } from '@rushstack/lookup-by-path'; +import { Path, FileSystem, Async, AlreadyReportedError } from '@rushstack/node-core-library'; import { getRepoChanges, getRepoRoot, getRepoStateAsync, + hashFilesAsync, type IFileDiffStatus } from '@rushstack/package-deps-hash'; -import { Path, FileSystem, Async } from '@rushstack/node-core-library'; import type { ITerminal } from '@rushstack/terminal'; import type { RushConfiguration } from '../api/RushConfiguration'; import { RushProjectConfiguration } from '../api/RushProjectConfiguration'; -import { Git } from './Git'; -import { BaseProjectShrinkwrapFile } from './base/BaseProjectShrinkwrapFile'; import type { RushConfigurationProject } from '../api/RushConfigurationProject'; -import { RushConstants } from './RushConstants'; -import type { LookupByPath } from '@rushstack/lookup-by-path'; +import { BaseProjectShrinkwrapFile } from './base/BaseProjectShrinkwrapFile'; import { PnpmShrinkwrapFile } from './pnpm/PnpmShrinkwrapFile'; -import { UNINITIALIZED } from '../utilities/Utilities'; +import { Git } from './Git'; +import { + type IInputsSnapshotProjectMetadata, + type IInputsSnapshot, + InputsSnapshot, + type GetInputsSnapshotAsyncFn +} from './incremental/InputsSnapshot'; /** * @beta @@ -46,12 +50,6 @@ export interface IGetChangedProjectsOptions { enableFiltering: boolean; } -interface IGitState { - gitPath: string; - hashes: Map; - rootDir: string; -} - /** * @internal */ @@ -65,13 +63,6 @@ export interface IRawRepoState { * @beta */ export class ProjectChangeAnalyzer { - /** - * UNINITIALIZED === we haven't looked - * undefined === data isn't available (i.e. - git isn't present) - */ - private _data: IRawRepoState | UNINITIALIZED | undefined = UNINITIALIZED; - private readonly _filteredData: Map> = new Map(); - private readonly _projectStateCache: Map = new Map(); private readonly _rushConfiguration: RushConfiguration; private readonly _git: Git; @@ -80,134 +71,6 @@ export class ProjectChangeAnalyzer { this._git = new Git(this._rushConfiguration); } - /** - * Try to get a list of the specified project's dependencies and their hashes. - * - * @remarks - * If the data can't be generated (i.e. - if Git is not present) this returns undefined. - * - * @internal - */ - public async _tryGetProjectDependenciesAsync( - project: RushConfigurationProject, - terminal: ITerminal - ): Promise | undefined> { - // Check the cache for any existing data - let filteredProjectData: Map | undefined = this._filteredData.get(project); - if (filteredProjectData) { - return filteredProjectData; - } - - const data: IRawRepoState | undefined = await this._ensureInitializedAsync(terminal); - - if (!data) { - return undefined; - } - - const { projectState, rootDir } = data; - - if (projectState === undefined) { - return undefined; - } - - const unfilteredProjectData: Map | undefined = projectState.get(project); - if (!unfilteredProjectData) { - throw new Error(`Project "${project.packageName}" does not exist in the current Rush configuration.`); - } - - filteredProjectData = await this._filterProjectDataAsync( - project, - unfilteredProjectData, - rootDir, - terminal - ); - - this._filteredData.set(project, filteredProjectData); - return filteredProjectData; - } - - /** - * @internal - */ - public async _ensureInitializedAsync(terminal: ITerminal): Promise { - if (this._data === UNINITIALIZED) { - this._data = await this._getDataAsync(terminal); - } - - return this._data; - } - - /** - * The project state hash is calculated in the following way: - * - Project dependencies are collected (see ProjectChangeAnalyzer.getPackageDeps) - * - If project dependencies cannot be collected (i.e. - if Git isn't available), - * this function returns `undefined` - * - The (path separator normalized) repo-root-relative dependencies' file paths are sorted - * - A SHA1 hash is created and each (sorted) file path is fed into the hash and then its - * Git SHA is fed into the hash - * - A hex digest of the hash is returned - * - * @internal - */ - public async _tryGetProjectStateHashAsync( - project: RushConfigurationProject, - terminal: ITerminal - ): Promise { - let projectState: string | undefined = this._projectStateCache.get(project); - if (!projectState) { - const packageDeps: Map | undefined = await this._tryGetProjectDependenciesAsync( - project, - terminal - ); - - if (!packageDeps) { - return undefined; - } else { - const sortedPackageDepsFiles: string[] = Array.from(packageDeps.keys()).sort(); - const hash: crypto.Hash = crypto.createHash('sha1'); - for (const packageDepsFile of sortedPackageDepsFiles) { - hash.update(packageDepsFile); - hash.update(RushConstants.hashDelimiter); - hash.update(packageDeps.get(packageDepsFile)!); - hash.update(RushConstants.hashDelimiter); - } - - projectState = hash.digest('hex'); - this._projectStateCache.set(project, projectState); - } - } - - return projectState; - } - - public async _filterProjectDataAsync( - project: RushConfigurationProject, - unfilteredProjectData: Map, - rootDir: string, - terminal: ITerminal - ): Promise> { - const ignoreMatcher: Ignore | undefined = await this._getIgnoreMatcherForProjectAsync(project, terminal); - if (!ignoreMatcher) { - return unfilteredProjectData; - } - - const projectKey: string = path.relative(rootDir, project.projectFolder); - const projectKeyLength: number = projectKey.length + 1; - - // At this point, `filePath` is guaranteed to start with `projectKey`, so - // we can safely slice off the first N characters to get the file path relative to the - // root of the project. - const filteredProjectData: Map = new Map(); - for (const [filePath, value] of unfilteredProjectData) { - const relativePath: string = filePath.slice(projectKeyLength); - if (!ignoreMatcher.ignores(relativePath)) { - // Add the file path to the filtered data if it is not ignored - filteredProjectData.set(filePath, value); - } - } - return filteredProjectData; - } - /** * Gets a list of projects that have changed in the current state of the repo * when compared to the specified branch, optionally taking the shrinkwrap and settings in @@ -286,9 +149,7 @@ export class ProjectChangeAnalyzer { return new Set(rushConfiguration.projects); } - const { packageManager } = rushConfiguration; - - if (packageManager === 'pnpm') { + if (rushConfiguration.isPnpm) { const currentShrinkwrap: PnpmShrinkwrapFile | undefined = PnpmShrinkwrapFile.loadFromFile(fullShrinkwrapPath); @@ -331,66 +192,200 @@ export class ProjectChangeAnalyzer { return lookup.groupByChild(changedFiles); } - private async _getDataAsync(terminal: ITerminal): Promise { - const repoState: IGitState | undefined = await this._getRepoDepsAsync(terminal); - if (!repoState) { - // Mark as resolved, but no data - return { - projectState: undefined, - rootDir: this._rushConfiguration.rushJsonFolder, - rawHashes: new Map() - }; - } + /** + * Gets a snapshot of the input state of the Rush workspace that can be queried for incremental + * build operations and use by the build cache. + * @internal + */ + public async _tryGetSnapshotProviderAsync( + projectConfigurations: ReadonlyMap, + terminal: ITerminal, + projectSelection?: ReadonlySet + ): Promise { + try { + const gitPath: string = this._git.getGitPathOrThrow(); - const lookup: LookupByPath = this._rushConfiguration.getProjectLookupForRoot( - repoState.rootDir - ); - const projectHashDeps: Map> = new Map(); + if (!this._git.isPathUnderGitWorkingTree()) { + terminal.writeLine( + `The Rush monorepo is not in a Git repository. Rush will proceed without incremental build support.` + ); - for (const project of this._rushConfiguration.projects) { - projectHashDeps.set(project, new Map()); - } + return; + } - const { hashes: repoDeps, rootDir } = repoState; - - // Currently, only pnpm handles project shrinkwraps - if (this._rushConfiguration.packageManager !== 'pnpm') { - const currentVariant: string | undefined = - await this._rushConfiguration.getCurrentlyInstalledVariantAsync(); - // Add the shrinkwrap file to every project's dependencies - const shrinkwrapFile: string = Path.convertToSlashes( - path.relative( - rootDir, - this._rushConfiguration.defaultSubspace.getCommittedShrinkwrapFilePath(currentVariant) - ) - ); + const rushConfiguration: RushConfiguration = this._rushConfiguration; + + // Do not use getGitInfo().root; it is the root of the *primary* worktree, not the *current* one. + const rootDirectory: string = getRepoRoot(rushConfiguration.rushJsonFolder, gitPath); - const shrinkwrapHash: string | undefined = repoDeps.get(shrinkwrapFile); + // Load the rush-project.json files for the whole repository + const additionalGlobs: IAdditionalGlob[] = []; - for (const projectDeps of projectHashDeps.values()) { - if (shrinkwrapHash) { - projectDeps.set(shrinkwrapFile, shrinkwrapHash); + const projectMap: Map = new Map(); + + for (const project of rushConfiguration.projects) { + const projectConfig: RushProjectConfiguration | undefined = projectConfigurations.get(project); + + const additionalFilesByOperationName: Map> = new Map(); + const projectMetadata: IInputsSnapshotProjectMetadata = { + projectConfig, + additionalFilesByOperationName + }; + projectMap.set(project, projectMetadata); + + if (projectConfig) { + const { operationSettingsByOperationName } = projectConfig; + for (const [operationName, { dependsOnAdditionalFiles }] of operationSettingsByOperationName) { + if (dependsOnAdditionalFiles) { + const additionalFilesForOperation: Set = new Set(); + additionalFilesByOperationName.set(operationName, additionalFilesForOperation); + for (const pattern of dependsOnAdditionalFiles) { + additionalGlobs.push({ + project, + operationName, + additionalFilesForOperation, + pattern + }); + } + } + } } } - } - // Sort each project folder into its own package deps hash - for (const [filePath, fileHash] of repoDeps) { - // lookups in findChildPath are O(K) - // K being the maximum folder depth of any project in rush.json (usually on the order of 3) - const owningProject: RushConfigurationProject | undefined = lookup.findChildPath(filePath); + // Include project shrinkwrap files as part of the computation + const additionalRelativePathsToHash: string[] = []; + const globalAdditionalFiles: string[] = []; + if (rushConfiguration.isPnpm) { + await Async.forEachAsync(rushConfiguration.projects, async (project: RushConfigurationProject) => { + const projectShrinkwrapFilePath: string = BaseProjectShrinkwrapFile.getFilePathForProject(project); + if (!(await FileSystem.existsAsync(projectShrinkwrapFilePath))) { + if (rushConfiguration.subspacesFeatureEnabled) { + return; + } + + throw new Error( + `A project dependency file (${projectShrinkwrapFilePath}) is missing. You may need to run ` + + '"rush install" or "rush update".' + ); + } - if (owningProject) { - const owningProjectHashDeps: Map = projectHashDeps.get(owningProject)!; - owningProjectHashDeps.set(filePath, fileHash); + const relativeProjectShrinkwrapFilePath: string = Path.convertToSlashes( + path.relative(rootDirectory, projectShrinkwrapFilePath) + ); + additionalRelativePathsToHash.push(relativeProjectShrinkwrapFilePath); + }); + } else { + // Add the shrinkwrap file to every project's dependencies + const currentVariant: string | undefined = + await this._rushConfiguration.getCurrentlyInstalledVariantAsync(); + + const shrinkwrapFile: string = Path.convertToSlashes( + path.relative( + rootDirectory, + rushConfiguration.defaultSubspace.getCommittedShrinkwrapFilePath(currentVariant) + ) + ); + + globalAdditionalFiles.push(shrinkwrapFile); } + + const lookupByPath: IReadonlyLookupByPath = + this._rushConfiguration.getProjectLookupForRoot(rootDirectory); + + let filterPath: string[] = []; + + if ( + projectSelection && + projectSelection.size > 0 && + this._rushConfiguration.experimentsConfiguration.configuration.enableSubpathScan + ) { + filterPath = Array.from(projectSelection, ({ projectFolder }) => projectFolder); + } + + return async function tryGetSnapshotAsync(): Promise { + try { + const [hashes, additionalFiles] = await Promise.all([ + getRepoStateAsync(rootDirectory, additionalRelativePathsToHash, gitPath, filterPath), + getAdditionalFilesFromRushProjectConfigurationAsync( + additionalGlobs, + lookupByPath, + rootDirectory, + terminal + ) + ]); + + for (const file of additionalFiles) { + if (hashes.has(file)) { + additionalFiles.delete(file); + } + } + + const additionalHashes: Map = new Map( + await hashFilesAsync(rootDirectory, additionalFiles, gitPath) + ); + + return new InputsSnapshot({ + additionalHashes, + globalAdditionalFiles, + hashes, + lookupByPath, + projectMap: projectMap, + rootDir: rootDirectory + }); + } catch (e) { + // If getRepoState fails, don't fail the whole build. Treat this case as if we don't know anything about + // the state of the files in the repo. This can happen if the environment doesn't have Git. + terminal.writeWarningLine( + `Error calculating the state of the repo. (inner error: ${ + e.stack ?? e.message ?? e + }). Continuing without diffing files.` + ); + + return; + } + }; + } catch (e) { + // If getRepoState fails, don't fail the whole build. Treat this case as if we don't know anything about + // the state of the files in the repo. This can happen if the environment doesn't have Git. + terminal.writeWarningLine( + `Error calculating the state of the repo. (inner error: ${ + e.stack ?? e.message ?? e + }). Continuing without diffing files.` + ); + + return; } + } - return { - projectState: projectHashDeps, - rootDir, - rawHashes: repoState.hashes - }; + /** + * @internal + */ + public async _filterProjectDataAsync( + project: RushConfigurationProject, + unfilteredProjectData: Map, + rootDir: string, + terminal: ITerminal + ): Promise> { + const ignoreMatcher: Ignore | undefined = await this._getIgnoreMatcherForProjectAsync(project, terminal); + if (!ignoreMatcher) { + return unfilteredProjectData; + } + + const projectKey: string = path.relative(rootDir, project.projectFolder); + const projectKeyLength: number = projectKey.length + 1; + + // At this point, `filePath` is guaranteed to start with `projectKey`, so + // we can safely slice off the first N characters to get the file path relative to the + // root of the project. + const filteredProjectData: Map = new Map(); + for (const [filePath, value] of unfilteredProjectData) { + const relativePath: string = filePath.slice(projectKeyLength); + if (!ignoreMatcher.ignores(relativePath)) { + // Add the file path to the filtered data if it is not ignored + filteredProjectData.set(filePath, value); + } + } + return filteredProjectData; } private async _getIgnoreMatcherForProjectAsync( @@ -406,59 +401,77 @@ export class ProjectChangeAnalyzer { return ignoreMatcher; } } +} - private async _getRepoDepsAsync(terminal: ITerminal): Promise { - try { - const gitPath: string = this._git.getGitPathOrThrow(); +interface IAdditionalGlob { + project: RushConfigurationProject; + operationName: string; + additionalFilesForOperation: Set; + pattern: string; +} - if (this._git.isPathUnderGitWorkingTree()) { - // Do not use getGitInfo().root; it is the root of the *primary* worktree, not the *current* one. - const rootDir: string = getRepoRoot(this._rushConfiguration.rushJsonFolder, gitPath); - // Load the package deps hash for the whole repository - // Include project shrinkwrap files as part of the computation - const additionalFilesToHash: string[] = []; - - if (this._rushConfiguration.packageManager === 'pnpm') { - await Async.forEachAsync( - this._rushConfiguration.projects, - async (project: RushConfigurationProject) => { - const projectShrinkwrapFilePath: string = - BaseProjectShrinkwrapFile.getFilePathForProject(project); - if (!(await FileSystem.existsAsync(projectShrinkwrapFilePath))) { - // Missing shrinkwrap of subspace project is allowed because subspace projects can be partial installed - if (this._rushConfiguration.subspacesFeatureEnabled) { - return; - } - throw new Error( - `A project dependency file (${projectShrinkwrapFilePath}) is missing. You may need to run ` + - '"rush install" or "rush update".' - ); - } - const relativeProjectShrinkwrapFilePath: string = Path.convertToSlashes( - path.relative(rootDir, projectShrinkwrapFilePath) - ); - additionalFilesToHash.push(relativeProjectShrinkwrapFilePath); - } - ); - } +async function getAdditionalFilesFromRushProjectConfigurationAsync( + additionalGlobs: IAdditionalGlob[], + rootRelativeLookupByPath: IReadonlyLookupByPath, + rootDirectory: string, + terminal: ITerminal +): Promise> { + const additionalFilesFromRushProjectConfiguration: Set = new Set(); - const hashes: Map = await getRepoStateAsync(rootDir, additionalFilesToHash, gitPath); - return { - gitPath, - hashes, - rootDir - }; - } else { - return undefined; - } - } catch (e) { - // If getPackageDeps fails, don't fail the whole build. Treat this case as if we don't know anything about - // the state of the files in the repo. This can happen if the environment doesn't have Git. - terminal.writeWarningLine( - `Error calculating the state of the repo. (inner error: ${e}). Continuing without diffing files.` + if (!additionalGlobs.length) { + return additionalFilesFromRushProjectConfiguration; + } + + const { default: glob } = await import('fast-glob'); + await Async.forEachAsync(additionalGlobs, async (item: IAdditionalGlob) => { + const { project, operationName, additionalFilesForOperation, pattern } = item; + const matches: string[] = await glob(pattern, { + cwd: project.projectFolder, + onlyFiles: true, + // We want to keep path's type unchanged, + // i.e. if the pattern was a relative path, then matched paths should also be relative paths + // if the pattern was an absolute path, then matched paths should also be absolute paths + // + // We are doing this because these paths are going to be used to calculate operation state hashes and some users + // might choose to depend on global files (e.g. `/etc/os-release`) and some might choose to depend on local non-project files + // (e.g. `../path/to/workspace/file`) + // + // In both cases we want that path to the resource to be the same on all machines, + // regardless of what is the current working directory. + // + // That being said, we want to keep `absolute` options here as false: + absolute: false + }); + + for (const match of matches) { + // The glob result is relative to the project folder, but we want it to be relative to the repo root + const rootRelativeFilePath: string = Path.convertToSlashes( + path.relative(rootDirectory, path.resolve(project.projectFolder, match)) ); - return undefined; + if (rootRelativeFilePath.startsWith('../')) { + // The target file is outside of the Git tree, use the original result of the match. + additionalFilesFromRushProjectConfiguration.add(match); + additionalFilesForOperation.add(match); + } else { + // The target file is inside of the Git tree, find out if it is in a Rush project. + const projectMatch: RushConfigurationProject | undefined = + rootRelativeLookupByPath.findChildPath(rootRelativeFilePath); + if (projectMatch && projectMatch !== project) { + terminal.writeErrorLine( + `In project "${project.packageName}" ("${project.projectRelativeFolder}"), ` + + `config for operation "${operationName}" specifies a glob "${pattern}" that selects a file "${rootRelativeFilePath}" in a different workspace project ` + + `"${projectMatch.packageName}" ("${projectMatch.projectRelativeFolder}"). ` + + `This is forbidden. The "dependsOnAdditionalFiles" property of "rush-project.json" may only be used to refer to non-workspace files, non-project files, ` + + `or untracked files in the current project. To depend on files in another workspace project, use "devDependencies" in "package.json".` + ); + throw new AlreadyReportedError(); + } + additionalFilesForOperation.add(rootRelativeFilePath); + additionalFilesFromRushProjectConfiguration.add(rootRelativeFilePath); + } } - } + }); + + return additionalFilesFromRushProjectConfiguration; } diff --git a/libraries/rush-lib/src/logic/ProjectWatcher.ts b/libraries/rush-lib/src/logic/ProjectWatcher.ts index 824ad800f5b..83dd92b904c 100644 --- a/libraries/rush-lib/src/logic/ProjectWatcher.ts +++ b/libraries/rush-lib/src/logic/ProjectWatcher.ts @@ -6,20 +6,21 @@ import * as os from 'os'; import * as readline from 'readline'; import { once } from 'events'; import { getRepoRoot } from '@rushstack/package-deps-hash'; -import { Path, type FileSystemStats, FileSystem } from '@rushstack/node-core-library'; +import { AlreadyReportedError, Path, type FileSystemStats, FileSystem } from '@rushstack/node-core-library'; import { Colorize, type ITerminal } from '@rushstack/terminal'; import { Git } from './Git'; -import { ProjectChangeAnalyzer } from './ProjectChangeAnalyzer'; +import type { IInputsSnapshot, GetInputsSnapshotAsyncFn } from './incremental/InputsSnapshot'; import type { RushConfiguration } from '../api/RushConfiguration'; import type { RushConfigurationProject } from '../api/RushConfigurationProject'; export interface IProjectWatcherOptions { + getInputsSnapshotAsync: GetInputsSnapshotAsyncFn; debounceMs?: number; rushConfiguration: RushConfiguration; projectsToWatch: ReadonlySet; terminal: ITerminal; - initialState?: ProjectChangeAnalyzer | undefined; + initialSnapshot?: IInputsSnapshot | undefined; } export interface IProjectChangeResult { @@ -30,7 +31,7 @@ export interface IProjectChangeResult { /** * Contains the git hashes for all tracked files in the repo */ - state: ProjectChangeAnalyzer; + inputsSnapshot: IInputsSnapshot; } export interface IPromptGeneratorFunction { @@ -45,21 +46,22 @@ interface IPathWatchOptions { * This class is for incrementally watching a set of projects in the repository for changes. * * We are manually using fs.watch() instead of `chokidar` because all we want from the file system watcher is a boolean - * signal indicating that "at least 1 file in a watched project changed". We then defer to ProjectChangeAnalyzer (which + * signal indicating that "at least 1 file in a watched project changed". We then defer to getInputsSnapshotAsync (which * is responsible for change detection in all incremental builds) to determine what actually chanaged. * * Calling `waitForChange()` will return a promise that resolves when the package-deps of one or * more projects differ from the value the previous time it was invoked. The first time will always resolve with the full selection. */ export class ProjectWatcher { + private readonly _getInputsSnapshotAsync: GetInputsSnapshotAsyncFn; private readonly _debounceMs: number; private readonly _repoRoot: string; private readonly _rushConfiguration: RushConfiguration; private readonly _projectsToWatch: ReadonlySet; private readonly _terminal: ITerminal; - private _initialState: ProjectChangeAnalyzer | undefined; - private _previousState: ProjectChangeAnalyzer | undefined; + private _initialSnapshot: IInputsSnapshot | undefined; + private _previousSnapshot: IInputsSnapshot | undefined; private _forceChangedProjects: Map = new Map(); private _resolveIfChanged: undefined | (() => Promise); private _getPromptLines: undefined | IPromptGeneratorFunction; @@ -69,7 +71,14 @@ export class ProjectWatcher { public isPaused: boolean = false; public constructor(options: IProjectWatcherOptions) { - const { debounceMs = 1000, rushConfiguration, projectsToWatch, terminal, initialState } = options; + const { + getInputsSnapshotAsync: snapshotProvider, + debounceMs = 1000, + rushConfiguration, + projectsToWatch, + terminal, + initialSnapshot: initialState + } = options; this._debounceMs = debounceMs; this._rushConfiguration = rushConfiguration; @@ -79,11 +88,12 @@ export class ProjectWatcher { const gitPath: string = new Git(rushConfiguration).getGitPathOrThrow(); this._repoRoot = Path.convertToSlashes(getRepoRoot(rushConfiguration.rushJsonFolder, gitPath)); - this._initialState = initialState; - this._previousState = initialState; + this._initialSnapshot = initialState; + this._previousSnapshot = initialState; this._renderedStatusLines = 0; this._getPromptLines = undefined; + this._getInputsSnapshotAsync = snapshotProvider; } public pause(): void { @@ -133,7 +143,7 @@ export class ProjectWatcher { public async waitForChangeAsync(onWatchingFiles?: () => void): Promise { const initialChangeResult: IProjectChangeResult = await this._computeChangedAsync(); // Ensure that the new state is recorded so that we don't loop infinitely - this._commitChanges(initialChangeResult.state); + this._commitChanges(initialChangeResult.inputsSnapshot); if (initialChangeResult.changedProjects.size) { // We can't call `clear()` here due to the async tick in the end of _computeChanged for (const project of initialChangeResult.changedProjects) { @@ -145,7 +155,7 @@ export class ProjectWatcher { return initialChangeResult; } - const previousState: ProjectChangeAnalyzer = initialChangeResult.state; + const previousState: IInputsSnapshot = initialChangeResult.inputsSnapshot; const repoRoot: string = Path.convertToSlashes(this._rushConfiguration.rushJsonFolder); // Map of path to whether config for the path @@ -170,10 +180,8 @@ export class ProjectWatcher { } } else { for (const project of this._projectsToWatch) { - const projectState: Map = (await previousState._tryGetProjectDependenciesAsync( - project, - this._terminal - ))!; + const projectState: ReadonlyMap = + previousState.getTrackedFileHashesForOperation(project); const prefixLength: number = project.projectFolder.length - repoRoot.length - 1; // Watch files in the root of the project, or @@ -230,7 +238,7 @@ export class ProjectWatcher { } } - this._commitChanges(result.state); + this._commitChanges(result.inputsSnapshot); const hasForcedChanges: boolean = this._forceChangedProjects.size > 0; if (hasForcedChanges) { @@ -392,23 +400,27 @@ export class ProjectWatcher { * Determines which, if any, projects (within the selection) have new hashes for files that are not in .gitignore */ private async _computeChangedAsync(): Promise { - const state: ProjectChangeAnalyzer = new ProjectChangeAnalyzer(this._rushConfiguration); + const currentSnapshot: IInputsSnapshot | undefined = await this._getInputsSnapshotAsync(); - const previousState: ProjectChangeAnalyzer | undefined = this._previousState; + if (!currentSnapshot) { + throw new AlreadyReportedError(); + } + + const previousSnapshot: IInputsSnapshot | undefined = this._previousSnapshot; - if (!previousState) { + if (!previousSnapshot) { return { changedProjects: this._projectsToWatch, - state + inputsSnapshot: currentSnapshot }; } const changedProjects: Set = new Set(); for (const project of this._projectsToWatch) { - const [previous, current] = await Promise.all([ - previousState._tryGetProjectDependenciesAsync(project, this._terminal), - state._tryGetProjectDependenciesAsync(project, this._terminal) - ]); + const previous: ReadonlyMap | undefined = + previousSnapshot.getTrackedFileHashesForOperation(project); + const current: ReadonlyMap | undefined = + currentSnapshot.getTrackedFileHashesForOperation(project); if (ProjectWatcher._haveProjectDepsChanged(previous, current)) { // May need to detect if the nature of the change will break the process, e.g. changes to package.json @@ -422,14 +434,14 @@ export class ProjectWatcher { return { changedProjects, - state + inputsSnapshot: currentSnapshot }; } - private _commitChanges(state: ProjectChangeAnalyzer): void { - this._previousState = state; - if (!this._initialState) { - this._initialState = state; + private _commitChanges(state: IInputsSnapshot): void { + this._previousSnapshot = state; + if (!this._initialSnapshot) { + this._initialSnapshot = state; } } @@ -439,8 +451,8 @@ export class ProjectWatcher { * @returns `true` if the maps are different, `false` otherwise */ private static _haveProjectDepsChanged( - prev: Map | undefined, - next: Map | undefined + prev: ReadonlyMap | undefined, + next: ReadonlyMap | undefined ): boolean { if (!prev && !next) { return false; diff --git a/libraries/rush-lib/src/logic/PurgeManager.ts b/libraries/rush-lib/src/logic/PurgeManager.ts index 423d1ca388d..80081d21d1d 100644 --- a/libraries/rush-lib/src/logic/PurgeManager.ts +++ b/libraries/rush-lib/src/logic/PurgeManager.ts @@ -88,7 +88,7 @@ export class PurgeManager { ); if ( - this._rushConfiguration.packageManager === 'pnpm' && + this._rushConfiguration.isPnpm && this._rushConfiguration.pnpmOptions.pnpmStore === 'global' && this._rushConfiguration.pnpmOptions.pnpmStorePath ) { diff --git a/libraries/rush-lib/src/logic/RepoStateFile.ts b/libraries/rush-lib/src/logic/RepoStateFile.ts index 3bdff9898ed..074609fa363 100644 --- a/libraries/rush-lib/src/logic/RepoStateFile.ts +++ b/libraries/rush-lib/src/logic/RepoStateFile.ts @@ -162,7 +162,7 @@ export class RepoStateFile { // Only support saving the pnpm shrinkwrap hash if it was enabled const preventShrinkwrapChanges: boolean = - rushConfiguration.packageManager === 'pnpm' && + rushConfiguration.isPnpm && rushConfiguration.pnpmOptions && rushConfiguration.pnpmOptions.preventManualShrinkwrapChanges; if (preventShrinkwrapChanges) { @@ -200,7 +200,7 @@ export class RepoStateFile { this._modified = true; } - if (rushConfiguration.packageManager === 'pnpm' && rushConfiguration.subspacesFeatureEnabled) { + if (rushConfiguration.isPnpm) { const packageJsonInjectedDependenciesHash: string | undefined = subspace.getPackageJsonInjectedDependenciesHash(variant); diff --git a/libraries/rush-lib/src/logic/SetupChecks.ts b/libraries/rush-lib/src/logic/SetupChecks.ts index f85a2386664..9f60b71708e 100644 --- a/libraries/rush-lib/src/logic/SetupChecks.ts +++ b/libraries/rush-lib/src/logic/SetupChecks.ts @@ -40,7 +40,7 @@ export class SetupChecks { private static _validate(rushConfiguration: RushConfiguration): string | undefined { // Check for outdated tools - if (rushConfiguration.packageManager === 'pnpm') { + if (rushConfiguration.isPnpm) { if (semver.lt(rushConfiguration.packageManagerToolVersion, MINIMUM_SUPPORTED_PNPM_VERSION)) { return ( `The ${RushConstants.rushJsonFilename} file requests PNPM version ` + diff --git a/libraries/rush-lib/src/logic/ShrinkwrapFileFactory.ts b/libraries/rush-lib/src/logic/ShrinkwrapFileFactory.ts index 558bb9d9620..1fdec16fab2 100644 --- a/libraries/rush-lib/src/logic/ShrinkwrapFileFactory.ts +++ b/libraries/rush-lib/src/logic/ShrinkwrapFileFactory.ts @@ -2,7 +2,6 @@ // See LICENSE in the project root for license information. import type { PackageManagerName } from '../api/packageManager/PackageManager'; -import type { PackageManagerOptionsConfigurationBase } from './base/BasePackageManagerOptionsConfiguration'; import type { BaseShrinkwrapFile } from './base/BaseShrinkwrapFile'; import { NpmShrinkwrapFile } from './npm/NpmShrinkwrapFile'; import { PnpmShrinkwrapFile } from './pnpm/PnpmShrinkwrapFile'; @@ -11,7 +10,6 @@ import { YarnShrinkwrapFile } from './yarn/YarnShrinkwrapFile'; export class ShrinkwrapFileFactory { public static getShrinkwrapFile( packageManager: PackageManagerName, - packageManagerOptions: PackageManagerOptionsConfigurationBase, shrinkwrapFilename: string ): BaseShrinkwrapFile | undefined { switch (packageManager) { @@ -28,7 +26,6 @@ export class ShrinkwrapFileFactory { public static parseShrinkwrapFile( packageManager: PackageManagerName, - packageManagerOptions: PackageManagerOptionsConfigurationBase, shrinkwrapContent: string ): BaseShrinkwrapFile | undefined { switch (packageManager) { diff --git a/libraries/rush-lib/src/logic/StandardScriptUpdater.ts b/libraries/rush-lib/src/logic/StandardScriptUpdater.ts index 79bc66b6128..5a4fda349c7 100644 --- a/libraries/rush-lib/src/logic/StandardScriptUpdater.ts +++ b/libraries/rush-lib/src/logic/StandardScriptUpdater.ts @@ -87,7 +87,7 @@ const _pnpmOnlyScripts: IScriptSpecifier[] = [ ]; const getScripts = (rushConfiguration: RushConfiguration): IScriptSpecifier[] => { - if (rushConfiguration.packageManager === 'pnpm') { + if (rushConfiguration.isPnpm) { return _scripts.concat(_pnpmOnlyScripts); } diff --git a/libraries/rush-lib/src/logic/Telemetry.ts b/libraries/rush-lib/src/logic/Telemetry.ts index 761638499a6..66de0da2c1b 100644 --- a/libraries/rush-lib/src/logic/Telemetry.ts +++ b/libraries/rush-lib/src/logic/Telemetry.ts @@ -71,6 +71,12 @@ export interface ITelemetryOperationResult { * Duration in milliseconds when the operation does not hit cache */ nonCachedDurationMs?: number; + + /** + * Was this operation built on this machine? If so, the duration can be calculated from `startTimestampMs` and `endTimestampMs`. + * If not, you should use the metrics from the machine that built it. + */ + wasExecutedOnThisMachine?: boolean; } /** @@ -150,14 +156,15 @@ export class Telemetry { if (!this._enabled) { return; } + const cpus: os.CpuInfo[] = os.cpus(); const data: ITelemetryData = { ...telemetryData, machineInfo: telemetryData.machineInfo || { machineArchitecture: os.arch(), // The Node.js model is sometimes padded, for example: // "AMD Ryzen 7 3700X 8-Core Processor " - machineCpu: os.cpus()[0].model.trim(), - machineCores: os.cpus().length, + machineCpu: cpus[0].model.trim(), + machineCores: cpus.length, machineTotalMemoryMiB: Math.round(os.totalmem() / ONE_MEGABYTE_IN_BYTES), machineFreeMemoryMiB: Math.round(os.freemem() / ONE_MEGABYTE_IN_BYTES) }, diff --git a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts index e42e37157f6..c8092494915 100644 --- a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts +++ b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import type * as fetch from 'node-fetch'; import * as os from 'os'; import * as path from 'path'; import * as crypto from 'crypto'; @@ -48,7 +47,7 @@ import { ShrinkwrapFileFactory } from '../ShrinkwrapFileFactory'; import { Utilities } from '../../utilities/Utilities'; import { InstallHelpers } from '../installManager/InstallHelpers'; import * as PolicyValidator from '../policy/PolicyValidator'; -import type { WebClient as WebClientType, WebClientResponse } from '../../utilities/WebClient'; +import type { WebClient as WebClientType, IWebClientResponse } from '../../utilities/WebClient'; import { SetupPackageRegistry } from '../setup/SetupPackageRegistry'; import { PnpmfileConfiguration } from '../pnpm/PnpmfileConfiguration'; import type { IInstallManagerOptions } from './BaseInstallManagerTypes'; @@ -255,7 +254,6 @@ export abstract class BaseInstallManager { const committedShrinkwrapFileName: string = subspace.getCommittedShrinkwrapFilePath(variant); const shrinkwrapFile: BaseShrinkwrapFile | undefined = ShrinkwrapFileFactory.getShrinkwrapFile( this.rushConfiguration.packageManager, - this.rushConfiguration.packageManagerOptions, committedShrinkwrapFileName ); shrinkwrapFile?.validateShrinkwrapAfterUpdate(this.rushConfiguration, subspace, this._terminal); @@ -284,7 +282,7 @@ export abstract class BaseInstallManager { const { configuration: experiments } = this.rushConfiguration.experimentsConfiguration; // if usePnpmSyncForInjectedDependencies is true // the pnpm-sync will generate the pnpm-sync.json based on lockfile - if (this.rushConfiguration.packageManager === 'pnpm' && experiments?.usePnpmSyncForInjectedDependencies) { + if (this.rushConfiguration.isPnpm && experiments?.usePnpmSyncForInjectedDependencies) { const pnpmLockfilePath: string = subspace.getTempShrinkwrapFilename(); const dotPnpmFolder: string = `${subspace.getSubspaceTempFolderPath()}/node_modules/.pnpm`; @@ -400,9 +398,9 @@ export abstract class BaseInstallManager { potentiallyChangedFiles.push(subspace.getCommonVersionsFilePath(variant)); // Add pnpm-config.json file to the potentially changed files list. - potentiallyChangedFiles.push(subspace.getPnpmConfigFilePath(variant)); + potentiallyChangedFiles.push(subspace.getPnpmConfigFilePath()); - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { // If the repo is using pnpmfile.js, consider that also const pnpmFileFilePath: string = subspace.getPnpmfilePath(variant); const pnpmFileExists: boolean = await FileSystem.existsAsync(pnpmFileFilePath); @@ -464,7 +462,6 @@ export abstract class BaseInstallManager { try { shrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile( this.rushConfiguration.packageManager, - this.rushConfiguration.packageManagerOptions, committedShrinkwrapFileName ); } catch (ex) { @@ -538,7 +535,8 @@ export abstract class BaseInstallManager { sourceNpmrcFolder: subspace.getSubspaceConfigFolderPath(), targetNpmrcFolder: subspace.getSubspaceTempFolderPath(), linesToPrepend: extraNpmrcLines, - createIfMissing: this.rushConfiguration.subspacesFeatureEnabled + createIfMissing: this.rushConfiguration.subspacesFeatureEnabled, + supportEnvVarFallbackSyntax: this.rushConfiguration.isPnpm }); this._syncNpmrcAlreadyCalled = true; @@ -546,7 +544,7 @@ export abstract class BaseInstallManager { ? crypto.createHash('sha1').update(npmrcText).digest('hex') : undefined; - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { // Copy the committed patches folder if using pnpm const commonTempPnpmPatchesFolder: string = `${subspace.getSubspaceTempFolderPath()}/${ RushConstants.pnpmPatchesFolderName @@ -601,7 +599,7 @@ export abstract class BaseInstallManager { // Shim support for pnpmfile in. // Additionally when in workspaces, the shim implements support for common versions. - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { await PnpmfileConfiguration.writeCommonTempPnpmfileShimAsync( this.rushConfiguration, subspace.getSubspaceTempFolderPath(), @@ -839,7 +837,7 @@ ${gitLfsHookHandling} if (collectLogFile) { args.push('--verbose'); } - } else if (this.rushConfiguration.packageManager === 'pnpm') { + } else if (this.rushConfiguration.isPnpm) { // Only explicitly define the store path if `pnpmStore` is using the default, or has been set to // 'local'. If `pnpmStore` = 'global', then allow PNPM to use the system's default // path. In all cases, this will be overridden by RUSH_PNPM_STORE_PATH @@ -914,7 +912,8 @@ ${gitLfsHookHandling} */ const isAutoInstallPeersInNpmrc: boolean = isVariableSetInNpmrcFile( subspace.getSubspaceConfigFolderPath(), - 'auto-install-peers' + 'auto-install-peers', + this.rushConfiguration.isPnpm ); let autoInstallPeers: boolean | undefined = this.rushConfiguration.pnpmOptions.autoInstallPeers; @@ -942,7 +941,8 @@ ${gitLfsHookHandling} */ const isResolutionModeInNpmrc: boolean = isVariableSetInNpmrcFile( subspace.getSubspaceConfigFolderPath(), - 'resolution-mode' + 'resolution-mode', + this.rushConfiguration.isPnpm ); let resolutionMode: PnpmResolutionMode | undefined = this.rushConfiguration.pnpmOptions.resolutionMode; @@ -1068,12 +1068,13 @@ ${gitLfsHookHandling} webClient.userAgent = `pnpm/? npm/? node/${process.version} ${os.platform()} ${os.arch()}`; webClient.accept = 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*'; - const response: WebClientResponse = await webClient.fetchAsync(queryUrl); + const response: IWebClientResponse = await webClient.fetchAsync(queryUrl); if (!response.ok) { throw new Error('Failed to query'); } - const data: { versions: { [version: string]: { dist: { tarball: string } } } } = await response.json(); + const data: { versions: { [version: string]: { dist: { tarball: string } } } } = + await response.getJsonAsync(); let url: string; try { if (!data.versions[Rush.version]) { @@ -1092,7 +1093,7 @@ ${gitLfsHookHandling} // Make sure the tarball wasn't deleted from the CDN webClient.accept = '*/*'; - const response2: fetch.Response = await webClient.fetchAsync(url); + const response2: IWebClientResponse = await webClient.fetchAsync(url); if (!response2.ok) { if (response2.status === 404) { @@ -1118,7 +1119,7 @@ ${gitLfsHookHandling} // Otherwise delete the temporary file FileSystem.deleteFile(subspace.getTempShrinkwrapFilename()); - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { // Workaround for https://github.com/pnpm/pnpm/issues/1890 // // When "rush update --full" is run, Rush deletes "common/temp/pnpm-lock.yaml" diff --git a/libraries/rush-lib/src/logic/buildCache/ProjectBuildCache.ts b/libraries/rush-lib/src/logic/buildCache/ProjectBuildCache.ts index 239634eda37..9b3e495c70d 100644 --- a/libraries/rush-lib/src/logic/buildCache/ProjectBuildCache.ts +++ b/libraries/rush-lib/src/logic/buildCache/ProjectBuildCache.ts @@ -8,37 +8,50 @@ import { FileSystem, type FolderItem, InternalError, Async } from '@rushstack/no import type { ITerminal } from '@rushstack/terminal'; import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; -import type { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer'; -import { RushConstants } from '../RushConstants'; import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration'; import type { ICloudBuildCacheProvider } from './ICloudBuildCacheProvider'; import type { FileSystemBuildCacheProvider } from './FileSystemBuildCacheProvider'; import { TarExecutable } from '../../utilities/TarExecutable'; import { EnvironmentVariableNames } from '../../api/EnvironmentConfiguration'; +import type { OperationExecutionRecord } from '../operations/OperationExecutionRecord'; -export interface IProjectBuildCacheOptions { +export interface IOperationBuildCacheOptions { + /** + * The repo-wide configuration for the build cache. + */ buildCacheConfiguration: BuildCacheConfiguration; - project: RushConfigurationProject; - projectOutputFolderNames: ReadonlyArray; - additionalProjectOutputFilePaths?: ReadonlyArray; - additionalContext?: Record; - configHash: string; - projectChangeAnalyzer: ProjectChangeAnalyzer; + /** + * The terminal to use for logging. + */ terminal: ITerminal; - phaseName: string; } +export type IProjectBuildCacheOptions = IOperationBuildCacheOptions & { + /** + * Value from rush-project.json + */ + projectOutputFolderNames: ReadonlyArray; + /** + * The project to be cached. + */ + project: RushConfigurationProject; + /** + * The hash of all relevant inputs and configuration that uniquely identifies this execution. + */ + operationStateHash: string; + /** + * The name of the phase that is being cached. + */ + phaseName: string; +}; + interface IPathsToCache { filteredOutputFolderNames: string[]; outputFilePaths: string[]; } export class ProjectBuildCache { - /** - * null === we haven't tried to initialize yet - * undefined === unable to initialize - */ - private static _tarUtilityPromise: Promise | null = null; + private static _tarUtilityPromise: Promise | undefined; private readonly _project: RushConfigurationProject; private readonly _localBuildCacheProvider: FileSystemBuildCacheProvider; @@ -46,8 +59,7 @@ export class ProjectBuildCache { private readonly _buildCacheEnabled: boolean; private readonly _cacheWriteEnabled: boolean; private readonly _projectOutputFolderNames: ReadonlyArray; - private readonly _additionalProjectOutputFilePaths: ReadonlyArray; - private _cacheId: string | undefined; + private readonly _cacheId: string | undefined; private constructor(cacheId: string | undefined, options: IProjectBuildCacheOptions) { const { @@ -58,8 +70,7 @@ export class ProjectBuildCache { cacheWriteEnabled }, project, - projectOutputFolderNames, - additionalProjectOutputFilePaths + projectOutputFolderNames } = options; this._project = project; this._localBuildCacheProvider = localCacheProvider; @@ -67,12 +78,11 @@ export class ProjectBuildCache { this._buildCacheEnabled = buildCacheEnabled; this._cacheWriteEnabled = cacheWriteEnabled; this._projectOutputFolderNames = projectOutputFolderNames || []; - this._additionalProjectOutputFilePaths = additionalProjectOutputFilePaths || []; this._cacheId = cacheId; } private static _tryGetTarUtility(terminal: ITerminal): Promise { - if (ProjectBuildCache._tarUtilityPromise === null) { + if (!ProjectBuildCache._tarUtilityPromise) { ProjectBuildCache._tarUtilityPromise = TarExecutable.tryInitializeAsync(terminal); } @@ -83,13 +93,36 @@ export class ProjectBuildCache { return this._cacheId; } - public static async tryGetProjectBuildCacheAsync( - options: IProjectBuildCacheOptions - ): Promise { - const cacheId: string | undefined = await ProjectBuildCache._getCacheIdAsync(options); + public static getProjectBuildCache(options: IProjectBuildCacheOptions): ProjectBuildCache { + const cacheId: string | undefined = ProjectBuildCache._getCacheId(options); return new ProjectBuildCache(cacheId, options); } + public static forOperation( + operation: OperationExecutionRecord, + options: IOperationBuildCacheOptions + ): ProjectBuildCache { + if (!operation.associatedProject) { + throw new InternalError('Operation must have an associated project'); + } + if (!operation.associatedPhase) { + throw new InternalError('Operation must have an associated phase'); + } + const outputFolders: string[] = [...(operation.operation.settings?.outputFolderNames ?? [])]; + if (operation.metadataFolderPath) { + outputFolders.push(operation.metadataFolderPath); + } + const buildCacheOptions: IProjectBuildCacheOptions = { + ...options, + project: operation.associatedProject, + phaseName: operation.associatedPhase.name, + projectOutputFolderNames: outputFolders, + operationStateHash: operation.stateHash + }; + const cacheId: string | undefined = ProjectBuildCache._getCacheId(buildCacheOptions); + return new ProjectBuildCache(cacheId, buildCacheOptions); + } + public async tryRestoreFromCacheAsync(terminal: ITerminal, specifiedCacheId?: string): Promise { const cacheId: string | undefined = specifiedCacheId || this._cacheId; if (!cacheId) { @@ -150,7 +183,7 @@ export class ProjectBuildCache { const tarUtility: TarExecutable | undefined = await ProjectBuildCache._tryGetTarUtility(terminal); let restoreSuccess: boolean = false; if (tarUtility && localCacheEntryPath) { - const logFilePath: string = this._getTarLogFilePath('untar'); + const logFilePath: string = this._getTarLogFilePath(cacheId, 'untar'); const tarExitCode: number = await tarUtility.tryUntarAsync({ archivePath: localCacheEntryPath, outputFolderPath: projectFolderPath, @@ -207,7 +240,7 @@ export class ProjectBuildCache { const randomSuffix: string = crypto.randomBytes(8).toString('hex'); const tempLocalCacheEntryPath: string = `${finalLocalCacheEntryPath}-${randomSuffix}.temp`; - const logFilePath: string = this._getTarLogFilePath('tar'); + const logFilePath: string = this._getTarLogFilePath(cacheId, 'tar'); const tarExitCode: number = await tarUtility.tryCreateArchiveFromProjectPathsAsync({ archivePath: tempLocalCacheEntryPath, paths: filesToCache.outputFilePaths, @@ -349,19 +382,6 @@ export class ProjectBuildCache { return undefined; } - // Add additional output file paths - await Async.forEachAsync( - this._additionalProjectOutputFilePaths, - async (additionalProjectOutputFilePath: string) => { - const fullPath: string = `${projectFolderPath}/${additionalProjectOutputFilePath}`; - const pathExists: boolean = await FileSystem.existsAsync(fullPath); - if (pathExists) { - outputFilePaths.push(additionalProjectOutputFilePath); - } - }, - { concurrency: 10 } - ); - // Ensure stable output path order. outputFilePaths.sort(); @@ -371,84 +391,20 @@ export class ProjectBuildCache { }; } - private _getTarLogFilePath(mode: 'tar' | 'untar'): string { - return path.join(this._project.projectRushTempFolder, `${this._cacheId}.${mode}.log`); + private _getTarLogFilePath(cacheId: string, mode: 'tar' | 'untar'): string { + return path.join(this._project.projectRushTempFolder, `${cacheId}.${mode}.log`); } - private static async _getCacheIdAsync({ - projectChangeAnalyzer, - project, - terminal, - projectOutputFolderNames, - configHash, - additionalContext, - phaseName, - buildCacheConfiguration: { getCacheEntryId } - }: IProjectBuildCacheOptions): Promise { - // The project state hash is calculated in the following method: - // - The current project's hash (see ProjectChangeAnalyzer.getProjectStateHash) is - // calculated and appended to an array - // - The current project's recursive dependency projects' hashes are calculated - // and appended to the array - // - A SHA1 hash is created and the following data is fed into it, in order: - // 1. The JSON-serialized list of output folder names for this - // project (see ProjectBuildCache._projectOutputFolderNames) - // 2. The configHash from the operation's runner - // 3. Each dependency project hash (from the array constructed in previous steps), - // in sorted alphanumerical-sorted order - // - A hex digest of the hash is returned - const projectStates: string[] = []; - const projectsToProcess: Set = new Set(); - projectsToProcess.add(project); - - for (const projectToProcess of projectsToProcess) { - const projectState: string | undefined = await projectChangeAnalyzer._tryGetProjectStateHashAsync( - projectToProcess, - terminal - ); - if (!projectState) { - // If we hit any projects with unknown state, return unknown cache ID - return undefined; - } else { - projectStates.push(projectState); - for (const dependency of projectToProcess.dependencyProjects) { - projectsToProcess.add(dependency); - } - } - } - - const sortedProjectStates: string[] = projectStates.sort(); - const hash: crypto.Hash = crypto.createHash('sha1'); - // This value is used to force cache bust when the build cache algorithm changes - hash.update(`${RushConstants.buildCacheVersion}`); - hash.update(RushConstants.hashDelimiter); - const serializedOutputFolders: string = JSON.stringify(projectOutputFolderNames); - hash.update(serializedOutputFolders); - hash.update(RushConstants.hashDelimiter); - hash.update(configHash); - hash.update(RushConstants.hashDelimiter); - if (additionalContext) { - for (const key of Object.keys(additionalContext).sort()) { - // Add additional context keys and values. - // - // This choice (to modify the hash for every key regardless of whether a value is set) implies - // that just _adding_ an env var to the list of dependsOnEnvVars will modify its hash. This - // seems appropriate, because this behavior is consistent whether or not the env var happens - // to have a value. - hash.update(`${key}=${additionalContext[key]}`); - hash.update(RushConstants.hashDelimiter); - } - } - for (const projectHash of sortedProjectStates) { - hash.update(projectHash); - hash.update(RushConstants.hashDelimiter); - } - - const projectStateHash: string = hash.digest('hex'); - - return getCacheEntryId({ - projectName: project.packageName, - projectStateHash, + private static _getCacheId(options: IProjectBuildCacheOptions): string | undefined { + const { + buildCacheConfiguration, + project: { packageName }, + operationStateHash, + phaseName + } = options; + return buildCacheConfiguration.getCacheEntryId({ + projectName: packageName, + projectStateHash: operationStateHash, phaseName }); } diff --git a/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts b/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts deleted file mode 100644 index 628bc03d800..00000000000 --- a/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See LICENSE in the project root for license information. - -import { getGitHashForFiles } from '@rushstack/package-deps-hash'; -import * as path from 'path'; -import type { IRawRepoState } from '../ProjectChangeAnalyzer'; - -async function expandGlobPatternsAsync( - globPatterns: Iterable, - packagePath: string -): Promise { - const { default: glob } = await import('fast-glob'); - const matches: string[] = await glob(Array.from(globPatterns), { - cwd: packagePath, - onlyFiles: true, - // We want to keep path's type unchanged, - // i.e. if the pattern was a relative path, then matched paths should also be relative paths - // if the pattern was an absolute path, then matched paths should also be absolute paths - // - // We are doing this because these paths are going to be used to calculate a hash for the build cache and some users - // might choose to depend on global files (e.g. `/etc/os-release`) and some might choose to depend on local files - // (e.g. `../path/to/workspace/file`) - // - // In both cases we want that path to the resource would be the same on all machines, - // regardless of what is the current working directory. - // - // That being said, we want to keep `absolute` option here as false: - absolute: false - }); - - if (matches.length === 0) { - throw new Error( - `Couldn't find any files matching provided glob patterns: ["${Array.from(globPatterns).join('", "')}"].` - ); - } - - return matches; -} - -interface IKnownHashesResult { - foundPaths: Map; - missingPaths: string[]; -} - -function getKnownHashes( - filePaths: string[], - packagePath: string, - repoState: IRawRepoState -): IKnownHashesResult { - const missingPaths: string[] = []; - const foundPaths: Map = new Map(); - - for (const filePath of filePaths) { - const absolutePath: string = path.isAbsolute(filePath) ? filePath : path.join(packagePath, filePath); - - /** - * We are using RegExp here to prevent false positives in the following string.replace function - * - `^` anchor makes sure that we are replacing only the beginning of the string - * - extra `/` makes sure that we are remove extra slash from the relative path - */ - const gitFilePath: string = absolutePath.replace(new RegExp('^' + repoState.rootDir + '/'), ''); - const foundHash: string | undefined = repoState.rawHashes.get(gitFilePath); - - if (foundHash) { - foundPaths.set(filePath, foundHash); - } else { - missingPaths.push(filePath); - } - } - - return { foundPaths, missingPaths }; -} - -export async function getHashesForGlobsAsync( - globPatterns: Iterable, - packagePath: string, - repoState: IRawRepoState | undefined -): Promise> { - const filePaths: string[] = await expandGlobPatternsAsync(globPatterns, packagePath); - - if (!repoState) { - return getGitHashForFiles(filePaths, packagePath); - } - - const { foundPaths, missingPaths } = getKnownHashes(filePaths, packagePath, repoState); - const calculatedHashes: Map = getGitHashForFiles(missingPaths, packagePath); - - /** - * We want to keep the order of the output the same regardless whether the file was already - * hashed by git or not (as this can change, e.g. due to .gitignore). - * Therefore we will populate our final hashes map in the same order as `filePaths`. - */ - const result: Map = new Map(); - for (const filePath of filePaths) { - const hash: string | undefined = foundPaths.get(filePath) || calculatedHashes.get(filePath); - if (!hash) { - // Sanity check -- this should never happen - throw new Error(`Failed to calculate hash of file: "${filePath}"`); - } - result.set(filePath, hash); - } - - return result; -} diff --git a/libraries/rush-lib/src/logic/buildCache/test/ProjectBuildCache.test.ts b/libraries/rush-lib/src/logic/buildCache/test/ProjectBuildCache.test.ts index c92d2965340..1acc025dee4 100644 --- a/libraries/rush-lib/src/logic/buildCache/test/ProjectBuildCache.test.ts +++ b/libraries/rush-lib/src/logic/buildCache/test/ProjectBuildCache.test.ts @@ -5,7 +5,6 @@ import { StringBufferTerminalProvider, Terminal } from '@rushstack/terminal'; import type { BuildCacheConfiguration } from '../../../api/BuildCacheConfiguration'; import type { RushConfigurationProject } from '../../../api/RushConfigurationProject'; -import { ProjectChangeAnalyzer } from '../../ProjectChangeAnalyzer'; import type { IGenerateCacheEntryIdOptions } from '../CacheEntryId'; import type { FileSystemBuildCacheProvider } from '../FileSystemBuildCacheProvider'; @@ -18,15 +17,10 @@ interface ITestOptions { } describe(ProjectBuildCache.name, () => { - async function prepareSubject(options: Partial): Promise { + function prepareSubject(options: Partial): ProjectBuildCache { const terminal: Terminal = new Terminal(new StringBufferTerminalProvider()); - const projectChangeAnalyzer = { - [ProjectChangeAnalyzer.prototype._tryGetProjectStateHashAsync.name]: async () => { - return 'state_hash'; - } - } as unknown as ProjectChangeAnalyzer; - const subject: ProjectBuildCache | undefined = await ProjectBuildCache.tryGetProjectBuildCacheAsync({ + const subject: ProjectBuildCache = ProjectBuildCache.getProjectBuildCache({ buildCacheConfiguration: { buildCacheEnabled: options.hasOwnProperty('enabled') ? options.enabled : true, getCacheEntryId: (opts: IGenerateCacheEntryIdOptions) => @@ -42,8 +36,9 @@ describe(ProjectBuildCache.name, () => { projectRelativeFolder: 'apps/acme-wizard', dependencyProjects: [] } as unknown as RushConfigurationProject, - configHash: 'build', - projectChangeAnalyzer, + // Value from past tests, for consistency. + // The project build cache is not responsible for calculating this value. + operationStateHash: '1926f30e8ed24cb47be89aea39e7efd70fcda075', terminal, phaseName: 'build' }); @@ -51,9 +46,9 @@ describe(ProjectBuildCache.name, () => { return subject; } - describe(ProjectBuildCache.tryGetProjectBuildCacheAsync.name, () => { - it('returns a ProjectBuildCache with a calculated cacheId value', async () => { - const subject: ProjectBuildCache = (await prepareSubject({}))!; + describe(ProjectBuildCache.getProjectBuildCache.name, () => { + it('returns a ProjectBuildCache with a calculated cacheId value', () => { + const subject: ProjectBuildCache = prepareSubject({}); expect(subject['_cacheId']).toMatchInlineSnapshot( `"acme-wizard/1926f30e8ed24cb47be89aea39e7efd70fcda075"` ); diff --git a/libraries/rush-lib/src/logic/incremental/InputsSnapshot.ts b/libraries/rush-lib/src/logic/incremental/InputsSnapshot.ts new file mode 100644 index 00000000000..94c31ea19c3 --- /dev/null +++ b/libraries/rush-lib/src/logic/incremental/InputsSnapshot.ts @@ -0,0 +1,453 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import * as path from 'node:path'; +import { createHash, type Hash } from 'node:crypto'; + +import ignore, { type Ignore } from 'ignore'; + +import { type IReadonlyLookupByPath, LookupByPath } from '@rushstack/lookup-by-path'; +import { InternalError, Path, Sort } from '@rushstack/node-core-library'; + +import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; +import type { IOperationSettings, RushProjectConfiguration } from '../../api/RushProjectConfiguration'; +import { RushConstants } from '../RushConstants'; + +/** + * @beta + */ +export type IRushConfigurationProjectForSnapshot = Pick< + RushConfigurationProject, + 'projectFolder' | 'projectRelativeFolder' +>; + +/** + * @internal + */ +export interface IInputsSnapshotProjectMetadata { + /** + * The contents of rush-project.json for the project, if available + */ + projectConfig?: RushProjectConfiguration; + /** + * A map of operation name to additional files that should be included in the hash for that operation. + */ + additionalFilesByOperationName?: ReadonlyMap>; +} + +interface IInternalInputsSnapshotProjectMetadata extends IInputsSnapshotProjectMetadata { + /** + * Cached filter of files that are not ignored by the project's `incrementalBuildIgnoredGlobs`. + * @param filePath - The path to the file to check + * @returns true if the file path is an input to all operations in the project, false otherwise + */ + projectFilePathFilter?: (filePath: string) => boolean; + /** + * The cached Git hashes for all files in the project folder. + */ + hashes: Map; + /** + * Cached hashes for all files in the project folder, including additional files. + * Upon calculating this map, input-output file collisions are detected. + */ + fileHashesByOperationName: Map>; + /** + * The flattened state hash for each operation name, where the key "undefined" represents no particular operation. + */ + hashByOperationName: Map; + /** + * The project relative folder, which is a prefix in all relative paths. + */ + relativePrefix: string; +} + +export type IRushSnapshotProjectMetadataMap = ReadonlyMap< + IRushConfigurationProjectForSnapshot, + IInputsSnapshotProjectMetadata +>; + +/** + * Function that computes a new snapshot of the current state of the repository as of the current moment. + * Rush-level configuration state will have been bound during creation of the function. + * Captures the state of the environment, tracked files, and additional files. + * + * @beta + */ +export type GetInputsSnapshotAsyncFn = () => Promise; + +/** + * The parameters for constructing an {@link InputsSnapshot}. + * @internal + */ +export interface IInputsSnapshotParameters { + /** + * Hashes for files selected by `dependsOnAdditionalFiles`. + * Separated out to prevent being auto-assigned to a project. + */ + additionalHashes?: ReadonlyMap; + /** + * The environment to use for `dependsOnEnvVars`. By default performs a snapshot of process.env upon construction. + * @defaultValue \{ ...process.env \} + */ + environment?: Record; + /** + * File paths (keys into additionalHashes or hashes) to be included as part of every operation's dependencies. + */ + globalAdditionalFiles?: Iterable; + /** + * The hashes of all tracked files in the repository. + */ + hashes: ReadonlyMap; + /** + * Optimized lookup engine used to route `hashes` to individual projects. + */ + lookupByPath: IReadonlyLookupByPath; + /** + * Metadata for each project. + */ + projectMap: IRushSnapshotProjectMetadataMap; + /** + * The directory that all relative paths are relative to. + */ + rootDir: string; +} + +const { hashDelimiter } = RushConstants; + +/** + * Represents a synchronously-queryable in-memory snapshot of the state of the inputs to a Rush repository. + * + * The methods on this interface are idempotent and will return the same result regardless of when they are executed. + * @beta + */ +export interface IInputsSnapshot { + /** + * The raw hashes of all tracked files in the repository. + */ + readonly hashes: ReadonlyMap; + + /** + * The directory that all paths in `hashes` are relative to. + */ + readonly rootDirectory: string; + + /** + * Gets the map of file paths to Git hashes that will be used to compute the local state hash of the operation. + * Exposed separately from the final state hash to facilitate detailed change detection. + * + * @param project - The Rush project to get hashes for + * @param operationName - The name of the operation (phase) to get hashes for. If omitted, returns a default set for the project, as used for bulk commands. + * @returns A map of file name to Git hash. For local files paths will be relative. Configured additional files may be absolute paths. + */ + getTrackedFileHashesForOperation( + project: IRushConfigurationProjectForSnapshot, + operationName?: string + ): ReadonlyMap; + + /** + * Gets the state hash for the files owned by this operation, including the resolutions of package.json dependencies. This will later be combined with the hash of + * the command being executed and the final hashes of the operation's dependencies to compute the final hash for the operation. + * @param project - The Rush project to compute the state hash for + * @param operationName - The name of the operation (phase) to get hashes for. If omitted, returns a generic hash for the whole project, as used for bulk commands. + * @returns The local state hash for the project. This is a hash of the environment, the project's tracked files, and any additional files. + */ + getOperationOwnStateHash(project: IRushConfigurationProjectForSnapshot, operationName?: string): string; +} + +/** + * Represents a synchronously-queryable in-memory snapshot of the state of the inputs to a Rush repository. + * Any asynchronous work needs to be performed by the caller and the results passed to the constructor. + * + * @remarks + * All operations on this class will return the same result regardless of when they are executed. + * + * @internal + */ +export class InputsSnapshot implements IInputsSnapshot { + /** + * {@inheritdoc IInputsSnapshot.hashes} + */ + public readonly hashes: ReadonlyMap; + /** + * {@inheritdoc IInputsSnapshot.rootDirectory} + */ + public readonly rootDirectory: string; + + /** + * The metadata for each project. This is a superset of the information in `projectMap` and includes caching of queries. + */ + private readonly _projectMetadataMap: Map< + IRushConfigurationProjectForSnapshot, + IInternalInputsSnapshotProjectMetadata + >; + /** + * Hashes of files to be included in all result sets. + */ + private readonly _globalAdditionalHashes: ReadonlyMap | undefined; + /** + * Hashes for files selected by `dependsOnAdditionalFiles`. + */ + private readonly _additionalHashes: ReadonlyMap | undefined; + /** + * The environment to use for `dependsOnEnvVars`. + */ + private readonly _environment: Record; + + /** + * + * @param params - The parameters for the snapshot + * @internal + */ + public constructor(params: IInputsSnapshotParameters) { + const { + additionalHashes, + environment = { ...process.env }, + globalAdditionalFiles, + hashes, + lookupByPath, + rootDir + } = params; + const projectMetadataMap: Map< + IRushConfigurationProjectForSnapshot, + IInternalInputsSnapshotProjectMetadata + > = new Map(); + for (const [project, record] of params.projectMap) { + projectMetadataMap.set(project, createInternalRecord(project, record, rootDir)); + } + + // Route hashes to individual projects + for (const [file, hash] of hashes) { + const project: IRushConfigurationProjectForSnapshot | undefined = lookupByPath.findChildPath(file); + if (!project) { + continue; + } + + let record: IInternalInputsSnapshotProjectMetadata | undefined = projectMetadataMap.get(project); + if (!record) { + projectMetadataMap.set(project, (record = createInternalRecord(project, undefined, rootDir))); + } + + record.hashes.set(file, hash); + } + + let globalAdditionalHashes: Map | undefined; + if (globalAdditionalFiles) { + globalAdditionalHashes = new Map(); + const sortedAdditionalFiles: string[] = Array.from(globalAdditionalFiles).sort(); + for (const file of sortedAdditionalFiles) { + const hash: string | undefined = hashes.get(file); + if (!hash) { + throw new Error(`Hash not found for global file: "${file}"`); + } + const owningProject: IRushConfigurationProjectForSnapshot | undefined = + lookupByPath.findChildPath(file); + if (owningProject) { + throw new InternalError( + `Requested global additional file "${file}" is owned by project in "${owningProject.projectRelativeFolder}". Declare a project dependency instead.` + ); + } + globalAdditionalHashes.set(file, hash); + } + } + + for (const record of projectMetadataMap.values()) { + // Ensure stable ordering. + Sort.sortMapKeys(record.hashes); + } + + this._projectMetadataMap = projectMetadataMap; + this._additionalHashes = additionalHashes; + this._globalAdditionalHashes = globalAdditionalHashes; + // Snapshot the environment so that queries are not impacted by when they happen + this._environment = environment; + this.hashes = hashes; + this.rootDirectory = rootDir; + } + + /** + * {@inheritdoc} + */ + public getTrackedFileHashesForOperation( + project: IRushConfigurationProjectForSnapshot, + operationName?: string + ): ReadonlyMap { + const record: IInternalInputsSnapshotProjectMetadata | undefined = this._projectMetadataMap.get(project); + if (!record) { + throw new InternalError(`No information available for project at ${project.projectFolder}`); + } + + const { fileHashesByOperationName } = record; + let hashes: Map | undefined = fileHashesByOperationName.get(operationName); + if (!hashes) { + hashes = new Map(); + fileHashesByOperationName.set(operationName, hashes); + // TODO: Support incrementalBuildIgnoredGlobs per-operation + const filter: (filePath: string) => boolean = getOrCreateProjectFilter(record); + + let outputValidator: LookupByPath | undefined; + + if (operationName) { + const operationSettings: Readonly | undefined = + record.projectConfig?.operationSettingsByOperationName.get(operationName); + + const outputFolderNames: string[] | undefined = operationSettings?.outputFolderNames; + if (outputFolderNames) { + const { relativePrefix } = record; + outputValidator = new LookupByPath(); + for (const folderName of outputFolderNames) { + outputValidator.setItem(`${relativePrefix}/${folderName}`, folderName); + } + } + + // Hash any additional files (files outside of a project, untracked project files, or even files outside of the repository) + const additionalFilesForOperation: ReadonlySet | undefined = + record.additionalFilesByOperationName?.get(operationName); + if (additionalFilesForOperation) { + for (const [filePath, hash] of this._resolveHashes(additionalFilesForOperation)) { + hashes.set(filePath, hash); + } + } + } + + const { _globalAdditionalHashes: globalAdditionalHashes } = this; + if (globalAdditionalHashes) { + for (const [file, hash] of globalAdditionalHashes) { + record.hashes.set(file, hash); + } + } + + // Hash the base project files + for (const [filePath, hash] of record.hashes) { + if (filter(filePath)) { + hashes.set(filePath, hash); + } + + // Ensure that the configured output folders for this operation do not contain any input files + // This should be reworked to operate on a global file origin map to ensure a hashed input + // is not a declared output of *any* operation. + const outputMatch: string | undefined = outputValidator?.findChildPath(filePath); + if (outputMatch) { + throw new Error( + `Configured output folder "${outputMatch}" for operation "${operationName}" in project "${project.projectRelativeFolder}" contains tracked input file "${filePath}".` + + ` If it is intended that this operation modifies its own input files, modify the build process to emit a warning if the output version differs from the input, and remove the directory from "outputFolderNames".` + + ` This will ensure cache correctness. Otherwise, change the build process to output to a disjoint folder.` + ); + } + } + } + + return hashes; + } + + /** + * {@inheritdoc} + */ + public getOperationOwnStateHash( + project: IRushConfigurationProjectForSnapshot, + operationName?: string + ): string { + const record: IInternalInputsSnapshotProjectMetadata | undefined = this._projectMetadataMap.get(project); + if (!record) { + throw new Error(`No information available for project at ${project.projectFolder}`); + } + + const { hashByOperationName } = record; + let hash: string | undefined = hashByOperationName.get(operationName); + if (!hash) { + const hashes: ReadonlyMap = this.getTrackedFileHashesForOperation( + project, + operationName + ); + + const hasher: Hash = createHash('sha1'); + // If this is for a specific operation, apply operation-specific options + if (operationName) { + const operationSettings: Readonly | undefined = + record.projectConfig?.operationSettingsByOperationName.get(operationName); + if (operationSettings) { + const { dependsOnEnvVars, outputFolderNames } = operationSettings; + if (dependsOnEnvVars) { + // As long as we enumerate environment variables in a consistent order, we will get a stable hash. + // Changing the order in rush-project.json will change the hash anyway since the file contents are part of the hash. + for (const envVar of dependsOnEnvVars) { + hasher.update(`${hashDelimiter}$${envVar}=${this._environment[envVar] || ''}`); + } + } + + if (outputFolderNames) { + hasher.update(`${hashDelimiter}${JSON.stringify(outputFolderNames)}`); + } + } + } + + // Hash the base project files + for (const [filePath, fileHash] of hashes) { + hasher.update(`${hashDelimiter}${filePath}${hashDelimiter}${fileHash}`); + } + + hash = hasher.digest('hex'); + + hashByOperationName.set(operationName, hash); + } + + return hash; + } + + private *_resolveHashes(filePaths: Iterable): Generator<[string, string]> { + const { hashes, _additionalHashes } = this; + + for (const filePath of filePaths) { + const hash: string | undefined = hashes.get(filePath) ?? _additionalHashes?.get(filePath); + if (!hash) { + throw new Error(`Could not find hash for file path "${filePath}"`); + } + yield [filePath, hash]; + } + } +} + +function getOrCreateProjectFilter( + record: IInternalInputsSnapshotProjectMetadata +): (filePath: string) => boolean { + if (!record.projectFilePathFilter) { + const ignoredGlobs: readonly string[] | undefined = record.projectConfig?.incrementalBuildIgnoredGlobs; + if (!ignoredGlobs || ignoredGlobs.length === 0) { + record.projectFilePathFilter = noopFilter; + } else { + const ignorer: Ignore = ignore(); + ignorer.add(ignoredGlobs as string[]); + const prefixLength: number = record.relativePrefix.length + 1; + record.projectFilePathFilter = function projectFilePathFilter(filePath: string): boolean { + return !ignorer.ignores(filePath.slice(prefixLength)); + }; + } + } + + return record.projectFilePathFilter; +} + +function createInternalRecord( + project: IRushConfigurationProjectForSnapshot, + baseRecord: IInputsSnapshotProjectMetadata | undefined, + rootDir: string +): IInternalInputsSnapshotProjectMetadata { + return { + // Data from the caller + projectConfig: baseRecord?.projectConfig, + additionalFilesByOperationName: baseRecord?.additionalFilesByOperationName, + + // Caches + hashes: new Map(), + hashByOperationName: new Map(), + fileHashesByOperationName: new Map(), + relativePrefix: getRelativePrefix(project, rootDir) + }; +} + +function getRelativePrefix(project: IRushConfigurationProjectForSnapshot, rootDir: string): string { + return Path.convertToSlashes(path.relative(rootDir, project.projectFolder)); +} + +function noopFilter(filePath: string): boolean { + return true; +} diff --git a/libraries/rush-lib/src/logic/incremental/test/InputsSnapshot.test.ts b/libraries/rush-lib/src/logic/incremental/test/InputsSnapshot.test.ts new file mode 100644 index 00000000000..a082fbc5098 --- /dev/null +++ b/libraries/rush-lib/src/logic/incremental/test/InputsSnapshot.test.ts @@ -0,0 +1,469 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { LookupByPath } from '@rushstack/lookup-by-path'; + +import type { RushProjectConfiguration } from '../../../api/RushProjectConfiguration'; +import { + InputsSnapshot, + type IInputsSnapshotParameters, + type IRushConfigurationProjectForSnapshot +} from '../InputsSnapshot'; + +describe(InputsSnapshot.name, () => { + function getTestConfig(): { + project: IRushConfigurationProjectForSnapshot; + options: IInputsSnapshotParameters; + } { + const project: IRushConfigurationProjectForSnapshot = { + projectFolder: '/root/a', + projectRelativeFolder: 'a' + }; + + return { + project, + options: { + rootDir: '/root', + additionalHashes: new Map([['/ext/config.json', 'hash4']]), + hashes: new Map([ + ['a/file1.js', 'hash1'], + ['a/file2.js', 'hash2'], + ['a/lib/file3.js', 'hash3'], + ['common/config/some-config.json', 'hash5'] + ]), + lookupByPath: new LookupByPath([[project.projectRelativeFolder, project]]), + projectMap: new Map() + } + }; + } + + function getTrivialSnapshot(): { + project: IRushConfigurationProjectForSnapshot; + input: InputsSnapshot; + } { + const { project, options } = getTestConfig(); + + const input: InputsSnapshot = new InputsSnapshot(options); + + return { project, input }; + } + + describe(InputsSnapshot.prototype.getTrackedFileHashesForOperation.name, () => { + it('Handles trivial input', () => { + const { project, input } = getTrivialSnapshot(); + + const result: ReadonlyMap = input.getTrackedFileHashesForOperation(project); + + expect(result).toMatchSnapshot(); + expect(result.size).toEqual(3); + expect(result.get('a/file1.js')).toEqual('hash1'); + expect(result.get('a/file2.js')).toEqual('hash2'); + expect(result.get('a/lib/file3.js')).toEqual('hash3'); + }); + + it('Detects outputFileNames collisions', () => { + const { project, options } = getTestConfig(); + + const projectConfig: Pick = { + operationSettingsByOperationName: new Map([ + [ + '_phase:build', + { + operationName: '_phase:build', + outputFolderNames: ['lib'] + } + ] + ]) + }; + + options.projectMap = new Map([ + [ + project, + { + projectConfig: projectConfig as RushProjectConfiguration + } + ] + ]); + + const input: InputsSnapshot = new InputsSnapshot(options); + + expect(() => + input.getTrackedFileHashesForOperation(project, '_phase:build') + ).toThrowErrorMatchingSnapshot(); + }); + + it('Respects additionalFilesByOperationName', () => { + const { project, options } = getTestConfig(); + + const projectConfig: Pick = { + operationSettingsByOperationName: new Map([ + [ + '_phase:build', + { + operationName: '_phase:build' + } + ] + ]) + }; + + const input: InputsSnapshot = new InputsSnapshot({ + ...options, + projectMap: new Map([ + [ + project, + { + projectConfig: projectConfig as RushProjectConfiguration, + additionalFilesByOperationName: new Map([['_phase:build', new Set(['/ext/config.json'])]]) + } + ] + ]) + }); + + const result: ReadonlyMap = input.getTrackedFileHashesForOperation( + project, + '_phase:build' + ); + + expect(result).toMatchSnapshot(); + expect(result.size).toEqual(4); + expect(result.get('a/file1.js')).toEqual('hash1'); + expect(result.get('a/file2.js')).toEqual('hash2'); + expect(result.get('a/lib/file3.js')).toEqual('hash3'); + expect(result.get('/ext/config.json')).toEqual('hash4'); + }); + + it('Respects globalAdditionalFiles', () => { + const { project, options } = getTestConfig(); + + const projectConfig: Pick = { + operationSettingsByOperationName: new Map([ + [ + '_phase:build', + { + operationName: '_phase:build' + } + ] + ]) + }; + + const input: InputsSnapshot = new InputsSnapshot({ + ...options, + globalAdditionalFiles: new Set(['common/config/some-config.json']), + projectMap: new Map([ + [ + project, + { + projectConfig: projectConfig as RushProjectConfiguration + } + ] + ]) + }); + + const result: ReadonlyMap = input.getTrackedFileHashesForOperation( + project, + '_phase:build' + ); + + expect(result).toMatchSnapshot(); + expect(result.size).toEqual(4); + expect(result.get('a/file1.js')).toEqual('hash1'); + expect(result.get('a/file2.js')).toEqual('hash2'); + expect(result.get('a/lib/file3.js')).toEqual('hash3'); + expect(result.get('common/config/some-config.json')).toEqual('hash5'); + }); + + it('Respects incrementalBuildIgnoredGlobs', () => { + const { project, options } = getTestConfig(); + + const projectConfig: Pick = { + incrementalBuildIgnoredGlobs: ['*2.js'] + }; + + const input: InputsSnapshot = new InputsSnapshot({ + ...options, + projectMap: new Map([ + [ + project, + { + projectConfig: projectConfig as RushProjectConfiguration + } + ] + ]) + }); + + const result: ReadonlyMap = input.getTrackedFileHashesForOperation(project); + + expect(result).toMatchSnapshot(); + expect(result.size).toEqual(2); + expect(result.get('a/file1.js')).toEqual('hash1'); + expect(result.get('a/lib/file3.js')).toEqual('hash3'); + }); + }); + + describe(InputsSnapshot.prototype.getOperationOwnStateHash.name, () => { + it('Handles trivial input', () => { + const { project, input } = getTrivialSnapshot(); + + const result: string = input.getOperationOwnStateHash(project); + + expect(result).toMatchSnapshot(); + }); + + it('Is invariant to input hash order', () => { + const { project, options } = getTestConfig(); + + const baseline: string = new InputsSnapshot(options).getOperationOwnStateHash(project); + + const input: InputsSnapshot = new InputsSnapshot({ + ...options, + hashes: new Map(Array.from(options.hashes).reverse()) + }); + + const result: string = input.getOperationOwnStateHash(project); + + expect(result).toEqual(baseline); + }); + + it('Detects outputFileNames collisions', () => { + const { project, options } = getTestConfig(); + + const projectConfig: Pick = { + operationSettingsByOperationName: new Map([ + [ + '_phase:build', + { + operationName: '_phase:build', + outputFolderNames: ['lib'] + } + ] + ]) + }; + + options.projectMap = new Map([ + [ + project, + { + projectConfig: projectConfig as RushProjectConfiguration + } + ] + ]); + + const input: InputsSnapshot = new InputsSnapshot(options); + + expect(() => input.getOperationOwnStateHash(project, '_phase:build')).toThrowErrorMatchingSnapshot(); + }); + + it('Changes if outputFileNames changes', () => { + const { project, options } = getTestConfig(); + const baseline: string = new InputsSnapshot(options).getOperationOwnStateHash(project, '_phase:build'); + + const projectConfig1: Pick = { + operationSettingsByOperationName: new Map([ + [ + '_phase:build', + { + operationName: '_phase:build', + outputFolderNames: ['lib-commonjs'] + } + ] + ]) + }; + + const projectConfig2: Pick = { + operationSettingsByOperationName: new Map([ + [ + '_phase:build', + { + operationName: '_phase:build', + outputFolderNames: ['lib-esm'] + } + ] + ]) + }; + + const input1: InputsSnapshot = new InputsSnapshot({ + ...options, + projectMap: new Map([ + [ + project, + { + projectConfig: projectConfig1 as RushProjectConfiguration + } + ] + ]) + }); + + const input2: InputsSnapshot = new InputsSnapshot({ + ...options, + projectMap: new Map([ + [ + project, + { + projectConfig: projectConfig2 as RushProjectConfiguration + } + ] + ]) + }); + + const result1: string = input1.getOperationOwnStateHash(project, '_phase:build'); + + const result2: string = input2.getOperationOwnStateHash(project, '_phase:build'); + + expect(result1).not.toEqual(baseline); + expect(result2).not.toEqual(baseline); + expect(result1).not.toEqual(result2); + }); + + it('Respects additionalOutputFilesByOperationName', () => { + const { project, options } = getTestConfig(); + const baseline: string = new InputsSnapshot(options).getOperationOwnStateHash(project, '_phase:build'); + + const projectConfig: Pick = { + operationSettingsByOperationName: new Map([ + [ + '_phase:build', + { + operationName: '_phase:build' + } + ] + ]) + }; + + const input: InputsSnapshot = new InputsSnapshot({ + ...options, + projectMap: new Map([ + [ + project, + { + projectConfig: projectConfig as RushProjectConfiguration, + additionalFilesByOperationName: new Map([['_phase:build', new Set(['/ext/config.json'])]]) + } + ] + ]) + }); + + const result: string = input.getOperationOwnStateHash(project, '_phase:build'); + + expect(result).toMatchSnapshot(); + expect(result).not.toEqual(baseline); + }); + + it('Respects globalAdditionalFiles', () => { + const { project, options } = getTestConfig(); + const baseline: string = new InputsSnapshot(options).getOperationOwnStateHash(project, '_phase:build'); + + const input: InputsSnapshot = new InputsSnapshot({ + ...options, + globalAdditionalFiles: new Set(['common/config/some-config.json']) + }); + + const result: string = input.getOperationOwnStateHash(project); + + expect(result).toMatchSnapshot(); + expect(result).not.toEqual(baseline); + }); + + it('Respects incrementalBuildIgnoredGlobs', () => { + const { project, options } = getTestConfig(); + const baseline: string = new InputsSnapshot(options).getOperationOwnStateHash(project, '_phase:build'); + + const projectConfig1: Pick = { + incrementalBuildIgnoredGlobs: ['*2.js'] + }; + + const input1: InputsSnapshot = new InputsSnapshot({ + ...options, + projectMap: new Map([ + [ + project, + { + projectConfig: projectConfig1 as RushProjectConfiguration + } + ] + ]) + }); + + const result1: string = input1.getOperationOwnStateHash(project); + + expect(result1).toMatchSnapshot(); + expect(result1).not.toEqual(baseline); + + const projectConfig2: Pick = { + incrementalBuildIgnoredGlobs: ['*1.js'] + }; + + const input2: InputsSnapshot = new InputsSnapshot({ + ...options, + projectMap: new Map([ + [ + project, + { + projectConfig: projectConfig2 as RushProjectConfiguration + } + ] + ]) + }); + + const result2: string = input2.getOperationOwnStateHash(project); + + expect(result2).toMatchSnapshot(); + expect(result2).not.toEqual(baseline); + + expect(result2).not.toEqual(result1); + }); + + it('Respects dependsOnEnvVars', () => { + const { project, options } = getTestConfig(); + const baseline: string = new InputsSnapshot(options).getOperationOwnStateHash(project, '_phase:build'); + + const projectConfig1: Pick = { + operationSettingsByOperationName: new Map([ + [ + '_phase:build', + { + operationName: '_phase:build', + dependsOnEnvVars: ['ENV_VAR'] + } + ] + ]) + }; + + const input1: InputsSnapshot = new InputsSnapshot({ + ...options, + projectMap: new Map([ + [ + project, + { + projectConfig: projectConfig1 as RushProjectConfiguration + } + ] + ]), + environment: {} + }); + + const result1: string = input1.getOperationOwnStateHash(project, '_phase:build'); + + expect(result1).toMatchSnapshot(); + expect(result1).not.toEqual(baseline); + + const input2: InputsSnapshot = new InputsSnapshot({ + ...options, + projectMap: new Map([ + [ + project, + { + projectConfig: projectConfig1 as RushProjectConfiguration + } + ] + ]), + environment: { ENV_VAR: 'some_value' } + }); + + const result2: string = input2.getOperationOwnStateHash(project, '_phase:build'); + + expect(result2).toMatchSnapshot(); + expect(result2).not.toEqual(baseline); + expect(result2).not.toEqual(result1); + }); + }); +}); diff --git a/libraries/rush-lib/src/logic/incremental/test/__snapshots__/InputsSnapshot.test.ts.snap b/libraries/rush-lib/src/logic/incremental/test/__snapshots__/InputsSnapshot.test.ts.snap new file mode 100644 index 00000000000..a1db7fa9818 --- /dev/null +++ b/libraries/rush-lib/src/logic/incremental/test/__snapshots__/InputsSnapshot.test.ts.snap @@ -0,0 +1,52 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`InputsSnapshot getOperationOwnStateHash Detects outputFileNames collisions 1`] = `"Configured output folder \\"lib\\" for operation \\"_phase:build\\" in project \\"a\\" contains tracked input file \\"a/lib/file3.js\\". If it is intended that this operation modifies its own input files, modify the build process to emit a warning if the output version differs from the input, and remove the directory from \\"outputFolderNames\\". This will ensure cache correctness. Otherwise, change the build process to output to a disjoint folder."`; + +exports[`InputsSnapshot getOperationOwnStateHash Handles trivial input 1`] = `"acf14e45ed255b0288e449432d48c285f619d146"`; + +exports[`InputsSnapshot getOperationOwnStateHash Respects additionalOutputFilesByOperationName 1`] = `"07f4147294d21a07865de84875d60bfbcc690652"`; + +exports[`InputsSnapshot getOperationOwnStateHash Respects dependsOnEnvVars 1`] = `"ad1f915d0ac6331c09febbbe1496c970a5401b73"`; + +exports[`InputsSnapshot getOperationOwnStateHash Respects dependsOnEnvVars 2`] = `"2c68d56fc9278b6495496070a6a992b929c37a83"`; + +exports[`InputsSnapshot getOperationOwnStateHash Respects globalAdditionalFiles 1`] = `"0e0437ad1941bacd098b22da15dc673f86ca6003"`; + +exports[`InputsSnapshot getOperationOwnStateHash Respects incrementalBuildIgnoredGlobs 1`] = `"f7b5af9ffdaa39831ed3374f28d0f7dccbee9c8d"`; + +exports[`InputsSnapshot getOperationOwnStateHash Respects incrementalBuildIgnoredGlobs 2`] = `"24047d4271ebf8badc9403c9a21a09fb6db2fb9c"`; + +exports[`InputsSnapshot getTrackedFileHashesForOperation Detects outputFileNames collisions 1`] = `"Configured output folder \\"lib\\" for operation \\"_phase:build\\" in project \\"a\\" contains tracked input file \\"a/lib/file3.js\\". If it is intended that this operation modifies its own input files, modify the build process to emit a warning if the output version differs from the input, and remove the directory from \\"outputFolderNames\\". This will ensure cache correctness. Otherwise, change the build process to output to a disjoint folder."`; + +exports[`InputsSnapshot getTrackedFileHashesForOperation Handles trivial input 1`] = ` +Map { + "a/file1.js" => "hash1", + "a/file2.js" => "hash2", + "a/lib/file3.js" => "hash3", +} +`; + +exports[`InputsSnapshot getTrackedFileHashesForOperation Respects additionalFilesByOperationName 1`] = ` +Map { + "/ext/config.json" => "hash4", + "a/file1.js" => "hash1", + "a/file2.js" => "hash2", + "a/lib/file3.js" => "hash3", +} +`; + +exports[`InputsSnapshot getTrackedFileHashesForOperation Respects globalAdditionalFiles 1`] = ` +Map { + "a/file1.js" => "hash1", + "a/file2.js" => "hash2", + "a/lib/file3.js" => "hash3", + "common/config/some-config.json" => "hash5", +} +`; + +exports[`InputsSnapshot getTrackedFileHashesForOperation Respects incrementalBuildIgnoredGlobs 1`] = ` +Map { + "a/file1.js" => "hash1", + "a/lib/file3.js" => "hash3", +} +`; diff --git a/libraries/rush-lib/src/logic/installManager/InstallHelpers.ts b/libraries/rush-lib/src/logic/installManager/InstallHelpers.ts index cb8a4df9410..40f3354879c 100644 --- a/libraries/rush-lib/src/logic/installManager/InstallHelpers.ts +++ b/libraries/rush-lib/src/logic/installManager/InstallHelpers.ts @@ -9,7 +9,7 @@ import { JsonFile, LockFile } from '@rushstack/node-core-library'; -import { Colorize } from '@rushstack/terminal'; +import { Colorize, type ITerminal } from '@rushstack/terminal'; import { LastInstallFlag } from '../../api/LastInstallFlag'; import type { PackageManagerName } from '../../api/packageManager/PackageManager'; @@ -21,6 +21,7 @@ import type { PnpmOptionsConfiguration } from '../pnpm/PnpmOptionsConfiguration' import { merge } from '../../utilities/objectUtilities'; import type { Subspace } from '../../api/Subspace'; import { RushConstants } from '../RushConstants'; +import * as semver from 'semver'; interface ICommonPackageJson extends IPackageJson { pnpm?: { @@ -28,6 +29,7 @@ interface ICommonPackageJson extends IPackageJson { packageExtensions?: typeof PnpmOptionsConfiguration.prototype.globalPackageExtensions; peerDependencyRules?: typeof PnpmOptionsConfiguration.prototype.globalPeerDependencyRules; neverBuiltDependencies?: typeof PnpmOptionsConfiguration.prototype.globalNeverBuiltDependencies; + ignoredOptionalDependencies?: typeof PnpmOptionsConfiguration.prototype.globalIgnoredOptionalDependencies; allowedDeprecatedVersions?: typeof PnpmOptionsConfiguration.prototype.globalAllowedDeprecatedVersions; patchedDependencies?: typeof PnpmOptionsConfiguration.prototype.globalPatchedDependencies; }; @@ -37,7 +39,8 @@ export class InstallHelpers { public static generateCommonPackageJson( rushConfiguration: RushConfiguration, subspace: Subspace, - dependencies: Map = new Map() + dependencies: Map = new Map(), + terminal: ITerminal ): void { const commonPackageJson: ICommonPackageJson = { dependencies: {}, @@ -47,7 +50,7 @@ export class InstallHelpers { version: '0.0.0' }; - if (rushConfiguration.packageManager === 'pnpm') { + if (rushConfiguration.isPnpm) { const pnpmOptions: PnpmOptionsConfiguration = subspace.getPnpmOptions() || rushConfiguration.pnpmOptions; if (!commonPackageJson.pnpm) { @@ -69,6 +72,24 @@ export class InstallHelpers { commonPackageJson.pnpm.neverBuiltDependencies = pnpmOptions.globalNeverBuiltDependencies; } + if (pnpmOptions.globalIgnoredOptionalDependencies) { + if ( + rushConfiguration.rushConfigurationJson.pnpmVersion !== undefined && + semver.lt(rushConfiguration.rushConfigurationJson.pnpmVersion, '9.0.0') + ) { + terminal.writeWarningLine( + Colorize.yellow( + `Your version of pnpm (${rushConfiguration.rushConfigurationJson.pnpmVersion}) ` + + `doesn't support the "globalIgnoredOptionalDependencies" field in ` + + `${rushConfiguration.commonRushConfigFolder}/${RushConstants.pnpmConfigFilename}. ` + + 'Remove this field or upgrade to pnpm 9.' + ) + ); + } + + commonPackageJson.pnpm.ignoredOptionalDependencies = pnpmOptions.globalIgnoredOptionalDependencies; + } + if (pnpmOptions.globalAllowedDeprecatedVersions) { commonPackageJson.pnpm.allowedDeprecatedVersions = pnpmOptions.globalAllowedDeprecatedVersions; } @@ -111,7 +132,7 @@ export class InstallHelpers { if (rushConfiguration.npmOptions && rushConfiguration.npmOptions.environmentVariables) { configurationEnvironment = rushConfiguration.npmOptions.environmentVariables; } - } else if (rushConfiguration.packageManager === 'pnpm') { + } else if (rushConfiguration.isPnpm) { if (rushConfiguration.pnpmOptions && rushConfiguration.pnpmOptions.environmentVariables) { configurationEnvironment = rushConfiguration.pnpmOptions.environmentVariables; } diff --git a/libraries/rush-lib/src/logic/installManager/RushInstallManager.ts b/libraries/rush-lib/src/logic/installManager/RushInstallManager.ts index 03b9c506d8d..0c016ca3106 100644 --- a/libraries/rush-lib/src/logic/installManager/RushInstallManager.ts +++ b/libraries/rush-lib/src/logic/installManager/RushInstallManager.ts @@ -332,7 +332,7 @@ export class RushInstallManager extends BaseInstallManager { // with the shrinkwrap file, since these will cause install to fail. if ( shrinkwrapFile && - this.rushConfiguration.packageManager === 'pnpm' && + this.rushConfiguration.isPnpm && this.rushConfiguration.experimentsConfiguration.configuration.usePnpmFrozenLockfileForRushInstall ) { const pnpmShrinkwrapFile: PnpmShrinkwrapFile = shrinkwrapFile as PnpmShrinkwrapFile; @@ -361,7 +361,7 @@ export class RushInstallManager extends BaseInstallManager { } // Remove the workspace file if it exists - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { const workspaceFilePath: string = path.join( this.rushConfiguration.commonTempFolder, 'pnpm-workspace.yaml' @@ -379,7 +379,8 @@ export class RushInstallManager extends BaseInstallManager { InstallHelpers.generateCommonPackageJson( this.rushConfiguration, this.rushConfiguration.defaultSubspace, - commonDependencies + commonDependencies, + this._terminal ); stopwatch.stop(); @@ -621,7 +622,7 @@ export class RushInstallManager extends BaseInstallManager { }, this.options.maxInstallAttempts, () => { - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { // eslint-disable-next-line no-console console.log(Colorize.yellow(`Deleting the "node_modules" folder`)); this.installRecycler.moveFolder(commonNodeModulesFolder); diff --git a/libraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts b/libraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts index 8308aef00c8..cf5936f4a5f 100644 --- a/libraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts +++ b/libraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts @@ -42,6 +42,7 @@ import { Colorize, ConsoleTerminalProvider } from '@rushstack/terminal'; import { BaseLinkManager, SymlinkKind } from '../base/BaseLinkManager'; import { FlagFile } from '../../api/FlagFile'; import { Stopwatch } from '../../utilities/Stopwatch'; +import type { PnpmOptionsConfiguration } from '../pnpm/PnpmOptionsConfiguration'; export interface IPnpmModules { hoistedDependencies: { [dep in string]: { [depPath in string]: string } }; @@ -222,9 +223,19 @@ export class WorkspaceInstallManager extends BaseInstallManager { const dependencySpecifier: DependencySpecifier = new DependencySpecifier(name, version); // Is there a locally built Rush project that could satisfy this dependency? - const referencedLocalProject: RushConfigurationProject | undefined = + let referencedLocalProject: RushConfigurationProject | undefined = this.rushConfiguration.getProjectByName(name); + // If we enable exemptDecoupledDependenciesBetweenSubspaces, it will only check dependencies within the subspace. + if ( + this.rushConfiguration.experimentsConfiguration.configuration + .exemptDecoupledDependenciesBetweenSubspaces + ) { + if (referencedLocalProject && !subspace.contains(referencedLocalProject)) { + referencedLocalProject = undefined; + } + } + // Validate that local projects are referenced with workspace notation. If not, and it is not a // cyclic dependency, then it needs to be updated to specify `workspace:*` explicitly. Currently only // supporting versions and version ranges for specifying a local project. @@ -247,9 +258,9 @@ export class WorkspaceInstallManager extends BaseInstallManager { // eslint-disable-next-line no-console console.log( Colorize.red( - `"${rushProject.packageName}" depends on package "${name}" (${version}) which exists ` + - 'within the workspace but cannot be fulfilled with the specified version range. Either ' + - 'specify a valid version range, or add the package as a cyclic dependency.' + `"${rushProject.packageName}" depends on package "${name}" (${version}) which belongs to ` + + 'the workspace but cannot be fulfilled with the specified version range. Either ' + + 'specify a valid version range, or add the package to "decoupledLocalDependencies" in rush.json.' ) ); throw new AlreadyReportedError(); @@ -372,8 +383,11 @@ export class WorkspaceInstallManager extends BaseInstallManager { } // Check if overrides and globalOverrides are the same + const pnpmOptions: PnpmOptionsConfiguration = + subspace.getPnpmOptions() || this.rushConfiguration.pnpmOptions; + const overridesAreEqual: boolean = objectsAreDeepEqual>( - this.rushConfiguration.pnpmOptions.globalOverrides ?? {}, + pnpmOptions.globalOverrides ?? {}, shrinkwrapFile?.overrides ? Object.fromEntries(shrinkwrapFile?.overrides) : {} ); @@ -384,7 +398,7 @@ export class WorkspaceInstallManager extends BaseInstallManager { // Check if packageExtensionsChecksum matches globalPackageExtension's hash const packageExtensionsChecksum: string | undefined = this._getPackageExtensionChecksum( - this.rushConfiguration.pnpmOptions.globalPackageExtensions + pnpmOptions.globalPackageExtensions ); const packageExtensionsChecksumAreEqual: boolean = packageExtensionsChecksum === shrinkwrapFile?.packageExtensionsChecksum; @@ -395,7 +409,7 @@ export class WorkspaceInstallManager extends BaseInstallManager { } // Write the common package.json - InstallHelpers.generateCommonPackageJson(this.rushConfiguration, subspace, undefined); + InstallHelpers.generateCommonPackageJson(this.rushConfiguration, subspace, undefined, this._terminal); // Save the generated workspace file. Don't update the file timestamp unless the content has changed, // since "rush install" will consider this timestamp @@ -427,7 +441,7 @@ export class WorkspaceInstallManager extends BaseInstallManager { const potentiallyChangedFiles: string[] = []; - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { // Add workspace file. This file is only modified when workspace packages change. const pnpmWorkspaceFilename: string = path.join( subspace.getSubspaceTempFolderPath(), @@ -564,7 +578,7 @@ export class WorkspaceInstallManager extends BaseInstallManager { }, this.options.maxInstallAttempts, () => { - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { this._terminal.writeWarningLine(`Deleting the "node_modules" folder`); this.installRecycler.moveFolder(commonNodeModulesFolder); @@ -633,7 +647,6 @@ export class WorkspaceInstallManager extends BaseInstallManager { // projects with dependencies, a lockfile won't be generated. const tempShrinkwrapFile: BaseShrinkwrapFile | undefined = ShrinkwrapFileFactory.getShrinkwrapFile( this.rushConfiguration.packageManager, - this.rushConfiguration.pnpmOptions, subspace.getTempShrinkwrapFilename() ); @@ -646,10 +659,7 @@ export class WorkspaceInstallManager extends BaseInstallManager { }, { concurrency: 10 } ); - } else if ( - this.rushConfiguration.packageManager === 'pnpm' && - this.rushConfiguration.pnpmOptions?.useWorkspaces - ) { + } else if (this.rushConfiguration.isPnpm && this.rushConfiguration.pnpmOptions?.useWorkspaces) { // If we're in PNPM workspace mode and PNPM didn't create a shrinkwrap file, // there are no dependencies. Generate empty shrinkwrap files for all projects. await Async.forEachAsync( @@ -746,7 +756,7 @@ export class WorkspaceInstallManager extends BaseInstallManager { super.pushConfigurationArgs(args, options, subspace); // Add workspace-specific args - if (this.rushConfiguration.packageManager === 'pnpm') { + if (this.rushConfiguration.isPnpm) { args.push('--recursive'); args.push('--link-workspace-packages', 'false'); diff --git a/libraries/rush-lib/src/logic/operations/BuildPlanPlugin.ts b/libraries/rush-lib/src/logic/operations/BuildPlanPlugin.ts index ab835024798..f48cd061e5d 100644 --- a/libraries/rush-lib/src/logic/operations/BuildPlanPlugin.ts +++ b/libraries/rush-lib/src/logic/operations/BuildPlanPlugin.ts @@ -40,13 +40,13 @@ export class BuildPlanPlugin implements IPhasedCommandPlugin { public apply(hooks: PhasedCommandHooks): void { const terminal: ITerminal = this._terminal; - hooks.beforeExecuteOperations.tapPromise(PLUGIN_NAME, createBuildPlan); + hooks.beforeExecuteOperations.tap(PLUGIN_NAME, createBuildPlan); - async function createBuildPlan( + function createBuildPlan( recordByOperation: Map, context: IExecuteOperationsContext - ): Promise { - const { projectConfigurations, projectChangeAnalyzer } = context; + ): void { + const { projectConfigurations, inputsSnapshot } = context; const disjointSet: DisjointSet = new DisjointSet(); const operations: Operation[] = [...recordByOperation.keys()]; for (const operation of operations) { @@ -56,13 +56,14 @@ export class BuildPlanPlugin implements IPhasedCommandPlugin { Operation, IBuildPlanOperationCacheContext >(); + for (const operation of operations) { const { associatedProject, associatedPhase } = operation; if (associatedProject && associatedPhase) { const projectConfiguration: RushProjectConfiguration | undefined = projectConfigurations.get(associatedProject); - const fileHashes: Map | undefined = - await projectChangeAnalyzer._tryGetProjectDependenciesAsync(associatedProject, terminal); + const fileHashes: ReadonlyMap | undefined = + inputsSnapshot?.getTrackedFileHashesForOperation(associatedProject, associatedPhase.name); if (!fileHashes) { continue; } diff --git a/libraries/rush-lib/src/logic/operations/CacheableOperationPlugin.ts b/libraries/rush-lib/src/logic/operations/CacheableOperationPlugin.ts index dd5812e5aa6..37ba2d626e7 100644 --- a/libraries/rush-lib/src/logic/operations/CacheableOperationPlugin.ts +++ b/libraries/rush-lib/src/logic/operations/CacheableOperationPlugin.ts @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import * as crypto from 'crypto'; -import { Async, InternalError, NewlineKind, Sort } from '@rushstack/node-core-library'; +import { InternalError, NewlineKind, Sort } from '@rushstack/node-core-library'; import { CollatedTerminal, type CollatedWriter } from '@rushstack/stream-collator'; import { DiscardStdoutTransform, TextRewriterTransform } from '@rushstack/terminal'; import { SplitterTransform, type TerminalWritable, type ITerminal, Terminal } from '@rushstack/terminal'; @@ -12,8 +12,7 @@ import { OperationStatus } from './OperationStatus'; import { CobuildLock, type ICobuildCompletedState } from '../cobuild/CobuildLock'; import { ProjectBuildCache } from '../buildCache/ProjectBuildCache'; import { RushConstants } from '../RushConstants'; -import { type IOperationSettings, RushProjectConfiguration } from '../../api/RushProjectConfiguration'; -import { getHashesForGlobsAsync } from '../buildCache/getHashesForGlobsAsync'; +import type { RushProjectConfiguration } from '../../api/RushProjectConfiguration'; import { initializeProjectLogFilesAsync, getProjectLogFilePaths, @@ -33,8 +32,6 @@ import type { PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks'; import type { IPhase } from '../../api/CommandLineConfiguration'; -import type { IRawRepoState, ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer'; -import type { OperationMetadataManager } from './OperationMetadataManager'; import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration'; import type { IOperationExecutionResult } from './IOperationExecutionResult'; import type { OperationExecutionRecord } from './OperationExecutionRecord'; @@ -51,10 +48,11 @@ export interface IOperationBuildCacheContext { isCacheWriteAllowed: boolean; isCacheReadAllowed: boolean; - projectChangeAnalyzer: ProjectChangeAnalyzer; - projectBuildCache: ProjectBuildCache | undefined; + stateHash: string; + + operationBuildCache: ProjectBuildCache | undefined; cacheDisabledReason: string | undefined; - operationSettings: IOperationSettings | undefined; + outputFolderNames: ReadonlyArray; cobuildLock: CobuildLock | undefined; @@ -87,101 +85,85 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { } public apply(hooks: PhasedCommandHooks): void { - const { allowWarningsInSuccessfulBuild, buildCacheConfiguration, cobuildConfiguration, terminal } = - this._options; + const { allowWarningsInSuccessfulBuild, buildCacheConfiguration, cobuildConfiguration } = this._options; - hooks.beforeExecuteOperations.tapPromise( + hooks.beforeExecuteOperations.tap( PLUGIN_NAME, - async ( + ( recordByOperation: Map, context: IExecuteOperationsContext - ): Promise => { - const { isIncrementalBuildAllowed, projectChangeAnalyzer, projectConfigurations, isInitial } = - context; + ): void => { + const { isIncrementalBuildAllowed, inputsSnapshot, projectConfigurations, isInitial } = context; + + if (!inputsSnapshot) { + throw new Error( + `Build cache is only supported if running in a Git repository. Either disable the build cache or run Rush in a Git repository.` + ); + } const disjointSet: DisjointSet | undefined = cobuildConfiguration?.cobuildFeatureEnabled ? new DisjointSet() : undefined; - for (const operation of recordByOperation.keys()) { - if ( - operation.settings?.allowCobuildWithoutCache && - !cobuildConfiguration?.cobuildWithoutCacheAllowed - ) { - throw new Error( - `Operation ${operation.name} is not allowed to run without the cobuild orchestration experiment enabled. You must enable the "allowCobuildWithoutCache" experiment in experiments.json.` - ); - } - if ( - operation.settings?.allowCobuildWithoutCache && - !operation.settings.disableBuildCacheForOperation - ) { - throw new Error( - `Operation ${operation.name} must have disableBuildCacheForOperation set to true when using the cobuild orchestration experiment. This is to prevent implicit cache dependencies for this operation.` - ); + for (const [operation, record] of recordByOperation) { + const stateHash: string = (record as OperationExecutionRecord).calculateStateHash({ + inputsSnapshot, + buildCacheConfiguration + }); + const { associatedProject, associatedPhase, runner, settings: operationSettings } = operation; + if (!associatedProject || !associatedPhase || !runner) { + return; } - } - - await Async.forEachAsync( - recordByOperation.keys(), - async (operation: Operation) => { - const { associatedProject, associatedPhase, runner, settings: operationSettings } = operation; - if (!associatedProject || !associatedPhase || !runner) { - return; - } - const { name: phaseName } = associatedPhase; + const { name: phaseName } = associatedPhase; - const projectConfiguration: RushProjectConfiguration | undefined = - projectConfigurations.get(associatedProject); + const projectConfiguration: RushProjectConfiguration | undefined = + projectConfigurations.get(associatedProject); - // This value can *currently* be cached per-project, but in the future the list of files will vary - // depending on the selected phase. - const fileHashes: Map | undefined = - await projectChangeAnalyzer._tryGetProjectDependenciesAsync(associatedProject, terminal); + // This value can *currently* be cached per-project, but in the future the list of files will vary + // depending on the selected phase. + const fileHashes: ReadonlyMap | undefined = + inputsSnapshot.getTrackedFileHashesForOperation(associatedProject, phaseName); - if (!fileHashes) { - throw new Error( - `Build cache is only supported if running in a Git repository. Either disable the build cache or run Rush in a Git repository.` - ); - } + const cacheDisabledReason: string | undefined = projectConfiguration + ? projectConfiguration.getCacheDisabledReason(fileHashes.keys(), phaseName, operation.isNoOp) + : `Project does not have a ${RushConstants.rushProjectConfigFilename} configuration file, ` + + 'or one provided by a rig, so it does not support caching.'; - const cacheDisabledReason: string | undefined = - RushProjectConfiguration.getCacheDisabledReasonForProject({ - projectConfiguration, - phaseName: phaseName, - isNoOp: operation.isNoOp, - trackedFileNames: fileHashes.keys() - }); + const metadataFolderPath: string | undefined = record.metadataFolderPath; - disjointSet?.add(operation); - - const buildCacheContext: IOperationBuildCacheContext = { - // Supports cache writes by default for initial operations. - // Don't write during watch runs for performance reasons (and to avoid flooding the cache) - isCacheWriteAllowed: isInitial, - isCacheReadAllowed: isIncrementalBuildAllowed, - projectBuildCache: undefined, - projectChangeAnalyzer, - operationSettings, - cacheDisabledReason, - cobuildLock: undefined, - cobuildClusterId: undefined, - buildCacheTerminal: undefined, - buildCacheTerminalWritable: undefined, - periodicCallback: new PeriodicCallback({ - interval: PERIODIC_CALLBACK_INTERVAL_IN_SECONDS * 1000 - }), - cacheRestored: false, - isCacheReadAttempted: false - }; - // Upstream runners may mutate the property of build cache context for downstream runners - this._buildCacheContextByOperation.set(operation, buildCacheContext); - }, - { - concurrency: 10 + const outputFolderNames: string[] = metadataFolderPath ? [metadataFolderPath] : []; + const configuredOutputFolderNames: string[] | undefined = operationSettings?.outputFolderNames; + if (configuredOutputFolderNames) { + for (const folderName of configuredOutputFolderNames) { + outputFolderNames.push(folderName); + } } - ); + + disjointSet?.add(operation); + + const buildCacheContext: IOperationBuildCacheContext = { + // Supports cache writes by default for initial operations. + // Don't write during watch runs for performance reasons (and to avoid flooding the cache) + isCacheWriteAllowed: isInitial, + isCacheReadAllowed: isIncrementalBuildAllowed, + operationBuildCache: undefined, + outputFolderNames, + stateHash, + cacheDisabledReason, + cobuildLock: undefined, + cobuildClusterId: undefined, + buildCacheTerminal: undefined, + buildCacheTerminalWritable: undefined, + periodicCallback: new PeriodicCallback({ + interval: PERIODIC_CALLBACK_INTERVAL_IN_SECONDS * 1000 + }), + cacheRestored: false, + isCacheReadAttempted: false + }; + // Upstream runners may mutate the property of build cache context for downstream runners + this._buildCacheContextByOperation.set(operation, buildCacheContext); + } if (disjointSet) { clusterOperations(disjointSet, this._buildCacheContextByOperation); @@ -240,10 +222,12 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { associatedProject: project, associatedPhase: phase, runner, - _operationMetadataManager: operationMetadataManager + _operationMetadataManager: operationMetadataManager, + operation } = record; if ( + !operation.enabled || !project || !phase || !runner?.cacheable || @@ -265,24 +249,19 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { buildCacheContext, buildCacheEnabled: buildCacheConfiguration?.buildCacheEnabled, rushProject: project, - logFilenameIdentifier: operationMetadataManager.logFilenameIdentifier, + logFilenameIdentifier: operation.logFilenameIdentifier, quietMode: record.quietMode, debugMode: record.debugMode }); } const buildCacheTerminal: ITerminal = buildCacheContext.buildCacheTerminal; - const configHash: string = runner.getConfigHash() || ''; - let projectBuildCache: ProjectBuildCache | undefined = await this._tryGetProjectBuildCacheAsync({ + let projectBuildCache: ProjectBuildCache | undefined = this._tryGetProjectBuildCache({ buildCacheContext, buildCacheConfiguration, - rushProject: project, - phase, - configHash, terminal: buildCacheTerminal, - operationMetadataManager, - operation: record.operation + record }); // Try to acquire the cobuild lock @@ -290,7 +269,7 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { if (cobuildConfiguration?.cobuildFeatureEnabled) { if ( cobuildConfiguration?.cobuildLeafProjectLogOnlyAllowed && - record.operation.consumers.size === 0 && + operation.consumers.size === 0 && !projectBuildCache ) { // When the leaf project log only is allowed and the leaf project is build cache "disabled", try to get @@ -301,9 +280,7 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { buildCacheContext, rushProject: project, phase, - configHash, - terminal: buildCacheTerminal, - operationMetadataManager + terminal: buildCacheTerminal }); if (projectBuildCache) { buildCacheTerminal.writeVerboseLine( @@ -343,7 +320,7 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { const { error: errorLogPath } = getProjectLogFilePaths({ project, - logFilenameIdentifier: operationMetadataManager.logFilenameIdentifier + logFilenameIdentifier: operation.logFilenameIdentifier }); const restoreCacheAsync = async ( // TODO: Investigate if `projectBuildCacheForRestore` is always the same instance as `projectBuildCache` @@ -438,9 +415,9 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { const record: OperationExecutionRecord = runnerContext as OperationExecutionRecord; const { status, stopwatch, _operationMetadataManager: operationMetadataManager, operation } = record; - const { associatedProject: project, associatedPhase: phase, runner } = operation; + const { associatedProject: project, associatedPhase: phase, runner, enabled } = operation; - if (!project || !phase || !runner?.cacheable || !operationMetadataManager) { + if (!enabled || !project || !phase || !runner?.cacheable || !operationMetadataManager) { return; } @@ -456,7 +433,7 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { return; } - const { cobuildLock, projectBuildCache, isCacheWriteAllowed, buildCacheTerminal, cacheRestored } = + const { cobuildLock, operationBuildCache, isCacheWriteAllowed, buildCacheTerminal, cacheRestored } = buildCacheContext; try { @@ -523,8 +500,8 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { // If the command is successful, we can calculate project hash, and no dependencies were skipped, // write a new cache entry. - if (!setCacheEntryPromise && taskIsSuccessful && isCacheWriteAllowed && projectBuildCache) { - setCacheEntryPromise = () => projectBuildCache.trySetCacheEntryAsync(buildCacheTerminal); + if (!setCacheEntryPromise && taskIsSuccessful && isCacheWriteAllowed && operationBuildCache) { + setCacheEntryPromise = () => operationBuildCache.trySetCacheEntryAsync(buildCacheTerminal); } if (!cacheRestored) { const cacheWriteSuccess: boolean | undefined = await setCacheEntryPromise?.(); @@ -592,66 +569,37 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { return buildCacheContext; } - private async _tryGetProjectBuildCacheAsync({ + private _tryGetProjectBuildCache({ buildCacheConfiguration, buildCacheContext, - rushProject, - phase, - configHash, terminal, - operationMetadataManager, - operation + record }: { buildCacheContext: IOperationBuildCacheContext; buildCacheConfiguration: BuildCacheConfiguration | undefined; - rushProject: RushConfigurationProject; - phase: IPhase; - configHash: string; terminal: ITerminal; - operationMetadataManager: OperationMetadataManager | undefined; - operation: Operation; - }): Promise { - if (!buildCacheContext.projectBuildCache) { + record: OperationExecutionRecord; + }): ProjectBuildCache | undefined { + if (!buildCacheContext.operationBuildCache) { const { cacheDisabledReason } = buildCacheContext; - if (cacheDisabledReason && !operation.settings?.allowCobuildWithoutCache) { + if (cacheDisabledReason && !record.operation.settings?.allowCobuildWithoutCache) { terminal.writeVerboseLine(cacheDisabledReason); return; } - const { operationSettings, projectChangeAnalyzer } = buildCacheContext; - if (!operationSettings || !buildCacheConfiguration) { + if (!buildCacheConfiguration) { // Unreachable, since this will have set `cacheDisabledReason`. return; } - const projectOutputFolderNames: ReadonlyArray = operationSettings.outputFolderNames || []; - const additionalProjectOutputFilePaths: ReadonlyArray = - operationMetadataManager?.relativeFilepaths || []; - const additionalContext: Record = {}; - - await updateAdditionalContextAsync({ - operationSettings, - additionalContext, - projectChangeAnalyzer, - terminal, - rushProject - }); - // eslint-disable-next-line require-atomic-updates -- This is guaranteed to not be concurrent - buildCacheContext.projectBuildCache = await ProjectBuildCache.tryGetProjectBuildCacheAsync({ - project: rushProject, - projectOutputFolderNames, - additionalProjectOutputFilePaths, - additionalContext, + buildCacheContext.operationBuildCache = ProjectBuildCache.forOperation(record, { buildCacheConfiguration, - terminal, - configHash, - projectChangeAnalyzer, - phaseName: phase.name + terminal }); } - return buildCacheContext.projectBuildCache; + return buildCacheContext.operationBuildCache; } // Get a ProjectBuildCache only cache/restore log files @@ -659,63 +607,45 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { buildCacheContext, rushProject, terminal, - configHash, buildCacheConfiguration, cobuildConfiguration, - phase, - operationMetadataManager + phase }: { buildCacheContext: IOperationBuildCacheContext; buildCacheConfiguration: BuildCacheConfiguration | undefined; cobuildConfiguration: CobuildConfiguration; rushProject: RushConfigurationProject; phase: IPhase; - configHash: string; terminal: ITerminal; - operationMetadataManager: OperationMetadataManager | undefined; }): Promise { if (!buildCacheConfiguration?.buildCacheEnabled) { return; } - const { operationSettings, projectChangeAnalyzer } = buildCacheContext; + const { outputFolderNames, stateHash } = buildCacheContext; + + const hasher: crypto.Hash = crypto.createHash('sha1'); + hasher.update(stateHash); - const projectOutputFolderNames: ReadonlyArray = operationSettings?.outputFolderNames ?? []; - const additionalProjectOutputFilePaths: ReadonlyArray = - operationMetadataManager?.relativeFilepaths || []; - const additionalContext: Record = { - // Force the cache to be a log files only cache - logFilesOnly: '1' - }; if (cobuildConfiguration.cobuildContextId) { - additionalContext.cobuildContextId = cobuildConfiguration.cobuildContextId; + hasher.update(`\ncobuildContextId=${cobuildConfiguration.cobuildContextId}`); } - if (operationSettings) { - await updateAdditionalContextAsync({ - operationSettings, - additionalContext, - projectChangeAnalyzer, - terminal, - rushProject - }); - } + hasher.update(`\nlogFilesOnly=1`); - const projectBuildCache: ProjectBuildCache | undefined = - await ProjectBuildCache.tryGetProjectBuildCacheAsync({ - project: rushProject, - projectOutputFolderNames, - additionalProjectOutputFilePaths, - additionalContext, - buildCacheConfiguration, - terminal, - configHash, - projectChangeAnalyzer, - phaseName: phase.name - }); + const operationStateHash: string = hasher.digest('hex'); + + const projectBuildCache: ProjectBuildCache = ProjectBuildCache.getProjectBuildCache({ + project: rushProject, + projectOutputFolderNames: outputFolderNames, + buildCacheConfiguration, + terminal, + operationStateHash, + phaseName: phase.name + }); // eslint-disable-next-line require-atomic-updates -- This is guaranteed to not be concurrent - buildCacheContext.projectBuildCache = projectBuildCache; + buildCacheContext.operationBuildCache = projectBuildCache; return projectBuildCache; } @@ -769,7 +699,7 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { quietMode: boolean; debugMode: boolean; }): Promise { - const silent: boolean = record.runner.silent; + const silent: boolean = record.silent; if (silent) { const nullTerminalProvider: NullTerminalProvider = new NullTerminalProvider(); return new Terminal(nullTerminalProvider); @@ -847,46 +777,6 @@ export class CacheableOperationPlugin implements IPhasedCommandPlugin { return buildCacheContext.buildCacheTerminalWritable; } } -async function updateAdditionalContextAsync({ - operationSettings, - additionalContext, - projectChangeAnalyzer, - terminal, - rushProject -}: { - operationSettings: IOperationSettings; - additionalContext: Record; - projectChangeAnalyzer: ProjectChangeAnalyzer; - terminal: ITerminal; - rushProject: RushConfigurationProject; -}): Promise { - if (operationSettings.dependsOnEnvVars) { - for (const varName of operationSettings.dependsOnEnvVars) { - additionalContext['$' + varName] = process.env[varName] || ''; - } - } - - if (operationSettings.dependsOnAdditionalFiles) { - const repoState: IRawRepoState | undefined = - await projectChangeAnalyzer._ensureInitializedAsync(terminal); - - const additionalFiles: Map = await getHashesForGlobsAsync( - operationSettings.dependsOnAdditionalFiles, - rushProject.projectFolder, - repoState - ); - - terminal.writeDebugLine( - `Including additional files to calculate build cache hash:\n ${Array.from(additionalFiles.keys()).join( - '\n ' - )} ` - ); - - for (const [filePath, fileHash] of additionalFiles) { - additionalContext['file://' + filePath] = fileHash; - } - } -} export function clusterOperations( initialClusters: DisjointSet, diff --git a/libraries/rush-lib/src/logic/operations/ConsoleTimelinePlugin.ts b/libraries/rush-lib/src/logic/operations/ConsoleTimelinePlugin.ts index 8ad9f7d0663..5931ce1694b 100644 --- a/libraries/rush-lib/src/logic/operations/ConsoleTimelinePlugin.ts +++ b/libraries/rush-lib/src/logic/operations/ConsoleTimelinePlugin.ts @@ -150,7 +150,7 @@ export function _printTimeline({ terminal, result, cobuildConfiguration }: IPrin let workDuration: number = 0; for (const [operation, operationResult] of result.operationResults) { - if (operation.runner?.silent) { + if (operationResult.silent) { continue; } diff --git a/libraries/rush-lib/src/logic/operations/IOperationExecutionResult.ts b/libraries/rush-lib/src/logic/operations/IOperationExecutionResult.ts index 578c3c0fe8b..6991beb5ccb 100644 --- a/libraries/rush-lib/src/logic/operations/IOperationExecutionResult.ts +++ b/libraries/rush-lib/src/logic/operations/IOperationExecutionResult.ts @@ -28,6 +28,10 @@ export interface IOperationExecutionResult { * it later (for example to re-print errors at end of execution). */ readonly error: Error | undefined; + /** + * If this operation is only present in the graph to maintain dependency relationships, this flag will be set to true. + */ + readonly silent: boolean; /** * Object tracking execution timing. */ @@ -44,6 +48,10 @@ export interface IOperationExecutionResult { * The id of the runner which actually runs the building process in cobuild mode. */ readonly cobuildRunnerId: string | undefined; + /** + * The relative path to the folder that contains operation metadata. This folder will be automatically included in cache entries. + */ + readonly metadataFolderPath: string | undefined; /** * The paths to the log files, if applicable. */ diff --git a/libraries/rush-lib/src/logic/operations/LegacySkipPlugin.ts b/libraries/rush-lib/src/logic/operations/LegacySkipPlugin.ts index 9b8045f1922..0e3a02fadbe 100644 --- a/libraries/rush-lib/src/logic/operations/LegacySkipPlugin.ts +++ b/libraries/rush-lib/src/logic/operations/LegacySkipPlugin.ts @@ -3,7 +3,7 @@ import path from 'node:path'; -import { Async, FileSystem, JsonFile, type JsonObject } from '@rushstack/node-core-library'; +import { FileSystem, JsonFile, type JsonObject } from '@rushstack/node-core-library'; import { PrintUtilities, Colorize, type ITerminal } from '@rushstack/terminal'; import type { Operation } from './Operation'; @@ -66,19 +66,20 @@ export class LegacySkipPlugin implements IPhasedCommandPlugin { const { terminal, changedProjectsOnly, isIncrementalBuildAllowed, allowWarningsInSuccessfulBuild } = this._options; - hooks.beforeExecuteOperations.tapPromise( + hooks.beforeExecuteOperations.tap( PLUGIN_NAME, - async ( + ( operations: ReadonlyMap, - { projectChangeAnalyzer }: IExecuteOperationsContext - ): Promise => { + context: IExecuteOperationsContext + ): void => { let logGitWarning: boolean = false; + const { inputsSnapshot } = context; - await Async.forEachAsync(operations.values(), async (record: IOperationExecutionResult) => { + for (const record of operations.values()) { const { operation } = record; const { associatedProject, runner, logFilenameIdentifier } = operation; if (!associatedProject || !runner) { - return; + continue; } if (!runner.cacheable) { @@ -87,7 +88,7 @@ export class LegacySkipPlugin implements IPhasedCommandPlugin { packageDeps: undefined, packageDepsPath: '' }); - return; + continue; } const packageDepsFilename: string = `package-deps_${logFilenameIdentifier}.json`; @@ -100,12 +101,15 @@ export class LegacySkipPlugin implements IPhasedCommandPlugin { let packageDeps: IProjectDeps | undefined; try { - const fileHashes: Map | undefined = - await projectChangeAnalyzer._tryGetProjectDependenciesAsync(associatedProject, terminal); + const fileHashes: ReadonlyMap | undefined = + inputsSnapshot?.getTrackedFileHashesForOperation( + associatedProject, + operation.associatedPhase?.name + ); if (!fileHashes) { logGitWarning = true; - return; + continue; } const files: Record = {}; @@ -134,7 +138,7 @@ export class LegacySkipPlugin implements IPhasedCommandPlugin { packageDeps, allowSkip: isIncrementalBuildAllowed }); - }); + } if (logGitWarning) { // To test this code path: diff --git a/libraries/rush-lib/src/logic/operations/Operation.ts b/libraries/rush-lib/src/logic/operations/Operation.ts index 34568f2c06c..bbc8d5d2af8 100644 --- a/libraries/rush-lib/src/logic/operations/Operation.ts +++ b/libraries/rush-lib/src/logic/operations/Operation.ts @@ -15,10 +15,12 @@ export interface IOperationOptions { * The Rush phase associated with this Operation, if any */ phase?: IPhase | undefined; + /** * The Rush project associated with this Operation, if any */ project?: RushConfigurationProject | undefined; + /** * When the scheduler is ready to process this `Operation`, the `runner` implements the actual work of * running the operation. @@ -98,6 +100,13 @@ export class Operation { */ public settings: IOperationSettings | undefined = undefined; + /** + * If set to false, this operation will be skipped during evaluation (return OperationStatus.Skipped). + * This is useful for plugins to alter the scope of the operation graph across executions, + * e.g. to enable or disable unit test execution, or to include or exclude dependencies. + */ + public enabled: boolean; + public constructor(options: IOperationOptions) { const { phase, project, runner, settings, logFilenameIdentifier } = options; this.associatedPhase = phase; @@ -105,6 +114,7 @@ export class Operation { this.runner = runner; this.settings = settings; this.logFilenameIdentifier = logFilenameIdentifier; + this.enabled = true; } /** diff --git a/libraries/rush-lib/src/logic/operations/OperationExecutionManager.ts b/libraries/rush-lib/src/logic/operations/OperationExecutionManager.ts index f1e06dabf49..bd54fc9ff81 100644 --- a/libraries/rush-lib/src/logic/operations/OperationExecutionManager.ts +++ b/libraries/rush-lib/src/logic/operations/OperationExecutionManager.ts @@ -138,7 +138,7 @@ export class OperationExecutionManager { ); executionRecords.set(operation, executionRecord); - if (!executionRecord.runner.silent) { + if (!executionRecord.silent) { // Only count non-silent operations totalOperations++; } @@ -212,7 +212,7 @@ export class OperationExecutionManager { this._terminal.writeStdoutLine(`Selected ${totalOperations} operation${plural}:`); const nonSilentOperations: string[] = []; for (const record of this._executionRecords.values()) { - if (!record.runner.silent) { + if (!record.silent) { nonSilentOperations.push(record.name); } } @@ -252,8 +252,8 @@ export class OperationExecutionManager { await Async.forEachAsync( this._executionQueue, - async (operation: OperationExecutionRecord) => { - await operation.executeAsync({ + async (record: OperationExecutionRecord) => { + await record.executeAsync({ onStart: onOperationStartAsync, onResult: onOperationCompleteAsync }); @@ -289,10 +289,12 @@ export class OperationExecutionManager { if (message) { // This creates the writer, so don't do this until needed record.collatedWriter.terminal.writeStderrLine(message); - // Ensure that the error message, if present, shows up in the summary + // Ensure that the summary isn't blank if we have an error message + // If the summary already contains max lines of stderr, this will get dropped, so we hope those lines + // are more useful than the final exit code. record.stdioSummarizer.writeChunk({ text: `${message}\n`, - kind: TerminalChunkKind.Stderr + kind: TerminalChunkKind.Stdout }); } } @@ -301,9 +303,7 @@ export class OperationExecutionManager { * Handles the result of the operation and propagates any relevant effects. */ private _onOperationComplete(record: OperationExecutionRecord): void { - const { runner, name, status } = record; - - const silent: boolean = runner.silent; + const { runner, name, status, silent } = record; switch (status) { /** @@ -324,13 +324,13 @@ export class OperationExecutionManager { // Now that we have the concept of architectural no-ops, we could implement this by replacing // {blockedRecord.runner} with a no-op that sets status to Blocked and logs the blocking // operations. However, the existing behavior is a bit simpler, so keeping that for now. - if (!blockedRecord.runner.silent) { + if (!blockedRecord.silent) { terminal.writeStdoutLine(`"${blockedRecord.name}" is blocked by "${name}".`); } blockedRecord.status = OperationStatus.Blocked; this._executionQueue.complete(blockedRecord); - if (!blockedRecord.runner.silent) { + if (!blockedRecord.silent) { // Only increment the count if the operation is not silent to avoid confusing the user. // The displayed total is the count of non-silent operations. this._completedOperations++; diff --git a/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts b/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts index efc93a3e39d..54ca0331531 100644 --- a/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts +++ b/libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. +import * as crypto from 'crypto'; import { type ITerminal, @@ -28,6 +29,10 @@ import { type ILogFilePaths, initializeProjectLogFilesAsync } from './ProjectLogWritable'; +import type { IOperationExecutionResult } from './IOperationExecutionResult'; +import type { IInputsSnapshot } from '../incremental/InputsSnapshot'; +import { RushConstants } from '../RushConstants'; +import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration'; export interface IOperationExecutionRecordContext { streamCollator: StreamCollator; @@ -42,7 +47,7 @@ export interface IOperationExecutionRecordContext { * * @internal */ -export class OperationExecutionRecord implements IOperationRunnerContext { +export class OperationExecutionRecord implements IOperationRunnerContext, IOperationExecutionResult { /** * The associated operation. */ @@ -113,6 +118,7 @@ export class OperationExecutionRecord implements IOperationRunnerContext { private _collatedWriter: CollatedWriter | undefined = undefined; private _status: OperationStatus; + private _stateHash: string | undefined; public constructor(operation: Operation, context: IOperationExecutionRecordContext) { const { runner, associatedPhase, associatedProject } = operation; @@ -176,6 +182,10 @@ export class OperationExecutionRecord implements IOperationRunnerContext { return this._operationMetadataManager?.stateFile.state?.cobuildRunnerId; } + public get metadataFolderPath(): string | undefined { + return this._operationMetadataManager?.metadataFolderPath; + } + public get isTerminal(): boolean { return TERMINAL_STATUSES.has(this.status); } @@ -197,6 +207,19 @@ export class OperationExecutionRecord implements IOperationRunnerContext { this._context.onOperationStatusChanged?.(this); } + public get silent(): boolean { + return !this.operation.enabled || this.runner.silent; + } + + public get stateHash(): string { + if (!this._stateHash) { + throw new Error( + 'Operation state hash is not calculated yet, you must call `calculateStateHash` first.' + ); + } + return this._stateHash; + } + /** * {@inheritdoc IOperationRunnerContext.runWithTerminalAsync} */ @@ -303,7 +326,13 @@ export class OperationExecutionRecord implements IOperationRunnerContext { if (earlyReturnStatus) { this.status = earlyReturnStatus; } else { - this.status = await this.runner.executeAsync(this); + // If the operation is disabled, skip the runner and directly mark as Skipped. + // However, if the operation is a NoOp, return NoOp so that cache entries can still be written. + this.status = this.operation.enabled + ? await this.runner.executeAsync(this) + : this.runner.isNoOp + ? OperationStatus.NoOp + : OperationStatus.Skipped; } // Delegate global state reporting await onResult(this); @@ -320,4 +349,61 @@ export class OperationExecutionRecord implements IOperationRunnerContext { } } } + + public calculateStateHash(options: { + inputsSnapshot: IInputsSnapshot; + buildCacheConfiguration: BuildCacheConfiguration; + }): string { + if (!this._stateHash) { + const { + inputsSnapshot, + buildCacheConfiguration: { cacheHashSalt } + } = options; + + // Examples of data in the config hash: + // - CLI parameters (ShellOperationRunner) + const configHash: string = this.runner.getConfigHash(); + + const { associatedProject, associatedPhase } = this; + // Examples of data in the local state hash: + // - Environment variables specified in `dependsOnEnvVars` + // - Git hashes of tracked files in the associated project + // - Git hash of the shrinkwrap file for the project + // - Git hashes of any files specified in `dependsOnAdditionalFiles` (must not be associated with a project) + const localStateHash: string | undefined = + associatedProject && + inputsSnapshot.getOperationOwnStateHash(associatedProject, associatedPhase?.name); + + // The final state hashes of operation dependencies are factored into the hash to ensure that any + // state changes in dependencies will invalidate the cache. + const dependencyHashes: string[] = Array.from(this.dependencies, (record) => { + return `${RushConstants.hashDelimiter}${record.name}=${record.calculateStateHash(options)}`; + }).sort(); + + const hasher: crypto.Hash = crypto.createHash('sha1'); + // This property is used to force cache bust when version changes, e.g. when fixing bugs in the content + // of the build cache. + hasher.update(`${RushConstants.buildCacheVersion}`); + + if (cacheHashSalt !== undefined) { + // This allows repository owners to force a cache bust by changing the salt. + // A common use case is to invalidate the cache when adding/removing/updating rush plugins that alter the build output. + hasher.update(cacheHashSalt); + } + + for (const dependencyHash of dependencyHashes) { + hasher.update(dependencyHash); + } + + if (localStateHash) { + hasher.update(`${RushConstants.hashDelimiter}${localStateHash}`); + } + + hasher.update(`${RushConstants.hashDelimiter}${configHash}`); + + const hash: string = hasher.digest('hex'); + this._stateHash = hash; + } + return this._stateHash; + } } diff --git a/libraries/rush-lib/src/logic/operations/OperationMetadataManager.ts b/libraries/rush-lib/src/logic/operations/OperationMetadataManager.ts index 6c722357850..a327ae977dc 100644 --- a/libraries/rush-lib/src/logic/operations/OperationMetadataManager.ts +++ b/libraries/rush-lib/src/logic/operations/OperationMetadataManager.ts @@ -56,9 +56,6 @@ export class OperationMetadataManager { private readonly _logPath: string; private readonly _errorLogPath: string; private readonly _logChunksPath: string; - private readonly _relativeLogPath: string; - private readonly _relativeLogChunksPath: string; - private readonly _relativeErrorLogPath: string; public constructor(options: IOperationMetadataManagerOptions) { const { @@ -77,12 +74,9 @@ export class OperationMetadataManager { }); this._metadataFolderPath = metadataFolderPath; - this._relativeLogPath = `${metadataFolderPath}/all.log`; - this._relativeErrorLogPath = `${metadataFolderPath}/error.log`; - this._relativeLogChunksPath = `${metadataFolderPath}/log-chunks.jsonl`; - this._logPath = `${projectFolder}/${this._relativeLogPath}`; - this._errorLogPath = `${projectFolder}/${this._relativeErrorLogPath}`; - this._logChunksPath = `${projectFolder}/${this._relativeLogChunksPath}`; + this._logPath = `${projectFolder}/${metadataFolderPath}/all.log`; + this._errorLogPath = `${projectFolder}/${metadataFolderPath}/error.log`; + this._logChunksPath = `${projectFolder}/${metadataFolderPath}/log-chunks.jsonl`; } /** @@ -92,13 +86,8 @@ export class OperationMetadataManager { * Example: `.rush/temp/operation/_phase_build/all.log` * Example: `.rush/temp/operation/_phase_build/error.log` */ - public get relativeFilepaths(): string[] { - return [ - this.stateFile.relativeFilepath, - this._relativeLogPath, - this._relativeErrorLogPath, - this._relativeLogChunksPath - ]; + public get metadataFolderPath(): string { + return this._metadataFolderPath; } public async saveAsync({ diff --git a/libraries/rush-lib/src/logic/operations/OperationResultSummarizerPlugin.ts b/libraries/rush-lib/src/logic/operations/OperationResultSummarizerPlugin.ts index a0bd482bf19..ec9a3cde168 100644 --- a/libraries/rush-lib/src/logic/operations/OperationResultSummarizerPlugin.ts +++ b/libraries/rush-lib/src/logic/operations/OperationResultSummarizerPlugin.ts @@ -52,7 +52,7 @@ export function _printOperationStatus(terminal: ITerminal, result: IExecutionRes const operationsByStatus: IOperationsByStatus = new Map(); for (const record of operationResults) { - if (record[0].runner?.silent) { + if (record[1].silent) { // Don't report silenced operations continue; } diff --git a/libraries/rush-lib/src/logic/operations/PhasedOperationPlugin.ts b/libraries/rush-lib/src/logic/operations/PhasedOperationPlugin.ts index d7c1342c910..0eeaaf0f651 100644 --- a/libraries/rush-lib/src/logic/operations/PhasedOperationPlugin.ts +++ b/libraries/rush-lib/src/logic/operations/PhasedOperationPlugin.ts @@ -5,8 +5,6 @@ import type { RushConfigurationProject } from '../../api/RushConfigurationProjec import type { IPhase } from '../../api/CommandLineConfiguration'; import { Operation } from './Operation'; -import { OperationStatus } from './OperationStatus'; -import { NullOperationRunner } from './NullOperationRunner'; import type { ICreateOperationsContext, IPhasedCommandPlugin, @@ -55,15 +53,11 @@ function createOperations( } } - for (const [key, operation] of operations) { + for (const operation of operations.values()) { if (!operationsWithWork.has(operation)) { // This operation is in scope, but did not change since it was last executed by the current command. // However, we have no state tracking across executions, so treat as unknown. - operation.runner = new NullOperationRunner({ - name: key, - result: OperationStatus.Skipped, - silent: true - }); + operation.enabled = false; } } @@ -91,12 +85,8 @@ function createOperations( }); if (!phaseSelection.has(phase) || !projectSelection.has(project)) { - // Not in scope. Mark skipped because state is unknown. - operation.runner = new NullOperationRunner({ - name: key, - result: OperationStatus.Skipped, - silent: true - }); + // Not in scope. Mark disabled, which will report as OperationStatus.Skipped. + operation.enabled = false; } else if (changedProjects.has(project)) { operationsWithWork.add(operation); } diff --git a/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts b/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts index cac65421518..a281a31ad65 100644 --- a/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts +++ b/libraries/rush-lib/src/logic/operations/ProjectLogWritable.ts @@ -148,7 +148,7 @@ export class SplitLogFileWritable extends TerminalWritable { this.errorLogPath = errorLogPath; this._logWriter = FileWriter.open(logPath); - this._errorLogWriter = FileWriter.open(errorLogPath); + this._errorLogWriter = undefined; } // Override writeChunk function to throw custom error diff --git a/libraries/rush-lib/src/logic/operations/test/BuildPlanPlugin.test.ts b/libraries/rush-lib/src/logic/operations/test/BuildPlanPlugin.test.ts index 9401819a483..d97de794e87 100644 --- a/libraries/rush-lib/src/logic/operations/test/BuildPlanPlugin.test.ts +++ b/libraries/rush-lib/src/logic/operations/test/BuildPlanPlugin.test.ts @@ -22,9 +22,9 @@ import { PhasedOperationPlugin } from '../PhasedOperationPlugin'; import type { RushConfigurationProject } from '../../../api/RushConfigurationProject'; import { RushConstants } from '../../RushConstants'; import { MockOperationRunner } from './MockOperationRunner'; -import { ProjectChangeAnalyzer } from '../../ProjectChangeAnalyzer'; import path from 'path'; import type { ICommandLineJson } from '../../../api/CommandLineJson'; +import type { IInputsSnapshot } from '../../incremental/InputsSnapshot'; describe(BuildPlanPlugin.name, () => { const rushJsonFile: string = path.resolve(__dirname, `../../test/workspaceRepo/rush.json`); @@ -104,12 +104,13 @@ describe(BuildPlanPlugin.name, () => { const hooks: PhasedCommandHooks = new PhasedCommandHooks(); new BuildPlanPlugin(terminal).apply(hooks); - const context: Pick = { - projectChangeAnalyzer: { - [ProjectChangeAnalyzer.prototype._tryGetProjectDependenciesAsync.name]: async () => { - return new Map(); - } - } as unknown as ProjectChangeAnalyzer, + const inputsSnapshot: Pick = { + getTrackedFileHashesForOperation() { + return new Map(); + } + }; + const context: Pick = { + inputsSnapshot: inputsSnapshot as unknown as IInputsSnapshot, projectConfigurations: new Map() }; const buildCommand: IPhasedCommandConfig = commandLineConfiguration.commands.get( diff --git a/libraries/rush-lib/src/logic/operations/test/PhasedOperationPlugin.test.ts b/libraries/rush-lib/src/logic/operations/test/PhasedOperationPlugin.test.ts index 89f434a673e..273e86a2313 100644 --- a/libraries/rush-lib/src/logic/operations/test/PhasedOperationPlugin.test.ts +++ b/libraries/rush-lib/src/logic/operations/test/PhasedOperationPlugin.test.ts @@ -30,7 +30,7 @@ interface ISerializedOperation { function serializeOperation(operation: Operation): ISerializedOperation { return { name: operation.name!, - silent: operation.runner!.silent, + silent: !operation.enabled || operation.runner!.silent, dependencies: Array.from(operation.dependencies, (dep: Operation) => dep.name!) }; } diff --git a/libraries/rush-lib/src/logic/operations/test/__snapshots__/PhasedOperationPlugin.test.ts.snap b/libraries/rush-lib/src/logic/operations/test/__snapshots__/PhasedOperationPlugin.test.ts.snap index f0d8741667a..39094171e89 100644 --- a/libraries/rush-lib/src/logic/operations/test/__snapshots__/PhasedOperationPlugin.test.ts.snap +++ b/libraries/rush-lib/src/logic/operations/test/__snapshots__/PhasedOperationPlugin.test.ts.snap @@ -623,19 +623,19 @@ exports[`PhasedOperationPlugin handles filtered phases 1`] = ` Array [ Object { "dependencies": Array [ - "a;_phase:no-deps", + "a (no-deps)", ], "name": "a (upstream-self)", "silent": false, }, Object { "dependencies": Array [], - "name": "a;_phase:no-deps", + "name": "a (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", "a (upstream-self)", ], "name": "b (upstream-self)", @@ -643,12 +643,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "b;_phase:no-deps", + "name": "b (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "c;_phase:no-deps", + "c (no-deps)", "b (upstream-self)", ], "name": "c (upstream-self)", @@ -656,12 +656,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "c;_phase:no-deps", + "name": "c (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "d;_phase:no-deps", + "d (no-deps)", "b (upstream-self)", ], "name": "d (upstream-self)", @@ -669,12 +669,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "d;_phase:no-deps", + "name": "d (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "e;_phase:no-deps", + "e (no-deps)", "c (upstream-self)", ], "name": "e (upstream-self)", @@ -682,12 +682,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "e;_phase:no-deps", + "name": "e (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "f;_phase:no-deps", + "f (no-deps)", "a (upstream-self)", "h (upstream-self)", ], @@ -696,12 +696,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "f;_phase:no-deps", + "name": "f (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "h;_phase:no-deps", + "h (no-deps)", "a (upstream-self)", ], "name": "h (upstream-self)", @@ -709,12 +709,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "h;_phase:no-deps", + "name": "h (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "g;_phase:no-deps", + "g (no-deps)", "a (upstream-self)", ], "name": "g (upstream-self)", @@ -722,31 +722,31 @@ Array [ }, Object { "dependencies": Array [], - "name": "g;_phase:no-deps", + "name": "g (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "i;_phase:no-deps", + "i (no-deps)", ], "name": "i (upstream-self)", "silent": false, }, Object { "dependencies": Array [], - "name": "i;_phase:no-deps", + "name": "i (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "j;_phase:no-deps", + "j (no-deps)", ], "name": "j (upstream-self)", "silent": false, }, Object { "dependencies": Array [], - "name": "j;_phase:no-deps", + "name": "j (no-deps)", "silent": true, }, ] @@ -769,48 +769,48 @@ Array [ Object { "dependencies": Array [ "b (upstream-3)", - "a;_phase:upstream-1-self-upstream", - "a;_phase:upstream-2-self", + "a (upstream-1-self-upstream)", + "a (upstream-2-self)", ], "name": "b (complex)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], "name": "b (upstream-3)", "silent": false, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-2", + "name": "a (upstream-2)", "silent": true, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-1-self-upstream", + "name": "a (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], - "name": "a;_phase:upstream-2-self", + "name": "a (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ "c (upstream-3)", - "b;_phase:upstream-1-self-upstream", - "b;_phase:upstream-2-self", + "b (upstream-1-self-upstream)", + "b (upstream-2-self)", ], "name": "c (complex)", "silent": false, }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], "name": "c (upstream-3)", "silent": false, @@ -819,7 +819,7 @@ Array [ "dependencies": Array [ "a (upstream-1)", ], - "name": "b;_phase:upstream-2", + "name": "b (upstream-2)", "silent": true, }, Object { @@ -829,37 +829,37 @@ Array [ }, Object { "dependencies": Array [ - "a;_phase:upstream-1-self", + "a (upstream-1-self)", ], - "name": "b;_phase:upstream-1-self-upstream", + "name": "b (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ "a (upstream-1)", ], - "name": "a;_phase:upstream-1-self", + "name": "a (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], - "name": "b;_phase:upstream-2-self", + "name": "b (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ "d (upstream-3)", - "b;_phase:upstream-1-self-upstream", - "b;_phase:upstream-2-self", + "b (upstream-1-self-upstream)", + "b (upstream-2-self)", ], "name": "d (complex)", "silent": false, }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], "name": "d (upstream-3)", "silent": false, @@ -867,15 +867,15 @@ Array [ Object { "dependencies": Array [ "e (upstream-3)", - "c;_phase:upstream-1-self-upstream", - "c;_phase:upstream-2-self", + "c (upstream-1-self-upstream)", + "c (upstream-2-self)", ], "name": "e (complex)", "silent": false, }, Object { "dependencies": Array [ - "c;_phase:upstream-2", + "c (upstream-2)", ], "name": "e (upstream-3)", "silent": false, @@ -884,7 +884,7 @@ Array [ "dependencies": Array [ "b (upstream-1)", ], - "name": "c;_phase:upstream-2", + "name": "c (upstream-2)", "silent": true, }, Object { @@ -901,40 +901,40 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:upstream-1-self", + "b (upstream-1-self)", ], - "name": "c;_phase:upstream-1-self-upstream", + "name": "c (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ "b (upstream-1)", ], - "name": "b;_phase:upstream-1-self", + "name": "b (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "c;_phase:upstream-2", + "c (upstream-2)", ], - "name": "c;_phase:upstream-2-self", + "name": "c (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ "f (upstream-3)", - "a;_phase:upstream-1-self-upstream", - "h;_phase:upstream-1-self-upstream", - "a;_phase:upstream-2-self", - "h;_phase:upstream-2-self", + "a (upstream-1-self-upstream)", + "h (upstream-1-self-upstream)", + "a (upstream-2-self)", + "h (upstream-2-self)", ], "name": "f (complex)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", - "h;_phase:upstream-2", + "a (upstream-2)", + "h (upstream-2)", ], "name": "f (upstream-3)", "silent": false, @@ -943,35 +943,35 @@ Array [ "dependencies": Array [ "a (upstream-1)", ], - "name": "h;_phase:upstream-2", + "name": "h (upstream-2)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-1-self", + "a (upstream-1-self)", ], - "name": "h;_phase:upstream-1-self-upstream", + "name": "h (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "h;_phase:upstream-2", + "h (upstream-2)", ], - "name": "h;_phase:upstream-2-self", + "name": "h (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ "g (upstream-3)", - "a;_phase:upstream-1-self-upstream", - "a;_phase:upstream-2-self", + "a (upstream-1-self-upstream)", + "a (upstream-2-self)", ], "name": "g (complex)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], "name": "g (upstream-3)", "silent": false, @@ -979,15 +979,15 @@ Array [ Object { "dependencies": Array [ "h (upstream-3)", - "a;_phase:upstream-1-self-upstream", - "a;_phase:upstream-2-self", + "a (upstream-1-self-upstream)", + "a (upstream-2-self)", ], "name": "h (complex)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], "name": "h (upstream-3)", "silent": false, @@ -1121,27 +1121,27 @@ exports[`PhasedOperationPlugin handles filtered phases on filtered projects 1`] Array [ Object { "dependencies": Array [ - "a;_phase:upstream-1", - "h;_phase:upstream-1", + "a (upstream-1)", + "h (upstream-1)", ], "name": "f (upstream-2)", "silent": false, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-1", + "name": "a (upstream-1)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:no-deps", + "a (no-deps)", ], - "name": "h;_phase:upstream-1", + "name": "h (upstream-1)", "silent": true, }, Object { "dependencies": Array [], - "name": "a;_phase:no-deps", + "name": "a (no-deps)", "silent": true, }, Object { @@ -1151,16 +1151,16 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:upstream-1", + "b (upstream-1)", ], "name": "c (upstream-2)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:no-deps", + "a (no-deps)", ], - "name": "b;_phase:upstream-1", + "name": "b (upstream-1)", "silent": true, }, ] @@ -1171,32 +1171,32 @@ Array [ Object { "dependencies": Array [ "f (upstream-3)", - "a;_phase:upstream-1-self-upstream", - "h;_phase:upstream-1-self-upstream", - "a;_phase:upstream-2-self", - "h;_phase:upstream-2-self", + "a (upstream-1-self-upstream)", + "h (upstream-1-self-upstream)", + "a (upstream-2-self)", + "h (upstream-2-self)", ], "name": "f (complex)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", - "h;_phase:upstream-2", + "a (upstream-2)", + "h (upstream-2)", ], "name": "f (upstream-3)", "silent": false, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-2", + "name": "a (upstream-2)", "silent": true, }, Object { "dependencies": Array [ "a (upstream-1)", ], - "name": "h;_phase:upstream-2", + "name": "h (upstream-2)", "silent": true, }, Object { @@ -1206,35 +1206,35 @@ Array [ }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-1-self-upstream", + "name": "a (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-1-self", + "a (upstream-1-self)", ], - "name": "h;_phase:upstream-1-self-upstream", + "name": "h (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ "a (upstream-1)", ], - "name": "a;_phase:upstream-1-self", + "name": "a (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], - "name": "a;_phase:upstream-2-self", + "name": "a (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ - "h;_phase:upstream-2", + "h (upstream-2)", ], - "name": "h;_phase:upstream-2-self", + "name": "h (upstream-2-self)", "silent": true, }, Object { @@ -1252,15 +1252,15 @@ Array [ Object { "dependencies": Array [ "c (upstream-3)", - "b;_phase:upstream-1-self-upstream", - "b;_phase:upstream-2-self", + "b (upstream-1-self-upstream)", + "b (upstream-2-self)", ], "name": "c (complex)", "silent": false, }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], "name": "c (upstream-3)", "silent": false, @@ -1269,27 +1269,27 @@ Array [ "dependencies": Array [ "a (upstream-1)", ], - "name": "b;_phase:upstream-2", + "name": "b (upstream-2)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-1-self", + "a (upstream-1-self)", ], - "name": "b;_phase:upstream-1-self-upstream", + "name": "b (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], - "name": "b;_phase:upstream-2-self", + "name": "b (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ "a (no-deps)", - "h;_phase:no-deps", + "h (no-deps)", ], "name": "f (upstream-1)", "silent": false, @@ -1301,19 +1301,19 @@ Array [ }, Object { "dependencies": Array [], - "name": "h;_phase:no-deps", + "name": "h (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", ], "name": "c (upstream-1)", "silent": false, }, Object { "dependencies": Array [], - "name": "b;_phase:no-deps", + "name": "b (no-deps)", "silent": true, }, Object { @@ -1339,52 +1339,52 @@ Array [ Object { "dependencies": Array [ "g (no-deps)", - "a;_phase:upstream-self", + "a (upstream-self)", ], "name": "g (upstream-self)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:no-deps", + "a (no-deps)", ], - "name": "a;_phase:upstream-self", + "name": "a (upstream-self)", "silent": true, }, Object { "dependencies": Array [], - "name": "a;_phase:no-deps", + "name": "a (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:no-deps", + "a (no-deps)", ], "name": "g (upstream-1)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:upstream-1", + "a (upstream-1)", ], "name": "g (upstream-2)", "silent": false, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-1", + "name": "a (upstream-1)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], "name": "g (upstream-3)", "silent": false, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-2", + "name": "a (upstream-2)", "silent": true, }, Object { @@ -1403,37 +1403,37 @@ Array [ }, Object { "dependencies": Array [ - "a;_phase:upstream-1-self", + "a (upstream-1-self)", ], "name": "g (upstream-1-self-upstream)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:upstream-1", + "a (upstream-1)", ], - "name": "a;_phase:upstream-1-self", + "name": "a (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ "g (upstream-3)", - "a;_phase:upstream-1-self-upstream", - "a;_phase:upstream-2-self", + "a (upstream-1-self-upstream)", + "a (upstream-2-self)", ], "name": "g (complex)", "silent": false, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-1-self-upstream", + "name": "a (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], - "name": "a;_phase:upstream-2-self", + "name": "a (upstream-2-self)", "silent": true, }, ] @@ -1460,7 +1460,7 @@ Array [ "dependencies": Array [ "f (no-deps)", "a (upstream-self)", - "h;_phase:upstream-self", + "h (upstream-self)", ], "name": "f (upstream-self)", "silent": false, @@ -1474,42 +1474,42 @@ Array [ }, Object { "dependencies": Array [ - "h;_phase:no-deps", + "h (no-deps)", "a (upstream-self)", ], - "name": "h;_phase:upstream-self", + "name": "h (upstream-self)", "silent": true, }, Object { "dependencies": Array [], - "name": "h;_phase:no-deps", + "name": "h (no-deps)", "silent": true, }, Object { "dependencies": Array [ "c (no-deps)", - "b;_phase:upstream-self", + "b (upstream-self)", ], "name": "c (upstream-self)", "silent": false, }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", "a (upstream-self)", ], - "name": "b;_phase:upstream-self", + "name": "b (upstream-self)", "silent": true, }, Object { "dependencies": Array [], - "name": "b;_phase:no-deps", + "name": "b (no-deps)", "silent": true, }, Object { "dependencies": Array [ "a (no-deps)", - "h;_phase:no-deps", + "h (no-deps)", ], "name": "f (upstream-1)", "silent": false, @@ -1521,7 +1521,7 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", ], "name": "c (upstream-1)", "silent": false, @@ -1529,7 +1529,7 @@ Array [ Object { "dependencies": Array [ "a (upstream-1)", - "h;_phase:upstream-1", + "h (upstream-1)", ], "name": "f (upstream-2)", "silent": false, @@ -1538,7 +1538,7 @@ Array [ "dependencies": Array [ "a (no-deps)", ], - "name": "h;_phase:upstream-1", + "name": "h (upstream-1)", "silent": true, }, Object { @@ -1548,7 +1548,7 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:upstream-1", + "b (upstream-1)", ], "name": "c (upstream-2)", "silent": false, @@ -1557,13 +1557,13 @@ Array [ "dependencies": Array [ "a (no-deps)", ], - "name": "b;_phase:upstream-1", + "name": "b (upstream-1)", "silent": true, }, Object { "dependencies": Array [ "a (upstream-2)", - "h;_phase:upstream-2", + "h (upstream-2)", ], "name": "f (upstream-3)", "silent": false, @@ -1572,7 +1572,7 @@ Array [ "dependencies": Array [ "a (upstream-1)", ], - "name": "h;_phase:upstream-2", + "name": "h (upstream-2)", "silent": true, }, Object { @@ -1582,7 +1582,7 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], "name": "c (upstream-3)", "silent": false, @@ -1591,7 +1591,7 @@ Array [ "dependencies": Array [ "a (upstream-1)", ], - "name": "b;_phase:upstream-2", + "name": "b (upstream-2)", "silent": true, }, Object { @@ -1639,16 +1639,16 @@ Array [ Object { "dependencies": Array [ "a (upstream-1-self)", - "h;_phase:upstream-1-self", + "h (upstream-1-self)", ], "name": "f (upstream-1-self-upstream)", "silent": false, }, Object { "dependencies": Array [ - "h;_phase:upstream-1", + "h (upstream-1)", ], - "name": "h;_phase:upstream-1-self", + "name": "h (upstream-1-self)", "silent": true, }, Object { @@ -1658,25 +1658,25 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:upstream-1-self", + "b (upstream-1-self)", ], "name": "c (upstream-1-self-upstream)", "silent": false, }, Object { "dependencies": Array [ - "b;_phase:upstream-1", + "b (upstream-1)", ], - "name": "b;_phase:upstream-1-self", + "name": "b (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ "f (upstream-3)", "a (upstream-1-self-upstream)", - "h;_phase:upstream-1-self-upstream", + "h (upstream-1-self-upstream)", "a (upstream-2-self)", - "h;_phase:upstream-2-self", + "h (upstream-2-self)", ], "name": "f (complex)", "silent": false, @@ -1685,14 +1685,14 @@ Array [ "dependencies": Array [ "a (upstream-1-self)", ], - "name": "h;_phase:upstream-1-self-upstream", + "name": "h (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "h;_phase:upstream-2", + "h (upstream-2)", ], - "name": "h;_phase:upstream-2-self", + "name": "h (upstream-2-self)", "silent": true, }, Object { @@ -1705,8 +1705,8 @@ Array [ Object { "dependencies": Array [ "c (upstream-3)", - "b;_phase:upstream-1-self-upstream", - "b;_phase:upstream-2-self", + "b (upstream-1-self-upstream)", + "b (upstream-2-self)", ], "name": "c (complex)", "silent": false, @@ -1715,14 +1715,14 @@ Array [ "dependencies": Array [ "a (upstream-1-self)", ], - "name": "b;_phase:upstream-1-self-upstream", + "name": "b (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], - "name": "b;_phase:upstream-2-self", + "name": "b (upstream-2-self)", "silent": true, }, ] @@ -1732,32 +1732,32 @@ exports[`PhasedOperationPlugin handles some changed projects 1`] = ` Array [ Object { "dependencies": Array [], - "name": "a;_phase:no-deps", + "name": "a (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "b;_phase:no-deps", + "name": "b (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "c;_phase:no-deps", + "name": "c (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "d;_phase:no-deps", + "name": "d (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "e;_phase:no-deps", + "name": "e (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "f;_phase:no-deps", + "name": "f (no-deps)", "silent": true, }, Object { @@ -1767,332 +1767,332 @@ Array [ }, Object { "dependencies": Array [], - "name": "h;_phase:no-deps", + "name": "h (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "i;_phase:no-deps", + "name": "i (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "j;_phase:no-deps", + "name": "j (no-deps)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:no-deps", + "a (no-deps)", ], - "name": "a;_phase:upstream-self", + "name": "a (upstream-self)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:no-deps", - "a;_phase:upstream-self", + "b (no-deps)", + "a (upstream-self)", ], - "name": "b;_phase:upstream-self", + "name": "b (upstream-self)", "silent": true, }, Object { "dependencies": Array [ - "c;_phase:no-deps", - "b;_phase:upstream-self", + "c (no-deps)", + "b (upstream-self)", ], - "name": "c;_phase:upstream-self", + "name": "c (upstream-self)", "silent": true, }, Object { "dependencies": Array [ - "d;_phase:no-deps", - "b;_phase:upstream-self", + "d (no-deps)", + "b (upstream-self)", ], - "name": "d;_phase:upstream-self", + "name": "d (upstream-self)", "silent": true, }, Object { "dependencies": Array [ - "e;_phase:no-deps", - "c;_phase:upstream-self", + "e (no-deps)", + "c (upstream-self)", ], - "name": "e;_phase:upstream-self", + "name": "e (upstream-self)", "silent": true, }, Object { "dependencies": Array [ - "f;_phase:no-deps", - "a;_phase:upstream-self", - "h;_phase:upstream-self", + "f (no-deps)", + "a (upstream-self)", + "h (upstream-self)", ], - "name": "f;_phase:upstream-self", + "name": "f (upstream-self)", "silent": true, }, Object { "dependencies": Array [ - "h;_phase:no-deps", - "a;_phase:upstream-self", + "h (no-deps)", + "a (upstream-self)", ], - "name": "h;_phase:upstream-self", + "name": "h (upstream-self)", "silent": true, }, Object { "dependencies": Array [ "g (no-deps)", - "a;_phase:upstream-self", + "a (upstream-self)", ], "name": "g (upstream-self)", "silent": false, }, Object { "dependencies": Array [ - "i;_phase:no-deps", + "i (no-deps)", ], - "name": "i;_phase:upstream-self", + "name": "i (upstream-self)", "silent": true, }, Object { "dependencies": Array [ - "j;_phase:no-deps", + "j (no-deps)", ], - "name": "j;_phase:upstream-self", + "name": "j (upstream-self)", "silent": true, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-1", + "name": "a (upstream-1)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:no-deps", + "a (no-deps)", ], - "name": "b;_phase:upstream-1", + "name": "b (upstream-1)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", ], - "name": "c;_phase:upstream-1", + "name": "c (upstream-1)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", ], - "name": "d;_phase:upstream-1", + "name": "d (upstream-1)", "silent": true, }, Object { "dependencies": Array [ - "c;_phase:no-deps", + "c (no-deps)", ], - "name": "e;_phase:upstream-1", + "name": "e (upstream-1)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:no-deps", - "h;_phase:no-deps", + "a (no-deps)", + "h (no-deps)", ], - "name": "f;_phase:upstream-1", + "name": "f (upstream-1)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:no-deps", + "a (no-deps)", ], "name": "g (upstream-1)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:no-deps", + "a (no-deps)", ], - "name": "h;_phase:upstream-1", + "name": "h (upstream-1)", "silent": true, }, Object { "dependencies": Array [], - "name": "i;_phase:upstream-1", + "name": "i (upstream-1)", "silent": true, }, Object { "dependencies": Array [], - "name": "j;_phase:upstream-1", + "name": "j (upstream-1)", "silent": true, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-2", + "name": "a (upstream-2)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-1", + "a (upstream-1)", ], - "name": "b;_phase:upstream-2", + "name": "b (upstream-2)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-1", + "b (upstream-1)", ], - "name": "c;_phase:upstream-2", + "name": "c (upstream-2)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-1", + "b (upstream-1)", ], - "name": "d;_phase:upstream-2", + "name": "d (upstream-2)", "silent": true, }, Object { "dependencies": Array [ - "c;_phase:upstream-1", + "c (upstream-1)", ], - "name": "e;_phase:upstream-2", + "name": "e (upstream-2)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-1", - "h;_phase:upstream-1", + "a (upstream-1)", + "h (upstream-1)", ], - "name": "f;_phase:upstream-2", + "name": "f (upstream-2)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-1", + "a (upstream-1)", ], "name": "g (upstream-2)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:upstream-1", + "a (upstream-1)", ], - "name": "h;_phase:upstream-2", + "name": "h (upstream-2)", "silent": true, }, Object { "dependencies": Array [], - "name": "i;_phase:upstream-2", + "name": "i (upstream-2)", "silent": true, }, Object { "dependencies": Array [], - "name": "j;_phase:upstream-2", + "name": "j (upstream-2)", "silent": true, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-3", + "name": "a (upstream-3)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], - "name": "b;_phase:upstream-3", + "name": "b (upstream-3)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], - "name": "c;_phase:upstream-3", + "name": "c (upstream-3)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], - "name": "d;_phase:upstream-3", + "name": "d (upstream-3)", "silent": true, }, Object { "dependencies": Array [ - "c;_phase:upstream-2", + "c (upstream-2)", ], - "name": "e;_phase:upstream-3", + "name": "e (upstream-3)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", - "h;_phase:upstream-2", + "a (upstream-2)", + "h (upstream-2)", ], - "name": "f;_phase:upstream-3", + "name": "f (upstream-3)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], "name": "g (upstream-3)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], - "name": "h;_phase:upstream-3", + "name": "h (upstream-3)", "silent": true, }, Object { "dependencies": Array [], - "name": "i;_phase:upstream-3", + "name": "i (upstream-3)", "silent": true, }, Object { "dependencies": Array [], - "name": "j;_phase:upstream-3", + "name": "j (upstream-3)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-1", + "a (upstream-1)", ], - "name": "a;_phase:upstream-1-self", + "name": "a (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-1", + "b (upstream-1)", ], - "name": "b;_phase:upstream-1-self", + "name": "b (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "c;_phase:upstream-1", + "c (upstream-1)", ], - "name": "c;_phase:upstream-1-self", + "name": "c (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "d;_phase:upstream-1", + "d (upstream-1)", ], - "name": "d;_phase:upstream-1-self", + "name": "d (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "e;_phase:upstream-1", + "e (upstream-1)", ], - "name": "e;_phase:upstream-1-self", + "name": "e (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "f;_phase:upstream-1", + "f (upstream-1)", ], - "name": "f;_phase:upstream-1-self", + "name": "f (upstream-1-self)", "silent": true, }, Object { @@ -2104,65 +2104,65 @@ Array [ }, Object { "dependencies": Array [ - "h;_phase:upstream-1", + "h (upstream-1)", ], - "name": "h;_phase:upstream-1-self", + "name": "h (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "i;_phase:upstream-1", + "i (upstream-1)", ], - "name": "i;_phase:upstream-1-self", + "name": "i (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "j;_phase:upstream-1", + "j (upstream-1)", ], - "name": "j;_phase:upstream-1-self", + "name": "j (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-2", + "a (upstream-2)", ], - "name": "a;_phase:upstream-2-self", + "name": "a (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], - "name": "b;_phase:upstream-2-self", + "name": "b (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ - "c;_phase:upstream-2", + "c (upstream-2)", ], - "name": "c;_phase:upstream-2-self", + "name": "c (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ - "d;_phase:upstream-2", + "d (upstream-2)", ], - "name": "d;_phase:upstream-2-self", + "name": "d (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ - "e;_phase:upstream-2", + "e (upstream-2)", ], - "name": "e;_phase:upstream-2-self", + "name": "e (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ - "f;_phase:upstream-2", + "f (upstream-2)", ], - "name": "f;_phase:upstream-2-self", + "name": "f (upstream-2-self)", "silent": true, }, Object { @@ -2174,174 +2174,174 @@ Array [ }, Object { "dependencies": Array [ - "h;_phase:upstream-2", + "h (upstream-2)", ], - "name": "h;_phase:upstream-2-self", + "name": "h (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ - "i;_phase:upstream-2", + "i (upstream-2)", ], - "name": "i;_phase:upstream-2-self", + "name": "i (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ - "j;_phase:upstream-2", + "j (upstream-2)", ], - "name": "j;_phase:upstream-2-self", + "name": "j (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [], - "name": "a;_phase:upstream-1-self-upstream", + "name": "a (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-1-self", + "a (upstream-1-self)", ], - "name": "b;_phase:upstream-1-self-upstream", + "name": "b (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-1-self", + "b (upstream-1-self)", ], - "name": "c;_phase:upstream-1-self-upstream", + "name": "c (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-1-self", + "b (upstream-1-self)", ], - "name": "d;_phase:upstream-1-self-upstream", + "name": "d (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "c;_phase:upstream-1-self", + "c (upstream-1-self)", ], - "name": "e;_phase:upstream-1-self-upstream", + "name": "e (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-1-self", - "h;_phase:upstream-1-self", + "a (upstream-1-self)", + "h (upstream-1-self)", ], - "name": "f;_phase:upstream-1-self-upstream", + "name": "f (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-1-self", + "a (upstream-1-self)", ], "name": "g (upstream-1-self-upstream)", "silent": false, }, Object { "dependencies": Array [ - "a;_phase:upstream-1-self", + "a (upstream-1-self)", ], - "name": "h;_phase:upstream-1-self-upstream", + "name": "h (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [], - "name": "i;_phase:upstream-1-self-upstream", + "name": "i (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [], - "name": "j;_phase:upstream-1-self-upstream", + "name": "j (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "a;_phase:upstream-3", + "a (upstream-3)", ], - "name": "a;_phase:complex", + "name": "a (complex)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-3", - "a;_phase:upstream-1-self-upstream", - "a;_phase:upstream-2-self", + "b (upstream-3)", + "a (upstream-1-self-upstream)", + "a (upstream-2-self)", ], - "name": "b;_phase:complex", + "name": "b (complex)", "silent": true, }, Object { "dependencies": Array [ - "c;_phase:upstream-3", - "b;_phase:upstream-1-self-upstream", - "b;_phase:upstream-2-self", + "c (upstream-3)", + "b (upstream-1-self-upstream)", + "b (upstream-2-self)", ], - "name": "c;_phase:complex", + "name": "c (complex)", "silent": true, }, Object { "dependencies": Array [ - "d;_phase:upstream-3", - "b;_phase:upstream-1-self-upstream", - "b;_phase:upstream-2-self", + "d (upstream-3)", + "b (upstream-1-self-upstream)", + "b (upstream-2-self)", ], - "name": "d;_phase:complex", + "name": "d (complex)", "silent": true, }, Object { "dependencies": Array [ - "e;_phase:upstream-3", - "c;_phase:upstream-1-self-upstream", - "c;_phase:upstream-2-self", + "e (upstream-3)", + "c (upstream-1-self-upstream)", + "c (upstream-2-self)", ], - "name": "e;_phase:complex", + "name": "e (complex)", "silent": true, }, Object { "dependencies": Array [ - "f;_phase:upstream-3", - "a;_phase:upstream-1-self-upstream", - "h;_phase:upstream-1-self-upstream", - "a;_phase:upstream-2-self", - "h;_phase:upstream-2-self", + "f (upstream-3)", + "a (upstream-1-self-upstream)", + "h (upstream-1-self-upstream)", + "a (upstream-2-self)", + "h (upstream-2-self)", ], - "name": "f;_phase:complex", + "name": "f (complex)", "silent": true, }, Object { "dependencies": Array [ "g (upstream-3)", - "a;_phase:upstream-1-self-upstream", - "a;_phase:upstream-2-self", + "a (upstream-1-self-upstream)", + "a (upstream-2-self)", ], "name": "g (complex)", "silent": false, }, Object { "dependencies": Array [ - "h;_phase:upstream-3", - "a;_phase:upstream-1-self-upstream", - "a;_phase:upstream-2-self", + "h (upstream-3)", + "a (upstream-1-self-upstream)", + "a (upstream-2-self)", ], - "name": "h;_phase:complex", + "name": "h (complex)", "silent": true, }, Object { "dependencies": Array [ - "i;_phase:upstream-3", + "i (upstream-3)", ], - "name": "i;_phase:complex", + "name": "i (complex)", "silent": true, }, Object { "dependencies": Array [ - "j;_phase:upstream-3", + "j (upstream-3)", ], - "name": "j;_phase:complex", + "name": "j (complex)", "silent": true, }, ] @@ -2356,7 +2356,7 @@ Array [ }, Object { "dependencies": Array [], - "name": "b;_phase:no-deps", + "name": "b (no-deps)", "silent": true, }, Object { @@ -2366,12 +2366,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "d;_phase:no-deps", + "name": "d (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "e;_phase:no-deps", + "name": "e (no-deps)", "silent": true, }, Object { @@ -2381,22 +2381,22 @@ Array [ }, Object { "dependencies": Array [], - "name": "g;_phase:no-deps", + "name": "g (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "h;_phase:no-deps", + "name": "h (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "i;_phase:no-deps", + "name": "i (no-deps)", "silent": true, }, Object { "dependencies": Array [], - "name": "j;_phase:no-deps", + "name": "j (no-deps)", "silent": true, }, Object { @@ -2408,7 +2408,7 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", "a (upstream-self)", ], "name": "b (upstream-self)", @@ -2424,7 +2424,7 @@ Array [ }, Object { "dependencies": Array [ - "d;_phase:no-deps", + "d (no-deps)", "b (upstream-self)", ], "name": "d (upstream-self)", @@ -2432,7 +2432,7 @@ Array [ }, Object { "dependencies": Array [ - "e;_phase:no-deps", + "e (no-deps)", "c (upstream-self)", ], "name": "e (upstream-self)", @@ -2449,7 +2449,7 @@ Array [ }, Object { "dependencies": Array [ - "h;_phase:no-deps", + "h (no-deps)", "a (upstream-self)", ], "name": "h (upstream-self)", @@ -2457,7 +2457,7 @@ Array [ }, Object { "dependencies": Array [ - "g;_phase:no-deps", + "g (no-deps)", "a (upstream-self)", ], "name": "g (upstream-self)", @@ -2465,16 +2465,16 @@ Array [ }, Object { "dependencies": Array [ - "i;_phase:no-deps", + "i (no-deps)", ], - "name": "i;_phase:upstream-self", + "name": "i (upstream-self)", "silent": true, }, Object { "dependencies": Array [ - "j;_phase:no-deps", + "j (no-deps)", ], - "name": "j;_phase:upstream-self", + "name": "j (upstream-self)", "silent": true, }, Object { @@ -2491,16 +2491,16 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", ], "name": "c (upstream-1)", "silent": false, }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", ], - "name": "d;_phase:upstream-1", + "name": "d (upstream-1)", "silent": true, }, Object { @@ -2513,7 +2513,7 @@ Array [ Object { "dependencies": Array [ "a (no-deps)", - "h;_phase:no-deps", + "h (no-deps)", ], "name": "f (upstream-1)", "silent": false, @@ -2534,12 +2534,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "i;_phase:upstream-1", + "name": "i (upstream-1)", "silent": true, }, Object { "dependencies": Array [], - "name": "j;_phase:upstream-1", + "name": "j (upstream-1)", "silent": true, }, Object { @@ -2599,12 +2599,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "i;_phase:upstream-2", + "name": "i (upstream-2)", "silent": true, }, Object { "dependencies": Array [], - "name": "j;_phase:upstream-2", + "name": "j (upstream-2)", "silent": true, }, Object { @@ -2664,12 +2664,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "i;_phase:upstream-3", + "name": "i (upstream-3)", "silent": true, }, Object { "dependencies": Array [], - "name": "j;_phase:upstream-3", + "name": "j (upstream-3)", "silent": true, }, Object { @@ -2695,9 +2695,9 @@ Array [ }, Object { "dependencies": Array [ - "d;_phase:upstream-1", + "d (upstream-1)", ], - "name": "d;_phase:upstream-1-self", + "name": "d (upstream-1-self)", "silent": true, }, Object { @@ -2730,16 +2730,16 @@ Array [ }, Object { "dependencies": Array [ - "i;_phase:upstream-1", + "i (upstream-1)", ], - "name": "i;_phase:upstream-1-self", + "name": "i (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ - "j;_phase:upstream-1", + "j (upstream-1)", ], - "name": "j;_phase:upstream-1-self", + "name": "j (upstream-1-self)", "silent": true, }, Object { @@ -2800,16 +2800,16 @@ Array [ }, Object { "dependencies": Array [ - "i;_phase:upstream-2", + "i (upstream-2)", ], - "name": "i;_phase:upstream-2-self", + "name": "i (upstream-2-self)", "silent": true, }, Object { "dependencies": Array [ - "j;_phase:upstream-2", + "j (upstream-2)", ], - "name": "j;_phase:upstream-2-self", + "name": "j (upstream-2-self)", "silent": true, }, Object { @@ -2869,12 +2869,12 @@ Array [ }, Object { "dependencies": Array [], - "name": "i;_phase:upstream-1-self-upstream", + "name": "i (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [], - "name": "j;_phase:upstream-1-self-upstream", + "name": "j (upstream-1-self-upstream)", "silent": true, }, Object { @@ -2951,16 +2951,16 @@ Array [ }, Object { "dependencies": Array [ - "i;_phase:upstream-3", + "i (upstream-3)", ], - "name": "i;_phase:complex", + "name": "i (complex)", "silent": true, }, Object { "dependencies": Array [ - "j;_phase:upstream-3", + "j (upstream-3)", ], - "name": "j;_phase:complex", + "name": "j (complex)", "silent": true, }, ] @@ -2970,7 +2970,7 @@ exports[`PhasedOperationPlugin handles some changed projects within filtered pro Array [ Object { "dependencies": Array [], - "name": "f;_phase:no-deps", + "name": "f (no-deps)", "silent": true, }, Object { @@ -2985,9 +2985,9 @@ Array [ }, Object { "dependencies": Array [ - "f;_phase:no-deps", + "f (no-deps)", "a (upstream-self)", - "h;_phase:upstream-self", + "h (upstream-self)", ], "name": "f (upstream-self)", "silent": false, @@ -3001,42 +3001,42 @@ Array [ }, Object { "dependencies": Array [ - "h;_phase:no-deps", + "h (no-deps)", "a (upstream-self)", ], - "name": "h;_phase:upstream-self", + "name": "h (upstream-self)", "silent": true, }, Object { "dependencies": Array [], - "name": "h;_phase:no-deps", + "name": "h (no-deps)", "silent": true, }, Object { "dependencies": Array [ "c (no-deps)", - "b;_phase:upstream-self", + "b (upstream-self)", ], "name": "c (upstream-self)", "silent": false, }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", "a (upstream-self)", ], - "name": "b;_phase:upstream-self", + "name": "b (upstream-self)", "silent": true, }, Object { "dependencies": Array [], - "name": "b;_phase:no-deps", + "name": "b (no-deps)", "silent": true, }, Object { "dependencies": Array [ "a (no-deps)", - "h;_phase:no-deps", + "h (no-deps)", ], "name": "f (upstream-1)", "silent": false, @@ -3048,7 +3048,7 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:no-deps", + "b (no-deps)", ], "name": "c (upstream-1)", "silent": false, @@ -3056,7 +3056,7 @@ Array [ Object { "dependencies": Array [ "a (upstream-1)", - "h;_phase:upstream-1", + "h (upstream-1)", ], "name": "f (upstream-2)", "silent": false, @@ -3065,7 +3065,7 @@ Array [ "dependencies": Array [ "a (no-deps)", ], - "name": "h;_phase:upstream-1", + "name": "h (upstream-1)", "silent": true, }, Object { @@ -3075,7 +3075,7 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:upstream-1", + "b (upstream-1)", ], "name": "c (upstream-2)", "silent": false, @@ -3084,13 +3084,13 @@ Array [ "dependencies": Array [ "a (no-deps)", ], - "name": "b;_phase:upstream-1", + "name": "b (upstream-1)", "silent": true, }, Object { "dependencies": Array [ "a (upstream-2)", - "h;_phase:upstream-2", + "h (upstream-2)", ], "name": "f (upstream-3)", "silent": false, @@ -3099,7 +3099,7 @@ Array [ "dependencies": Array [ "a (upstream-1)", ], - "name": "h;_phase:upstream-2", + "name": "h (upstream-2)", "silent": true, }, Object { @@ -3109,7 +3109,7 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], "name": "c (upstream-3)", "silent": false, @@ -3118,7 +3118,7 @@ Array [ "dependencies": Array [ "a (upstream-1)", ], - "name": "b;_phase:upstream-2", + "name": "b (upstream-2)", "silent": true, }, Object { @@ -3166,16 +3166,16 @@ Array [ Object { "dependencies": Array [ "a (upstream-1-self)", - "h;_phase:upstream-1-self", + "h (upstream-1-self)", ], "name": "f (upstream-1-self-upstream)", "silent": false, }, Object { "dependencies": Array [ - "h;_phase:upstream-1", + "h (upstream-1)", ], - "name": "h;_phase:upstream-1-self", + "name": "h (upstream-1-self)", "silent": true, }, Object { @@ -3185,25 +3185,25 @@ Array [ }, Object { "dependencies": Array [ - "b;_phase:upstream-1-self", + "b (upstream-1-self)", ], "name": "c (upstream-1-self-upstream)", "silent": false, }, Object { "dependencies": Array [ - "b;_phase:upstream-1", + "b (upstream-1)", ], - "name": "b;_phase:upstream-1-self", + "name": "b (upstream-1-self)", "silent": true, }, Object { "dependencies": Array [ "f (upstream-3)", "a (upstream-1-self-upstream)", - "h;_phase:upstream-1-self-upstream", + "h (upstream-1-self-upstream)", "a (upstream-2-self)", - "h;_phase:upstream-2-self", + "h (upstream-2-self)", ], "name": "f (complex)", "silent": false, @@ -3212,14 +3212,14 @@ Array [ "dependencies": Array [ "a (upstream-1-self)", ], - "name": "h;_phase:upstream-1-self-upstream", + "name": "h (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "h;_phase:upstream-2", + "h (upstream-2)", ], - "name": "h;_phase:upstream-2-self", + "name": "h (upstream-2-self)", "silent": true, }, Object { @@ -3232,8 +3232,8 @@ Array [ Object { "dependencies": Array [ "c (upstream-3)", - "b;_phase:upstream-1-self-upstream", - "b;_phase:upstream-2-self", + "b (upstream-1-self-upstream)", + "b (upstream-2-self)", ], "name": "c (complex)", "silent": false, @@ -3242,14 +3242,14 @@ Array [ "dependencies": Array [ "a (upstream-1-self)", ], - "name": "b;_phase:upstream-1-self-upstream", + "name": "b (upstream-1-self-upstream)", "silent": true, }, Object { "dependencies": Array [ - "b;_phase:upstream-2", + "b (upstream-2)", ], - "name": "b;_phase:upstream-2-self", + "name": "b (upstream-2-self)", "silent": true, }, ] diff --git a/libraries/rush-lib/src/logic/pnpm/PnpmLinkManager.ts b/libraries/rush-lib/src/logic/pnpm/PnpmLinkManager.ts index 3b627490037..1afc6c0f2e6 100644 --- a/libraries/rush-lib/src/logic/pnpm/PnpmLinkManager.ts +++ b/libraries/rush-lib/src/logic/pnpm/PnpmLinkManager.ts @@ -229,7 +229,8 @@ export class PnpmLinkManager extends BaseLinkManager { const pathToLocalInstallation: string = await this._getPathToLocalInstallationAsync( tarballEntry, absolutePathToTgzFile, - folderNameSuffix + folderNameSuffix, + tempProjectDependencyKey ); const parentShrinkwrapEntry: IPnpmShrinkwrapDependencyYaml | undefined = @@ -289,7 +290,8 @@ export class PnpmLinkManager extends BaseLinkManager { private async _getPathToLocalInstallationAsync( tarballEntry: string, absolutePathToTgzFile: string, - folderSuffix: string + folderSuffix: string, + tempProjectDependencyKey: string ): Promise { if (this._pnpmVersion.major === 6) { // PNPM 6 changed formatting to replace all ':' and '/' chars with '+'. Additionally, folder names > 120 @@ -319,8 +321,22 @@ export class PnpmLinkManager extends BaseLinkManager { folderName, RushConstants.nodeModulesFolderName ); - } else if (this._pnpmVersion.major >= 8) { + } else if (this._pnpmVersion.major >= 9) { const { depPathToFilename } = await import('@pnpm/dependency-path'); + + // project@file+projects+presentation-integration-tests.tgz_jsdom@11.12.0 + // The second parameter is max length of virtual store dir, default is 120 https://pnpm.io/next/npmrc#virtual-store-dir-max-length + // TODO Read virtual-store-dir-max-length from .npmrc + const folderName: string = depPathToFilename(tempProjectDependencyKey, 120); + return path.join( + this._rushConfiguration.commonTempFolder, + RushConstants.nodeModulesFolderName, + '.pnpm', + folderName, + RushConstants.nodeModulesFolderName + ); + } else if (this._pnpmVersion.major >= 8) { + const { depPathToFilename } = await import('@pnpm/dependency-path-lockfile-pre-v9'); // PNPM 8 changed the local path format again and the hashing algorithm, and // is now using the scoped '@pnpm/dependency-path' package // See https://github.com/pnpm/pnpm/releases/tag/v8.0.0 diff --git a/libraries/rush-lib/src/logic/pnpm/PnpmOptionsConfiguration.ts b/libraries/rush-lib/src/logic/pnpm/PnpmOptionsConfiguration.ts index 8060a65fba7..92009e39c84 100644 --- a/libraries/rush-lib/src/logic/pnpm/PnpmOptionsConfiguration.ts +++ b/libraries/rush-lib/src/logic/pnpm/PnpmOptionsConfiguration.ts @@ -1,7 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { JsonFile, type JsonObject, JsonSchema } from '@rushstack/node-core-library'; +import { JsonFile, type JsonObject } from '@rushstack/node-core-library'; +import { NonProjectConfigurationFile } from '@rushstack/heft-config-file'; +import { ConsoleTerminalProvider, Terminal } from '@rushstack/terminal'; import { type IPackageManagerOptionsJsonBase, @@ -111,6 +113,10 @@ export interface IPnpmOptionsJson extends IPackageManagerOptionsJsonBase { * {@inheritDoc PnpmOptionsConfiguration.globalNeverBuiltDependencies} */ globalNeverBuiltDependencies?: string[]; + /** + * {@inheritDoc PnpmOptionsConfiguration.globalIgnoredOptionalDependencies} + */ + globalIgnoredOptionalDependencies?: string[]; /** * {@inheritDoc PnpmOptionsConfiguration.globalAllowedDeprecatedVersions} */ @@ -157,8 +163,6 @@ export interface IPnpmOptionsJson extends IPackageManagerOptionsJsonBase { * @public */ export class PnpmOptionsConfiguration extends PackageManagerOptionsConfigurationBase { - private static _jsonSchema: JsonSchema = JsonSchema.fromLoadedObject(schemaJson); - private readonly _json: JsonObject; private _globalPatchedDependencies: Record | undefined; @@ -321,6 +325,20 @@ export class PnpmOptionsConfiguration extends PackageManagerOptionsConfiguration */ public readonly globalNeverBuiltDependencies: string[] | undefined; + /** + * The ignoredOptionalDependencies setting allows you to exclude certain optional dependencies from being installed + * during the Rush installation process. This can be useful when optional dependencies are not required or are + * problematic in specific environments (e.g., dependencies with incompatible binaries or platform-specific requirements). + * The listed dependencies will be treated as though they are missing, even if other packages specify them as optional + * dependencies. The settings are copied into the pnpm.ignoredOptionalDependencies field of the common/temp/package.json + * file that is generated by Rush during installation. + * + * (SUPPORTED ONLY IN PNPM 9.0.0 AND NEWER) + * + * PNPM documentation: https://pnpm.io/package_json#pnpmignoredoptionaldependencies + */ + public readonly globalIgnoredOptionalDependencies: string[] | undefined; + /** * The `globalAllowedDeprecatedVersions` setting suppresses installation warnings for package * versions that the NPM registry reports as being deprecated. This is useful if the @@ -400,6 +418,7 @@ export class PnpmOptionsConfiguration extends PackageManagerOptionsConfiguration this.globalPeerDependencyRules = json.globalPeerDependencyRules; this.globalPackageExtensions = json.globalPackageExtensions; this.globalNeverBuiltDependencies = json.globalNeverBuiltDependencies; + this.globalIgnoredOptionalDependencies = json.globalIgnoredOptionalDependencies; this.globalAllowedDeprecatedVersions = json.globalAllowedDeprecatedVersions; this.unsupportedPackageJsonSettings = json.unsupportedPackageJsonSettings; this._globalPatchedDependencies = json.globalPatchedDependencies; @@ -415,9 +434,16 @@ export class PnpmOptionsConfiguration extends PackageManagerOptionsConfiguration jsonFilename: string, commonTempFolder: string ): PnpmOptionsConfiguration { - const pnpmOptionJson: IPnpmOptionsJson = JsonFile.loadAndValidate( - jsonFilename, - PnpmOptionsConfiguration._jsonSchema + // TODO: plumb through the terminal + const terminal: Terminal = new Terminal(new ConsoleTerminalProvider()); + + const pnpmOptionsConfigFile: NonProjectConfigurationFile = + new NonProjectConfigurationFile({ + jsonSchemaObject: schemaJson + }); + const pnpmOptionJson: IPnpmOptionsJson = pnpmOptionsConfigFile.loadConfigurationFile( + terminal, + jsonFilename ); return new PnpmOptionsConfiguration(pnpmOptionJson || {}, commonTempFolder, jsonFilename); } diff --git a/libraries/rush-lib/src/logic/pnpm/PnpmShrinkWrapFileConverters.ts b/libraries/rush-lib/src/logic/pnpm/PnpmShrinkWrapFileConverters.ts new file mode 100644 index 00000000000..ca57585da1d --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/PnpmShrinkWrapFileConverters.ts @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +/** + * Fork https://github.com/pnpm/pnpm/blob/main/lockfile/fs/src/lockfileFormatConverters.ts + * + * Pnpm lockfile v9 have some breaking changes on the lockfile format. For Example, the "packages" field has been split into "packages" and "snapshots" two parts. + * Rush should not parse the lockfile by itself, but should rely on pnpm to parse the lockfile. + * To ensure consistency with pnpm's parsing logic, I copied the relevant logic from @pnpm/lockfile.fs to this file. + * + * There are some reasons for copying the relevant logic instead of depending on @pnpm/lockfile.fs directly: + * 1. @pnpm/lockfile.fs has a exports filed in package.json, which will cause convertLockfileV9ToLockfileObject cannot be imported directly. + * 2. @pnpm/lockfile.fs only provides asynchronous read methods, while rush requires synchronous reading of the lockfile file. + * Perhaps this file will be deleted in the future and instead depend on @pnpm/lockfile.fs directly. + */ +import { removeSuffix } from '@pnpm/dependency-path'; +import type { + InlineSpecifiersProjectSnapshot, + InlineSpecifiersResolvedDependencies, + Lockfile, + LockfileFile, + LockfileFileV9, + PackageSnapshots, + ProjectSnapshot, + ResolvedDependencies +} from '@pnpm/lockfile.types'; +import { removeNullishProps } from '../../utilities/objectUtilities'; + +type DepPath = string & { __brand: 'DepPath' }; +// eslint-disable-next-line @typescript-eslint/typedef +const DEPENDENCIES_FIELDS = ['optionalDependencies', 'dependencies', 'devDependencies'] as const; + +function revertProjectSnapshot(from: InlineSpecifiersProjectSnapshot): ProjectSnapshot { + const specifiers: ResolvedDependencies = {}; + + function moveSpecifiers(fromDep: InlineSpecifiersResolvedDependencies): ResolvedDependencies { + const resolvedDependencies: ResolvedDependencies = {}; + for (const [depName, { specifier, version }] of Object.entries(fromDep)) { + const existingValue: string = specifiers[depName]; + if (existingValue != null && existingValue !== specifier) { + throw new Error( + `Project snapshot lists the same dependency more than once with conflicting versions: ${depName}` + ); + } + + specifiers[depName] = specifier; + resolvedDependencies[depName] = version; + } + return resolvedDependencies; + } + + const dependencies: ResolvedDependencies | undefined = + from.dependencies == null ? from.dependencies : moveSpecifiers(from.dependencies); + const devDependencies: ResolvedDependencies | undefined = + from.devDependencies == null ? from.devDependencies : moveSpecifiers(from.devDependencies); + const optionalDependencies: ResolvedDependencies | undefined = + from.optionalDependencies == null ? from.optionalDependencies : moveSpecifiers(from.optionalDependencies); + + return { + ...removeNullishProps({ + ...from, + dependencies, + devDependencies, + optionalDependencies + }), + specifiers + }; +} + +function convertFromLockfileFileMutable(lockfileFile: LockfileFile): LockfileFileV9 { + if (typeof lockfileFile?.importers === 'undefined') { + lockfileFile.importers = { + '.': { + dependenciesMeta: lockfileFile.dependenciesMeta, + publishDirectory: lockfileFile.publishDirectory + } + }; + for (const depType of DEPENDENCIES_FIELDS) { + if (lockfileFile[depType] != null) { + lockfileFile.importers['.'][depType] = lockfileFile[depType]; + delete lockfileFile[depType]; + } + } + } + return lockfileFile as LockfileFileV9; +} + +function mapValues(obj: Record, mapper: (val: T, key: string) => U): Record { + const result: Record = {}; + for (const [key, value] of Object.entries(obj)) { + result[key] = mapper(value, key); + } + return result; +} + +/** + * Convert lockfile v9 object to standard lockfile object. + * + * This function will mutate the lockfile object. It will: + * 1. Ensure importers['.'] exists. + * 2. Merge snapshots and packages into packages. + * 3. Extract specifier from importers['xxx'] into the specifiers field. + */ +export function convertLockfileV9ToLockfileObject(lockfile: LockfileFileV9): Lockfile { + const { importers, ...rest } = convertFromLockfileFileMutable(lockfile); + + const packages: PackageSnapshots = {}; + for (const [depPath, pkg] of Object.entries(lockfile.snapshots ?? {})) { + const pkgId: string = removeSuffix(depPath); + packages[depPath as DepPath] = Object.assign(pkg, lockfile.packages?.[pkgId]); + } + return { + ...rest, + packages, + importers: mapValues(importers ?? {}, revertProjectSnapshot) + }; +} diff --git a/libraries/rush-lib/src/logic/pnpm/PnpmShrinkwrapFile.ts b/libraries/rush-lib/src/logic/pnpm/PnpmShrinkwrapFile.ts index 5801d1dc1cc..7812c840621 100644 --- a/libraries/rush-lib/src/logic/pnpm/PnpmShrinkwrapFile.ts +++ b/libraries/rush-lib/src/logic/pnpm/PnpmShrinkwrapFile.ts @@ -14,6 +14,7 @@ import { InternalError } from '@rushstack/node-core-library'; import { Colorize, type ITerminal } from '@rushstack/terminal'; +import * as dependencyPathLockfilePreV9 from '@pnpm/dependency-path-lockfile-pre-v9'; import * as dependencyPath from '@pnpm/dependency-path'; import { BaseShrinkwrapFile } from '../base/BaseShrinkwrapFile'; @@ -32,9 +33,23 @@ import { PnpmOptionsConfiguration } from './PnpmOptionsConfiguration'; import type { IPnpmfile, IPnpmfileContext } from './IPnpmfile'; import type { Subspace } from '../../api/Subspace'; import { CustomTipId, type CustomTipsConfiguration } from '../../api/CustomTipsConfiguration'; +import type { + ProjectId, + Lockfile, + PackageSnapshot, + ProjectSnapshot, + LockfileFileV9, + ResolvedDependencies +} from '@pnpm/lockfile.types'; +import { convertLockfileV9ToLockfileObject } from './PnpmShrinkWrapFileConverters'; const yamlModule: typeof import('js-yaml') = Import.lazy('js-yaml', require); +export enum ShrinkwrapFileMajorVersion { + V6 = 6, + V9 = 9 +} + export interface IPeerDependenciesMetaYaml { optional?: boolean; } @@ -47,11 +62,14 @@ export interface IPnpmV8VersionSpecifier { version: string; specifier: string; } -export type IPnpmVersionSpecifier = IPnpmV7VersionSpecifier | IPnpmV8VersionSpecifier; - -export interface IPnpmShrinkwrapDependencyYaml { - /** Information about the resolved package */ - resolution?: { +export type IPnpmV9VersionSpecifier = string; +export type IPnpmVersionSpecifier = + | IPnpmV7VersionSpecifier + | IPnpmV8VersionSpecifier + | IPnpmV9VersionSpecifier; + +export interface IPnpmShrinkwrapDependencyYaml extends Omit { + resolution: { /** The directory this package should clone, for injected dependencies */ directory?: string; /** The hash of the tarball, to ensure archive integrity */ @@ -59,103 +77,110 @@ export interface IPnpmShrinkwrapDependencyYaml { /** The name of the tarball, if this was from a TGZ file */ tarball?: string; }; - /** The list of bundled dependencies in this package */ - bundledDependencies?: ReadonlyArray; - /** The list of dependencies and the resolved version */ - dependencies?: Record; - /** The list of optional dependencies and the resolved version */ - optionalDependencies?: Record; - /** The list of peer dependencies and the resolved version */ - peerDependencies?: Record; - /** - * Used to indicate optional peer dependencies, as described in this RFC: - * https://github.com/yarnpkg/rfcs/blob/master/accepted/0000-optional-peer-dependencies.md - */ - peerDependenciesMeta?: Record; - /** The name of the package, if the package is a local tarball */ - name?: string; - /** If this is an optional dependency */ - optional?: boolean; - /** The values of process.platform supported by this package */ - os?: readonly string[]; - /** The values of process.arch supported by this package */ - cpu?: readonly string[]; - /** The libc runtimes supported by this package */ - libc?: readonly string[]; } -export interface IPnpmShrinkwrapImporterYaml { - /** The list of resolved version numbers for direct dependencies */ - dependencies?: Record; - /** The list of resolved version numbers for dev dependencies */ - devDependencies?: Record; - /** The list of resolved version numbers for optional dependencies */ - optionalDependencies?: Record; - /** The list of metadata for dependencies declared inside dependencies, optionalDependencies, and devDependencies. */ - dependenciesMeta?: Record; +export type IPnpmShrinkwrapImporterYaml = ProjectSnapshot; + +export interface IPnpmShrinkwrapYaml extends Lockfile { /** - * The list of specifiers used to resolve dependency versions - * - * @remarks - * This has been removed in PNPM v8 + * This interface represents the raw pnpm-lock.YAML file + * Example: + * { + * "dependencies": { + * "@rush-temp/project1": "file:./projects/project1.tgz" + * }, + * "packages": { + * "file:projects/library1.tgz": { + * "dependencies: { + * "markdown": "0.5.0" + * }, + * "name": "@rush-temp/library1", + * "resolution": { + * "tarball": "file:projects/library1.tgz" + * }, + * "version": "0.0.0" + * }, + * "markdown/0.5.0": { + * "resolution": { + * "integrity": "sha1-KCBbVlqK51kt4gdGPWY33BgnIrI=" + * } + * } + * }, + * "registry": "http://localhost:4873/", + * "shrinkwrapVersion": 3, + * "specifiers": { + * "@rush-temp/project1": "file:./projects/project1.tgz" + * } + * } */ - specifiers?: Record; -} - -/** - * This interface represents the raw pnpm-lock.YAML file - * Example: - * { - * "dependencies": { - * "@rush-temp/project1": "file:./projects/project1.tgz" - * }, - * "packages": { - * "file:projects/library1.tgz": { - * "dependencies: { - * "markdown": "0.5.0" - * }, - * "name": "@rush-temp/library1", - * "resolution": { - * "tarball": "file:projects/library1.tgz" - * }, - * "version": "0.0.0" - * }, - * "markdown/0.5.0": { - * "resolution": { - * "integrity": "sha1-KCBbVlqK51kt4gdGPWY33BgnIrI=" - * } - * } - * }, - * "registry": "http://localhost:4873/", - * "shrinkwrapVersion": 3, - * "specifiers": { - * "@rush-temp/project1": "file:./projects/project1.tgz" - * } - * } - */ -export interface IPnpmShrinkwrapYaml { - /** The version of the lockfile format */ - lockfileVersion?: string | number; /** The list of resolved version numbers for direct dependencies */ - dependencies: Record; - /** The list of importers for local workspace projects */ - importers: Record; - /** The description of the solved graph */ - packages: Record; - /** URL of the registry which was used */ - registry: string; + dependencies?: Record; /** The list of specifiers used to resolve direct dependency versions */ - specifiers: Record; - /** The list of override version number for dependencies */ - overrides?: { [dependency: string]: string }; - /** The checksum of package extensions fields for extending dependencies */ - packageExtensionsChecksum?: string; + specifiers?: Record; + /** URL of the registry which was used */ + registry?: string; } export interface ILoadFromFileOptions { withCaching?: boolean; } +export function parsePnpm9DependencyKey( + dependencyName: string, + versionSpecifier: IPnpmVersionSpecifier +): DependencySpecifier | undefined { + if (!versionSpecifier) { + return undefined; + } + + const dependencyKey: string = normalizePnpmVersionSpecifier(versionSpecifier); + + // Example: file:projects/project2 + // Example: project-2@file:projects/project2 + // Example: link:../projects/project1 + if (/(file|link):/.test(dependencyKey)) { + // If it starts with an NPM scheme such as "file:projects/my-app.tgz", we don't support that + return undefined; + } + + const { peersIndex } = dependencyPath.indexOfPeersSuffix(dependencyKey); + if (peersIndex !== -1) { + // Remove peer suffix + const key: string = dependencyKey.slice(0, peersIndex); + + // Example: 7.26.0 + if (semver.valid(key)) { + return new DependencySpecifier(dependencyName, key); + } + } + + // Example: @babel/preset-env@7.26.0 -> name=@babel/preset-env version=7.26.0 + // Example: @babel/preset-env@7.26.0(peer@1.2.3) -> name=@babel/preset-env version=7.26.0 + // Example: https://github.com/jonschlinkert/pad-left/tarball/2.1.0 -> name=undefined version=undefined + // Example: pad-left@https://github.com/jonschlinkert/pad-left/tarball/2.1.0 -> name=pad-left nonSemverVersion=https://xxxx + // Example: pad-left@https://codeload.github.com/jonschlinkert/pad-left/tar.gz/7798d648225aa5 -> name=pad-left nonSemverVersion=https://xxxx + const dependency: dependencyPath.DependencyPath = dependencyPath.parse(dependencyKey); + + const name: string = dependency.name ?? dependencyName; + const version: string = dependency.version ?? dependency.nonSemverVersion ?? dependencyKey; + + // Example: https://xxxx/pad-left/tarball/2.1.0 + // Example: https://github.com/jonschlinkert/pad-left/tarball/2.1.0 + // Example: https://codeload.github.com/jonschlinkert/pad-left/tar.gz/7798d648225aa5d879660a37c408ab4675b65ac7 + if (/^https?:/.test(version)) { + return new DependencySpecifier(name, version); + } + + // Is it an alias for a different package? + if (name === dependencyName) { + // No, it's a regular dependency + return new DependencySpecifier(name, version); + } else { + // If the parsed package name is different from the dependencyName, then this is an NPM package alias + return new DependencySpecifier(dependencyName, `npm:${name}@${version}`); + } +} + /** * Given an encoded "dependency key" from the PNPM shrinkwrap file, this parses it into an equivalent * DependencySpecifier. @@ -309,12 +334,33 @@ export class PnpmShrinkwrapFile extends BaseShrinkwrapFile { this.overrides = new Map(Object.entries(shrinkwrapJson.overrides || {})); this.packageExtensionsChecksum = shrinkwrapJson.packageExtensionsChecksum; - // Importers only exist in workspaces - this.isWorkspaceCompatible = this.importers.size > 0; + // Lockfile v9 always has "." in importers filed. + this.isWorkspaceCompatible = + this.shrinkwrapFileMajorVersion >= ShrinkwrapFileMajorVersion.V9 + ? this.importers.size > 1 + : this.importers.size > 0; this._integrities = new Map(); } + public static getLockfileV9PackageId(name: string, version: string): string { + /** + * name@1.2.3 -> name@1.2.3 + * name@1.2.3(peer) -> name@1.2.3(peer) + * https://xxx/@a/b -> name@https://xxx/@a/b + * file://xxx -> name@file://xxx + * 1.2.3 -> name@1.2.3 + */ + + if (/https?:/.test(version)) { + return /@https?:/.test(version) ? version : `${name}@${version}`; + } else if (/file:/.test(version)) { + return /@file:/.test(version)? version : `${name}@${version}`; + } + + return dependencyPath.removeSuffix(version).includes('@', 1) ? version : `${name}@${version}`; + } + public static loadFromFile( shrinkwrapYamlFilePath: string, { withCaching }: ILoadFromFileOptions = {} @@ -342,8 +388,39 @@ export class PnpmShrinkwrapFile extends BaseShrinkwrapFile { } public static loadFromString(shrinkwrapContent: string): PnpmShrinkwrapFile { - const parsedData: IPnpmShrinkwrapYaml = yamlModule.safeLoad(shrinkwrapContent); - return new PnpmShrinkwrapFile(parsedData); + const shrinkwrapJson: IPnpmShrinkwrapYaml = yamlModule.safeLoad(shrinkwrapContent); + if ((shrinkwrapJson as LockfileFileV9).snapshots) { + const lockfile: IPnpmShrinkwrapYaml | null = convertLockfileV9ToLockfileObject( + shrinkwrapJson as LockfileFileV9 + ); + /** + * In Lockfile V9, + * 1. There is no top-level dependencies field, but it is a property of the importers field. + * 2. The version may is not equal to the key in the package field. Thus, it needs to be standardized in the form of `:`. + * + * importers: + * .: + * dependencies: + * 'project1': + * specifier: file:./projects/project1 + * version: file:projects/project1 + * + * packages: + * project1@file:projects/project1: + * resolution: {directory: projects/project1, type: directory} + */ + const dependencies: ResolvedDependencies | undefined = + lockfile.importers['.' as ProjectId]?.dependencies; + if (dependencies) { + lockfile.dependencies = {}; + for (const [name, versionSpecifier] of Object.entries(dependencies)) { + lockfile.dependencies[name] = PnpmShrinkwrapFile.getLockfileV9PackageId(name, versionSpecifier); + } + } + return new PnpmShrinkwrapFile(lockfile); + } + + return new PnpmShrinkwrapFile(shrinkwrapJson); } public getShrinkwrapHash(experimentsConfig?: IExperimentsJson): string { @@ -479,7 +556,7 @@ export class PnpmShrinkwrapFile extends BaseShrinkwrapFile { private _convertLockfileV6DepPathToV5DepPath(newDepPath: string): string { if (!newDepPath.includes('@', 2) || newDepPath.startsWith('file:')) return newDepPath; const index: number = newDepPath.indexOf('@', newDepPath.indexOf('/@') + 2); - if (newDepPath.includes('(') && index > dependencyPath.indexOfPeersSuffix(newDepPath)) return newDepPath; + if (newDepPath.includes('(') && index > dependencyPathLockfilePreV9.indexOfPeersSuffix(newDepPath)) return newDepPath; return `${newDepPath.substring(0, index)}/${newDepPath.substring(index + 1)}`; } @@ -493,7 +570,7 @@ export class PnpmShrinkwrapFile extends BaseShrinkwrapFile { if (this.shrinkwrapFileMajorVersion >= 6) { depPath = this._convertLockfileV6DepPathToV5DepPath(packagePath); } - const pkgInfo: ReturnType = dependencyPath.parse(depPath); + const pkgInfo: ReturnType = dependencyPathLockfilePreV9.parse(depPath); return this._getPackageId(pkgInfo.name as string, pkgInfo.version as string); } @@ -594,6 +671,11 @@ export class PnpmShrinkwrapFile extends BaseShrinkwrapFile { const dependency: IPnpmShrinkwrapDependencyYaml | undefined = this.packages.get(value); if (dependency?.resolution?.tarball && value.startsWith(dependency.resolution.tarball)) { return new DependencySpecifier(dependencyName, dependency.resolution.tarball); + } + + if (this.shrinkwrapFileMajorVersion >= ShrinkwrapFileMajorVersion.V9) { + const { version, nonSemverVersion } = dependencyPath.parse(value); + value = version ?? nonSemverVersion ?? value; } else { let underscoreOrParenthesisIndex: number = value.indexOf('_'); if (underscoreOrParenthesisIndex < 0) { @@ -974,7 +1056,7 @@ export class PnpmShrinkwrapFile extends BaseShrinkwrapFile { } } } else { - // PNPM v8 + // >= PNPM v8 const importerOptionalDependencies: Set = new Set( Object.keys(importer.optionalDependencies ?? {}) ); @@ -1022,20 +1104,32 @@ export class PnpmShrinkwrapFile extends BaseShrinkwrapFile { return true; } } else { - if (typeof specifierFromLockfile === 'string') { - throw new Error( - `The PNPM lockfile is in an unexpected format. The "${name}" package is specified as ` + - `"${specifierFromLockfile}" instead of an object.` - ); - } else { + if (this.shrinkwrapFileMajorVersion >= ShrinkwrapFileMajorVersion.V9) { // TODO: Emit an error message when someone tries to override a version of something in one of their // local repo packages. let resolvedVersion: string = this.overrides.get(name) ?? version; // convert path in posix style, otherwise pnpm install will fail in subspace case resolvedVersion = Path.convertToSlashes(resolvedVersion); - if (specifierFromLockfile.specifier !== resolvedVersion && !isDevDepFallThrough && !isOptional) { + const specifier: string = importer.specifiers[name]; + if (specifier !== resolvedVersion && !isDevDepFallThrough && !isOptional) { return true; } + } else { + if (typeof specifierFromLockfile === 'string') { + throw new Error( + `The PNPM lockfile is in an unexpected format. The "${name}" package is specified as ` + + `"${specifierFromLockfile}" instead of an object.` + ); + } else { + // TODO: Emit an error message when someone tries to override a version of something in one of their + // local repo packages. + let resolvedVersion: string = this.overrides.get(name) ?? version; + // convert path in posix style, otherwise pnpm install will fail in subspace case + resolvedVersion = Path.convertToSlashes(resolvedVersion); + if (specifierFromLockfile.specifier !== resolvedVersion && !isDevDepFallThrough && !isOptional) { + return true; + } + } } } } @@ -1151,7 +1245,9 @@ export class PnpmShrinkwrapFile extends BaseShrinkwrapFile { private _getPackageId(name: string, versionSpecifier: IPnpmVersionSpecifier): string { const version: string = normalizePnpmVersionSpecifier(versionSpecifier); - if (this.shrinkwrapFileMajorVersion >= 6) { + if (this.shrinkwrapFileMajorVersion >= ShrinkwrapFileMajorVersion.V9) { + return PnpmShrinkwrapFile.getLockfileV9PackageId(name, version); + } else if (this.shrinkwrapFileMajorVersion >= ShrinkwrapFileMajorVersion.V6) { if (version.startsWith('@github')) { // This is a github repo reference return version; @@ -1169,10 +1265,10 @@ export class PnpmShrinkwrapFile extends BaseShrinkwrapFile { pnpmDependencyKey: IPnpmVersionSpecifier ): DependencySpecifier | undefined { if (pnpmDependencyKey) { - const result: DependencySpecifier | undefined = parsePnpmDependencyKey( - dependencyName, - pnpmDependencyKey - ); + const result: DependencySpecifier | undefined = + this.shrinkwrapFileMajorVersion >= ShrinkwrapFileMajorVersion.V9 + ? parsePnpm9DependencyKey(dependencyName, pnpmDependencyKey) + : parsePnpmDependencyKey(dependencyName, pnpmDependencyKey); if (!result) { throw new Error( diff --git a/libraries/rush-lib/src/logic/pnpm/test/PnpmOptionsConfiguration.test.ts b/libraries/rush-lib/src/logic/pnpm/test/PnpmOptionsConfiguration.test.ts index 6ed38a7de65..8fc9a7552d2 100644 --- a/libraries/rush-lib/src/logic/pnpm/test/PnpmOptionsConfiguration.test.ts +++ b/libraries/rush-lib/src/logic/pnpm/test/PnpmOptionsConfiguration.test.ts @@ -3,6 +3,7 @@ import * as path from 'path'; import { PnpmOptionsConfiguration } from '../PnpmOptionsConfiguration'; +import { TestUtilities } from '@rushstack/heft-config-file'; const fakeCommonTempFolder: string = path.join(__dirname, 'common', 'temp'); @@ -31,14 +32,14 @@ describe(PnpmOptionsConfiguration.name, () => { fakeCommonTempFolder ); - expect(pnpmConfiguration.globalOverrides).toEqual({ + expect(TestUtilities.stripAnnotations(pnpmConfiguration.globalOverrides)).toEqual({ foo: '^1.0.0', quux: 'npm:@myorg/quux@^1.0.0', 'bar@^2.1.0': '3.0.0', 'qar@1>zoo': '2' }); - expect(pnpmConfiguration.environmentVariables).toEqual({ + expect(TestUtilities.stripAnnotations(pnpmConfiguration.environmentVariables)).toEqual({ NODE_OPTIONS: { value: '--max-old-space-size=4096', override: false @@ -52,7 +53,7 @@ describe(PnpmOptionsConfiguration.name, () => { fakeCommonTempFolder ); - expect(pnpmConfiguration.globalPackageExtensions).toEqual({ + expect(TestUtilities.stripAnnotations(pnpmConfiguration.globalPackageExtensions)).toEqual({ 'react-redux': { peerDependencies: { 'react-dom': '*' @@ -67,6 +68,9 @@ describe(PnpmOptionsConfiguration.name, () => { fakeCommonTempFolder ); - expect(pnpmConfiguration.globalNeverBuiltDependencies).toEqual(['fsevents', 'level']); + expect(TestUtilities.stripAnnotations(pnpmConfiguration.globalNeverBuiltDependencies)).toEqual([ + 'fsevents', + 'level' + ]); }); }); diff --git a/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapConverters.test.ts b/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapConverters.test.ts new file mode 100644 index 00000000000..673bf4826ff --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapConverters.test.ts @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import type { LockfileFileV9, PackageSnapshot, ProjectSnapshot } from '@pnpm/lockfile.types'; +import { convertLockfileV9ToLockfileObject } from '../PnpmShrinkWrapFileConverters'; +import { FileSystem } from '@rushstack/node-core-library'; +import yamlModule from 'js-yaml'; + +describe(convertLockfileV9ToLockfileObject.name, () => { + const lockfileContent: string = FileSystem.readFile( + `${__dirname}/yamlFiles/pnpm-lock-v9/pnpm-lock-v9.yaml` + ); + const lockfileJson: LockfileFileV9 = yamlModule.safeLoad(lockfileContent); + const lockfile = convertLockfileV9ToLockfileObject(lockfileJson); + + it('merge packages and snapshots', () => { + const packages = new Map(Object.entries(lockfile.packages || {})); + const padLeftPackage = packages.get('pad-left@2.1.0'); + expect(padLeftPackage).toBeDefined(); + expect(padLeftPackage?.dependencies).toEqual({ + 'repeat-string': '1.6.1' + }); + }); + + it("importers['.']", () => { + const importers = new Map(Object.entries(lockfile.importers || {})); + + const currentPackage = importers.get('.'); + expect(currentPackage).toBeDefined(); + + expect(currentPackage?.dependencies).toEqual({ + jquery: '3.7.1', + 'pad-left': '2.1.0' + }); + + expect(currentPackage?.specifiers).toEqual({ + jquery: '^3.7.1', + 'pad-left': '^2.1.0' + }); + }); + + it("no nullish values", () => { + const importers = new Map(Object.entries(lockfile.importers || {})); + + const currentPackage = importers.get('.'); + const props = Object.keys(currentPackage || {}); + expect(props).toContain('dependencies'); + expect(props).toContain('specifiers'); + expect(props).not.toContain('optionalDependencies'); + expect(props).not.toContain('devDependencies'); + }); +}); diff --git a/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapFile.test.ts b/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapFile.test.ts index 91f787e57b5..aa1170e999b 100644 --- a/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapFile.test.ts +++ b/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapFile.test.ts @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import { type DependencySpecifier, DependencySpecifierType } from '../../DependencySpecifier'; -import { PnpmShrinkwrapFile, parsePnpmDependencyKey } from '../PnpmShrinkwrapFile'; +import { PnpmShrinkwrapFile, parsePnpm9DependencyKey, parsePnpmDependencyKey } from '../PnpmShrinkwrapFile'; import { RushConfiguration } from '../../../api/RushConfiguration'; import type { RushConfigurationProject } from '../../../api/RushConfigurationProject'; @@ -126,6 +126,99 @@ describe(PnpmShrinkwrapFile.name, () => { }); }); + describe(parsePnpm9DependencyKey.name, () => { + it('Does not support file:// specifiers', () => { + expect(parsePnpm9DependencyKey(DEPENDENCY_NAME, 'file:///path/to/file')).toBeUndefined(); + expect(parsePnpm9DependencyKey(DEPENDENCY_NAME, 'pad-left@file:///path/to/file')).toBeUndefined(); + expect(parsePnpm9DependencyKey(DEPENDENCY_NAME, 'link:///path/to/file')).toBeUndefined(); + }); + + it('Supports a variety of non-aliased package specifiers', () => { + function testSpecifiers(specifiers: string[], expectedName: string, expectedVersion: string): void { + for (const specifier of specifiers) { + const parsedSpecifier: DependencySpecifier | undefined = parsePnpm9DependencyKey( + expectedName, + specifier + ); + expect(parsedSpecifier).toBeDefined(); + expect(parsedSpecifier!.specifierType).toBe(DependencySpecifierType.Version); + expect(parsedSpecifier!.packageName).toBe(expectedName); + expect(parsedSpecifier!.versionSpecifier).toBe(expectedVersion); + } + } + + // non-scoped, non-prerelease + testSpecifiers( + [`${DEPENDENCY_NAME}@${VERSION}`, `${DEPENDENCY_NAME}@${VERSION}(peer@3.5.0+peer2@1.17.7)`], + DEPENDENCY_NAME, + VERSION + ); + + // scoped, non-prerelease + testSpecifiers( + [ + `${SCOPED_DEPENDENCY_NAME}@${VERSION}`, + `${SCOPED_DEPENDENCY_NAME}@${VERSION}(peer@3.5.0+peer2@1.17.7)` + ], + SCOPED_DEPENDENCY_NAME, + VERSION + ); + + // non-scoped, prerelease + testSpecifiers( + [ + `${DEPENDENCY_NAME}@${PRERELEASE_VERSION}`, + `${DEPENDENCY_NAME}@${PRERELEASE_VERSION}(peer@3.5.0+peer2@1.17.7)` + ], + DEPENDENCY_NAME, + PRERELEASE_VERSION + ); + + // scoped, prerelease + testSpecifiers( + [ + `${SCOPED_DEPENDENCY_NAME}@${PRERELEASE_VERSION}`, + `${SCOPED_DEPENDENCY_NAME}@${PRERELEASE_VERSION}(peer@3.5.0+peer2@1.17.7)` + ], + SCOPED_DEPENDENCY_NAME, + PRERELEASE_VERSION + ); + }); + + it('Supports aliased package specifiers (v9)', () => { + const parsedSpecifier: DependencySpecifier | undefined = parsePnpm9DependencyKey( + SCOPED_DEPENDENCY_NAME, + `${DEPENDENCY_NAME}@${VERSION}` + ); + expect(parsedSpecifier).toBeDefined(); + expect(parsedSpecifier!.specifierType).toBe(DependencySpecifierType.Alias); + expect(parsedSpecifier!.packageName).toBe(SCOPED_DEPENDENCY_NAME); + expect(parsedSpecifier!.versionSpecifier).toMatchInlineSnapshot(`"npm:${DEPENDENCY_NAME}@${VERSION}"`); + }); + + it('Supports URL package specifiers', () => { + const specifiers: string[] = [ + 'https://github.com/jonschlinkert/pad-left/tarball/2.1.0', + 'https://xxx.xxxx.org/pad-left/-/pad-left-2.1.0.tgz', + 'https://codeload.github.com/jonschlinkert/pad-left/tar.gz/7798d648225aa5d879660a37c408ab4675b65ac7', + `${SCOPED_DEPENDENCY_NAME}@http://abc.com/jonschlinkert/pad-left/tarball/2.1.0`, + `${SCOPED_DEPENDENCY_NAME}@https://xxx.xxxx.org/pad-left/-/pad-left-2.1.0.tgz`, + `${SCOPED_DEPENDENCY_NAME}@https://codeload.github.com/jonschlinkert/pad-left/tar.gz/7798d648225aa5d879660a37c408ab4675b65ac7` + ]; + + for (const specifier of specifiers) { + const parsedSpecifier: DependencySpecifier | undefined = parsePnpm9DependencyKey( + SCOPED_DEPENDENCY_NAME, + specifier + ); + expect(parsedSpecifier).toBeDefined(); + expect(parsedSpecifier!.specifierType).toBe(DependencySpecifierType.Remote); + expect(parsedSpecifier!.packageName).toBe(SCOPED_DEPENDENCY_NAME); + expect(parsedSpecifier!.versionSpecifier).toBe(specifier.replace(`${SCOPED_DEPENDENCY_NAME}@`, '')); + } + }); + }); + describe('Check is workspace project modified', () => { describe('pnpm lockfile major version 5', () => { it('can detect not modified', async () => { @@ -228,6 +321,64 @@ describe(PnpmShrinkwrapFile.name, () => { ).resolves.toBe(false); }); }); + + describe('pnpm lockfile major version 9', () => { + it('can detect not modified', async () => { + const project = getMockRushProject(); + const pnpmShrinkwrapFile = getPnpmShrinkwrapFileFromFile( + `${__dirname}/yamlFiles/pnpm-lock-v9/not-modified.yaml` + ); + await expect( + pnpmShrinkwrapFile.isWorkspaceProjectModifiedAsync( + project, + project.rushConfiguration.defaultSubspace, + undefined + ) + ).resolves.toBe(false); + }); + + it('can detect modified', async () => { + const project = getMockRushProject(); + const pnpmShrinkwrapFile = getPnpmShrinkwrapFileFromFile( + `${__dirname}/yamlFiles/pnpm-lock-v9/modified.yaml` + ); + await expect( + pnpmShrinkwrapFile.isWorkspaceProjectModifiedAsync( + project, + project.rushConfiguration.defaultSubspace, + undefined + ) + ).resolves.toBe(true); + }); + + it('can detect overrides', async () => { + const project = getMockRushProject(); + const pnpmShrinkwrapFile = getPnpmShrinkwrapFileFromFile( + `${__dirname}/yamlFiles/pnpm-lock-v9/overrides-not-modified.yaml` + ); + await expect( + pnpmShrinkwrapFile.isWorkspaceProjectModifiedAsync( + project, + project.rushConfiguration.defaultSubspace, + undefined + ) + ).resolves.toBe(false); + }); + + it('can handle the inconsistent version of a package declared in dependencies and devDependencies', async () => { + const project = getMockRushProject2(); + const pnpmShrinkwrapFile = getPnpmShrinkwrapFileFromFile( + `${__dirname}/yamlFiles/pnpm-lock-v9/inconsistent-dep-devDep.yaml` + ); + await expect( + pnpmShrinkwrapFile.isWorkspaceProjectModifiedAsync( + project, + project.rushConfiguration.defaultSubspace, + undefined + ) + ).resolves.toBe(false); + }); + }); }); }); diff --git a/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/inconsistent-dep-devDep.yaml b/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/inconsistent-dep-devDep.yaml new file mode 100644 index 00000000000..7f26989631c --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/inconsistent-dep-devDep.yaml @@ -0,0 +1,26 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: {} + + ../../apps/bar: + dependencies: + prettier: + specifier: ~2.3.0 + version: 2.3.2 + +packages: + + prettier@2.3.2: + resolution: {integrity: sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==} + engines: {node: '>=10.13.0'} + hasBin: true + +snapshots: + + prettier@2.3.2: {} diff --git a/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/modified.yaml b/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/modified.yaml new file mode 100644 index 00000000000..71509e89efe --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/modified.yaml @@ -0,0 +1,35 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: {} + + ../../apps/foo: + dependencies: + tslib: + specifier: ~2.3.0 + version: 2.3.1 + devDependencies: + typescript: + specifier: ~5.0.4 + version: 5.0.4 + +packages: + + tslib@2.3.1: + resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} + + typescript@5.0.4: + resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} + engines: {node: '>=12.20'} + hasBin: true + +snapshots: + + tslib@2.3.1: {} + + typescript@5.0.4: {} diff --git a/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/not-modified.yaml b/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/not-modified.yaml new file mode 100644 index 00000000000..47ef29262c3 --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/not-modified.yaml @@ -0,0 +1,35 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: {} + + ../../apps/foo: + dependencies: + tslib: + specifier: ~2.3.1 + version: 2.3.1 + devDependencies: + typescript: + specifier: ~5.0.4 + version: 5.0.4 + +packages: + + tslib@2.3.1: + resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} + + typescript@5.0.4: + resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} + engines: {node: '>=12.20'} + hasBin: true + +snapshots: + + tslib@2.3.1: {} + + typescript@5.0.4: {} diff --git a/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/overrides-not-modified.yaml b/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/overrides-not-modified.yaml new file mode 100644 index 00000000000..d21630b1d81 --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/overrides-not-modified.yaml @@ -0,0 +1,38 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +overrides: + typescript: 5.0.4 + +importers: + + .: {} + + ../../apps/foo: + dependencies: + tslib: + specifier: ~2.3.1 + version: 2.3.1 + devDependencies: + typescript: + specifier: 5.0.4 + version: 5.0.4 + +packages: + + tslib@2.3.1: + resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} + + typescript@5.0.4: + resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} + engines: {node: '>=12.20'} + hasBin: true + +snapshots: + + tslib@2.3.1: {} + + typescript@5.0.4: {} diff --git a/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/pnpm-lock-v9.yaml b/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/pnpm-lock-v9.yaml new file mode 100644 index 00000000000..9fe144e1b91 --- /dev/null +++ b/libraries/rush-lib/src/logic/pnpm/test/yamlFiles/pnpm-lock-v9/pnpm-lock-v9.yaml @@ -0,0 +1,39 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + jquery: + specifier: ^3.7.1 + version: 3.7.1 + pad-left: + specifier: ^2.1.0 + version: 2.1.0 + +packages: + + jquery@3.7.1: + resolution: {integrity: sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==} + + pad-left@2.1.0: + resolution: {integrity: sha512-HJxs9K9AztdIQIAIa/OIazRAUW/L6B9hbQDxO4X07roW3eo9XqZc2ur9bn1StH9CnbbI9EgvejHQX7CBpCF1QA==} + engines: {node: '>=0.10.0'} + + repeat-string@1.6.1: + resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} + engines: {node: '>=0.10'} + +snapshots: + + jquery@3.7.1: {} + + pad-left@2.1.0: + dependencies: + repeat-string: 1.6.1 + + repeat-string@1.6.1: {} diff --git a/libraries/rush-lib/src/logic/policy/ShrinkwrapFilePolicy.ts b/libraries/rush-lib/src/logic/policy/ShrinkwrapFilePolicy.ts index f774eae072b..dd2f4e3c9f3 100644 --- a/libraries/rush-lib/src/logic/policy/ShrinkwrapFilePolicy.ts +++ b/libraries/rush-lib/src/logic/policy/ShrinkwrapFilePolicy.ts @@ -25,7 +25,6 @@ export function validate( console.log('Validating package manager shrinkwrap file.\n'); const shrinkwrapFile: BaseShrinkwrapFile | undefined = ShrinkwrapFileFactory.getShrinkwrapFile( rushConfiguration.packageManager, - rushConfiguration.packageManagerOptions, subspace.getCommittedShrinkwrapFilePath(variant) ); diff --git a/libraries/rush-lib/src/logic/setup/SetupPackageRegistry.ts b/libraries/rush-lib/src/logic/setup/SetupPackageRegistry.ts index ac6acbc2a43..a9097e7182f 100644 --- a/libraries/rush-lib/src/logic/setup/SetupPackageRegistry.ts +++ b/libraries/rush-lib/src/logic/setup/SetupPackageRegistry.ts @@ -17,7 +17,7 @@ import { PrintUtilities, Colorize, ConsoleTerminalProvider, Terminal } from '@ru import type { RushConfiguration } from '../../api/RushConfiguration'; import { Utilities } from '../../utilities/Utilities'; import { type IArtifactoryPackageRegistryJson, ArtifactoryConfiguration } from './ArtifactoryConfiguration'; -import type { WebClient as WebClientType, WebClientResponse } from '../../utilities/WebClient'; +import type { WebClient as WebClientType, IWebClientResponse } from '../../utilities/WebClient'; import { TerminalInput } from './TerminalInput'; interface IArtifactoryCustomizableMessages { @@ -110,7 +110,8 @@ export class SetupPackageRegistry { if (!this._options.syncNpmrcAlreadyCalled) { Utilities.syncNpmrc({ sourceNpmrcFolder: this.rushConfiguration.commonRushConfigFolder, - targetNpmrcFolder: this.rushConfiguration.commonTempFolder + targetNpmrcFolder: this.rushConfiguration.commonTempFolder, + supportEnvVarFallbackSyntax: this.rushConfiguration.isPnpm }); } @@ -300,7 +301,7 @@ export class SetupPackageRegistry { // our token. queryUrl += `auth/.npm`; - let response: WebClientResponse; + let response: IWebClientResponse; try { response = await webClient.fetchAsync(queryUrl); } catch (e) { @@ -324,7 +325,7 @@ export class SetupPackageRegistry { // //your-company.jfrog.io/your-artifacts/api/npm/npm-private/:username=your.name@your-company.com // //your-company.jfrog.io/your-artifacts/api/npm/npm-private/:email=your.name@your-company.com // //your-company.jfrog.io/your-artifacts/api/npm/npm-private/:always-auth=true - const responseText: string = await response.text(); + const responseText: string = await response.getTextAsync(); const responseLines: string[] = Text.convertToLf(responseText).trim().split('\n'); if (responseLines.length < 2 || !responseLines[0].startsWith('@.npm:')) { throw new Error('Unexpected response from Artifactory'); diff --git a/libraries/rush-lib/src/logic/test/InstallHelpers.test.ts b/libraries/rush-lib/src/logic/test/InstallHelpers.test.ts index e943f877654..d161d5da632 100644 --- a/libraries/rush-lib/src/logic/test/InstallHelpers.test.ts +++ b/libraries/rush-lib/src/logic/test/InstallHelpers.test.ts @@ -1,20 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. +import { type IPackageJson, JsonFile } from '@rushstack/node-core-library'; +import { StringBufferTerminalProvider, Terminal } from '@rushstack/terminal'; +import { TestUtilities } from '@rushstack/heft-config-file'; + import { InstallHelpers } from '../installManager/InstallHelpers'; import { RushConfiguration } from '../../api/RushConfiguration'; -import { type IPackageJson, JsonFile } from '@rushstack/node-core-library'; describe('InstallHelpers', () => { describe('generateCommonPackageJson', () => { const originalJsonFileSave = JsonFile.save; const mockJsonFileSave: jest.Mock = jest.fn(); + let terminal: Terminal; + let terminalProvider: StringBufferTerminalProvider; + beforeAll(() => { JsonFile.save = mockJsonFileSave; }); + + beforeEach(() => { + terminalProvider = new StringBufferTerminalProvider(); + terminal = new Terminal(terminalProvider); + }); + afterEach(() => { + expect({ + output: terminalProvider.getOutput({ normalizeSpecialCharacters: true }), + verbose: terminalProvider.getVerbose({ normalizeSpecialCharacters: true }), + error: terminalProvider.getDebugOutput({ normalizeSpecialCharacters: true }), + warning: terminalProvider.getWarningOutput({ normalizeSpecialCharacters: true }), + debug: terminalProvider.getDebugOutput({ normalizeSpecialCharacters: true }) + }).toMatchSnapshot('Terminal Output'); mockJsonFileSave.mockClear(); }); + afterAll(() => { JsonFile.save = originalJsonFileSave; }); @@ -26,10 +46,11 @@ describe('InstallHelpers', () => { InstallHelpers.generateCommonPackageJson( rushConfiguration, rushConfiguration.defaultSubspace, - undefined + undefined, + terminal ); const packageJson: IPackageJson = mockJsonFileSave.mock.calls[0][0]; - expect(packageJson).toEqual( + expect(TestUtilities.stripAnnotations(packageJson)).toEqual( expect.objectContaining({ pnpm: { overrides: { diff --git a/libraries/rush-lib/src/logic/test/ProjectChangeAnalyzer.test.ts b/libraries/rush-lib/src/logic/test/ProjectChangeAnalyzer.test.ts index 473b81c5444..fc9e983494e 100644 --- a/libraries/rush-lib/src/logic/test/ProjectChangeAnalyzer.test.ts +++ b/libraries/rush-lib/src/logic/test/ProjectChangeAnalyzer.test.ts @@ -1,322 +1,99 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { LookupByPath } from '@rushstack/lookup-by-path'; -import { StringBufferTerminalProvider, Terminal } from '@rushstack/terminal'; - -import { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer'; -import type { RushConfiguration } from '../../api/RushConfiguration'; -import { EnvironmentConfiguration } from '../../api/EnvironmentConfiguration'; -import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; -import { RushProjectConfiguration } from '../../api/RushProjectConfiguration'; -import { UNINITIALIZED } from '../../utilities/Utilities'; - -describe(ProjectChangeAnalyzer.name, () => { - beforeEach(() => { - jest.spyOn(EnvironmentConfiguration, 'gitBinaryPath', 'get').mockReturnValue(undefined); - jest.spyOn(RushProjectConfiguration, 'tryLoadIgnoreGlobsForProjectAsync').mockResolvedValue(undefined); - }); - - afterEach(() => { - jest.resetAllMocks(); - }); - - function createTestSubject( - projects: RushConfigurationProject[], - files: Map - ): ProjectChangeAnalyzer { - const rushConfiguration: RushConfiguration = { - commonRushConfigFolder: '', - projects, - rushJsonFolder: '', - defaultSubspace: { - getCommittedShrinkwrapFilePath(variant: string | undefined): string { - return 'common/config/rush/pnpm-lock.yaml'; - } - }, - getProjectLookupForRoot(root: string): LookupByPath { - const lookup: LookupByPath = new LookupByPath(); - for (const project of projects) { - lookup.setItem(project.projectRelativeFolder, project); - } - return lookup; - }, - getProjectByName(name: string): RushConfigurationProject | undefined { - return projects.find((project) => project.packageName === name); - }, - getCurrentlyInstalledVariantAsync: () => Promise.resolve(undefined) - } as RushConfiguration; - - const subject: ProjectChangeAnalyzer = new ProjectChangeAnalyzer(rushConfiguration); - - subject['_getRepoDepsAsync'] = jest.fn(() => { - return Promise.resolve({ - gitPath: 'git', - hashes: files, - rootDir: '' - }); - }); - - return subject; - } - - describe(ProjectChangeAnalyzer.prototype._tryGetProjectDependenciesAsync.name, () => { - it('returns the files for the specified project', async () => { - const projects: RushConfigurationProject[] = [ - { - packageName: 'apple', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/apple' - } as RushConfigurationProject, - { - packageName: 'banana', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/banana' - } as RushConfigurationProject - ]; - const files: Map = new Map([ - ['apps/apple/core.js', 'a101'], - ['apps/banana/peel.js', 'b201'] - ]); - const subject: ProjectChangeAnalyzer = createTestSubject(projects, files); - const terminal: Terminal = new Terminal(new StringBufferTerminalProvider()); - - expect(await subject._tryGetProjectDependenciesAsync(projects[0], terminal)).toEqual( - new Map([['apps/apple/core.js', 'a101']]) - ); - expect(await subject._tryGetProjectDependenciesAsync(projects[1], terminal)).toEqual( - new Map([['apps/banana/peel.js', 'b201']]) - ); - }); - - it('ignores files specified by project configuration files, relative to project folder', async () => { - // rush-project.json configuration for 'apple' - jest - .spyOn(RushProjectConfiguration, 'tryLoadIgnoreGlobsForProjectAsync') - .mockResolvedValueOnce(['assets/*.png', '*.js.map']); - // rush-project.json configuration for 'banana' does not exist - jest - .spyOn(RushProjectConfiguration, 'tryLoadIgnoreGlobsForProjectAsync') - .mockResolvedValueOnce(undefined); - - const projects: RushConfigurationProject[] = [ - { - packageName: 'apple', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/apple' - } as RushConfigurationProject, - { - packageName: 'banana', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/banana' - } as RushConfigurationProject - ]; - const files: Map = new Map([ - ['apps/apple/core.js', 'a101'], - ['apps/apple/core.js.map', 'a102'], - ['apps/apple/assets/one.jpg', 'a103'], - ['apps/apple/assets/two.png', 'a104'], - ['apps/banana/peel.js', 'b201'], - ['apps/banana/peel.js.map', 'b202'] - ]); - const subject: ProjectChangeAnalyzer = createTestSubject(projects, files); - const terminal: Terminal = new Terminal(new StringBufferTerminalProvider()); - - expect(await subject._tryGetProjectDependenciesAsync(projects[0], terminal)).toEqual( - new Map([ - ['apps/apple/core.js', 'a101'], - ['apps/apple/assets/one.jpg', 'a103'] - ]) - ); - expect(await subject._tryGetProjectDependenciesAsync(projects[1], terminal)).toEqual( - new Map([ - ['apps/banana/peel.js', 'b201'], - ['apps/banana/peel.js.map', 'b202'] - ]) - ); - }); - - it('interprets ignored globs as a dot-ignore file (not as individually handled globs)', async () => { - // rush-project.json configuration for 'apple' - jest - .spyOn(RushProjectConfiguration, 'tryLoadIgnoreGlobsForProjectAsync') - .mockResolvedValue(['*.png', 'assets/*.psd', '!assets/important/**']); - - const projects: RushConfigurationProject[] = [ - { - packageName: 'apple', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/apple' - } as RushConfigurationProject - ]; - const files: Map = new Map([ - ['apps/apple/one.png', 'a101'], - ['apps/apple/assets/two.psd', 'a102'], - ['apps/apple/assets/three.png', 'a103'], - ['apps/apple/assets/important/four.png', 'a104'], - ['apps/apple/assets/important/five.psd', 'a105'], - ['apps/apple/src/index.ts', 'a106'] - ]); - const subject: ProjectChangeAnalyzer = createTestSubject(projects, files); - const terminal: Terminal = new Terminal(new StringBufferTerminalProvider()); - - // In a dot-ignore file, the later rule '!assets/important/**' should override the previous - // rule of '*.png'. This unit test verifies that this behavior doesn't change later if - // we modify the implementation. - expect(await subject._tryGetProjectDependenciesAsync(projects[0], terminal)).toEqual( - new Map([ - ['apps/apple/assets/important/four.png', 'a104'], - ['apps/apple/assets/important/five.psd', 'a105'], - ['apps/apple/src/index.ts', 'a106'] - ]) - ); - }); +const mockHashes: Map = new Map([ + ['a/package.json', 'hash1'], + ['b/package.json', 'hash2'], + ['c/package.json', 'hash3'], + ['changes/a.json', 'hash4'], + ['changes/b.json', 'hash5'], + ['changes/c.json', 'hash6'], + ['changes/d.json', 'hash7'], + ['changes/h.json', 'hash8'], + ['common/config/rush/version-policies.json', 'hash9'], + ['common/config/rush/npm-shrinkwrap.json', 'hash10'], + ['d/package.json', 'hash11'], + ['e/package.json', 'hash12'], + ['f/package.json', 'hash13'], + ['g/package.json', 'hash14'], + ['h/package.json', 'hash15'], + ['i/package.json', 'hash16'], + ['j/package.json', 'hash17'], + ['rush.json', 'hash18'] +]); +jest.mock(`@rushstack/package-deps-hash`, () => { + return { + getRepoRoot(dir: string): string { + return dir; + }, + getRepoStateAsync(): ReadonlyMap { + return mockHashes; + }, + getRepoChangesAsync(): ReadonlyMap { + return new Map(); + }, + getGitHashForFiles(filePaths: Iterable): ReadonlyMap { + return new Map(Array.from(filePaths, (filePath: string) => [filePath, filePath])); + }, + hashFilesAsync(rootDirectory: string, filePaths: Iterable): ReadonlyMap { + return new Map(Array.from(filePaths, (filePath: string) => [filePath, filePath])); + } + }; +}); - it('includes the committed shrinkwrap file as a dep for all projects', async () => { - const projects: RushConfigurationProject[] = [ - { - packageName: 'apple', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/apple' - } as RushConfigurationProject, - { - packageName: 'banana', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/banana' - } as RushConfigurationProject - ]; - const files: Map = new Map([ - ['apps/apple/core.js', 'a101'], - ['apps/banana/peel.js', 'b201'], - ['common/config/rush/pnpm-lock.yaml', 'ffff'], - ['tools/random-file.js', 'e00e'] - ]); - const subject: ProjectChangeAnalyzer = createTestSubject(projects, files); - const terminal: Terminal = new Terminal(new StringBufferTerminalProvider()); +const mockSnapshot: jest.Mock = jest.fn(); - expect(await subject._tryGetProjectDependenciesAsync(projects[0], terminal)).toEqual( - new Map([ - ['apps/apple/core.js', 'a101'], - ['common/config/rush/pnpm-lock.yaml', 'ffff'] - ]) - ); - expect(await subject._tryGetProjectDependenciesAsync(projects[1], terminal)).toEqual( - new Map([ - ['apps/banana/peel.js', 'b201'], - ['common/config/rush/pnpm-lock.yaml', 'ffff'] - ]) - ); - }); - - it('throws an exception if the specified project does not exist', async () => { - const projects: RushConfigurationProject[] = [ - { - packageName: 'apple', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/apple' - } as RushConfigurationProject - ]; - const files: Map = new Map([['apps/apple/core.js', 'a101']]); - const subject: ProjectChangeAnalyzer = createTestSubject(projects, files); - const terminal: Terminal = new Terminal(new StringBufferTerminalProvider()); +jest.mock('../incremental/InputsSnapshot', () => { + return { + InputsSnapshot: mockSnapshot + }; +}); - try { - await subject._tryGetProjectDependenciesAsync( - { - packageName: 'carrot' - } as RushConfigurationProject, - terminal - ); - fail('Should have thrown error'); - } catch (e) { - expect(e).toMatchSnapshot(); - } - }); +import { resolve } from 'node:path'; - it('lazy-loads project data and caches it for future calls', async () => { - const projects: RushConfigurationProject[] = [ - { - packageName: 'apple', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/apple' - } as RushConfigurationProject - ]; - const files: Map = new Map([['apps/apple/core.js', 'a101']]); - const subject: ProjectChangeAnalyzer = createTestSubject(projects, files); - const terminal: Terminal = new Terminal(new StringBufferTerminalProvider()); +import { StringBufferTerminalProvider, Terminal } from '@rushstack/terminal'; - // Because other unit tests rely on the fact that a freshly instantiated - // ProjectChangeAnalyzer is inert until someone actually requests project data, - // this test makes that expectation explicit. +import { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer'; +import { RushConfiguration } from '../../api/RushConfiguration'; +import type { + IInputsSnapshot, + GetInputsSnapshotAsyncFn, + IInputsSnapshotParameters +} from '../incremental/InputsSnapshot'; - expect(subject['_data']).toEqual(UNINITIALIZED); - expect(await subject._tryGetProjectDependenciesAsync(projects[0], terminal)).toEqual( - new Map([['apps/apple/core.js', 'a101']]) - ); - expect(subject['_data']).toBeDefined(); - expect(subject['_data']).not.toEqual(UNINITIALIZED); - expect(await subject._tryGetProjectDependenciesAsync(projects[0], terminal)).toEqual( - new Map([['apps/apple/core.js', 'a101']]) - ); - expect(subject['_getRepoDepsAsync']).toHaveBeenCalledTimes(1); - }); +describe(ProjectChangeAnalyzer.name, () => { + beforeEach(() => { + mockSnapshot.mockClear(); }); - describe(ProjectChangeAnalyzer.prototype._tryGetProjectStateHashAsync.name, () => { - it('returns a fixed hash snapshot for a set of project deps', async () => { - const projects: RushConfigurationProject[] = [ - { - packageName: 'apple', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/apple' - } as RushConfigurationProject - ]; - const files: Map = new Map([ - ['apps/apple/core.js', 'a101'], - ['apps/apple/juice.js', 'e333'], - ['apps/apple/slices.js', 'a102'] - ]); - const subject: ProjectChangeAnalyzer = createTestSubject(projects, files); - const terminal: Terminal = new Terminal(new StringBufferTerminalProvider()); - - expect(await subject._tryGetProjectStateHashAsync(projects[0], terminal)).toMatchInlineSnapshot( - `"265536e325cdfac3fa806a51873d927a712fc6c9"` - ); - }); - - it('returns the same hash regardless of dep order', async () => { - const projectsA: RushConfigurationProject[] = [ - { - packageName: 'apple', - projectFolder: '/apps/apple', - projectRelativeFolder: 'apps/apple' - } as RushConfigurationProject - ]; - const filesA: Map = new Map([ - ['apps/apple/core.js', 'a101'], - ['apps/apple/juice.js', 'e333'], - ['apps/apple/slices.js', 'a102'] - ]); - const subjectA: ProjectChangeAnalyzer = createTestSubject(projectsA, filesA); - - const projectsB: RushConfigurationProject[] = [ - { - packageName: 'apple', - projectFolder: 'apps/apple', - projectRelativeFolder: 'apps/apple' - } as RushConfigurationProject - ]; - const filesB: Map = new Map([ - ['apps/apple/slices.js', 'a102'], - ['apps/apple/core.js', 'a101'], - ['apps/apple/juice.js', 'e333'] - ]); - const subjectB: ProjectChangeAnalyzer = createTestSubject(projectsB, filesB); - - const terminal: Terminal = new Terminal(new StringBufferTerminalProvider()); - expect(await subjectA._tryGetProjectStateHashAsync(projectsA[0], terminal)).toEqual( - await subjectB._tryGetProjectStateHashAsync(projectsB[0], terminal) + describe(ProjectChangeAnalyzer.prototype._tryGetSnapshotProviderAsync.name, () => { + it('returns a snapshot', async () => { + const rootDir: string = resolve(__dirname, 'repo'); + const rushConfiguration: RushConfiguration = RushConfiguration.loadFromConfigurationFile( + resolve(rootDir, 'rush.json') ); + const projectChangeAnalyzer: ProjectChangeAnalyzer = new ProjectChangeAnalyzer(rushConfiguration); + const terminalProvider: StringBufferTerminalProvider = new StringBufferTerminalProvider(true); + const terminal: Terminal = new Terminal(terminalProvider); + const mockSnapshotValue: {} = {}; + mockSnapshot.mockImplementation(() => mockSnapshotValue); + const snapshotProvider: GetInputsSnapshotAsyncFn | undefined = + await projectChangeAnalyzer._tryGetSnapshotProviderAsync(new Map(), terminal); + const snapshot: IInputsSnapshot | undefined = await snapshotProvider?.(); + + expect(snapshot).toBe(mockSnapshotValue); + expect(terminalProvider.getErrorOutput()).toEqual(''); + expect(terminalProvider.getWarningOutput()).toEqual(''); + + expect(mockSnapshot).toHaveBeenCalledTimes(1); + + const mockInput: IInputsSnapshotParameters = mockSnapshot.mock.calls[0][0]; + expect(mockInput.globalAdditionalFiles).toBeDefined(); + expect(mockInput.globalAdditionalFiles).toMatchObject(['common/config/rush/npm-shrinkwrap.json']); + + expect(mockInput.hashes).toEqual(mockHashes); + expect(mockInput.rootDir).toEqual(rootDir); + expect(mockInput.additionalHashes).toEqual(new Map()); }); }); }); diff --git a/libraries/rush-lib/src/logic/test/ShrinkwrapFile.test.ts b/libraries/rush-lib/src/logic/test/ShrinkwrapFile.test.ts index 1c4996a6fab..2104bb07b10 100644 --- a/libraries/rush-lib/src/logic/test/ShrinkwrapFile.test.ts +++ b/libraries/rush-lib/src/logic/test/ShrinkwrapFile.test.ts @@ -6,14 +6,18 @@ import { JsonFile } from '@rushstack/node-core-library'; import type { BaseShrinkwrapFile } from '../base/BaseShrinkwrapFile'; import { ShrinkwrapFileFactory } from '../ShrinkwrapFileFactory'; -import { parsePnpmDependencyKey, PnpmShrinkwrapFile } from '../pnpm/PnpmShrinkwrapFile'; +import { + parsePnpmDependencyKey, + PnpmShrinkwrapFile, + ShrinkwrapFileMajorVersion +} from '../pnpm/PnpmShrinkwrapFile'; import { DependencySpecifier } from '../DependencySpecifier'; import { NpmShrinkwrapFile } from '../npm/NpmShrinkwrapFile'; import type { RushConfigurationProject } from '../../api/RushConfigurationProject'; describe(NpmShrinkwrapFile.name, () => { const filename: string = `${__dirname}/shrinkwrapFile/npm-shrinkwrap.json`; - const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile('npm', {}, filename)!; + const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile('npm', filename)!; it('verifies root-level dependency', () => { expect(shrinkwrapFile.hasCompatibleTopLevelDependency(new DependencySpecifier('q', '~1.5.0'))).toEqual( @@ -73,12 +77,28 @@ describe(PnpmShrinkwrapFile.name, () => { '@rush-temp/project1' ) ).toEqual(false); - expect( - shrinkwrapFile.tryEnsureCompatibleDependency( - new DependencySpecifier('@scope/testDep', '>=2.0.0 <3.0.0'), - '@rush-temp/project3' - ) - ).toEqual(true); + + if ( + shrinkwrapFile instanceof PnpmShrinkwrapFile && + shrinkwrapFile.shrinkwrapFileMajorVersion >= ShrinkwrapFileMajorVersion.V9 + ) { + expect( + shrinkwrapFile.tryEnsureCompatibleDependency( + new DependencySpecifier( + '@scope/testDep', + 'https://github.com/jonschlinkert/pad-left/tarball/2.1.0' + ), + '@rush-temp/project3' + ) + ).toEqual(true); + } else { + expect( + shrinkwrapFile.tryEnsureCompatibleDependency( + new DependencySpecifier('@scope/testDep', '>=2.0.0 <3.0.0'), + '@rush-temp/project3' + ) + ).toEqual(true); + } }); it('extracts temp projects successfully', () => { @@ -97,11 +117,7 @@ describe(PnpmShrinkwrapFile.name, () => { __dirname, '../../../src/logic/test/shrinkwrapFile/non-workspace-pnpm-lock-v5.yaml' ); - const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile( - 'pnpm', - {}, - filename - )!; + const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile('pnpm', filename)!; validateNonWorkspaceLockfile(shrinkwrapFile); }); @@ -111,11 +127,7 @@ describe(PnpmShrinkwrapFile.name, () => { __dirname, '../../../src/logic/test/shrinkwrapFile/non-workspace-pnpm-lock-v5.3.yaml' ); - const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile( - 'pnpm', - {}, - filename - )!; + const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile('pnpm', filename)!; validateNonWorkspaceLockfile(shrinkwrapFile); }); @@ -125,14 +137,19 @@ describe(PnpmShrinkwrapFile.name, () => { __dirname, '../../../src/logic/test/shrinkwrapFile/non-workspace-pnpm-lock-v6.1.yaml' ); - const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile( - 'pnpm', - {}, - filename - )!; + const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile('pnpm', filename)!; validateNonWorkspaceLockfile(shrinkwrapFile); }); + + describe('V9 lockfile', () => { + const filename: string = path.resolve( + __dirname, + '../../../src/logic/test/shrinkwrapFile/non-workspace-pnpm-lock-v9.yaml' + ); + const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile('pnpm', filename)!; + validateNonWorkspaceLockfile(shrinkwrapFile); + }); }); describe('workspace', () => { @@ -179,11 +196,7 @@ describe(PnpmShrinkwrapFile.name, () => { __dirname, '../../../src/logic/test/shrinkwrapFile/workspace-pnpm-lock-v5.3.yaml' ); - const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile( - 'pnpm', - {}, - filename - )!; + const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile('pnpm', filename)!; validateWorkspaceLockfile(shrinkwrapFile); }); @@ -193,11 +206,18 @@ describe(PnpmShrinkwrapFile.name, () => { __dirname, '../../../src/logic/test/shrinkwrapFile/workspace-pnpm-lock-v5.3.yaml' ); - const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile( - 'pnpm', - {}, - filename - )!; + const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile('pnpm', filename)!; + + validateWorkspaceLockfile(shrinkwrapFile); + }); + + describe('V9 lockfile', () => { + const filename: string = path.resolve( + __dirname, + '../../../src/logic/test/shrinkwrapFile/workspace-pnpm-lock-v9.yaml' + ); + + const shrinkwrapFile: BaseShrinkwrapFile = ShrinkwrapFileFactory.getShrinkwrapFile('pnpm', filename)!; validateWorkspaceLockfile(shrinkwrapFile); }); diff --git a/libraries/rush-lib/src/logic/test/__snapshots__/InstallHelpers.test.ts.snap b/libraries/rush-lib/src/logic/test/__snapshots__/InstallHelpers.test.ts.snap new file mode 100644 index 00000000000..7f122921b53 --- /dev/null +++ b/libraries/rush-lib/src/logic/test/__snapshots__/InstallHelpers.test.ts.snap @@ -0,0 +1,11 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`InstallHelpers generateCommonPackageJson generates correct package json with pnpm configurations: Terminal Output 1`] = ` +Object { + "debug": "", + "error": "", + "output": "", + "verbose": "", + "warning": "", +} +`; diff --git a/libraries/rush-lib/src/logic/test/__snapshots__/ProjectChangeAnalyzer.test.ts.snap b/libraries/rush-lib/src/logic/test/__snapshots__/ProjectChangeAnalyzer.test.ts.snap deleted file mode 100644 index bc265de44ee..00000000000 --- a/libraries/rush-lib/src/logic/test/__snapshots__/ProjectChangeAnalyzer.test.ts.snap +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ProjectChangeAnalyzer _tryGetProjectDependenciesAsync throws an exception if the specified project does not exist 1`] = `[Error: Project "carrot" does not exist in the current Rush configuration.]`; diff --git a/libraries/rush-lib/src/logic/test/__snapshots__/ShrinkwrapFile.test.ts.snap b/libraries/rush-lib/src/logic/test/__snapshots__/ShrinkwrapFile.test.ts.snap index 5192b36bf2f..c4f9d4453dd 100644 --- a/libraries/rush-lib/src/logic/test/__snapshots__/ShrinkwrapFile.test.ts.snap +++ b/libraries/rush-lib/src/logic/test/__snapshots__/ShrinkwrapFile.test.ts.snap @@ -99,3 +99,53 @@ Array [ ], ] `; + +exports[`PnpmShrinkwrapFile workspace V9 lockfile verifies project dependencies: project1 1`] = ` +Array [ + Array [ + Object { + "../../project1": "../../project1:6yFTI2g+Ny0Au80xpo6zIY61TCNDUuLUd6EgLlbOBtc=:", + "jquery@1.12.3": "sha512-FzM42/Ew+Hb8ha2OlhHRBLgWIZS32gZ0+NvWTf+ZvVvGaIlJkOiXQyb7VBjv4L6fJfmTrRf3EsAmbfsHDhfemw==", + "pad-left@1.0.2": "sha512-saxSV1EYAytuZDtQYEwi0DPzooG6aN18xyHrnJtzwjVwmMauzkEecd7hynVJGolNGk1Pl9tltmZqfze4TZTCxg==", + "repeat-string@1.6.1": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + }, + "project1/.rush/temp/shrinkwrap-deps.json", + Object { + "ensureFolderExists": true, + }, + ], +] +`; + +exports[`PnpmShrinkwrapFile workspace V9 lockfile verifies project dependencies: project2 1`] = ` +Array [ + Array [ + Object { + "../../project2": "../../project2:l6v/HWUhScMI0m4k6D5qHiCOFj3Z0GoIFJEcp4I63w0=:", + "jquery@2.2.4": "sha512-lBHj60ezci2u1v2FqnZIraShGgEXq35qCzMv4lITyHGppTnA13rwR0MgwyNJh9TnDs3aXUvd1xjAotfraMHX/Q==", + "q@1.5.0": "sha512-VVMcd+HnuWZalHPycK7CsbVJ+sSrrrnCvHcW38YJVK9Tywnb5DUWJjONi81bLUj7aqDjIXnePxBl5t1r/F/ncg==", + }, + "project2/.rush/temp/shrinkwrap-deps.json", + Object { + "ensureFolderExists": true, + }, + ], +] +`; + +exports[`PnpmShrinkwrapFile workspace V9 lockfile verifies project dependencies: project3 1`] = ` +Array [ + Array [ + Object { + "../../project3": "../../project3:vMoje8cXfsHYOc6EXbxEw/qyBGXGUL1RApmNfwl7oA8=:", + "pad-left@https://github.com/jonschlinkert/pad-left/tarball/2.1.0": "pad-left@https://github.com/jonschlinkert/pad-left/tarball/2.1.0:bKrL+SvVYubL0HwTq/GOOXq1d05LTQ+HGqlXabzGEAU=:", + "q@1.5.0": "sha512-VVMcd+HnuWZalHPycK7CsbVJ+sSrrrnCvHcW38YJVK9Tywnb5DUWJjONi81bLUj7aqDjIXnePxBl5t1r/F/ncg==", + "repeat-string@1.6.1": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + }, + "project3/.rush/temp/shrinkwrap-deps.json", + Object { + "ensureFolderExists": true, + }, + ], +] +`; diff --git a/libraries/rush-lib/src/logic/test/shrinkwrapFile/non-workspace-pnpm-lock-v9.yaml b/libraries/rush-lib/src/logic/test/shrinkwrapFile/non-workspace-pnpm-lock-v9.yaml new file mode 100644 index 00000000000..b74c0511f12 --- /dev/null +++ b/libraries/rush-lib/src/logic/test/shrinkwrapFile/non-workspace-pnpm-lock-v9.yaml @@ -0,0 +1,196 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@pnpm/dependency-path': + specifier: ^5.1.7 + version: 5.1.7 + '@pnpm/lockfile.utils': + specifier: ^1.0.4 + version: 1.0.4 + '@rush-temp/project1': + specifier: file:./projects/project1 + version: project1@file:projects/project1 + '@rush-temp/project2': + specifier: file:./projects/project2 + version: project2@file:projects/project2 + '@rush-temp/project3': + specifier: file:./projects/project3 + version: project3@file:projects/project3 + pad-left: + specifier: 1.0.0 + version: 1.0.0 + +packages: + + '@pnpm/crypto.base32-hash@3.0.1': + resolution: {integrity: sha512-DM4RR/tvB7tMb2FekL0Q97A5PCXNyEC+6ht8SaufAUFSJNxeozqHw9PHTZR03mzjziPzNQLOld0pNINBX3srtw==} + engines: {node: '>=18.12'} + + '@pnpm/crypto.polyfill@1.0.0': + resolution: {integrity: sha512-WbmsqqcUXKKaAF77ox1TQbpZiaQcr26myuMUu+WjUtoWYgD3VP6iKYEvSx35SZ6G2L316lu+pv+40A2GbWJc1w==} + engines: {node: '>=18.12'} + + '@pnpm/dependency-path@5.1.7': + resolution: {integrity: sha512-MKCyaTy1r9fhBXAnhDZNBVgo6ThPnicwJEG203FDp7pGhD7NruS/FhBI+uMd7GNsK3D7aIFCDAgbWpNTXn/eWw==} + engines: {node: '>=18.12'} + + '@pnpm/lockfile.types@1.0.3': + resolution: {integrity: sha512-A7vUWktnhDkrIs+WmXm7AdffJVyVYJpQUEouya/DYhB+Y+tQ3BXjZ6CV0KybqLgI/8AZErgCJqFxA0GJH6QDjA==} + engines: {node: '>=18.12'} + + '@pnpm/lockfile.utils@1.0.4': + resolution: {integrity: sha512-ptHO2muziYyNCwpsuaPtaRgKiHMrE/lkGI4nqbHnRWWgfdJbTeL1tq+b/EUsxjlKlJ/a9Q4z2C+t38g+9bhTJg==} + engines: {node: '>=18.12'} + + '@pnpm/patching.types@1.0.0': + resolution: {integrity: sha512-juCdQCC1USqLcOhVPl1tYReoTO9YH4fTullMnFXXcmpsDM7Dkn3tzuOQKC3oPoJ2ozv+0EeWWMtMGqn2+IM3pQ==} + engines: {node: '>=18.12'} + + '@pnpm/pick-fetcher@3.0.0': + resolution: {integrity: sha512-2eisylRAU/jeuxFEPnS1gjLZKJGbYc4QEtEW6MVUYjO4Xi+2ttkSm7825S0J5IPpUIvln8HYPCUS0eQWSfpOaQ==} + engines: {node: '>=18.12'} + + '@pnpm/ramda@0.28.1': + resolution: {integrity: sha512-zcAG+lvU0fMziNeGXpPyCyCJYp5ZVrPElEE4t14jAmViaihohocZ+dDkcRIyAomox8pQsuZnv1EyHR+pOhmUWw==} + + '@pnpm/resolver-base@13.0.4': + resolution: {integrity: sha512-d6GtsaXDN1VmVdeB6ohrhwGwQfvYpEX/XkBZyRT0Hp772WabWVfaulvicwdh/8o7Rpzy7IV/2hKnDpodUY00lw==} + engines: {node: '>=18.12'} + + '@pnpm/types@12.2.0': + resolution: {integrity: sha512-5RtwWhX39j89/Tmyv2QSlpiNjErA357T/8r1Dkg+2lD3P7RuS7Xi2tChvmOC3VlezEFNcWnEGCOeKoGRkDuqFA==} + engines: {node: '>=18.12'} + + get-npm-tarball-url@2.1.0: + resolution: {integrity: sha512-ro+DiMu5DXgRBabqXupW38h7WPZ9+Ad8UjwhvsmmN8w1sU7ab0nzAXvVZ4kqYg57OrqomRtJvepX5/xvFKNtjA==} + engines: {node: '>=12.17'} + + jquery@1.12.3: + resolution: {integrity: sha512-FzM42/Ew+Hb8ha2OlhHRBLgWIZS32gZ0+NvWTf+ZvVvGaIlJkOiXQyb7VBjv4L6fJfmTrRf3EsAmbfsHDhfemw==} + + jquery@2.2.4: + resolution: {integrity: sha512-lBHj60ezci2u1v2FqnZIraShGgEXq35qCzMv4lITyHGppTnA13rwR0MgwyNJh9TnDs3aXUvd1xjAotfraMHX/Q==} + + pad-left@1.0.0: + resolution: {integrity: sha512-VIgD7DviaDL6QCj+jEU1jpjXlu0z/sl4yzAmFLmM7YvM3ZRKLaxZAe+sZ1hKHeYUeI4zoZHfMetDpazu/uAwsw==} + engines: {node: '>=0.10.0'} + + pad-left@https://github.com/jonschlinkert/pad-left/tarball/2.1.0: + resolution: {tarball: https://github.com/jonschlinkert/pad-left/tarball/2.1.0} + version: 2.1.0 + engines: {node: '>=0.10.0'} + + project1@file:projects/project1: + resolution: {directory: projects/project1, type: directory} + + project2@file:projects/project2: + resolution: {directory: projects/project2, type: directory} + + project3@file:projects/project3: + resolution: {directory: projects/project3, type: directory} + + q@1.5.1: + resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} + engines: {node: '>=0.6.0', teleport: '>=0.2.0'} + deprecated: |- + You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. + + (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) + + repeat-string@1.6.1: + resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} + engines: {node: '>=0.10'} + + rfc4648@1.5.3: + resolution: {integrity: sha512-MjOWxM065+WswwnmNONOT+bD1nXzY9Km6u3kzvnx8F8/HXGZdz3T6e6vZJ8Q/RIMUSp/nxqjH3GwvJDy8ijeQQ==} + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + +snapshots: + + '@pnpm/crypto.base32-hash@3.0.1': + dependencies: + '@pnpm/crypto.polyfill': 1.0.0 + rfc4648: 1.5.3 + + '@pnpm/crypto.polyfill@1.0.0': {} + + '@pnpm/dependency-path@5.1.7': + dependencies: + '@pnpm/crypto.base32-hash': 3.0.1 + '@pnpm/types': 12.2.0 + semver: 7.6.3 + + '@pnpm/lockfile.types@1.0.3': + dependencies: + '@pnpm/patching.types': 1.0.0 + '@pnpm/types': 12.2.0 + + '@pnpm/lockfile.utils@1.0.4': + dependencies: + '@pnpm/dependency-path': 5.1.7 + '@pnpm/lockfile.types': 1.0.3 + '@pnpm/pick-fetcher': 3.0.0 + '@pnpm/resolver-base': 13.0.4 + '@pnpm/types': 12.2.0 + get-npm-tarball-url: 2.1.0 + ramda: '@pnpm/ramda@0.28.1' + + '@pnpm/patching.types@1.0.0': {} + + '@pnpm/pick-fetcher@3.0.0': {} + + '@pnpm/ramda@0.28.1': {} + + '@pnpm/resolver-base@13.0.4': + dependencies: + '@pnpm/types': 12.2.0 + + '@pnpm/types@12.2.0': {} + + get-npm-tarball-url@2.1.0: {} + + jquery@1.12.3: {} + + jquery@2.2.4: {} + + pad-left@1.0.0: + dependencies: + repeat-string: 1.6.1 + + pad-left@https://github.com/jonschlinkert/pad-left/tarball/2.1.0: + dependencies: + repeat-string: 1.6.1 + + project1@file:projects/project1: + dependencies: + jquery: 1.12.3 + pad-left: 1.0.0 + + project2@file:projects/project2: + dependencies: + jquery: 2.2.4 + q: 1.5.1 + + project3@file:projects/project3: + dependencies: + '@scope/testDep': pad-left@https://github.com/jonschlinkert/pad-left/tarball/2.1.0 + q: 1.5.1 + + q@1.5.1: {} + + repeat-string@1.6.1: {} + + rfc4648@1.5.3: {} + + semver@7.6.3: {} diff --git a/libraries/rush-lib/src/logic/test/shrinkwrapFile/workspace-pnpm-lock-v9.yaml b/libraries/rush-lib/src/logic/test/shrinkwrapFile/workspace-pnpm-lock-v9.yaml new file mode 100644 index 00000000000..ad160af09b8 --- /dev/null +++ b/libraries/rush-lib/src/logic/test/shrinkwrapFile/workspace-pnpm-lock-v9.yaml @@ -0,0 +1,83 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: {} + + ../../project1: + dependencies: + jquery: + specifier: 1.12.3 + version: 1.12.3 + pad-left: + specifier: ^1.0.0 + version: 1.0.2 + + ../../project2: + dependencies: + jquery: + specifier: 2.2.4 + version: 2.2.4 + q: + specifier: ~1.5.0 + version: 1.5.0 + + ../../project3: + dependencies: + '@scope/testDep': + specifier: https://github.com/jonschlinkert/pad-left/tarball/2.1.0 + version: pad-left@https://github.com/jonschlinkert/pad-left/tarball/2.1.0 + q: + specifier: 1.5.0 + version: 1.5.0 + +packages: + + jquery@1.12.3: + resolution: {integrity: sha512-FzM42/Ew+Hb8ha2OlhHRBLgWIZS32gZ0+NvWTf+ZvVvGaIlJkOiXQyb7VBjv4L6fJfmTrRf3EsAmbfsHDhfemw==} + + jquery@2.2.4: + resolution: {integrity: sha512-lBHj60ezci2u1v2FqnZIraShGgEXq35qCzMv4lITyHGppTnA13rwR0MgwyNJh9TnDs3aXUvd1xjAotfraMHX/Q==} + + pad-left@1.0.2: + resolution: {integrity: sha512-saxSV1EYAytuZDtQYEwi0DPzooG6aN18xyHrnJtzwjVwmMauzkEecd7hynVJGolNGk1Pl9tltmZqfze4TZTCxg==} + engines: {node: '>=0.10.0'} + + pad-left@https://github.com/jonschlinkert/pad-left/tarball/2.1.0: + resolution: {tarball: https://github.com/jonschlinkert/pad-left/tarball/2.1.0} + version: 2.1.0 + engines: {node: '>=0.10.0'} + + q@1.5.0: + resolution: {integrity: sha512-VVMcd+HnuWZalHPycK7CsbVJ+sSrrrnCvHcW38YJVK9Tywnb5DUWJjONi81bLUj7aqDjIXnePxBl5t1r/F/ncg==} + engines: {node: '>=0.6.0', teleport: '>=0.2.0'} + deprecated: |- + You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. + + (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) + + repeat-string@1.6.1: + resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} + engines: {node: '>=0.10'} + +snapshots: + + jquery@1.12.3: {} + + jquery@2.2.4: {} + + pad-left@1.0.2: + dependencies: + repeat-string: 1.6.1 + + pad-left@https://github.com/jonschlinkert/pad-left/tarball/2.1.0: + dependencies: + repeat-string: 1.6.1 + + q@1.5.0: {} + + repeat-string@1.6.1: {} diff --git a/libraries/rush-lib/src/pluginFramework/PhasedCommandHooks.ts b/libraries/rush-lib/src/pluginFramework/PhasedCommandHooks.ts index 3e6762f74e0..c0e9e7f764c 100644 --- a/libraries/rush-lib/src/pluginFramework/PhasedCommandHooks.ts +++ b/libraries/rush-lib/src/pluginFramework/PhasedCommandHooks.ts @@ -15,7 +15,6 @@ import type { IPhase } from '../api/CommandLineConfiguration'; import type { RushConfiguration } from '../api/RushConfiguration'; import type { RushConfigurationProject } from '../api/RushConfigurationProject'; import type { Operation } from '../logic/operations/Operation'; -import type { ProjectChangeAnalyzer } from '../logic/ProjectChangeAnalyzer'; import type { IExecutionResult, IOperationExecutionResult @@ -25,6 +24,7 @@ import type { RushProjectConfiguration } from '../api/RushProjectConfiguration'; import type { IOperationRunnerContext } from '../logic/operations/IOperationRunner'; import type { ITelemetryData } from '../logic/Telemetry'; import type { OperationStatus } from '../logic/operations/OperationStatus'; +import type { IInputsSnapshot } from '../logic/incremental/InputsSnapshot'; /** * A plugin that interacts with a phased commands. @@ -77,7 +77,6 @@ export interface ICreateOperationsContext { * The set of phases selected for the current command execution. */ readonly phaseSelection: ReadonlySet; - /** * The set of Rush projects selected for the current command execution. */ @@ -109,11 +108,10 @@ export interface ICreateOperationsContext { */ export interface IExecuteOperationsContext extends ICreateOperationsContext { /** - * The current state of the repository. - * - * Note that this is not defined during the initial operation creation. + * The current state of the repository, if available. + * Not part of the creation context to avoid the overhead of Git calls when initializing the graph. */ - readonly projectChangeAnalyzer: ProjectChangeAnalyzer; + readonly inputsSnapshot?: IInputsSnapshot; } /** diff --git a/libraries/rush-lib/src/schemas/build-cache.schema.json b/libraries/rush-lib/src/schemas/build-cache.schema.json index 4ec92204e5d..4131a90bd6e 100644 --- a/libraries/rush-lib/src/schemas/build-cache.schema.json +++ b/libraries/rush-lib/src/schemas/build-cache.schema.json @@ -33,6 +33,10 @@ "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 one of the following tokens: [projectName], [projectName:normalize], [phaseName], [phaseName:normalize], [phaseName:trimPrefix], [os], and [arch]." }, + "cacheHashSalt": { + "type": "string", + "description": "An optional salt to inject during calculation of the cache key. This can be used to invalidate the cache for all projects when the salt changes." + }, "azureBlobStorageConfiguration": { "type": "object", "additionalProperties": false, @@ -50,6 +54,11 @@ "description": "The Azure environment the storage account exists in. Defaults to AzurePublicCloud.", "enum": ["AzurePublicCloud", "AzureChina", "AzureGermany", "AzureGovernment"] }, + "loginFlow": { + "type": "string", + "description": "The Entra ID login flow to use. Defaults to 'AdoCodespacesAuth' on GitHub Codespaces, 'InteractiveBrowser' otherwise.", + "enum": ["AdoCodespacesAuth", "InteractiveBrowser", "DeviceCode"] + }, "blobPrefix": { "type": "string", "description": "An optional prefix for cache item blob names." @@ -57,6 +66,10 @@ "isCacheWriteAllowed": { "type": "boolean", "description": "If set to true, allow writing to the cache. Defaults to false." + }, + "readRequiresAuthentication": { + "type": "boolean", + "description": "If set to true, reading the cache requires authentication. Defaults to false." } } }, @@ -144,7 +157,17 @@ "properties": { "cacheProvider": { "type": "string", - "pattern": "^(?:(?!azure-blob-storage|amazon-s3|http).)*$" + "pattern": "^(?:(?!local-only|azure-blob-storage|amazon-s3|http).)*$" + } + } + }, + { + "type": "object", + "additionalProperties": true, + "properties": { + "cacheProvider": { + "type": "string", + "enum": ["local-only"] } } }, diff --git a/libraries/rush-lib/src/schemas/experiments.schema.json b/libraries/rush-lib/src/schemas/experiments.schema.json index d18ec334876..35f173444b4 100644 --- a/libraries/rush-lib/src/schemas/experiments.schema.json +++ b/libraries/rush-lib/src/schemas/experiments.schema.json @@ -73,6 +73,14 @@ "rushAlerts": { "description": "(UNDER DEVELOPMENT) The Rush alerts feature provides a way to send announcements to engineers working in the monorepo, by printing directly in the user's shell window when they invoke Rush commands. This ensures that important notices will be seen by anyone doing active development, since people often ignore normal discussion group messages or don't know to subscribe.", "type": "boolean" + }, + "enableSubpathScan": { + "description": "By default, rush perform a full scan of the entire repository. For example, Rush runs `git status` to check for local file changes. When this toggle is enabled, Rush will only scan specific paths, significantly speeding up Git operations.", + "type": "boolean" + }, + "exemptDecoupledDependenciesBetweenSubspaces": { + "description": "Rush has a policy that normally requires Rush projects to specify `workspace:*` in package.json when depending on other projects in the workspace, unless they are explicitly declared as `decoupledLocalDependencies in rush.json. Enabling this experiment will remove that requirement for dependencies belonging to a different subspace. This is useful for large product groups who work in separate subspaces and generally prefer to consume each other's packages via the NPM registry.", + "type": "boolean" } }, "additionalProperties": false diff --git a/libraries/rush-lib/src/schemas/pnpm-config.schema.json b/libraries/rush-lib/src/schemas/pnpm-config.schema.json index d120ca72266..6ab70eb2667 100644 --- a/libraries/rush-lib/src/schemas/pnpm-config.schema.json +++ b/libraries/rush-lib/src/schemas/pnpm-config.schema.json @@ -10,6 +10,11 @@ "type": "string" }, + "extends": { + "description": "Optionally specifies another JSON config file that this file extends from. This provides a way for standard settings to be shared across multiple projects.", + "type": "string" + }, + "useWorkspaces": { "description": "If true, then `rush install` and `rush update` will use the PNPM workspaces feature to perform the install, instead of the old model where Rush generated the symlinks for each projects's node_modules folder. This option is strongly recommended. The default value is false.", "type": "boolean" @@ -145,6 +150,15 @@ } }, + "globalIgnoredOptionalDependencies": { + "description": "This field allows you to skip the installation of specific optional dependencies. The listed packages will be treated as if they are not present in the dependency tree during installation, meaning they will not be installed even if required by other packages.\n\n(SUPPORTED ONLY IN PNPM 9.0.0 AND NEWER)\n\nPNPM documentation: https://pnpm.io/package_json#pnpmalloweddeprecatedversions", + "type": "array", + "items": { + "description": "Specify the package name of the optional dependency to be ignored.", + "type": "string" + } + }, + "globalAllowedDeprecatedVersions": { "description": "The `globalAllowedDeprecatedVersions` setting suppresses installation warnings for package versions that the NPM registry reports as being deprecated. This is useful if the deprecated package is an indirect dependency of an external package that has not released a fix. The settings are copied into the `pnpm.allowedDeprecatedVersions` field of the `common/temp/package.json` file that is generated by Rush during installation.\n\nPNPM documentation: https://pnpm.io/package_json#pnpmalloweddeprecatedversions", "type": "object", diff --git a/libraries/rush-lib/src/scripts/install-run.ts b/libraries/rush-lib/src/scripts/install-run.ts index f6332c0ebd7..775e87eb89e 100644 --- a/libraries/rush-lib/src/scripts/install-run.ts +++ b/libraries/rush-lib/src/scripts/install-run.ts @@ -169,7 +169,8 @@ function _resolvePackageVersion( syncNpmrc({ sourceNpmrcFolder, targetNpmrcFolder: rushTempFolder, - logger + logger, + supportEnvVarFallbackSyntax: false }); const npmPath: string = getNpmPath(); @@ -433,7 +434,8 @@ export function installAndRun( syncNpmrc({ sourceNpmrcFolder, targetNpmrcFolder: packageInstallFolder, - logger + logger, + supportEnvVarFallbackSyntax: false }); _createPackageJson(packageInstallFolder, packageName, packageVersion); diff --git a/libraries/rush-lib/src/utilities/Utilities.ts b/libraries/rush-lib/src/utilities/Utilities.ts index f4f8901b00c..d521640b543 100644 --- a/libraries/rush-lib/src/utilities/Utilities.ts +++ b/libraries/rush-lib/src/utilities/Utilities.ts @@ -531,7 +531,8 @@ export class Utilities { if (commonRushConfigFolder) { Utilities.syncNpmrc({ sourceNpmrcFolder: commonRushConfigFolder, - targetNpmrcFolder: directory + targetNpmrcFolder: directory, + supportEnvVarFallbackSyntax: false }); } diff --git a/libraries/rush-lib/src/utilities/WebClient.ts b/libraries/rush-lib/src/utilities/WebClient.ts index a2eb11c2e0a..6cee2f138cd 100644 --- a/libraries/rush-lib/src/utilities/WebClient.ts +++ b/libraries/rush-lib/src/utilities/WebClient.ts @@ -3,29 +3,38 @@ import * as os from 'os'; import * as process from 'process'; -import * as fetch from 'node-fetch'; import type * as http from 'http'; -import { Import } from '@rushstack/node-core-library'; - -// =================================================================================================================== -// AS A TEMPORARY WORKAROUND, THIS FILE WAS COPY+PASTED INTO THE "rush-amazon-s3-build-cache-plugin" PROJECT. -// See that copy for notes. -// =================================================================================================================== +import { request as httpRequest, type IncomingMessage } from 'node:http'; +import { request as httpsRequest, type RequestOptions } from 'node:https'; +import { Import, LegacyAdapters } from '@rushstack/node-core-library'; const createHttpsProxyAgent: typeof import('https-proxy-agent') = Import.lazy('https-proxy-agent', require); /** * For use with {@link WebClient}. */ -export type WebClientResponse = fetch.Response; +export interface IWebClientResponse { + ok: boolean; + status: number; + statusText?: string; + redirected: boolean; + headers: Record; + getTextAsync: () => Promise; + getJsonAsync: () => Promise; + getBufferAsync: () => Promise; +} /** * For use with {@link WebClient}. */ export interface IWebFetchOptionsBase { timeoutMs?: number; - verb?: 'GET' | 'PUT'; - headers?: fetch.Headers; + headers?: Record; + redirect?: 'follow' | 'error' | 'manual'; + /** + * If true, the response will not be decoded if a Content-Encoding header is present. + */ + noDecode?: boolean; } /** @@ -38,8 +47,8 @@ export interface IGetFetchOptions extends IWebFetchOptionsBase { /** * For use with {@link WebClient}. */ -export interface IPutFetchOptions extends IWebFetchOptionsBase { - verb: 'PUT'; +export interface IFetchOptionsWithBody extends IWebFetchOptionsBase { + verb: 'PUT' | 'POST' | 'PATCH'; body?: Buffer; } @@ -51,50 +60,211 @@ export enum WebClientProxy { Detect, Fiddler } +export interface IRequestOptions + extends RequestOptions, + Pick {} + +export type FetchFn = ( + url: string, + options: IRequestOptions, + isRedirect?: boolean +) => Promise; + +const DEFLATE_ENCODING: 'deflate' = 'deflate'; +const GZIP_ENCODING: 'gzip' = 'gzip'; +const BROTLI_ENCODING: 'br' = 'br'; +export const AUTHORIZATION_HEADER_NAME: 'Authorization' = 'Authorization'; +const ACCEPT_HEADER_NAME: 'accept' = 'accept'; +const USER_AGENT_HEADER_NAME: 'user-agent' = 'user-agent'; +const CONTENT_ENCODING_HEADER_NAME: 'content-encoding' = 'content-encoding'; + +const makeRequestAsync: FetchFn = async ( + url: string, + options: IRequestOptions, + redirected: boolean = false +) => { + const { body, redirect, noDecode } = options; + + return await new Promise( + (resolve: (result: IWebClientResponse) => void, reject: (error: Error) => void) => { + const parsedUrl: URL = typeof url === 'string' ? new URL(url) : url; + const requestFunction: typeof httpRequest | typeof httpsRequest = + parsedUrl.protocol === 'https:' ? httpsRequest : httpRequest; + + requestFunction(url, options, (response: IncomingMessage) => { + const responseBuffers: (Buffer | Uint8Array)[] = []; + response.on('data', (chunk: string | Buffer | Uint8Array) => { + responseBuffers.push(Buffer.from(chunk)); + }); + response.on('end', () => { + // Handle retries by calling the method recursively with the redirect URL + const statusCode: number | undefined = response.statusCode; + if (statusCode === 301 || statusCode === 302) { + switch (redirect) { + case 'follow': { + const redirectUrl: string | string[] | undefined = response.headers.location; + if (redirectUrl) { + makeRequestAsync(redirectUrl, options, true).then(resolve).catch(reject); + } else { + reject( + new Error(`Received status code ${response.statusCode} with no location header: ${url}`) + ); + } + + break; + } + case 'error': + reject(new Error(`Received status code ${response.statusCode}: ${url}`)); + return; + } + } + + const responseData: Buffer = Buffer.concat(responseBuffers); + const status: number = response.statusCode || 0; + const statusText: string | undefined = response.statusMessage; + const headers: Record = response.headers; + + let bodyString: string | undefined; + let bodyJson: unknown | undefined; + let decodedBuffer: Buffer | undefined; + const result: IWebClientResponse = { + ok: status >= 200 && status < 300, + status, + statusText, + redirected, + headers, + getTextAsync: async () => { + if (bodyString === undefined) { + const buffer: Buffer = await result.getBufferAsync(); + // eslint-disable-next-line require-atomic-updates + bodyString = buffer.toString(); + } + + return bodyString; + }, + getJsonAsync: async () => { + if (bodyJson === undefined) { + const text: string = await result.getTextAsync(); + // eslint-disable-next-line require-atomic-updates + bodyJson = JSON.parse(text); + } + + return bodyJson as TJson; + }, + getBufferAsync: async () => { + // Determine if the buffer is compressed and decode it if necessary + if (decodedBuffer === undefined) { + let encodings: string | string[] | undefined = headers[CONTENT_ENCODING_HEADER_NAME]; + if (!noDecode && encodings !== undefined) { + const zlib: typeof import('zlib') = await import('zlib'); + if (!Array.isArray(encodings)) { + encodings = encodings.split(','); + } + + let buffer: Buffer = responseData; + for (const encoding of encodings) { + let decompressFn: (buffer: Buffer, callback: import('zlib').CompressCallback) => void; + switch (encoding.trim()) { + case DEFLATE_ENCODING: { + decompressFn = zlib.inflate.bind(zlib); + break; + } + case GZIP_ENCODING: { + decompressFn = zlib.gunzip.bind(zlib); + break; + } + case BROTLI_ENCODING: { + decompressFn = zlib.brotliDecompress.bind(zlib); + break; + } + default: { + throw new Error(`Unsupported content-encoding: ${encodings}`); + } + } + + buffer = await LegacyAdapters.convertCallbackToPromise(decompressFn, buffer); + } + + // eslint-disable-next-line require-atomic-updates + decodedBuffer = buffer; + } else { + decodedBuffer = responseData; + } + } + + return decodedBuffer; + } + }; + resolve(result); + }); + }) + .on('error', (error: Error) => { + reject(error); + }) + .end(body); + } + ); +}; /** * A helper for issuing HTTP requests. */ export class WebClient { - public readonly standardHeaders: fetch.Headers = new fetch.Headers(); + private static _requestFn: FetchFn = makeRequestAsync; + + public readonly standardHeaders: Record = {}; public accept: string | undefined = '*/*'; public userAgent: string | undefined = `rush node/${process.version} ${os.platform()} ${os.arch()}`; public proxy: WebClientProxy = WebClientProxy.Detect; - public constructor() {} + public static mockRequestFn(fn: FetchFn): void { + WebClient._requestFn = fn; + } + + public static resetMockRequestFn(): void { + WebClient._requestFn = makeRequestAsync; + } - public static mergeHeaders(target: fetch.Headers, source: fetch.Headers): void { - source.forEach((value, name) => { - target.set(name, value); - }); + public static mergeHeaders(target: Record, source: Record): void { + for (const [name, value] of Object.entries(source)) { + target[name] = value; + } } public addBasicAuthHeader(userName: string, password: string): void { - this.standardHeaders.set( - 'Authorization', - 'Basic ' + Buffer.from(userName + ':' + password).toString('base64') - ); + this.standardHeaders[AUTHORIZATION_HEADER_NAME] = + 'Basic ' + Buffer.from(userName + ':' + password).toString('base64'); } public async fetchAsync( url: string, - options?: IGetFetchOptions | IPutFetchOptions - ): Promise { - const headers: fetch.Headers = new fetch.Headers(); + options?: IGetFetchOptions | IFetchOptionsWithBody + ): Promise { + const { + headers: optionsHeaders, + timeoutMs = 15 * 1000, + verb, + redirect, + body, + noDecode + } = (options as IFetchOptionsWithBody | undefined) ?? {}; + + const headers: Record = {}; WebClient.mergeHeaders(headers, this.standardHeaders); - if (options?.headers) { - WebClient.mergeHeaders(headers, options.headers); + if (optionsHeaders) { + WebClient.mergeHeaders(headers, optionsHeaders); } if (this.userAgent) { - headers.set('user-agent', this.userAgent); + headers[USER_AGENT_HEADER_NAME] = this.userAgent; } + if (this.accept) { - headers.set('accept', this.accept); + headers[ACCEPT_HEADER_NAME] = this.accept; } let proxyUrl: string = ''; @@ -121,18 +291,16 @@ export class WebClient { agent = createHttpsProxyAgent(proxyUrl); } - const timeoutMs: number = options?.timeoutMs !== undefined ? options.timeoutMs : 15 * 1000; // 15 seconds - const requestInit: fetch.RequestInit = { - method: options?.verb, - headers: headers, - agent: agent, - timeout: timeoutMs + const requestInit: IRequestOptions = { + method: verb, + headers, + agent, + timeout: timeoutMs, + redirect, + body, + noDecode }; - const putOptions: IPutFetchOptions | undefined = options as IPutFetchOptions | undefined; - if (putOptions?.body) { - requestInit.body = putOptions.body; - } - return await fetch.default(url, requestInit); + return await WebClient._requestFn(url, requestInit); } } diff --git a/libraries/rush-lib/src/utilities/npmrcUtilities.ts b/libraries/rush-lib/src/utilities/npmrcUtilities.ts index e3bd9026e21..db15a0d17d4 100644 --- a/libraries/rush-lib/src/utilities/npmrcUtilities.ts +++ b/libraries/rush-lib/src/utilities/npmrcUtilities.ts @@ -22,27 +22,55 @@ export interface ILogger { // create a global _combinedNpmrc for cache purpose const _combinedNpmrcMap: Map = new Map(); -function _trimNpmrcFile(options: { - sourceNpmrcPath: string; - linesToPrepend?: string[]; - linesToAppend?: string[]; -}): string { - const { sourceNpmrcPath, linesToPrepend, linesToAppend } = options; +function _trimNpmrcFile( + options: Pick< + INpmrcTrimOptions, + 'sourceNpmrcPath' | 'linesToAppend' | 'linesToPrepend' | 'supportEnvVarFallbackSyntax' + > +): string { + const { sourceNpmrcPath, linesToPrepend, linesToAppend, supportEnvVarFallbackSyntax } = options; const combinedNpmrcFromCache: string | undefined = _combinedNpmrcMap.get(sourceNpmrcPath); if (combinedNpmrcFromCache !== undefined) { return combinedNpmrcFromCache; } + let npmrcFileLines: string[] = []; if (linesToPrepend) { npmrcFileLines.push(...linesToPrepend); } + if (fs.existsSync(sourceNpmrcPath)) { npmrcFileLines.push(...fs.readFileSync(sourceNpmrcPath).toString().split('\n')); } + if (linesToAppend) { npmrcFileLines.push(...linesToAppend); } + npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim()); + + const resultLines: string[] = trimNpmrcFileLines(npmrcFileLines, process.env, supportEnvVarFallbackSyntax); + + const combinedNpmrc: string = resultLines.join('\n'); + + //save the cache + _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); + + return combinedNpmrc; +} + +/** + * + * @param npmrcFileLines The npmrc file's lines + * @param env The environment variables object + * @param supportEnvVarFallbackSyntax Whether to support fallback values in the form of `${VAR_NAME:-fallback}` + * @returns + */ +export function trimNpmrcFileLines( + npmrcFileLines: string[], + env: NodeJS.ProcessEnv, + supportEnvVarFallbackSyntax: boolean +): string[] { const resultLines: string[] = []; // This finds environment variable tokens that look like "${VAR_NAME}" @@ -66,11 +94,36 @@ function _trimNpmrcFile(options: { const environmentVariables: string[] | null = line.match(expansionRegExp); if (environmentVariables) { for (const token of environmentVariables) { - // Remove the leading "${" and the trailing "}" from the token - const environmentVariableName: string = token.substring(2, token.length - 1); + /** + * Remove the leading "${" and the trailing "}" from the token + * + * ${nameString} -> nameString + * ${nameString-fallbackString} -> name-fallbackString + * ${nameString:-fallbackString} -> name:-fallbackString + */ + const nameWithFallback: string = token.substring(2, token.length - 1); + + let environmentVariableName: string; + let fallback: string | undefined; + if (supportEnvVarFallbackSyntax) { + /** + * Get the environment variable name and fallback value. + * + * name fallback + * nameString -> nameString undefined + * nameString-fallbackString -> nameString fallbackString + * nameString:-fallbackString -> nameString fallbackString + */ + const matched: string[] | null = nameWithFallback.match(/^([^:-]+)(?:\:?-(.+))?$/); + // matched: [originStr, variableName, fallback] + environmentVariableName = matched?.[1] ?? nameWithFallback; + fallback = matched?.[2]; + } else { + environmentVariableName = nameWithFallback; + } - // Is the environment variable defined? - if (!process.env[environmentVariableName]) { + // Is the environment variable and fallback value defined. + if (!env[environmentVariableName] && !fallback) { // No, so trim this line lineShouldBeTrimmed = true; break; @@ -88,12 +141,7 @@ function _trimNpmrcFile(options: { } } - const combinedNpmrc: string = resultLines.join('\n'); - - //save the cache - _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); - - return combinedNpmrc; + return resultLines; } /** @@ -116,17 +164,15 @@ interface INpmrcTrimOptions { logger: ILogger; linesToPrepend?: string[]; linesToAppend?: string[]; + supportEnvVarFallbackSyntax: boolean; } + function _copyAndTrimNpmrcFile(options: INpmrcTrimOptions): string { - const { logger, sourceNpmrcPath, targetNpmrcPath, linesToPrepend, linesToAppend } = options; + const { logger, sourceNpmrcPath, targetNpmrcPath } = options; logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose logger.info(` --> "${targetNpmrcPath}"`); - const combinedNpmrc: string = _trimNpmrcFile({ - sourceNpmrcPath, - linesToPrepend, - linesToAppend - }); + const combinedNpmrc: string = _trimNpmrcFile(options); fs.writeFileSync(targetNpmrcPath, combinedNpmrc); @@ -145,12 +191,14 @@ function _copyAndTrimNpmrcFile(options: INpmrcTrimOptions): string { export interface ISyncNpmrcOptions { sourceNpmrcFolder: string; targetNpmrcFolder: string; + supportEnvVarFallbackSyntax: boolean; useNpmrcPublish?: boolean; logger?: ILogger; linesToPrepend?: string[]; linesToAppend?: string[]; createIfMissing?: boolean; } + export function syncNpmrc(options: ISyncNpmrcOptions): string | undefined { const { sourceNpmrcFolder, @@ -162,9 +210,7 @@ export function syncNpmrc(options: ISyncNpmrcOptions): string | undefined { // eslint-disable-next-line no-console error: console.error }, - createIfMissing = false, - linesToAppend, - linesToPrepend + createIfMissing = false } = options; const sourceNpmrcPath: string = path.join( sourceNpmrcFolder, @@ -177,12 +223,12 @@ export function syncNpmrc(options: ISyncNpmrcOptions): string | undefined { if (!fs.existsSync(targetNpmrcFolder)) { fs.mkdirSync(targetNpmrcFolder, { recursive: true }); } + return _copyAndTrimNpmrcFile({ sourceNpmrcPath, targetNpmrcPath, logger, - linesToAppend, - linesToPrepend + ...options }); } else if (fs.existsSync(targetNpmrcPath)) { // If the source .npmrc doesn't exist and there is one in the target, delete the one in the target @@ -194,7 +240,11 @@ export function syncNpmrc(options: ISyncNpmrcOptions): string | undefined { } } -export function isVariableSetInNpmrcFile(sourceNpmrcFolder: string, variableKey: string): boolean { +export function isVariableSetInNpmrcFile( + sourceNpmrcFolder: string, + variableKey: string, + supportEnvVarFallbackSyntax: boolean +): boolean { const sourceNpmrcPath: string = `${sourceNpmrcFolder}/.npmrc`; //if .npmrc file does not exist, return false directly @@ -202,7 +252,7 @@ export function isVariableSetInNpmrcFile(sourceNpmrcFolder: string, variableKey: return false; } - const trimmedNpmrcFile: string = _trimNpmrcFile({ sourceNpmrcPath }); + const trimmedNpmrcFile: string = _trimNpmrcFile({ sourceNpmrcPath, supportEnvVarFallbackSyntax }); const variableKeyRegExp: RegExp = new RegExp(`^${variableKey}=`, 'm'); return trimmedNpmrcFile.match(variableKeyRegExp) !== null; diff --git a/libraries/rush-lib/src/utilities/objectUtilities.ts b/libraries/rush-lib/src/utilities/objectUtilities.ts index 092ba9ddc18..6224b94dc30 100644 --- a/libraries/rush-lib/src/utilities/objectUtilities.ts +++ b/libraries/rush-lib/src/utilities/objectUtilities.ts @@ -153,3 +153,21 @@ function isStrictComparable(value: T): boolean { value === value && !(value !== null && value !== undefined && (type === 'object' || type === 'function')) ); } + +/** + * Removes `undefined` and `null` direct properties from an object. + * + * @remarks + * Note that this does not recurse through sub-objects. + */ +export function removeNullishProps(obj: T): Partial { + const result: Partial = {}; + for (const key in obj) { + if (obj.hasOwnProperty(key)) { + if (obj[key] !== undefined && obj[key] !== null) { + result[key] = obj[key]; + } + } + } + return result; +} diff --git a/libraries/rush-lib/src/utilities/test/WebClient.test.ts b/libraries/rush-lib/src/utilities/test/WebClient.test.ts new file mode 100644 index 00000000000..cda35c0ee61 --- /dev/null +++ b/libraries/rush-lib/src/utilities/test/WebClient.test.ts @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { WebClient } from '../WebClient'; + +describe(WebClient.name, () => { + describe(WebClient.mergeHeaders.name, () => { + it('should merge headers', () => { + const target: Record = { header1: 'value1' }; + const source: Record = { header2: 'value2' }; + + WebClient.mergeHeaders(target, source); + expect(target).toMatchSnapshot(); + }); + + it('should handle an empty source', () => { + const target: Record = { header1: 'value1' }; + const source: Record = {}; + + WebClient.mergeHeaders(target, source); + expect(target).toMatchSnapshot(); + }); + + it('should handle an empty target', () => { + const target: Record = {}; + const source: Record = { header2: 'value2' }; + + WebClient.mergeHeaders(target, source); + expect(target).toMatchSnapshot(); + }); + + it('should handle both empty', () => { + const target: Record = {}; + const source: Record = {}; + + WebClient.mergeHeaders(target, source); + expect(target).toMatchSnapshot(); + }); + + it('should handle overwriting values', () => { + const target: Record = { header1: 'value1' }; + const source: Record = { header1: 'value2' }; + + WebClient.mergeHeaders(target, source); + expect(target).toMatchSnapshot(); + }); + + it('should handle a JS object as the source', () => { + const target: Record = { header1: 'value1' }; + + WebClient.mergeHeaders(target, { header2: 'value2' }); + expect(target).toMatchSnapshot(); + }); + }); +}); diff --git a/libraries/rush-lib/src/utilities/test/__snapshots__/WebClient.test.ts.snap b/libraries/rush-lib/src/utilities/test/__snapshots__/WebClient.test.ts.snap new file mode 100644 index 00000000000..82fdb7303c4 --- /dev/null +++ b/libraries/rush-lib/src/utilities/test/__snapshots__/WebClient.test.ts.snap @@ -0,0 +1,35 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`WebClient mergeHeaders should handle a JS object as the source 1`] = ` +Object { + "header1": "value1", + "header2": "value2", +} +`; + +exports[`WebClient mergeHeaders should handle an empty source 1`] = ` +Object { + "header1": "value1", +} +`; + +exports[`WebClient mergeHeaders should handle an empty target 1`] = ` +Object { + "header2": "value2", +} +`; + +exports[`WebClient mergeHeaders should handle both empty 1`] = `Object {}`; + +exports[`WebClient mergeHeaders should handle overwriting values 1`] = ` +Object { + "header1": "value2", +} +`; + +exports[`WebClient mergeHeaders should merge headers 1`] = ` +Object { + "header1": "value1", + "header2": "value2", +} +`; diff --git a/libraries/rush-lib/src/utilities/test/__snapshots__/npmrcUtilities.test.ts.snap b/libraries/rush-lib/src/utilities/test/__snapshots__/npmrcUtilities.test.ts.snap new file mode 100644 index 00000000000..691864176a2 --- /dev/null +++ b/libraries/rush-lib/src/utilities/test/__snapshots__/npmrcUtilities.test.ts.snap @@ -0,0 +1,225 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports a a variable without a fallback 1`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports a a variable without a fallback 2`] = ` +Array [ + "var1=\${foo}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports a variable with a fallback 1`] = ` +Array [ + "var1=\${foo-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports a variable with a fallback 2`] = ` +Array [ + "var1=\${foo-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports a variable with a fallback 3`] = ` +Array [ + "var1=\${foo:-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports a variable with a fallback 4`] = ` +Array [ + "var1=\${foo:-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports a variable with a fallback 5`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo}-\${bar}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports a variable with a fallback 6`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo}-\${bar}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports a variable with a fallback 7`] = ` +Array [ + "var1=\${foo}-\${bar}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports a variable with a fallback 8`] = ` +Array [ + "var1=\${foo:-fallback_value}-\${bar-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports malformed lines 1`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo_fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports malformed lines 2`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo:fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports malformed lines 3`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo:_fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports malformed lines 4`] = ` +Array [ + "var1=\${foo", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports multiple lines 1`] = ` +Array [ + "var1=\${foo}", + "; MISSING ENVIRONMENT VARIABLE: var2=\${bar}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports multiple lines 2`] = ` +Array [ + "var1=\${foo}", + "var2=\${bar}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports multiple lines 3`] = ` +Array [ + "var1=\${foo}", + "var2=\${bar-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines With support for env var fallback syntax supports multiple lines 4`] = ` +Array [ + "var1=\${foo:-fallback_value}", + "var2=\${bar-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports a a variable without a fallback 1`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports a a variable without a fallback 2`] = ` +Array [ + "var1=\${foo}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports a variable with a fallback 1`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports a variable with a fallback 2`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports a variable with a fallback 3`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo:-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports a variable with a fallback 4`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo:-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports a variable with a fallback 5`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo}-\${bar}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports a variable with a fallback 6`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo}-\${bar}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports a variable with a fallback 7`] = ` +Array [ + "var1=\${foo}-\${bar}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports a variable with a fallback 8`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo:-fallback_value}-\${bar-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports malformed lines 1`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo_fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports malformed lines 2`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo:fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports malformed lines 3`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo:_fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports malformed lines 4`] = ` +Array [ + "var1=\${foo", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports multiple lines 1`] = ` +Array [ + "var1=\${foo}", + "; MISSING ENVIRONMENT VARIABLE: var2=\${bar}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports multiple lines 2`] = ` +Array [ + "var1=\${foo}", + "var2=\${bar}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports multiple lines 3`] = ` +Array [ + "var1=\${foo}", + "; MISSING ENVIRONMENT VARIABLE: var2=\${bar-fallback_value}", +] +`; + +exports[`npmrcUtilities trimNpmrcFileLines Without support for env var fallback syntax supports multiple lines 4`] = ` +Array [ + "; MISSING ENVIRONMENT VARIABLE: var1=\${foo:-fallback_value}", + "; MISSING ENVIRONMENT VARIABLE: var2=\${bar-fallback_value}", +] +`; diff --git a/libraries/rush-lib/src/utilities/test/npmrcUtilities.test.ts b/libraries/rush-lib/src/utilities/test/npmrcUtilities.test.ts new file mode 100644 index 00000000000..b889435a0f7 --- /dev/null +++ b/libraries/rush-lib/src/utilities/test/npmrcUtilities.test.ts @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { trimNpmrcFileLines } from '../npmrcUtilities'; + +describe('npmrcUtilities', () => { + function runTests(supportEnvVarFallbackSyntax: boolean): void { + it('handles empty input', () => { + expect(trimNpmrcFileLines([], {}, supportEnvVarFallbackSyntax)).toEqual([]); + }); + + it('supports a a variable without a fallback', () => { + expect(trimNpmrcFileLines(['var1=${foo}'], {}, supportEnvVarFallbackSyntax)).toMatchSnapshot(); + expect( + trimNpmrcFileLines(['var1=${foo}'], { foo: 'test' }, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + }); + + it('supports a variable with a fallback', () => { + expect( + trimNpmrcFileLines(['var1=${foo-fallback_value}'], {}, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines(['var1=${foo-fallback_value}'], { foo: 'test' }, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines(['var1=${foo:-fallback_value}'], {}, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines(['var1=${foo:-fallback_value}'], { foo: 'test' }, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines(['var1=${foo}-${bar}'], { foo: 'test' }, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines(['var1=${foo}-${bar}'], { bar: 'test' }, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines(['var1=${foo}-${bar}'], { foo: 'test', bar: 'test' }, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines( + ['var1=${foo:-fallback_value}-${bar-fallback_value}'], + {}, + supportEnvVarFallbackSyntax + ) + ).toMatchSnapshot(); + }); + + it('supports multiple lines', () => { + expect( + trimNpmrcFileLines(['var1=${foo}', 'var2=${bar}'], { foo: 'test' }, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines( + ['var1=${foo}', 'var2=${bar}'], + { foo: 'test', bar: 'test' }, + supportEnvVarFallbackSyntax + ) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines( + ['var1=${foo}', 'var2=${bar-fallback_value}'], + { foo: 'test' }, + supportEnvVarFallbackSyntax + ) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines( + ['var1=${foo:-fallback_value}', 'var2=${bar-fallback_value}'], + {}, + supportEnvVarFallbackSyntax + ) + ).toMatchSnapshot(); + }); + + it('supports malformed lines', () => { + // Malformed + expect( + trimNpmrcFileLines(['var1=${foo_fallback_value}'], {}, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines(['var1=${foo:fallback_value}'], {}, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect( + trimNpmrcFileLines(['var1=${foo:_fallback_value}'], {}, supportEnvVarFallbackSyntax) + ).toMatchSnapshot(); + expect(trimNpmrcFileLines(['var1=${foo'], {}, supportEnvVarFallbackSyntax)).toMatchSnapshot(); + }); + } + + describe(trimNpmrcFileLines.name, () => { + describe('With support for env var fallback syntax', () => runTests(true)); + describe('Without support for env var fallback syntax', () => runTests(false)); + }); +}); diff --git a/libraries/rush-lib/src/utilities/test/objectUtilities.test.ts b/libraries/rush-lib/src/utilities/test/objectUtilities.test.ts index 6b8fef7ad51..9235fd63ab8 100644 --- a/libraries/rush-lib/src/utilities/test/objectUtilities.test.ts +++ b/libraries/rush-lib/src/utilities/test/objectUtilities.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { objectsAreDeepEqual, cloneDeep, merge } from '../objectUtilities'; +import { objectsAreDeepEqual, cloneDeep, merge, removeNullishProps } from '../objectUtilities'; describe('objectUtilities', () => { describe(objectsAreDeepEqual.name, () => { @@ -147,4 +147,12 @@ describe('objectUtilities', () => { expect(merge({ a: { b: 1 } }, { a: { c: 2 } })).toEqual({ a: { b: 1, c: 2 } }); }); }); + + describe(removeNullishProps.name, () => { + it('can remove undefined and null properties', () => { + expect(removeNullishProps({ a: 1, b: undefined })).toEqual({ a: 1 }); + expect(removeNullishProps({ a: 1, b: null })).toEqual({ a: 1 }); + expect(removeNullishProps({ a: 1, b: undefined, c: null })).toEqual({ a: 1 }); + }); + }); }); diff --git a/libraries/rush-sdk/package.json b/libraries/rush-sdk/package.json index fbb891e3e86..72348efe471 100644 --- a/libraries/rush-sdk/package.json +++ b/libraries/rush-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-sdk", - "version": "5.138.0", + "version": "5.148.0", "description": "An API for interacting with the Rush engine", "repository": { "type": "git", @@ -38,11 +38,11 @@ }, "license": "MIT", "dependencies": { + "@pnpm/lockfile.types": "~1.0.3", "@rushstack/lookup-by-path": "workspace:*", "@rushstack/node-core-library": "workspace:*", "@rushstack/package-deps-hash": "workspace:*", "@rushstack/terminal": "workspace:*", - "@types/node-fetch": "2.6.2", "tapable": "2.2.1" }, "devDependencies": { diff --git a/libraries/stream-collator/CHANGELOG.json b/libraries/stream-collator/CHANGELOG.json index b29dd2db0ad..b9340c8f33c 100644 --- a/libraries/stream-collator/CHANGELOG.json +++ b/libraries/stream-collator/CHANGELOG.json @@ -1,6 +1,186 @@ { "name": "@rushstack/stream-collator", "entries": [ + { + "version": "4.1.83", + "tag": "@rushstack/stream-collator_v4.1.83", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "4.1.82", + "tag": "@rushstack/stream-collator_v4.1.82", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "4.1.81", + "tag": "@rushstack/stream-collator_v4.1.81", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "4.1.80", + "tag": "@rushstack/stream-collator_v4.1.80", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "4.1.79", + "tag": "@rushstack/stream-collator_v4.1.79", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "4.1.78", + "tag": "@rushstack/stream-collator_v4.1.78", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "4.1.77", + "tag": "@rushstack/stream-collator_v4.1.77", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "4.1.76", + "tag": "@rushstack/stream-collator_v4.1.76", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "4.1.75", + "tag": "@rushstack/stream-collator_v4.1.75", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "4.1.74", + "tag": "@rushstack/stream-collator_v4.1.74", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "4.1.73", + "tag": "@rushstack/stream-collator_v4.1.73", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "4.1.72", + "tag": "@rushstack/stream-collator_v4.1.72", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "4.1.71", + "tag": "@rushstack/stream-collator_v4.1.71", + "date": "Tue, 15 Oct 2024 00:12:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "4.1.70", "tag": "@rushstack/stream-collator_v4.1.70", diff --git a/libraries/stream-collator/CHANGELOG.md b/libraries/stream-collator/CHANGELOG.md index 2dde53394b0..4bdafc11b50 100644 --- a/libraries/stream-collator/CHANGELOG.md +++ b/libraries/stream-collator/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/stream-collator -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 4.1.83 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 4.1.82 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 4.1.81 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 4.1.80 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 4.1.79 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 4.1.78 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 4.1.77 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 4.1.76 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 4.1.75 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 4.1.74 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 4.1.73 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 4.1.72 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 4.1.71 +Tue, 15 Oct 2024 00:12:32 GMT + +_Version update only_ ## 4.1.70 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/libraries/stream-collator/package.json b/libraries/stream-collator/package.json index 7c8a6a7b92c..a087571d9a7 100644 --- a/libraries/stream-collator/package.json +++ b/libraries/stream-collator/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/stream-collator", - "version": "4.1.70", + "version": "4.1.83", "description": "Display intelligible realtime output from concurrent processes", "repository": { "type": "git", diff --git a/libraries/terminal/CHANGELOG.json b/libraries/terminal/CHANGELOG.json index 0e8a128acd6..35af9926c14 100644 --- a/libraries/terminal/CHANGELOG.json +++ b/libraries/terminal/CHANGELOG.json @@ -1,6 +1,54 @@ { "name": "@rushstack/terminal", "entries": [ + { + "version": "0.14.6", + "tag": "@rushstack/terminal_v0.14.6", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + } + ] + } + }, + { + "version": "0.14.5", + "tag": "@rushstack/terminal_v0.14.5", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + } + ] + } + }, + { + "version": "0.14.4", + "tag": "@rushstack/terminal_v0.14.4", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + } + ] + } + }, + { + "version": "0.14.3", + "tag": "@rushstack/terminal_v0.14.3", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + } + ] + } + }, { "version": "0.14.2", "tag": "@rushstack/terminal_v0.14.2", diff --git a/libraries/terminal/CHANGELOG.md b/libraries/terminal/CHANGELOG.md index 66ed2c8e2ab..ce2619d3c70 100644 --- a/libraries/terminal/CHANGELOG.md +++ b/libraries/terminal/CHANGELOG.md @@ -1,6 +1,26 @@ # Change Log - @rushstack/terminal -This log was last generated on Fri, 13 Sep 2024 00:11:43 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 01:11:42 GMT and should not be manually modified. + +## 0.14.6 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.14.5 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.14.4 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.14.3 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ ## 0.14.2 Fri, 13 Sep 2024 00:11:43 GMT diff --git a/libraries/terminal/package.json b/libraries/terminal/package.json index c7959351e68..5021863f658 100644 --- a/libraries/terminal/package.json +++ b/libraries/terminal/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/terminal", - "version": "0.14.2", + "version": "0.14.6", "description": "User interface primitives for console applications", "main": "lib/index.js", "typings": "dist/terminal.d.ts", @@ -20,8 +20,8 @@ "supports-color": "~8.1.1" }, "devDependencies": { - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15", "@types/supports-color": "8.1.3", diff --git a/libraries/tree-pattern/package.json b/libraries/tree-pattern/package.json index d9ad20b32e5..89dc9ab513b 100644 --- a/libraries/tree-pattern/package.json +++ b/libraries/tree-pattern/package.json @@ -16,9 +16,9 @@ "_phase:test": "heft run --only test -- --clean" }, "devDependencies": { - "@rushstack/eslint-config": "4.0.2", - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/eslint-config": "4.1.1", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15", "eslint": "~8.57.0", diff --git a/libraries/ts-command-line/CHANGELOG.json b/libraries/ts-command-line/CHANGELOG.json index 81eca0aa415..8f1b7bcd954 100644 --- a/libraries/ts-command-line/CHANGELOG.json +++ b/libraries/ts-command-line/CHANGELOG.json @@ -1,6 +1,69 @@ { "name": "@rushstack/ts-command-line", "entries": [ + { + "version": "4.23.4", + "tag": "@rushstack/ts-command-line_v4.23.4", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + } + ] + } + }, + { + "version": "4.23.3", + "tag": "@rushstack/ts-command-line_v4.23.3", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + } + ] + } + }, + { + "version": "4.23.2", + "tag": "@rushstack/ts-command-line_v4.23.2", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + } + ] + } + }, + { + "version": "4.23.1", + "tag": "@rushstack/ts-command-line_v4.23.1", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + } + ] + } + }, + { + "version": "4.23.0", + "tag": "@rushstack/ts-command-line_v4.23.0", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "minor": [ + { + "comment": "Expand the `alternatives` and `completions` options of `CommandLineChoiceParameter` and `CommandLineChoiceListParameter` to allow readonly arrays and sets." + }, + { + "comment": "(BREAKING API CHANGE) Change the type of the `alternatives` property of `CommandLineChoiceParameter` and `CommandLineChoiceParameter` from an array to a `ReadonlySet`." + } + ] + } + }, { "version": "4.22.8", "tag": "@rushstack/ts-command-line_v4.22.8", diff --git a/libraries/ts-command-line/CHANGELOG.md b/libraries/ts-command-line/CHANGELOG.md index 05e73983e49..81efb754c55 100644 --- a/libraries/ts-command-line/CHANGELOG.md +++ b/libraries/ts-command-line/CHANGELOG.md @@ -1,6 +1,34 @@ # Change Log - @rushstack/ts-command-line -This log was last generated on Fri, 13 Sep 2024 00:11:43 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 01:11:42 GMT and should not be manually modified. + +## 4.23.4 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 4.23.3 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 4.23.2 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 4.23.1 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 4.23.0 +Thu, 17 Oct 2024 08:35:06 GMT + +### Minor changes + +- Expand the `alternatives` and `completions` options of `CommandLineChoiceParameter` and `CommandLineChoiceListParameter` to allow readonly arrays and sets. +- (BREAKING API CHANGE) Change the type of the `alternatives` property of `CommandLineChoiceParameter` and `CommandLineChoiceParameter` from an array to a `ReadonlySet`. ## 4.22.8 Fri, 13 Sep 2024 00:11:43 GMT diff --git a/libraries/ts-command-line/package.json b/libraries/ts-command-line/package.json index 26721306075..3dc4da2b0b5 100644 --- a/libraries/ts-command-line/package.json +++ b/libraries/ts-command-line/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/ts-command-line", - "version": "4.22.8", + "version": "4.23.4", "description": "An object-oriented command-line parser for TypeScript", "repository": { "type": "git", @@ -23,8 +23,8 @@ }, "devDependencies": { "local-eslint-config": "workspace:*", - "@rushstack/heft": "0.67.2", - "@rushstack/heft-node-rig": "2.6.31", + "@rushstack/heft": "0.68.12", + "@rushstack/heft-node-rig": "2.6.48", "@types/heft-jest": "1.0.1", "@types/node": "18.17.15" } diff --git a/libraries/ts-command-line/src/parameters/BaseClasses.ts b/libraries/ts-command-line/src/parameters/BaseClasses.ts index dc40f017553..d5eea4d4f02 100644 --- a/libraries/ts-command-line/src/parameters/BaseClasses.ts +++ b/libraries/ts-command-line/src/parameters/BaseClasses.ts @@ -280,7 +280,7 @@ export abstract class CommandLineParameterWithArgument extends CommandLineParame public readonly argumentName: string; /** {@inheritDoc IBaseCommandLineDefinitionWithArgument.completions} */ - public readonly completions: (() => Promise) | undefined; + public readonly completions: (() => Promise | ReadonlySet>) | undefined; /** @internal */ public constructor(definition: IBaseCommandLineDefinitionWithArgument) { diff --git a/libraries/ts-command-line/src/parameters/CommandLineChoiceListParameter.ts b/libraries/ts-command-line/src/parameters/CommandLineChoiceListParameter.ts index fa1f6e377d8..8faaf53dbeb 100644 --- a/libraries/ts-command-line/src/parameters/CommandLineChoiceListParameter.ts +++ b/libraries/ts-command-line/src/parameters/CommandLineChoiceListParameter.ts @@ -13,12 +13,12 @@ export class CommandLineChoiceListParameter< TChoice extends string = string > extends CommandLineParameterBase { /** {@inheritDoc ICommandLineChoiceListDefinition.alternatives} */ - public readonly alternatives: ReadonlyArray; + public readonly alternatives: ReadonlySet; private _values: TChoice[] = []; /** {@inheritDoc ICommandLineChoiceListDefinition.completions} */ - public readonly completions: (() => Promise) | undefined; + public readonly completions: (() => Promise | ReadonlySet>) | undefined; /** {@inheritDoc CommandLineParameter.kind} */ public readonly kind: CommandLineParameterKind.ChoiceList = CommandLineParameterKind.ChoiceList; @@ -26,15 +26,17 @@ export class CommandLineChoiceListParameter< /** @internal */ public constructor(definition: ICommandLineChoiceListDefinition) { super(definition); + const { alternatives, completions } = definition; - if (definition.alternatives.length < 1) { + const alternativesSet: Set = alternatives instanceof Set ? alternatives : new Set(alternatives); + if (alternativesSet.size < 1) { throw new Error( `When defining a choice list parameter, the alternatives list must contain at least one value.` ); } - this.alternatives = definition.alternatives; - this.completions = definition.completions; + this.alternatives = alternativesSet; + this.completions = completions; } /** @@ -60,8 +62,8 @@ export class CommandLineChoiceListParameter< const values: string[] | undefined = EnvironmentVariableParser.parseAsList(this.environmentVariable); if (values) { for (const value of values) { - if (!this.alternatives.includes(value as TChoice)) { - const choices: string = '"' + this.alternatives.join('", "') + '"'; + if (!this.alternatives.has(value as TChoice)) { + const choices: string = '"' + Array.from(this.alternatives).join('", "') + '"'; throw new Error( `Invalid value "${value}" for the environment variable` + ` ${this.environmentVariable}. Valid choices are: ${choices}` diff --git a/libraries/ts-command-line/src/parameters/CommandLineChoiceParameter.ts b/libraries/ts-command-line/src/parameters/CommandLineChoiceParameter.ts index 63dbfe3578b..49fbaa62535 100644 --- a/libraries/ts-command-line/src/parameters/CommandLineChoiceParameter.ts +++ b/libraries/ts-command-line/src/parameters/CommandLineChoiceParameter.ts @@ -19,7 +19,7 @@ export interface IRequiredCommandLineChoiceParameter extends CommandLineParameterBase { /** {@inheritDoc ICommandLineChoiceDefinition.alternatives} */ - public readonly alternatives: ReadonlyArray; + public readonly alternatives: ReadonlySet; /** {@inheritDoc ICommandLineStringDefinition.defaultValue} */ public readonly defaultValue: TChoice | undefined; @@ -27,7 +27,7 @@ export class CommandLineChoiceParameter extends private _value: TChoice | undefined = undefined; /** {@inheritDoc ICommandLineChoiceDefinition.completions} */ - public readonly completions: (() => Promise) | undefined; + public readonly completions: (() => Promise | ReadonlySet>) | undefined; /** {@inheritDoc CommandLineParameter.kind} */ public readonly kind: CommandLineParameterKind.Choice = -CommandLineParameterKind.Choice; @@ -35,23 +35,25 @@ export class CommandLineChoiceParameter extends /** @internal */ public constructor(definition: ICommandLineChoiceDefinition) { super(definition); + const { alternatives, defaultValue, completions } = definition; - if (definition.alternatives.length < 1) { + const alternativesSet: Set = alternatives instanceof Set ? alternatives : new Set(alternatives); + if (alternativesSet.size < 1) { throw new Error( `When defining a choice parameter, the alternatives list must contain at least one value.` ); } - if (definition.defaultValue && definition.alternatives.indexOf(definition.defaultValue) === -1) { + if (defaultValue && !alternativesSet.has(defaultValue)) { throw new Error( - `The specified default value "${definition.defaultValue}"` + - ` is not one of the available options: ${definition.alternatives.toString()}` + `The specified default value "${defaultValue}"` + + ` is not one of the available options: ${alternatives.toString()}` ); } - this.alternatives = definition.alternatives; - this.defaultValue = definition.defaultValue; + this.alternatives = alternativesSet; + this.defaultValue = defaultValue; this.validateDefaultValue(!!this.defaultValue); - this.completions = definition.completions; + this.completions = completions; } /** @@ -72,8 +74,8 @@ export class CommandLineChoiceParameter extends // Try reading the environment variable const environmentValue: string | undefined = process.env[this.environmentVariable]; if (environmentValue !== undefined && environmentValue !== '') { - if (!this.alternatives.includes(environmentValue as TChoice)) { - const choices: string = '"' + this.alternatives.join('", "') + '"'; + if (!this.alternatives.has(environmentValue as TChoice)) { + const choices: string = '"' + Array.from(this.alternatives).join('", "') + '"'; throw new Error( `Invalid value "${environmentValue}" for the environment variable` + ` ${this.environmentVariable}. Valid choices are: ${choices}` diff --git a/libraries/ts-command-line/src/parameters/CommandLineDefinition.ts b/libraries/ts-command-line/src/parameters/CommandLineDefinition.ts index 07adab02114..7a115dd94ea 100644 --- a/libraries/ts-command-line/src/parameters/CommandLineDefinition.ts +++ b/libraries/ts-command-line/src/parameters/CommandLineDefinition.ts @@ -130,7 +130,7 @@ export interface IBaseCommandLineDefinitionWithArgument extends IBaseCommandLine * * In a future release, this will be renamed to `getCompletionsAsync` */ - completions?: () => Promise; + completions?: () => Promise | ReadonlySet>; } /** @@ -146,7 +146,7 @@ export interface ICommandLineChoiceDefinition /** * A list of strings (which contain no spaces), of possible options which can be selected */ - alternatives: TChoice[]; + alternatives: ReadonlyArray | ReadonlySet; /** * {@inheritDoc ICommandLineStringDefinition.defaultValue} @@ -159,7 +159,7 @@ export interface ICommandLineChoiceDefinition * This option is only used when `ICommandLineParserOptions.enableTabCompletionAction` * is enabled. */ - completions?: () => Promise; + completions?: () => Promise | ReadonlySet>; } /** @@ -174,7 +174,7 @@ export interface ICommandLineChoiceListDefinition | ReadonlySet; /** * An optional callback that provides a list of custom choices for tab completion. @@ -182,7 +182,7 @@ export interface ICommandLineChoiceListDefinition Promise; + completions?: () => Promise | ReadonlySet>; } /** diff --git a/libraries/ts-command-line/src/providers/CommandLineParameterProvider.ts b/libraries/ts-command-line/src/providers/CommandLineParameterProvider.ts index 5b0d211c630..3a4e6eb5c08 100644 --- a/libraries/ts-command-line/src/providers/CommandLineParameterProvider.ts +++ b/libraries/ts-command-line/src/providers/CommandLineParameterProvider.ts @@ -835,11 +835,11 @@ export abstract class CommandLineParameterProvider { let type: string | undefined; switch (kind) { case CommandLineParameterKind.Choice: { - choices = parameter.alternatives as string[]; + choices = Array.from(parameter.alternatives); break; } case CommandLineParameterKind.ChoiceList: { - choices = parameter.alternatives as string[]; + choices = Array.from(parameter.alternatives); action = 'append'; break; } diff --git a/libraries/ts-command-line/src/providers/TabCompletionAction.ts b/libraries/ts-command-line/src/providers/TabCompletionAction.ts index bcb3a3db4f1..e05d3d14a7e 100644 --- a/libraries/ts-command-line/src/providers/TabCompletionAction.ts +++ b/libraries/ts-command-line/src/providers/TabCompletionAction.ts @@ -122,10 +122,10 @@ export class TabCompleteAction extends CommandLineAction { if (completePartialWord) { for (const parameterName of parameterNames) { if (parameterName === secondLastToken) { - const values: ReadonlyArray = await this._getParameterValueCompletionsAsync( + const values: ReadonlySet = await this._getParameterValueCompletionsAsync( parameterNameMap.get(parameterName)! ); - if (values.length > 0) { + if (values.size > 0) { yield* this._completeParameterValues(values, lastToken); return; } @@ -135,10 +135,10 @@ export class TabCompleteAction extends CommandLineAction { } else { for (const parameterName of parameterNames) { if (parameterName === lastToken) { - const values: ReadonlyArray = await this._getParameterValueCompletionsAsync( + const values: ReadonlySet = await this._getParameterValueCompletionsAsync( parameterNameMap.get(parameterName)! ); - if (values.length > 0) { + if (values.size > 0) { yield* values; return; } @@ -174,8 +174,8 @@ export class TabCompleteAction extends CommandLineAction { private async _getParameterValueCompletionsAsync( parameter: CommandLineParameter - ): Promise> { - let choiceParameterValues: ReadonlyArray = []; + ): Promise> { + let choiceParameterValues: ReadonlySet | undefined; if (parameter.kind === CommandLineParameterKind.Choice) { choiceParameterValues = parameter.alternatives; } else if (parameter.kind !== CommandLineParameterKind.Flag) { @@ -190,12 +190,12 @@ export class TabCompleteAction extends CommandLineAction { parameterWithArgumentOrChoices = parameter; } - if (parameterWithArgumentOrChoices?.completions) { - choiceParameterValues = await parameterWithArgumentOrChoices.completions(); - } + const completionValues: ReadonlyArray | ReadonlySet | undefined = + await parameterWithArgumentOrChoices?.completions?.(); + choiceParameterValues = completionValues instanceof Set ? completionValues : new Set(completionValues); } - return choiceParameterValues; + return choiceParameterValues ?? new Set(); } private _getGlobalParameterOffset(tokens: string[]): number { @@ -215,7 +215,7 @@ export class TabCompleteAction extends CommandLineAction { } private *_completeParameterValues( - choiceParameterValues: ReadonlyArray, + choiceParameterValues: ReadonlyArray | ReadonlySet, lastToken: string ): IterableIterator { for (const choiceParameterValue of choiceParameterValues) { diff --git a/libraries/typings-generator/CHANGELOG.json b/libraries/typings-generator/CHANGELOG.json index ef1f0942cd9..4508c666ba2 100644 --- a/libraries/typings-generator/CHANGELOG.json +++ b/libraries/typings-generator/CHANGELOG.json @@ -1,6 +1,186 @@ { "name": "@rushstack/typings-generator", "entries": [ + { + "version": "0.14.19", + "tag": "@rushstack/typings-generator_v0.14.19", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.14.18", + "tag": "@rushstack/typings-generator_v0.14.18", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.14.17", + "tag": "@rushstack/typings-generator_v0.14.17", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.14.16", + "tag": "@rushstack/typings-generator_v0.14.16", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.14.15", + "tag": "@rushstack/typings-generator_v0.14.15", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.14.14", + "tag": "@rushstack/typings-generator_v0.14.14", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.14.13", + "tag": "@rushstack/typings-generator_v0.14.13", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.14.12", + "tag": "@rushstack/typings-generator_v0.14.12", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.14.11", + "tag": "@rushstack/typings-generator_v0.14.11", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.14.10", + "tag": "@rushstack/typings-generator_v0.14.10", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.14.9", + "tag": "@rushstack/typings-generator_v0.14.9", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.14.8", + "tag": "@rushstack/typings-generator_v0.14.8", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.14.7", + "tag": "@rushstack/typings-generator_v0.14.7", + "date": "Tue, 15 Oct 2024 00:12:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.14.6", "tag": "@rushstack/typings-generator_v0.14.6", diff --git a/libraries/typings-generator/CHANGELOG.md b/libraries/typings-generator/CHANGELOG.md index 4c6b26df346..6d1bc871d66 100644 --- a/libraries/typings-generator/CHANGELOG.md +++ b/libraries/typings-generator/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/typings-generator -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.14.19 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.14.18 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.14.17 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.14.16 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.14.15 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.14.14 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.14.13 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.14.12 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.14.11 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.14.10 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.14.9 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.14.8 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.14.7 +Tue, 15 Oct 2024 00:12:32 GMT + +_Version update only_ ## 0.14.6 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/libraries/typings-generator/package.json b/libraries/typings-generator/package.json index c5cc668037b..cecb6bab293 100644 --- a/libraries/typings-generator/package.json +++ b/libraries/typings-generator/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/typings-generator", - "version": "0.14.6", + "version": "0.14.19", "description": "This library provides functionality for automatically generating typings for non-TS files.", "keywords": [ "dts", diff --git a/libraries/worker-pool/CHANGELOG.json b/libraries/worker-pool/CHANGELOG.json index cf4df853d11..b1ed5efa35c 100644 --- a/libraries/worker-pool/CHANGELOG.json +++ b/libraries/worker-pool/CHANGELOG.json @@ -1,6 +1,174 @@ { "name": "@rushstack/worker-pool", "entries": [ + { + "version": "0.5.2", + "tag": "@rushstack/worker-pool_v0.5.2", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.5.1", + "tag": "@rushstack/worker-pool_v0.5.1", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.5.0", + "tag": "@rushstack/worker-pool_v0.5.0", + "date": "Wed, 22 Jan 2025 03:03:47 GMT", + "comments": { + "minor": [ + { + "comment": "Add a `workerResourceLimits` option to the `WorkerPool` constructor to control the available resources to the workers." + } + ] + } + }, + { + "version": "0.4.81", + "tag": "@rushstack/worker-pool_v0.4.81", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.4.80", + "tag": "@rushstack/worker-pool_v0.4.80", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.4.79", + "tag": "@rushstack/worker-pool_v0.4.79", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.4.78", + "tag": "@rushstack/worker-pool_v0.4.78", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.4.77", + "tag": "@rushstack/worker-pool_v0.4.77", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.4.76", + "tag": "@rushstack/worker-pool_v0.4.76", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.4.75", + "tag": "@rushstack/worker-pool_v0.4.75", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.4.74", + "tag": "@rushstack/worker-pool_v0.4.74", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.4.73", + "tag": "@rushstack/worker-pool_v0.4.73", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.4.72", + "tag": "@rushstack/worker-pool_v0.4.72", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.4.71", + "tag": "@rushstack/worker-pool_v0.4.71", + "date": "Tue, 15 Oct 2024 00:12:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.4.70", "tag": "@rushstack/worker-pool_v0.4.70", diff --git a/libraries/worker-pool/CHANGELOG.md b/libraries/worker-pool/CHANGELOG.md index e2a2d7b5522..70aa5632f67 100644 --- a/libraries/worker-pool/CHANGELOG.md +++ b/libraries/worker-pool/CHANGELOG.md @@ -1,6 +1,78 @@ # Change Log - @rushstack/worker-pool -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.5.2 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.5.1 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.5.0 +Wed, 22 Jan 2025 03:03:47 GMT + +### Minor changes + +- Add a `workerResourceLimits` option to the `WorkerPool` constructor to control the available resources to the workers. + +## 0.4.81 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.4.80 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.4.79 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.4.78 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.4.77 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.4.76 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.4.75 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.4.74 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.4.73 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.4.72 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.4.71 +Tue, 15 Oct 2024 00:12:32 GMT + +_Version update only_ ## 0.4.70 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/libraries/worker-pool/package.json b/libraries/worker-pool/package.json index 1b9bea7d895..543ae8f3e40 100644 --- a/libraries/worker-pool/package.json +++ b/libraries/worker-pool/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/worker-pool", - "version": "0.4.70", + "version": "0.5.2", "description": "Lightweight worker pool using NodeJS worker_threads", "main": "lib/index.js", "typings": "dist/worker-pool.d.ts", diff --git a/libraries/worker-pool/src/WorkerPool.ts b/libraries/worker-pool/src/WorkerPool.ts index 87b6a9227df..28efb038469 100644 --- a/libraries/worker-pool/src/WorkerPool.ts +++ b/libraries/worker-pool/src/WorkerPool.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { Worker } from 'worker_threads'; +import { type ResourceLimits, Worker } from 'worker_threads'; /** * Symbol to read the ID off of a worker @@ -38,6 +38,11 @@ export interface IWorkerPoolOptions { * Absolute path to the worker script. */ workerScriptPath: string; + + /** + * Optional resource limits for the workers. + */ + workerResourceLimits?: ResourceLimits; } /** @@ -60,9 +65,18 @@ export class WorkerPool { private readonly _prepare: ((worker: Worker) => void) | undefined; private readonly _workerData: unknown; private readonly _workerScript: string; + private readonly _workerResourceLimits: ResourceLimits | undefined; public constructor(options: IWorkerPoolOptions) { - const { id, maxWorkers, onWorkerDestroyed, prepareWorker, workerData, workerScriptPath } = options; + const { + id, + maxWorkers, + onWorkerDestroyed, + prepareWorker, + workerData, + workerScriptPath, + workerResourceLimits + } = options; this.id = id; this.maxWorkers = maxWorkers; @@ -77,6 +91,7 @@ export class WorkerPool { this._prepare = prepareWorker; this._workerData = workerData; this._workerScript = workerScriptPath; + this._workerResourceLimits = workerResourceLimits; } /** @@ -193,7 +208,8 @@ export class WorkerPool { [WORKER_ID_SYMBOL]?: string; } = new Worker(this._workerScript, { eval: false, - workerData: this._workerData + workerData: this._workerData, + resourceLimits: this._workerResourceLimits }); const id: string = `${this.id}#${++this._nextId}`; diff --git a/repo-scripts/doc-plugin-rush-stack/package.json b/repo-scripts/doc-plugin-rush-stack/package.json index 3091bbacb7b..a76bd5f65ab 100644 --- a/repo-scripts/doc-plugin-rush-stack/package.json +++ b/repo-scripts/doc-plugin-rush-stack/package.json @@ -13,7 +13,7 @@ "dependencies": { "@microsoft/api-documenter": "workspace:*", "@microsoft/api-extractor-model": "workspace:*", - "@microsoft/tsdoc": "~0.15.0", + "@microsoft/tsdoc": "~0.15.1", "@rushstack/node-core-library": "workspace:*", "js-yaml": "~3.13.1" }, diff --git a/rigs/heft-node-rig/CHANGELOG.json b/rigs/heft-node-rig/CHANGELOG.json index 932306f79f6..95875bbe2c8 100644 --- a/rigs/heft-node-rig/CHANGELOG.json +++ b/rigs/heft-node-rig/CHANGELOG.json @@ -1,6 +1,435 @@ { "name": "@rushstack/heft-node-rig", "entries": [ + { + "version": "2.6.51", + "tag": "@rushstack/heft-node-rig_v2.6.51", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.65`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "2.6.50", + "tag": "@rushstack/heft-node-rig_v2.6.50", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.64`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "2.6.49", + "tag": "@rushstack/heft-node-rig_v2.6.49", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.63`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "2.6.48", + "tag": "@rushstack/heft-node-rig_v2.6.48", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.62`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "2.6.47", + "tag": "@rushstack/heft-node-rig_v2.6.47", + "date": "Tue, 07 Jan 2025 16:11:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `4.1.1`" + } + ] + } + }, + { + "version": "2.6.46", + "tag": "@rushstack/heft-node-rig_v2.6.46", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.61`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "2.6.45", + "tag": "@rushstack/heft-node-rig_v2.6.45", + "date": "Tue, 10 Dec 2024 07:32:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.0`" + } + ] + } + }, + { + "version": "2.6.44", + "tag": "@rushstack/heft-node-rig_v2.6.44", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.60`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.13.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "2.6.43", + "tag": "@rushstack/heft-node-rig_v2.6.43", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.59`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.13.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "2.6.42", + "tag": "@rushstack/heft-node-rig_v2.6.42", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.0`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `4.1.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.58`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.13.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "2.6.41", + "tag": "@rushstack/heft-node-rig_v2.6.41", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.57`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "2.6.40", + "tag": "@rushstack/heft-node-rig_v2.6.40", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.56`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.12.18`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.35`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "2.6.39", + "tag": "@rushstack/heft-node-rig_v2.6.39", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.55`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.12.17`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.34`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "2.6.38", + "tag": "@rushstack/heft-node-rig_v2.6.38", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.54`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.12.16`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.33`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "2.6.37", + "tag": "@rushstack/heft-node-rig_v2.6.37", + "date": "Wed, 16 Oct 2024 00:11:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.32`" + } + ] + } + }, + { + "version": "2.6.36", + "tag": "@rushstack/heft-node-rig_v2.6.36", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.53`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.12.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.31`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.2` to `0.68.3`" + } + ] + } + }, + { + "version": "2.6.35", + "tag": "@rushstack/heft-node-rig_v2.6.35", + "date": "Thu, 10 Oct 2024 00:11:51 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.0`" + } + ] + } + }, { "version": "2.6.34", "tag": "@rushstack/heft-node-rig_v2.6.34", diff --git a/rigs/heft-node-rig/CHANGELOG.md b/rigs/heft-node-rig/CHANGELOG.md index d672a70084a..601291f3a81 100644 --- a/rigs/heft-node-rig/CHANGELOG.md +++ b/rigs/heft-node-rig/CHANGELOG.md @@ -1,6 +1,91 @@ # Change Log - @rushstack/heft-node-rig -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 2.6.51 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 2.6.50 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 2.6.49 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 2.6.48 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 2.6.47 +Tue, 07 Jan 2025 16:11:06 GMT + +_Version update only_ + +## 2.6.46 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 2.6.45 +Tue, 10 Dec 2024 07:32:19 GMT + +_Version update only_ + +## 2.6.44 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 2.6.43 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 2.6.42 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 2.6.41 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 2.6.40 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 2.6.39 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 2.6.38 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 2.6.37 +Wed, 16 Oct 2024 00:11:20 GMT + +_Version update only_ + +## 2.6.36 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ + +## 2.6.35 +Thu, 10 Oct 2024 00:11:51 GMT + +_Version update only_ ## 2.6.34 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/rigs/heft-node-rig/package.json b/rigs/heft-node-rig/package.json index 40ecbf90cde..1e0175a9336 100644 --- a/rigs/heft-node-rig/package.json +++ b/rigs/heft-node-rig/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-node-rig", - "version": "2.6.34", + "version": "2.6.51", "description": "A rig package for Node.js projects that build using Heft", "license": "MIT", "scripts": { @@ -13,7 +13,7 @@ "directory": "rigs/heft-node-rig" }, "peerDependencies": { - "@rushstack/heft": "^0.68.2" + "@rushstack/heft": "^0.68.15" }, "dependencies": { "@microsoft/api-extractor": "workspace:*", diff --git a/rigs/heft-web-rig/CHANGELOG.json b/rigs/heft-web-rig/CHANGELOG.json index c006ec0f206..19aa9aa8a2c 100644 --- a/rigs/heft-web-rig/CHANGELOG.json +++ b/rigs/heft-web-rig/CHANGELOG.json @@ -1,6 +1,513 @@ { "name": "@rushstack/heft-web-rig", "entries": [ + { + "version": "0.25.18", + "tag": "@rushstack/heft-web-rig_v0.25.18", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.65`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.14` to `0.68.15`" + } + ] + } + }, + { + "version": "0.25.17", + "tag": "@rushstack/heft-web-rig_v0.25.17", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.64`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.13` to `0.68.14`" + } + ] + } + }, + { + "version": "0.25.16", + "tag": "@rushstack/heft-web-rig_v0.25.16", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.63`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.12` to `0.68.13`" + } + ] + } + }, + { + "version": "0.25.15", + "tag": "@rushstack/heft-web-rig_v0.25.15", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.49.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.62`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.11` to `0.68.12`" + } + ] + } + }, + { + "version": "0.25.14", + "tag": "@rushstack/heft-web-rig_v0.25.14", + "date": "Tue, 07 Jan 2025 16:11:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `4.1.1`" + } + ] + } + }, + { + "version": "0.25.13", + "tag": "@rushstack/heft-web-rig_v0.25.13", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.61`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.10` to `0.68.11`" + } + ] + } + }, + { + "version": "0.25.12", + "tag": "@rushstack/heft-web-rig_v0.25.12", + "date": "Tue, 10 Dec 2024 07:32:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.14.0`" + } + ] + } + }, + { + "version": "0.25.11", + "tag": "@rushstack/heft-web-rig_v0.25.11", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.60`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.13.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.9` to `0.68.10`" + } + ] + } + }, + { + "version": "0.25.10", + "tag": "@rushstack/heft-web-rig_v0.25.10", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.59`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.13.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.8` to `0.68.9`" + } + ] + } + }, + { + "version": "0.25.9", + "tag": "@rushstack/heft-web-rig_v0.25.9", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.48.0`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `4.1.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.58`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.13.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.7` to `0.68.8`" + } + ] + } + }, + { + "version": "0.25.8", + "tag": "@rushstack/heft-web-rig_v0.25.8", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.57`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.6.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.6` to `0.68.7`" + } + ] + } + }, + { + "version": "0.25.7", + "tag": "@rushstack/heft-web-rig_v0.25.7", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.56`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.12.18`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.35`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.5` to `0.68.6`" + } + ] + } + }, + { + "version": "0.25.6", + "tag": "@rushstack/heft-web-rig_v0.25.6", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.55`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.12.17`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.34`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.4` to `0.68.5`" + } + ] + } + }, + { + "version": "0.25.5", + "tag": "@rushstack/heft-web-rig_v0.25.5", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.54`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.12.16`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.33`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.3` to `0.68.4`" + } + ] + } + }, + { + "version": "0.25.4", + "tag": "@rushstack/heft-web-rig_v0.25.4", + "date": "Wed, 16 Oct 2024 00:11:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.32`" + } + ] + } + }, + { + "version": "0.25.3", + "tag": "@rushstack/heft-web-rig_v0.25.3", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.47.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-api-extractor-plugin\" to `0.3.53`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.12.15`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.15.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-typescript-plugin\" to `0.5.31`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.11.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.68.2` to `0.68.3`" + } + ] + } + }, + { + "version": "0.25.2", + "tag": "@rushstack/heft-web-rig_v0.25.2", + "date": "Thu, 10 Oct 2024 00:11:51 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-lint-plugin\" to `0.5.0`" + } + ] + } + }, { "version": "0.25.1", "tag": "@rushstack/heft-web-rig_v0.25.1", diff --git a/rigs/heft-web-rig/CHANGELOG.md b/rigs/heft-web-rig/CHANGELOG.md index 84643162f5f..ac804abfecf 100644 --- a/rigs/heft-web-rig/CHANGELOG.md +++ b/rigs/heft-web-rig/CHANGELOG.md @@ -1,6 +1,91 @@ # Change Log - @rushstack/heft-web-rig -This log was last generated on Thu, 03 Oct 2024 19:46:23 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.25.18 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.25.17 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.25.16 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.25.15 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.25.14 +Tue, 07 Jan 2025 16:11:06 GMT + +_Version update only_ + +## 0.25.13 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.25.12 +Tue, 10 Dec 2024 07:32:19 GMT + +_Version update only_ + +## 0.25.11 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.25.10 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.25.9 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.25.8 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.25.7 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.25.6 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.25.5 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.25.4 +Wed, 16 Oct 2024 00:11:20 GMT + +_Version update only_ + +## 0.25.3 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ + +## 0.25.2 +Thu, 10 Oct 2024 00:11:51 GMT + +_Version update only_ ## 0.25.1 Thu, 03 Oct 2024 19:46:23 GMT diff --git a/rigs/heft-web-rig/package.json b/rigs/heft-web-rig/package.json index 06584495406..8ecde5ecf9e 100644 --- a/rigs/heft-web-rig/package.json +++ b/rigs/heft-web-rig/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/heft-web-rig", - "version": "0.25.1", + "version": "0.25.18", "description": "A rig package for web browser projects that build using Heft", "license": "MIT", "scripts": { @@ -13,7 +13,7 @@ "directory": "rigs/heft-web-rig" }, "peerDependencies": { - "@rushstack/heft": "^0.68.2" + "@rushstack/heft": "^0.68.15" }, "dependencies": { "@microsoft/api-extractor": "workspace:*", diff --git a/rigs/local-node-rig/profiles/default/config/jest.config.json b/rigs/local-node-rig/profiles/default/config/jest.config.json index 969ec5d5fb2..1127530a185 100644 --- a/rigs/local-node-rig/profiles/default/config/jest.config.json +++ b/rigs/local-node-rig/profiles/default/config/jest.config.json @@ -20,5 +20,7 @@ "titleTemplate": "{title} ({filepath})" } ] - ] + ], + + "resolver": "@rushstack/heft-jest-plugin/lib/exports/jest-node-modules-symlink-resolver.js" } diff --git a/rigs/local-node-rig/profiles/default/config/typescript.json b/rigs/local-node-rig/profiles/default/config/typescript.json index 03fb43fc7ac..e821bdb4c18 100644 --- a/rigs/local-node-rig/profiles/default/config/typescript.json +++ b/rigs/local-node-rig/profiles/default/config/typescript.json @@ -1,5 +1,7 @@ { "$schema": "https://developer.microsoft.com/json-schemas/heft/typescript.schema.json", - "extends": "@rushstack/heft-node-rig/profiles/default/config/typescript.json" + "extends": "@rushstack/heft-node-rig/profiles/default/config/typescript.json", + + "onlyResolveSymlinksInNodeModules": true } diff --git a/rush-plugins/rush-amazon-s3-build-cache-plugin/package.json b/rush-plugins/rush-amazon-s3-build-cache-plugin/package.json index c193af30ef8..0e6c2c6db43 100644 --- a/rush-plugins/rush-amazon-s3-build-cache-plugin/package.json +++ b/rush-plugins/rush-amazon-s3-build-cache-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-amazon-s3-build-cache-plugin", - "version": "5.138.0", + "version": "5.148.0", "description": "Rush plugin for Amazon S3 cloud build cache", "repository": { "type": "git", @@ -22,13 +22,11 @@ "@rushstack/node-core-library": "workspace:*", "@rushstack/rush-sdk": "workspace:*", "@rushstack/terminal": "workspace:*", - "https-proxy-agent": "~5.0.0", - "node-fetch": "2.6.7" + "https-proxy-agent": "~5.0.0" }, "devDependencies": { "@microsoft/rush-lib": "workspace:*", "@rushstack/heft": "workspace:*", - "local-node-rig": "workspace:*", - "@types/node-fetch": "2.6.2" + "local-node-rig": "workspace:*" } } diff --git a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/AmazonS3BuildCacheProvider.ts b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/AmazonS3BuildCacheProvider.ts index d040e8d0b75..2d4292bd8af 100644 --- a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/AmazonS3BuildCacheProvider.ts +++ b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/AmazonS3BuildCacheProvider.ts @@ -11,9 +11,9 @@ import { EnvironmentVariableNames, EnvironmentConfiguration } from '@rushstack/rush-sdk'; +import { WebClient } from '@rushstack/rush-sdk/lib/utilities/WebClient'; import { AmazonS3Client } from './AmazonS3Client'; -import { WebClient } from './WebClient'; import { type IAmazonS3Credentials, fromAmazonEnv, fromRushEnv } from './AmazonS3Credentials'; /** diff --git a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/AmazonS3Client.ts b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/AmazonS3Client.ts index 1dcfab26e3a..384e33feb11 100644 --- a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/AmazonS3Client.ts +++ b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/AmazonS3Client.ts @@ -4,10 +4,15 @@ import { Async } from '@rushstack/node-core-library'; import { Colorize, type ITerminal } from '@rushstack/terminal'; import * as crypto from 'crypto'; -import * as fetch from 'node-fetch'; +import { + type IGetFetchOptions, + type IFetchOptionsWithBody, + type IWebClientResponse, + type WebClient, + AUTHORIZATION_HEADER_NAME +} from '@rushstack/rush-sdk/lib/utilities/WebClient'; import type { IAmazonS3BuildCacheProviderOptionsAdvanced } from './AmazonS3BuildCacheProvider'; -import type { IGetFetchOptions, IPutFetchOptions, WebClient } from './WebClient'; import { type IAmazonS3Credentials, fromRushEnv } from './AmazonS3Credentials'; const CONTENT_HASH_HEADER_NAME: 'x-amz-content-sha256' = 'x-amz-content-sha256'; @@ -113,11 +118,11 @@ export class AmazonS3Client { public async getObjectAsync(objectName: string): Promise { this._writeDebugLine('Reading object from S3'); return await this._sendCacheRequestWithRetriesAsync(async () => { - const response: fetch.Response = await this._makeRequestAsync('GET', objectName); + const response: IWebClientResponse = await this._makeRequestAsync('GET', objectName); if (response.ok) { return { hasNetworkError: false, - response: await response.buffer() + response: await response.getBufferAsync() }; } else if (response.status === 404) { return { @@ -158,7 +163,7 @@ export class AmazonS3Client { } await this._sendCacheRequestWithRetriesAsync(async () => { - const response: fetch.Response = await this._makeRequestAsync('PUT', objectName, objectBuffer); + const response: IWebClientResponse = await this._makeRequestAsync('PUT', objectName, objectBuffer); if (!response.ok) { return { hasNetworkError: true, @@ -194,12 +199,12 @@ export class AmazonS3Client { verb: 'GET' | 'PUT', objectName: string, body?: Buffer - ): Promise { + ): Promise { const isoDateString: IIsoDateString = this._getIsoDateString(); const bodyHash: string = this._getSha256(body); - const headers: fetch.Headers = new fetch.Headers(); - headers.set(DATE_HEADER_NAME, isoDateString.dateTime); - headers.set(CONTENT_HASH_HEADER_NAME, bodyHash); + const headers: Record = {}; + headers[DATE_HEADER_NAME] = isoDateString.dateTime; + headers[CONTENT_HASH_HEADER_NAME] = bodyHash; // the host can be e.g. https://s3.aws.com or http://localhost:9000 const host: string = this._s3Endpoint.replace(protocolRegex, ''); @@ -286,19 +291,19 @@ export class AmazonS3Client { const authorizationHeader: string = `AWS4-HMAC-SHA256 Credential=${this._credentials.accessKeyId}/${scope},SignedHeaders=${signedHeaderNamesString},Signature=${signature}`; - headers.set('Authorization', authorizationHeader); + headers[AUTHORIZATION_HEADER_NAME] = authorizationHeader; if (this._credentials.sessionToken) { // Handle signing with temporary credentials (via sts:assume-role) - headers.set('X-Amz-Security-Token', this._credentials.sessionToken); + headers['X-Amz-Security-Token'] = this._credentials.sessionToken; } } - const webFetchOptions: IGetFetchOptions | IPutFetchOptions = { + const webFetchOptions: IGetFetchOptions | IFetchOptionsWithBody = { verb, headers }; if (verb === 'PUT') { - (webFetchOptions as IPutFetchOptions).body = body; + (webFetchOptions as IFetchOptionsWithBody).body = body; } const url: string = `${this._s3Endpoint}${canonicalUri}`; @@ -306,11 +311,11 @@ export class AmazonS3Client { this._writeDebugLine(Colorize.bold(Colorize.underline('Sending request to S3'))); this._writeDebugLine(Colorize.bold('HOST: '), url); this._writeDebugLine(Colorize.bold('Headers: ')); - headers.forEach((value, name) => { + for (const [name, value] of Object.entries(headers)) { this._writeDebugLine(Colorize.cyan(`\t${name}: ${value}`)); - }); + } - const response: fetch.Response = await this._webClient.fetchAsync(url, webFetchOptions); + const response: IWebClientResponse = await this._webClient.fetchAsync(url, webFetchOptions); return response; } @@ -351,16 +356,16 @@ export class AmazonS3Client { }; } - private async _safeReadResponseTextAsync(response: fetch.Response): Promise { + private async _safeReadResponseTextAsync(response: IWebClientResponse): Promise { try { - return await response.text(); + return await response.getTextAsync(); } catch (err) { // ignore the error } return undefined; } - private async _getS3ErrorAsync(response: fetch.Response): Promise { + private async _getS3ErrorAsync(response: IWebClientResponse): Promise { const text: string | undefined = await this._safeReadResponseTextAsync(response); return new Error( `Amazon S3 responded with status code ${response.status} (${response.statusText})${ diff --git a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/WebClient.ts b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/WebClient.ts deleted file mode 100644 index 7c1776d998c..00000000000 --- a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/WebClient.ts +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See LICENSE in the project root for license information. - -// =================================================================================================================== -// AS A TEMPORARY WORKAROUND, THIS FILE WAS COPY+PASTED FROM THE "rush-lib" PROJECT. -// -// Eventually we plan to convert it into a more generic API for "node-core-library" or -// else replace it with a third party solution such as Axios. See the discussion here: -// https://github.com/microsoft/rushstack/pull/3036#discussion_r758010126 -// =================================================================================================================== - -import * as os from 'os'; -import * as process from 'process'; -import * as fetch from 'node-fetch'; -import type * as http from 'http'; -import { Import } from '@rushstack/node-core-library'; - -const createHttpsProxyAgent: typeof import('https-proxy-agent') = Import.lazy('https-proxy-agent', require); - -/** - * For use with {@link WebClient}. - * - * @public - */ -export type WebClientResponse = fetch.Response; - -/** - * For use with {@link WebClient}. - * - * @public - */ -export interface IWebFetchOptionsBase { - timeoutMs?: number; - verb?: 'GET' | 'PUT'; - headers?: fetch.Headers; -} - -/** - * For use with {@link WebClient}. - * - * @public - */ -export interface IGetFetchOptions extends IWebFetchOptionsBase { - verb: 'GET' | never; -} - -/** - * For use with {@link WebClient}. - * - * @public - */ -export interface IPutFetchOptions extends IWebFetchOptionsBase { - verb: 'PUT'; - body?: Buffer; -} - -/** - * For use with {@link WebClient}. - * @public - */ -export enum WebClientProxy { - None, - Detect, - Fiddler -} - -/** - * A helper for issuing HTTP requests. - * - * @public - */ -export class WebClient { - public readonly standardHeaders: fetch.Headers = new fetch.Headers(); - - public accept: string | undefined = '*/*'; - public userAgent: string | undefined = `rush node/${process.version} ${os.platform()} ${os.arch()}`; - - public proxy: WebClientProxy = WebClientProxy.Detect; - - public constructor() {} - - public static mergeHeaders(target: fetch.Headers, source: fetch.Headers): void { - source.forEach((value, name) => { - target.set(name, value); - }); - } - - public addBasicAuthHeader(userName: string, password: string): void { - this.standardHeaders.set( - 'Authorization', - 'Basic ' + Buffer.from(userName + ':' + password).toString('base64') - ); - } - - public async fetchAsync( - url: string, - options?: IGetFetchOptions | IPutFetchOptions - ): Promise { - const headers: fetch.Headers = new fetch.Headers(); - - WebClient.mergeHeaders(headers, this.standardHeaders); - - if (options?.headers) { - WebClient.mergeHeaders(headers, options.headers); - } - - if (this.userAgent) { - headers.set('user-agent', this.userAgent); - } - if (this.accept) { - headers.set('accept', this.accept); - } - - let proxyUrl: string = ''; - - switch (this.proxy) { - case WebClientProxy.Detect: - if (process.env.HTTPS_PROXY) { - proxyUrl = process.env.HTTPS_PROXY; - } else if (process.env.HTTP_PROXY) { - proxyUrl = process.env.HTTP_PROXY; - } - break; - - case WebClientProxy.Fiddler: - // For debugging, disable cert validation - // eslint-disable-next-line - process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; - proxyUrl = 'http://localhost:8888/'; - break; - } - - let agent: http.Agent | undefined = undefined; - if (proxyUrl) { - agent = createHttpsProxyAgent(proxyUrl); - } - - const timeoutMs: number = options?.timeoutMs !== undefined ? options.timeoutMs : 15 * 1000; // 15 seconds - const requestInit: fetch.RequestInit = { - method: options?.verb, - headers: headers, - agent: agent, - timeout: timeoutMs - }; - const putOptions: IPutFetchOptions | undefined = options as IPutFetchOptions | undefined; - if (putOptions?.body) { - requestInit.body = putOptions.body; - } - - return await fetch.default(url, requestInit); - } -} diff --git a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/index.ts b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/index.ts index dbb5a702b31..b110cb1a855 100644 --- a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/index.ts +++ b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/index.ts @@ -5,7 +5,6 @@ import { RushAmazonS3BuildCachePlugin } from './RushAmazonS3BuildCachePlugin'; export { type IAmazonS3Credentials } from './AmazonS3Credentials'; export { AmazonS3Client } from './AmazonS3Client'; -export { WebClient, type IGetFetchOptions, type IPutFetchOptions, type WebClientResponse } from './WebClient'; export default RushAmazonS3BuildCachePlugin; export type { IAmazonS3BuildCacheProviderOptionsBase, diff --git a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/AmazonS3BuildCacheProvider.test.ts b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/AmazonS3BuildCacheProvider.test.ts index 4ab30117f11..f66b89415ed 100644 --- a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/AmazonS3BuildCacheProvider.test.ts +++ b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/AmazonS3BuildCacheProvider.test.ts @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. +jest.mock('@rushstack/rush-sdk/lib/utilities/WebClient', () => { + return jest.requireActual('@microsoft/rush-lib/lib/utilities/WebClient'); +}); + import { ConsoleTerminalProvider, StringBufferTerminalProvider, Terminal } from '@rushstack/terminal'; import { RushSession, diff --git a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/AmazonS3Client.test.ts b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/AmazonS3Client.test.ts index d87115b17ed..07b5eddfc73 100644 --- a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/AmazonS3Client.test.ts +++ b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/AmazonS3Client.test.ts @@ -1,12 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. +jest.mock('@rushstack/rush-sdk/lib/utilities/WebClient', () => { + return jest.requireActual('@microsoft/rush-lib/lib/utilities/WebClient'); +}); + import { ConsoleTerminalProvider, Terminal } from '@rushstack/terminal'; -import { Response, type ResponseInit } from 'node-fetch'; +import { WebClient } from '@rushstack/rush-sdk/lib/utilities/WebClient'; import type { IAmazonS3BuildCacheProviderOptionsAdvanced } from '../AmazonS3BuildCacheProvider'; import { AmazonS3Client } from '../AmazonS3Client'; -import { WebClient } from '../WebClient'; import type { IAmazonS3Credentials } from '../AmazonS3Credentials'; const webClient = new WebClient(); @@ -219,7 +222,8 @@ describe(AmazonS3Client.name, () => { describe('Making requests', () => { interface IResponseOptions { body?: string; - responseInit: ResponseInit; + status: number; + statusText?: string; } let realDate: typeof Date; @@ -249,9 +253,25 @@ describe(AmazonS3Client.name, () => { response: IResponseOptions, testOptions: ITestOptions ): Promise { - const spy: jest.SpyInstance = jest - .spyOn(WebClient.prototype, 'fetchAsync') - .mockReturnValue(Promise.resolve(new Response(response.body, response.responseInit))); + const body: string | undefined = response.body; + const spy: jest.SpyInstance = jest.spyOn(WebClient.prototype, 'fetchAsync').mockReturnValue( + Promise.resolve({ + getBufferAsync: body + ? () => Promise.resolve(Buffer.from(body)) + : () => Promise.reject(new Error('No body provided')), + getTextAsync: body + ? () => Promise.resolve(body) + : () => Promise.reject(new Error('No body provided')), + getJsonAsync: body + ? () => Promise.resolve(JSON.parse(body)) + : () => Promise.reject(new Error('No body provided')), + headers: {}, + status: response.status, + statusText: response.statusText, + ok: response.status >= 200 && response.status < 300, + redirected: false + }) + ); const s3Client: AmazonS3Client = new AmazonS3Client(credentials, options, webClient, terminal); let result: TResponse; @@ -321,9 +341,7 @@ describe(AmazonS3Client.name, () => { 'abc123', { body: expectedContents, - responseInit: { - status: 200 - } + status: 200 }, { shouldRetry: false @@ -342,9 +360,7 @@ describe(AmazonS3Client.name, () => { 'abc123', { body: expectedContents, - responseInit: { - status: 200 - } + status: 200 }, { shouldRetry: false } ); @@ -358,10 +374,8 @@ describe(AmazonS3Client.name, () => { DUMMY_OPTIONS, 'abc123', { - responseInit: { - status: 404, - statusText: 'Not Found' - } + status: 404, + statusText: 'Not Found' }, { shouldRetry: false @@ -379,10 +393,8 @@ describe(AmazonS3Client.name, () => { DUMMY_OPTIONS, 'abc123', { - responseInit: { - status: 500, - statusText: 'Server Error' - } + status: 500, + statusText: 'Server Error' }, { shouldRetry: true @@ -407,10 +419,8 @@ describe(AmazonS3Client.name, () => { DUMMY_OPTIONS, 'abc123', { - responseInit: { - status: 400, - statusText: 'Bad Request' - } + status: 400, + statusText: 'Bad Request' }, { shouldRetry: false @@ -431,10 +441,8 @@ describe(AmazonS3Client.name, () => { DUMMY_OPTIONS, 'abc123', { - responseInit: { - status: 401, - statusText: 'Unauthorized' - } + status: 401, + statusText: 'Unauthorized' }, { shouldRetry: false @@ -465,10 +473,8 @@ describe(AmazonS3Client.name, () => { return await s3Client.getObjectAsync('abc123'); }, { - responseInit: { - status: code, - statusText: 'Unauthorized' - } + status: code, + statusText: 'Unauthorized' }, { shouldRetry: false @@ -497,10 +503,8 @@ describe(AmazonS3Client.name, () => { DUMMY_OPTIONS, 'abc123', { - responseInit: { - status: 403, - statusText: 'Unauthorized' - } + status: 403, + statusText: 'Unauthorized' }, { shouldRetry: false @@ -564,9 +568,7 @@ describe(AmazonS3Client.name, () => { 'abc123', 'abc123-contents', { - responseInit: { - status: 200 - } + status: 200 }, { shouldRetry: false } ); @@ -579,9 +581,7 @@ describe(AmazonS3Client.name, () => { 'abc123', 'abc123-contents', { - responseInit: { - status: 200 - } + status: 200 }, { shouldRetry: false } ); @@ -596,10 +596,8 @@ describe(AmazonS3Client.name, () => { 'abc123', 'abc123-contents', { - responseInit: { - status: 500, - statusText: 'Server Error' - } + status: 500, + statusText: 'Server Error' }, { shouldRetry: true } ) diff --git a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/__snapshots__/AmazonS3Client.test.ts.snap b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/__snapshots__/AmazonS3Client.test.ts.snap index 46526b4cfda..9481b3d6983 100644 --- a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/__snapshots__/AmazonS3Client.test.ts.snap +++ b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/test/__snapshots__/AmazonS3Client.test.ts.snap @@ -6,18 +6,10 @@ exports[`AmazonS3Client Making requests Getting an object With credentials Can g Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -28,18 +20,10 @@ exports[`AmazonS3Client Making requests Getting an object With credentials Can g Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-west-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=fa88dc2c0877d83d442298fd51281eeffa1196436397832a794b89a079302d71", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-west-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=fa88dc2c0877d83d442298fd51281eeffa1196436397832a794b89a079302d71", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -50,18 +34,10 @@ exports[`AmazonS3Client Making requests Getting an object With credentials Handl Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -74,18 +50,10 @@ exports[`AmazonS3Client Making requests Getting an object With credentials Handl Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -96,18 +64,10 @@ exports[`AmazonS3Client Making requests Getting an object With credentials Handl Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -120,21 +80,11 @@ exports[`AmazonS3Client Making requests Getting an object With credentials inclu Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", - ], - "X-Amz-Security-Token": Array [ - "sessionToken", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", + "X-Amz-Security-Token": "sessionToken", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -145,21 +95,11 @@ exports[`AmazonS3Client Making requests Getting an object With credentials inclu Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-west-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=c3e1597c716ad0146d1a0eca844194b3120f8d8f07cf0a2c402f0b4f2148de12", - ], - "X-Amz-Security-Token": Array [ - "sessionToken", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-west-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=c3e1597c716ad0146d1a0eca844194b3120f8d8f07cf0a2c402f0b4f2148de12", + "X-Amz-Security-Token": "sessionToken", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -170,21 +110,11 @@ exports[`AmazonS3Client Making requests Getting an object With credentials inclu Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", - ], - "X-Amz-Security-Token": Array [ - "sessionToken", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", + "X-Amz-Security-Token": "sessionToken", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -197,21 +127,11 @@ exports[`AmazonS3Client Making requests Getting an object With credentials inclu Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", - ], - "X-Amz-Security-Token": Array [ - "sessionToken", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", + "X-Amz-Security-Token": "sessionToken", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -222,21 +142,11 @@ exports[`AmazonS3Client Making requests Getting an object With credentials inclu Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", - ], - "X-Amz-Security-Token": Array [ - "sessionToken", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", + "X-Amz-Security-Token": "sessionToken", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -249,21 +159,11 @@ exports[`AmazonS3Client Making requests Getting an object With credentials inclu Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", - ], - "X-Amz-Security-Token": Array [ - "sessionToken", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", + "X-Amz-Security-Token": "sessionToken", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -276,21 +176,11 @@ exports[`AmazonS3Client Making requests Getting an object With credentials inclu Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", - ], - "X-Amz-Security-Token": Array [ - "sessionToken", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=2a4b8f28b1bdd37af6bb0fd79212c223e2c28e4f94bfb5d1c94a16bb056d5624", + "X-Amz-Security-Token": "sessionToken", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -303,18 +193,10 @@ exports[`AmazonS3Client Making requests Getting an object With credentials shoul Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -327,18 +209,10 @@ exports[`AmazonS3Client Making requests Getting an object With credentials shoul Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", - ], - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=194608e9e7ba6d8aa4a019b3b6fd237e6b09ef1f45ff7fa60cbb81c1875538be", + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -351,15 +225,9 @@ exports[`AmazonS3Client Making requests Getting an object Without credentials Ca Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -370,15 +238,9 @@ exports[`AmazonS3Client Making requests Getting an object Without credentials Ca Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -389,15 +251,9 @@ exports[`AmazonS3Client Making requests Getting an object Without credentials Ha Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -408,15 +264,9 @@ exports[`AmazonS3Client Making requests Getting an object Without credentials Ha Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -429,15 +279,9 @@ exports[`AmazonS3Client Making requests Getting an object Without credentials Ha Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -448,15 +292,9 @@ exports[`AmazonS3Client Making requests Getting an object Without credentials Ha Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -467,15 +305,9 @@ exports[`AmazonS3Client Making requests Getting an object Without credentials Ha Array [ "http://localhost:9000/abc123", Object { - "headers": Headers { - Symbol(map): Object { - "x-amz-content-sha256": Array [ - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "x-amz-content-sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "x-amz-date": "20200418T123242Z", }, "verb": "GET", }, @@ -508,18 +340,10 @@ Array [ ], "type": "Buffer", }, - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=1255739559ef86e1cc1e733fa9e13aa4990c6f1fb1ae821653540d401c48c5e1", - ], - "x-amz-content-sha256": Array [ - "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=1255739559ef86e1cc1e733fa9e13aa4990c6f1fb1ae821653540d401c48c5e1", + "x-amz-content-sha256": "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", + "x-amz-date": "20200418T123242Z", }, "verb": "PUT", }, @@ -552,18 +376,10 @@ Array [ ], "type": "Buffer", }, - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=1255739559ef86e1cc1e733fa9e13aa4990c6f1fb1ae821653540d401c48c5e1", - ], - "x-amz-content-sha256": Array [ - "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=1255739559ef86e1cc1e733fa9e13aa4990c6f1fb1ae821653540d401c48c5e1", + "x-amz-content-sha256": "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", + "x-amz-date": "20200418T123242Z", }, "verb": "PUT", }, @@ -594,18 +410,10 @@ Array [ ], "type": "Buffer", }, - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-west-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=66e311b6c1987dd62cb3bfec416b9129c966d1d15075d1ebf852433062bf4281", - ], - "x-amz-content-sha256": Array [ - "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-west-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=66e311b6c1987dd62cb3bfec416b9129c966d1d15075d1ebf852433062bf4281", + "x-amz-content-sha256": "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", + "x-amz-date": "20200418T123242Z", }, "verb": "PUT", }, @@ -636,21 +444,11 @@ Array [ ], "type": "Buffer", }, - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=0ed8d55f5a3265d967092faf7e3ca7acd08ff3566651dc7c7363d60118c11528", - ], - "X-Amz-Security-Token": Array [ - "sessionToken", - ], - "x-amz-content-sha256": Array [ - "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=0ed8d55f5a3265d967092faf7e3ca7acd08ff3566651dc7c7363d60118c11528", + "X-Amz-Security-Token": "sessionToken", + "x-amz-content-sha256": "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", + "x-amz-date": "20200418T123242Z", }, "verb": "PUT", }, @@ -683,21 +481,11 @@ Array [ ], "type": "Buffer", }, - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=0ed8d55f5a3265d967092faf7e3ca7acd08ff3566651dc7c7363d60118c11528", - ], - "X-Amz-Security-Token": Array [ - "sessionToken", - ], - "x-amz-content-sha256": Array [ - "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=0ed8d55f5a3265d967092faf7e3ca7acd08ff3566651dc7c7363d60118c11528", + "X-Amz-Security-Token": "sessionToken", + "x-amz-content-sha256": "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", + "x-amz-date": "20200418T123242Z", }, "verb": "PUT", }, @@ -728,21 +516,11 @@ Array [ ], "type": "Buffer", }, - "headers": Headers { - Symbol(map): Object { - "Authorization": Array [ - "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-west-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=8e2cd7b6241780b51b1d15f428c43179d389b106be9a572e0def4cad6a5ba1e5", - ], - "X-Amz-Security-Token": Array [ - "sessionToken", - ], - "x-amz-content-sha256": Array [ - "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", - ], - "x-amz-date": Array [ - "20200418T123242Z", - ], - }, + "headers": Object { + "Authorization": "AWS4-HMAC-SHA256 Credential=accessKeyId/20200418/us-west-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=8e2cd7b6241780b51b1d15f428c43179d389b106be9a572e0def4cad6a5ba1e5", + "X-Amz-Security-Token": "sessionToken", + "x-amz-content-sha256": "f8e4bdb2ca9c0f90b0fe56e32bf509ba44b73e2f52af123832f9ddbfe7e8fafa", + "x-amz-date": "20200418T123242Z", }, "verb": "PUT", }, diff --git a/rush-plugins/rush-azure-storage-build-cache-plugin/package.json b/rush-plugins/rush-azure-storage-build-cache-plugin/package.json index 58189498699..6fc697b2273 100644 --- a/rush-plugins/rush-azure-storage-build-cache-plugin/package.json +++ b/rush-plugins/rush-azure-storage-build-cache-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-azure-storage-build-cache-plugin", - "version": "5.138.0", + "version": "5.148.0", "description": "Rush plugin for Azure storage cloud build cache", "repository": { "type": "git", @@ -18,8 +18,8 @@ "_phase:test": "heft run --only test -- --clean" }, "dependencies": { - "@azure/identity": "~4.2.1", - "@azure/storage-blob": "~12.17.0", + "@azure/identity": "~4.5.0", + "@azure/storage-blob": "~12.26.0", "@rushstack/node-core-library": "workspace:*", "@rushstack/rush-sdk": "workspace:*", "@rushstack/terminal": "workspace:*" diff --git a/rush-plugins/rush-azure-storage-build-cache-plugin/src/AzureAuthenticationBase.ts b/rush-plugins/rush-azure-storage-build-cache-plugin/src/AzureAuthenticationBase.ts index 1fe236c91aa..0d0cbf5d87a 100644 --- a/rush-plugins/rush-azure-storage-build-cache-plugin/src/AzureAuthenticationBase.ts +++ b/rush-plugins/rush-azure-storage-build-cache-plugin/src/AzureAuthenticationBase.ts @@ -146,9 +146,13 @@ export abstract class AzureAuthenticationBase { } public constructor(options: IAzureAuthenticationBaseOptions) { - this._azureEnvironment = options.azureEnvironment || 'AzurePublicCloud'; + const { + azureEnvironment = 'AzurePublicCloud', + loginFlow = process.env.CODESPACES === 'true' ? 'AdoCodespacesAuth' : 'InteractiveBrowser' + } = options; + this._azureEnvironment = azureEnvironment; this._credentialUpdateCommandForLogging = options.credentialUpdateCommandForLogging; - this._loginFlow = options.loginFlow || 'DeviceCode'; + this._loginFlow = loginFlow; this._failoverOrder = options.loginFlowFailover || { AdoCodespacesAuth: 'InteractiveBrowser', InteractiveBrowser: 'DeviceCode', @@ -174,25 +178,25 @@ export abstract class AzureAuthenticationBase { * Launches an interactive flow to renew a cached credential. * * @param terminal - The terminal to log output to - * @param onlyIfExistingCredentialExpiresAfter - If specified, and a cached credential exists that is still valid - * after the date specified, no action will be taken. + * @param onlyIfExistingCredentialExpiresBefore - If specified, and a cached credential exists, action will only + * be taken if the cached credential expires before the specified date. */ public async updateCachedCredentialInteractiveAsync( terminal: ITerminal, - onlyIfExistingCredentialExpiresAfter?: Date + onlyIfExistingCredentialExpiresBefore?: Date ): Promise { await CredentialCache.usingAsync( { supportEditing: true }, async (credentialsCache: CredentialCache) => { - if (onlyIfExistingCredentialExpiresAfter) { + if (onlyIfExistingCredentialExpiresBefore) { const existingCredentialExpiration: Date | undefined = credentialsCache.tryGetCacheEntry( this._credentialCacheId )?.expires; if ( existingCredentialExpiration && - existingCredentialExpiration > onlyIfExistingCredentialExpiresAfter + existingCredentialExpiration > onlyIfExistingCredentialExpiresBefore ) { return; } diff --git a/rush-plugins/rush-azure-storage-build-cache-plugin/src/AzureStorageBuildCacheProvider.ts b/rush-plugins/rush-azure-storage-build-cache-plugin/src/AzureStorageBuildCacheProvider.ts index ba329be5a72..cfbf7ff1b45 100644 --- a/rush-plugins/rush-azure-storage-build-cache-plugin/src/AzureStorageBuildCacheProvider.ts +++ b/rush-plugins/rush-azure-storage-build-cache-plugin/src/AzureStorageBuildCacheProvider.ts @@ -24,6 +24,7 @@ import { export interface IAzureStorageBuildCacheProviderOptions extends IAzureStorageAuthenticationOptions { blobPrefix?: string; + readRequiresAuthentication?: boolean; } interface IBlobError extends Error { @@ -43,6 +44,7 @@ export class AzureStorageBuildCacheProvider { private readonly _blobPrefix: string | undefined; private readonly _environmentCredential: string | undefined; + private readonly _readRequiresAuthentication: boolean; public get isCacheWriteAllowed(): boolean { return EnvironmentConfiguration.buildCacheWriteAllowed ?? this._isCacheWriteAllowedByConfiguration; @@ -58,6 +60,7 @@ export class AzureStorageBuildCacheProvider this._blobPrefix = options.blobPrefix; this._environmentCredential = EnvironmentConfiguration.buildCacheCredential; + this._readRequiresAuthentication = !!options.readRequiresAuthentication; if (!(this._azureEnvironment in AzureAuthorityHosts)) { throw new Error( @@ -208,8 +211,8 @@ export class AzureStorageBuildCacheProvider if (sasString) { const connectionString: string = this._getConnectionString(sasString); blobServiceClient = BlobServiceClient.fromConnectionString(connectionString); - } else if (!this._isCacheWriteAllowedByConfiguration) { - // If cache write isn't allowed and we don't have a credential, assume the blob supports anonymous read + } else if (!this._readRequiresAuthentication && !this._isCacheWriteAllowedByConfiguration) { + // If we don't have a credential and read doesn't require authentication, we can still read from the cache. blobServiceClient = new BlobServiceClient(this._storageAccountUrl); } else { throw new Error( diff --git a/rush-plugins/rush-azure-storage-build-cache-plugin/src/RushAzureInteractiveAuthPlugin.ts b/rush-plugins/rush-azure-storage-build-cache-plugin/src/RushAzureInteractiveAuthPlugin.ts index 310683fecd1..aef43ad6df2 100644 --- a/rush-plugins/rush-azure-storage-build-cache-plugin/src/RushAzureInteractiveAuthPlugin.ts +++ b/rush-plugins/rush-azure-storage-build-cache-plugin/src/RushAzureInteractiveAuthPlugin.ts @@ -27,7 +27,7 @@ export interface IAzureInteractiveAuthOptions { /** * Login flow to use for interactive authentication. - * @defaultValue 'deviceCode' + * @defaultValue 'AdoCodespacesAuth' if on GitHub Codespaces, 'InteractiveBrowser' otherwise */ readonly loginFlow?: LoginFlowType; @@ -86,7 +86,7 @@ export default class RushAzureInteractieAuthPlugin implements IRushPlugin { storageContainerName, azureEnvironment = 'AzurePublicCloud', minimumValidityInMinutes, - loginFlow = 'DeviceCode' + loginFlow = process.env.CODESPACES ? 'AdoCodespacesAuth' : 'InteractiveBrowser' } = options; const logger: ILogger = rushSession.getLogger(PLUGIN_NAME); diff --git a/rush-plugins/rush-azure-storage-build-cache-plugin/src/RushAzureStorageBuildCachePlugin.ts b/rush-plugins/rush-azure-storage-build-cache-plugin/src/RushAzureStorageBuildCachePlugin.ts index 975a95553ed..a0f4883fcad 100644 --- a/rush-plugins/rush-azure-storage-build-cache-plugin/src/RushAzureStorageBuildCachePlugin.ts +++ b/rush-plugins/rush-azure-storage-build-cache-plugin/src/RushAzureStorageBuildCachePlugin.ts @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import type { IRushPlugin, RushSession, RushConfiguration } from '@rushstack/rush-sdk'; -import type { AzureEnvironmentName } from './AzureAuthenticationBase'; +import type { AzureEnvironmentName, LoginFlowType } from './AzureAuthenticationBase'; const PLUGIN_NAME: string = 'AzureStorageBuildCachePlugin'; @@ -25,6 +25,12 @@ interface IAzureBlobStorageConfigurationJson { */ azureEnvironment?: AzureEnvironmentName; + /** + * Login flow to use for interactive authentication. + * @defaultValue 'AdoCodespacesAuth' if on GitHub Codespaces, 'InteractiveBrowser' otherwise + */ + readonly loginFlow?: LoginFlowType; + /** * An optional prefix for cache item blob names. */ @@ -34,6 +40,11 @@ interface IAzureBlobStorageConfigurationJson { * If set to true, allow writing to the cache. Defaults to false. */ isCacheWriteAllowed?: boolean; + + /** + * If set to true, reading the cache requires authentication. Defaults to false. + */ + readRequiresAuthentication?: boolean; } /** @@ -55,7 +66,9 @@ export class RushAzureStorageBuildCachePlugin implements IRushPlugin { storageContainerName: azureBlobStorageConfiguration.storageContainerName, azureEnvironment: azureBlobStorageConfiguration.azureEnvironment, blobPrefix: azureBlobStorageConfiguration.blobPrefix, - isCacheWriteAllowed: !!azureBlobStorageConfiguration.isCacheWriteAllowed + loginFlow: azureBlobStorageConfiguration.loginFlow, + isCacheWriteAllowed: !!azureBlobStorageConfiguration.isCacheWriteAllowed, + readRequiresAuthentication: !!azureBlobStorageConfiguration.readRequiresAuthentication }); }); }); diff --git a/rush-plugins/rush-azure-storage-build-cache-plugin/src/schemas/azure-blob-storage-config.schema.json b/rush-plugins/rush-azure-storage-build-cache-plugin/src/schemas/azure-blob-storage-config.schema.json index 835487d5ee1..d471c614172 100644 --- a/rush-plugins/rush-azure-storage-build-cache-plugin/src/schemas/azure-blob-storage-config.schema.json +++ b/rush-plugins/rush-azure-storage-build-cache-plugin/src/schemas/azure-blob-storage-config.schema.json @@ -25,6 +25,12 @@ "enum": ["AzurePublicCloud", "AzureChina", "AzureGermany", "AzureGovernment"] }, + "loginFlow": { + "type": "string", + "description": "The Entra ID login flow to use. Defaults to 'AdoCodespacesAuth' on GitHub Codespaces, 'InteractiveBrowser' otherwise.", + "enum": ["AdoCodespacesAuth", "InteractiveBrowser", "DeviceCode"] + }, + "blobPrefix": { "type": "string", "description": "An optional prefix for cache item blob names." @@ -33,6 +39,11 @@ "isCacheWriteAllowed": { "type": "boolean", "description": "If set to true, allow writing to the cache. Defaults to false." + }, + + "readRequiresAuthentication": { + "type": "boolean", + "description": "If set to true, reading the cache requires authentication. Defaults to false." } } } diff --git a/rush-plugins/rush-azure-storage-build-cache-plugin/src/schemas/azure-interactive-auth.schema.json b/rush-plugins/rush-azure-storage-build-cache-plugin/src/schemas/azure-interactive-auth.schema.json index a733cd9d6e7..130d6a04d6e 100644 --- a/rush-plugins/rush-azure-storage-build-cache-plugin/src/schemas/azure-interactive-auth.schema.json +++ b/rush-plugins/rush-azure-storage-build-cache-plugin/src/schemas/azure-interactive-auth.schema.json @@ -25,6 +25,12 @@ "enum": ["AzurePublicCloud", "AzureChina", "AzureGermany", "AzureGovernment"] }, + "loginFlow": { + "type": "string", + "description": "The Entra ID login flow to use. Defaults to 'AdoCodespacesAuth' on GitHub Codespaces, 'InteractiveBrowser' otherwise.", + "enum": ["AdoCodespacesAuth", "InteractiveBrowser", "DeviceCode"] + }, + "minimumValidityInMinutes": { "type": "number", "description": "If specified and a credential exists that will be valid for at least this many minutes from the time of execution, no action will be taken." diff --git a/rush-plugins/rush-http-build-cache-plugin/package.json b/rush-plugins/rush-http-build-cache-plugin/package.json index 60ba0c01002..31a468f3db3 100644 --- a/rush-plugins/rush-http-build-cache-plugin/package.json +++ b/rush-plugins/rush-http-build-cache-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-http-build-cache-plugin", - "version": "5.138.0", + "version": "5.148.0", "description": "Rush plugin for generic HTTP cloud build cache", "repository": { "type": "git", @@ -21,14 +21,12 @@ "dependencies": { "@rushstack/node-core-library": "workspace:*", "@rushstack/rush-sdk": "workspace:*", - "https-proxy-agent": "~5.0.0", - "node-fetch": "2.6.7" + "https-proxy-agent": "~5.0.0" }, "devDependencies": { "@microsoft/rush-lib": "workspace:*", "@rushstack/heft": "workspace:*", "@rushstack/terminal": "workspace:*", - "local-node-rig": "workspace:*", - "@types/node-fetch": "2.6.2" + "local-node-rig": "workspace:*" } } diff --git a/rush-plugins/rush-http-build-cache-plugin/src/HttpBuildCacheProvider.ts b/rush-plugins/rush-http-build-cache-plugin/src/HttpBuildCacheProvider.ts index 43f39b065c4..4a6368b998d 100644 --- a/rush-plugins/rush-http-build-cache-plugin/src/HttpBuildCacheProvider.ts +++ b/rush-plugins/rush-http-build-cache-plugin/src/HttpBuildCacheProvider.ts @@ -10,7 +10,7 @@ import { type RushSession, EnvironmentConfiguration } from '@rushstack/rush-sdk'; -import fetch, { type BodyInit, type Response } from 'node-fetch'; +import { WebClient, type IWebClientResponse } from '@rushstack/rush-sdk/lib/utilities/WebClient'; import type { SpawnSyncReturns } from 'child_process'; enum CredentialsOptions { @@ -32,13 +32,18 @@ export interface IHttpBuildCacheTokenHandler { args?: string[]; } +/** + * @public + */ +export type UploadMethod = 'PUT' | 'POST' | 'PATCH'; + /** * @public */ export interface IHttpBuildCacheProviderOptions { url: string; tokenHandler?: IHttpBuildCacheTokenHandler; - uploadMethod?: string; + uploadMethod?: UploadMethod; minHttpRetryDelayMs?: number; headers?: Record; cacheKeyPrefix?: string; @@ -56,7 +61,7 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { private readonly _environmentCredential: string | undefined; private readonly _isCacheWriteAllowedByConfiguration: boolean; private readonly _url: URL; - private readonly _uploadMethod: string; + private readonly _uploadMethod: UploadMethod; private readonly _headers: Record; private readonly _cacheKeyPrefix: string; private readonly _tokenHandler: IHttpBuildCacheTokenHandler | undefined; @@ -210,8 +215,8 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { private async _makeHttpRequestAsync(options: { terminal: ITerminal; relUrl: string; - method: string; - body: BodyInit | undefined; + method: 'GET' | UploadMethod; + body: Buffer | undefined; warningText: string; readBody: boolean; maxAttempts: number; @@ -237,11 +242,13 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { terminal.writeDebugLine(`[http-build-cache] request: ${method} ${url} ${bodyLength} bytes`); - const response: Response = await fetch(url, { - method: method, + const webClient: WebClient = new WebClient(); + const response: IWebClientResponse = await webClient.fetchAsync(url, { + verb: method, headers: headers, body: body, - redirect: 'follow' + redirect: 'follow', + timeoutMs: 0 // Use the default timeout }); if (!response.ok) { @@ -279,7 +286,7 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { return false; } - const result: Buffer | boolean = readBody ? Buffer.from(await response.arrayBuffer()) : true; + const result: Buffer | boolean = readBody ? await response.getBufferAsync() : true; terminal.writeDebugLine( `[http-build-cache] actual response: ${response.status} ${url} ${ @@ -342,7 +349,11 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { } } - private _getFailureType(requestMethod: string, response: Response, isRedirect: boolean): FailureType { + private _getFailureType( + requestMethod: string, + response: IWebClientResponse, + isRedirect: boolean + ): FailureType { if (response.ok) { return FailureType.None; } @@ -392,7 +403,7 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { private _reportFailure( terminal: ITerminal, requestMethod: string, - response: Response, + response: IWebClientResponse, isRedirect: boolean, message: string ): void { diff --git a/rush-plugins/rush-http-build-cache-plugin/src/RushHttpBuildCachePlugin.ts b/rush-plugins/rush-http-build-cache-plugin/src/RushHttpBuildCachePlugin.ts index a06a55409c8..c1577afb1f6 100644 --- a/rush-plugins/rush-http-build-cache-plugin/src/RushHttpBuildCachePlugin.ts +++ b/rush-plugins/rush-http-build-cache-plugin/src/RushHttpBuildCachePlugin.ts @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import type { IRushPlugin, RushSession, RushConfiguration } from '@rushstack/rush-sdk'; -import type { IHttpBuildCacheProviderOptions } from './HttpBuildCacheProvider'; +import type { IHttpBuildCacheProviderOptions, UploadMethod } from './HttpBuildCacheProvider'; const PLUGIN_NAME: string = 'HttpBuildCachePlugin'; @@ -18,7 +18,7 @@ export interface IRushHttpBuildCachePluginConfig { /** * The HTTP method to use when writing to the cache (defaults to PUT). */ - uploadMethod?: string; + uploadMethod?: UploadMethod; /** * An optional set of HTTP headers to pass to the cache server. diff --git a/rush-plugins/rush-http-build-cache-plugin/src/index.ts b/rush-plugins/rush-http-build-cache-plugin/src/index.ts index dd9e088bac9..77b82280924 100644 --- a/rush-plugins/rush-http-build-cache-plugin/src/index.ts +++ b/rush-plugins/rush-http-build-cache-plugin/src/index.ts @@ -4,4 +4,4 @@ import { RushHttpBuildCachePlugin } from './RushHttpBuildCachePlugin'; export default RushHttpBuildCachePlugin; -export type { IHttpBuildCacheProviderOptions } from './HttpBuildCacheProvider'; +export type { IHttpBuildCacheProviderOptions, UploadMethod } from './HttpBuildCacheProvider'; diff --git a/rush-plugins/rush-http-build-cache-plugin/src/test/HttpBuildCacheProvider.test.ts b/rush-plugins/rush-http-build-cache-plugin/src/test/HttpBuildCacheProvider.test.ts index fe93acce8c4..463c238d2e6 100644 --- a/rush-plugins/rush-http-build-cache-plugin/src/test/HttpBuildCacheProvider.test.ts +++ b/rush-plugins/rush-http-build-cache-plugin/src/test/HttpBuildCacheProvider.test.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -jest.mock('node-fetch', function () { - return Object.assign(jest.fn(), jest.requireActual('node-fetch')); +jest.mock('@rushstack/rush-sdk/lib/utilities/WebClient', () => { + return jest.requireActual('@microsoft/rush-lib/lib/utilities/WebClient'); }); -import fetch, { Response } from 'node-fetch'; import { type RushSession, EnvironmentConfiguration } from '@rushstack/rush-sdk'; import { StringBufferTerminalProvider, Terminal } from '@rushstack/terminal'; +import { WebClient } from '@rushstack/rush-sdk/lib/utilities/WebClient'; import { HttpBuildCacheProvider, type IHttpBuildCacheProviderOptions } from '../HttpBuildCacheProvider'; @@ -24,13 +24,22 @@ const EXAMPLE_OPTIONS: IHttpBuildCacheProviderOptions = { minHttpRetryDelayMs: 1 }; +type FetchFnType = Parameters[0]; + describe('HttpBuildCacheProvider', () => { let terminalBuffer: StringBufferTerminalProvider; let terminal!: Terminal; + let fetchFn: jest.Mock; beforeEach(() => { terminalBuffer = new StringBufferTerminalProvider(); terminal = new Terminal(terminalBuffer); + fetchFn = jest.fn(); + WebClient.mockRequestFn(fetchFn as unknown as FetchFnType); + }); + + afterEach(() => { + WebClient.resetMockRequestFn(); }); describe('tryGetCacheEntryBufferByIdAsync', () => { @@ -40,22 +49,23 @@ describe('HttpBuildCacheProvider', () => { const session: RushSession = {} as RushSession; const provider = new HttpBuildCacheProvider(EXAMPLE_OPTIONS, session); - mocked(fetch).mockResolvedValue( - new Response('Unauthorized', { - status: 401, - statusText: 'Unauthorized' - }) - ); + mocked(fetchFn).mockResolvedValue({ + status: 401, + statusText: 'Unauthorized', + ok: false + }); const result = await provider.tryGetCacheEntryBufferByIdAsync(terminal, 'some-key'); expect(result).toBe(undefined); - expect(fetch).toHaveBeenCalledTimes(1); - expect(fetch).toHaveBeenNthCalledWith(1, 'https://buildcache.example.acme.com/some-key', { - body: undefined, - headers: {}, - method: 'GET', - redirect: 'follow' - }); + expect(fetchFn).toHaveBeenCalledTimes(1); + expect(fetchFn).toHaveBeenNthCalledWith( + 1, + 'https://buildcache.example.acme.com/some-key', + expect.objectContaining({ + method: 'GET', + redirect: 'follow' + }) + ); expect(terminalBuffer.getWarningOutput()).toMatchInlineSnapshot( `"Error getting cache entry: Error: Credentials for https://buildcache.example.acme.com/ have not been provided.[n]In CI, verify that RUSH_BUILD_CACHE_CREDENTIAL contains a valid Authorization header value.[n][n]For local developers, run:[n][n] rush update-cloud-credentials --interactive[n][n]"` ); @@ -67,46 +77,49 @@ describe('HttpBuildCacheProvider', () => { const session: RushSession = {} as RushSession; const provider = new HttpBuildCacheProvider(EXAMPLE_OPTIONS, session); - mocked(fetch).mockResolvedValueOnce( - new Response('InternalServiceError', { - status: 500, - statusText: 'InternalServiceError' + mocked(fetchFn).mockResolvedValueOnce({ + status: 500, + statusText: 'InternalServiceError', + ok: false + }); + mocked(fetchFn).mockResolvedValueOnce({ + status: 503, + statusText: 'ServiceUnavailable', + ok: false + }); + mocked(fetchFn).mockResolvedValueOnce({ + status: 504, + statusText: 'BadGateway', + ok: false + }); + + const result = await provider.tryGetCacheEntryBufferByIdAsync(terminal, 'some-key'); + expect(result).toBe(undefined); + expect(fetchFn).toHaveBeenCalledTimes(3); + expect(fetchFn).toHaveBeenNthCalledWith( + 1, + 'https://buildcache.example.acme.com/some-key', + expect.objectContaining({ + method: 'GET', + redirect: 'follow' }) ); - mocked(fetch).mockResolvedValueOnce( - new Response('ServiceUnavailable', { - status: 503, - statusText: 'ServiceUnavailable' + expect(fetchFn).toHaveBeenNthCalledWith( + 2, + 'https://buildcache.example.acme.com/some-key', + expect.objectContaining({ + method: 'GET', + redirect: 'follow' }) ); - mocked(fetch).mockResolvedValueOnce( - new Response('BadGateway', { - status: 504, - statusText: 'BadGateway' + expect(fetchFn).toHaveBeenNthCalledWith( + 3, + 'https://buildcache.example.acme.com/some-key', + expect.objectContaining({ + method: 'GET', + redirect: 'follow' }) ); - - const result = await provider.tryGetCacheEntryBufferByIdAsync(terminal, 'some-key'); - expect(result).toBe(undefined); - expect(fetch).toHaveBeenCalledTimes(3); - expect(fetch).toHaveBeenNthCalledWith(1, 'https://buildcache.example.acme.com/some-key', { - body: undefined, - headers: {}, - method: 'GET', - redirect: 'follow' - }); - expect(fetch).toHaveBeenNthCalledWith(2, 'https://buildcache.example.acme.com/some-key', { - body: undefined, - headers: {}, - method: 'GET', - redirect: 'follow' - }); - expect(fetch).toHaveBeenNthCalledWith(3, 'https://buildcache.example.acme.com/some-key', { - body: undefined, - headers: {}, - method: 'GET', - redirect: 'follow' - }); expect(terminalBuffer.getWarningOutput()).toMatchInlineSnapshot( `"Could not get cache entry: HTTP 504: BadGateway[n]"` ); diff --git a/rush-plugins/rush-redis-cobuild-plugin/package.json b/rush-plugins/rush-redis-cobuild-plugin/package.json index 38d1a8c9af3..6c49a20fdbe 100644 --- a/rush-plugins/rush-redis-cobuild-plugin/package.json +++ b/rush-plugins/rush-redis-cobuild-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-redis-cobuild-plugin", - "version": "5.138.0", + "version": "5.148.0", "description": "Rush plugin for Redis cobuild lock", "repository": { "type": "git", diff --git a/rush-plugins/rush-resolver-cache-plugin/package.json b/rush-plugins/rush-resolver-cache-plugin/package.json index 4556d56d305..6ee4dc9fc1e 100644 --- a/rush-plugins/rush-resolver-cache-plugin/package.json +++ b/rush-plugins/rush-resolver-cache-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-resolver-cache-plugin", - "version": "5.138.0", + "version": "5.148.0", "description": "A Rush plugin that generates a resolver cache file after successful install.", "license": "MIT", "repository": { diff --git a/rush-plugins/rush-serve-plugin/package.json b/rush-plugins/rush-serve-plugin/package.json index 47538cc2b5d..e6cb387333f 100644 --- a/rush-plugins/rush-serve-plugin/package.json +++ b/rush-plugins/rush-serve-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-serve-plugin", - "version": "5.138.0", + "version": "5.148.0", "description": "A Rush plugin that hooks into a rush action and serves output folders from all projects in the repository.", "license": "MIT", "repository": { diff --git a/rush-plugins/rush-serve-plugin/src/RushProjectServeConfigFile.ts b/rush-plugins/rush-serve-plugin/src/RushProjectServeConfigFile.ts index 0182025bc19..0126fcd5d30 100644 --- a/rush-plugins/rush-serve-plugin/src/RushProjectServeConfigFile.ts +++ b/rush-plugins/rush-serve-plugin/src/RushProjectServeConfigFile.ts @@ -3,7 +3,7 @@ import path from 'path'; -import { ConfigurationFile, InheritanceType } from '@rushstack/heft-config-file'; +import { ProjectConfigurationFile, InheritanceType } from '@rushstack/heft-config-file'; import { Async } from '@rushstack/node-core-library'; import type { ITerminal } from '@rushstack/terminal'; import { RigConfig } from '@rushstack/rig-package'; @@ -39,10 +39,10 @@ export interface IRoutingRule { } export class RushServeConfiguration { - private readonly _loader: ConfigurationFile; + private readonly _loader: ProjectConfigurationFile; public constructor() { - this._loader = new ConfigurationFile({ + this._loader = new ProjectConfigurationFile({ projectRelativeFilePath: 'config/rush-project-serve.json', jsonSchemaObject: rushProjectServeSchema, propertyInheritance: { diff --git a/rush-plugins/rush-serve-plugin/src/api.types.ts b/rush-plugins/rush-serve-plugin/src/api.types.ts index 40497b4bc7b..7509c7fa50b 100644 --- a/rush-plugins/rush-serve-plugin/src/api.types.ts +++ b/rush-plugins/rush-serve-plugin/src/api.types.ts @@ -44,10 +44,17 @@ export interface IOperationInfo { */ phaseName: string; + /** + * If false, this operation is disabled and will/did not execute during the current run. + * The status will be reported as `Skipped`. + */ + enabled: boolean; + /** * If true, this operation is configured to be silent and is included for completeness. */ silent: boolean; + /** * If true, this operation is configured to be a noop and is included for graph completeness. */ diff --git a/rush-plugins/rush-serve-plugin/src/phasedCommandHandler.ts b/rush-plugins/rush-serve-plugin/src/phasedCommandHandler.ts index 60682d6fb00..162172d325b 100644 --- a/rush-plugins/rush-serve-plugin/src/phasedCommandHandler.ts +++ b/rush-plugins/rush-serve-plugin/src/phasedCommandHandler.ts @@ -325,7 +325,7 @@ function tryEnableBuildStatusWebSocketServer( */ function convertToOperationInfo(record: IOperationExecutionResult): IOperationInfo | undefined { const { operation } = record; - const { name, associatedPhase, associatedProject, runner } = operation; + const { name, associatedPhase, associatedProject, runner, enabled } = operation; if (!name || !associatedPhase || !associatedProject || !runner) { return; @@ -338,7 +338,8 @@ function tryEnableBuildStatusWebSocketServer( packageName, phaseName: associatedPhase.name, - silent: !!runner.silent, + enabled, + silent: record.silent, noop: !!runner.isNoOp, status: readableStatusFromStatus[record.status], diff --git a/rush.json b/rush.json index 3230902fa3e..690690c365f 100644 --- a/rush.json +++ b/rush.json @@ -16,7 +16,7 @@ * path segment in the "$schema" field for all your Rush config files. This will ensure * correct error-underlining and tab-completion for editors such as VS Code. */ - "rushVersion": "5.135.0-pr4927.1", + "rushVersion": "5.147.2", /** * The next field selects which package manager should be installed and determines its version. @@ -42,7 +42,7 @@ * LTS schedule: https://nodejs.org/en/about/releases/ * LTS versions: https://nodejs.org/en/download/releases/ */ - "nodeSupportedVersionRange": ">=18.15.0 <19.0.0 || >=20.9.0 <21.0.0", + "nodeSupportedVersionRange": ">=18.15.0 <19.0.0 || >=20.9.0 <21.0.0 || >=22.12.0 <23.0.0", /** * If the version check above fails, Rush will display a message showing the current @@ -65,6 +65,13 @@ */ // "suppressNodeLtsWarning": false, + /** + * Rush normally prints a warning if it detects that the current version is not one published to the + * public npmjs.org registry. If you need to block calls to the npm registry, you can use this setting to disable + * Rush's check. + */ + // "suppressRushIsPublicVersionCheck": false, + /** * Large monorepos can become intimidating for newcomers if project folder paths don't follow * a consistent and recognizable pattern. When the system allows nested folder trees, @@ -183,7 +190,7 @@ // "changeLogUpdateCommitMessage": "Update changelogs [skip ci]", /** - * The commit message to use when commiting changefiles during 'rush change --commit' + * The commit message to use when committing changefiles during 'rush change --commit' * * If no commit message is set it will default to 'Rush change' */ @@ -258,6 +265,37 @@ "postRushx": [] }, + /** + * Installation variants allow you to maintain a parallel set of configuration files that can be + * used to build the entire monorepo with an alternate set of dependencies. For example, suppose + * you upgrade all your projects to use a new release of an important framework, but during a transition period + * you intend to maintain compatibility with the old release. In this situation, you probably want your + * CI validation to build the entire repo twice: once with the old release, and once with the new release. + * + * Rush "installation variants" correspond to sets of config files located under this folder: + * + * common/config/rush/variants/ + * + * The variant folder can contain an alternate common-versions.json file. Its "preferredVersions" field can be used + * to select older versions of dependencies (within a loose SemVer range specified in your package.json files). + * To install a variant, run "rush install --variant ". + * + * For more details and instructions, see this article: https://rushjs.io/pages/advanced/installation_variants/ + */ + "variants": [ + // { + // /** + // * The folder name for this variant. + // */ + // "variantName": "old-sdk", + // + // /** + // * An informative description + // */ + // "description": "Build this repo using the previous release of the SDK" + // } + ], + /** * Rush can collect anonymous telemetry about everyday developer activity such as * success/failure of installs, builds, and other operations. You can use this to identify diff --git a/vscode-extensions/rush-vscode-command-webview/src/ParameterView/ParameterForm/index.tsx b/vscode-extensions/rush-vscode-command-webview/src/ParameterView/ParameterForm/index.tsx index d1ed08e0544..506151b94a1 100644 --- a/vscode-extensions/rush-vscode-command-webview/src/ParameterView/ParameterForm/index.tsx +++ b/vscode-extensions/rush-vscode-command-webview/src/ParameterView/ParameterForm/index.tsx @@ -173,32 +173,33 @@ export const ParameterForm = (): JSX.Element => { switch (parameter.kind) { case CommandLineParameterKind.Choice: { - const commandLineChoiceParameter: CommandLineChoiceParameter = + const { alternatives, defaultValue }: CommandLineChoiceParameter = parameter as CommandLineChoiceParameter; + const options: { key: string; text: string }[] = []; + for (const alternative of alternatives) { + options.push({ + key: alternative, + text: alternative + }); + } + fieldNode = ( - ({ - key: alternative, - text: alternative - }))} - /> + ); break; } case CommandLineParameterKind.ChoiceList: { - const commandLineChoiceListParameter: CommandLineChoiceListParameter = + const { alternatives }: CommandLineChoiceListParameter = parameter as CommandLineChoiceListParameter; + const options: { key: string; text: string }[] = []; + for (const alternative of alternatives) { + options.push({ + key: alternative, + text: alternative + }); + } fieldNode = ( - ({ - key: alternative, - text: alternative - }))} - /> + ); break; } diff --git a/webpack/hashed-folder-copy-plugin/CHANGELOG.json b/webpack/hashed-folder-copy-plugin/CHANGELOG.json index 89919a11433..994382ea13b 100644 --- a/webpack/hashed-folder-copy-plugin/CHANGELOG.json +++ b/webpack/hashed-folder-copy-plugin/CHANGELOG.json @@ -1,6 +1,174 @@ { "name": "@rushstack/hashed-folder-copy-plugin", "entries": [ + { + "version": "1.0.74", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.74", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "1.0.73", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.73", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "1.0.72", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.72", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "1.0.71", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.71", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "1.0.70", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.70", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "1.0.69", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.69", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "1.0.68", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.68", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "1.0.67", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.67", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "1.0.66", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.66", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "1.0.65", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.65", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "1.0.64", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.64", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "1.0.63", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.63", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "1.0.62", + "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.62", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "1.0.61", "tag": "@rushstack/hashed-folder-copy-plugin_v1.0.61", diff --git a/webpack/hashed-folder-copy-plugin/CHANGELOG.md b/webpack/hashed-folder-copy-plugin/CHANGELOG.md index c608a3785fc..635f2b84b5c 100644 --- a/webpack/hashed-folder-copy-plugin/CHANGELOG.md +++ b/webpack/hashed-folder-copy-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/hashed-folder-copy-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 1.0.74 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 1.0.73 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 1.0.72 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 1.0.71 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 1.0.70 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 1.0.69 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 1.0.68 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 1.0.67 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 1.0.66 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 1.0.65 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 1.0.64 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 1.0.63 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 1.0.62 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 1.0.61 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/webpack/hashed-folder-copy-plugin/package.json b/webpack/hashed-folder-copy-plugin/package.json index 4b0e598af5e..89abf5d84a4 100644 --- a/webpack/hashed-folder-copy-plugin/package.json +++ b/webpack/hashed-folder-copy-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/hashed-folder-copy-plugin", - "version": "1.0.61", + "version": "1.0.74", "description": "Webpack plugin for copying a folder to the output directory with a hash in the folder name.", "typings": "dist/hashed-folder-copy-plugin.d.ts", "main": "lib/index.js", diff --git a/webpack/loader-load-themed-styles/CHANGELOG.json b/webpack/loader-load-themed-styles/CHANGELOG.json index 1b42a400206..bcb967a341f 100644 --- a/webpack/loader-load-themed-styles/CHANGELOG.json +++ b/webpack/loader-load-themed-styles/CHANGELOG.json @@ -1,6 +1,240 @@ { "name": "@microsoft/loader-load-themed-styles", "entries": [ + { + "version": "2.1.82", + "tag": "@microsoft/loader-load-themed-styles_v2.1.82", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.158`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.157` to `2.0.158`" + } + ] + } + }, + { + "version": "2.1.81", + "tag": "@microsoft/loader-load-themed-styles_v2.1.81", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.157`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.156` to `2.0.157`" + } + ] + } + }, + { + "version": "2.1.80", + "tag": "@microsoft/loader-load-themed-styles_v2.1.80", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.156`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.155` to `2.0.156`" + } + ] + } + }, + { + "version": "2.1.79", + "tag": "@microsoft/loader-load-themed-styles_v2.1.79", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.155`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.154` to `2.0.155`" + } + ] + } + }, + { + "version": "2.1.78", + "tag": "@microsoft/loader-load-themed-styles_v2.1.78", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.154`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.153` to `2.0.154`" + } + ] + } + }, + { + "version": "2.1.77", + "tag": "@microsoft/loader-load-themed-styles_v2.1.77", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.153`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.152` to `2.0.153`" + } + ] + } + }, + { + "version": "2.1.76", + "tag": "@microsoft/loader-load-themed-styles_v2.1.76", + "date": "Tue, 03 Dec 2024 16:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.152`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.151` to `2.0.152`" + } + ] + } + }, + { + "version": "2.1.75", + "tag": "@microsoft/loader-load-themed-styles_v2.1.75", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.151`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.150` to `2.0.151`" + } + ] + } + }, + { + "version": "2.1.74", + "tag": "@microsoft/loader-load-themed-styles_v2.1.74", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.150`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.149` to `2.0.150`" + } + ] + } + }, + { + "version": "2.1.73", + "tag": "@microsoft/loader-load-themed-styles_v2.1.73", + "date": "Thu, 24 Oct 2024 00:15:47 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.149`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.148` to `2.0.149`" + } + ] + } + }, + { + "version": "2.1.72", + "tag": "@microsoft/loader-load-themed-styles_v2.1.72", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.148`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.147` to `2.0.148`" + } + ] + } + }, + { + "version": "2.1.71", + "tag": "@microsoft/loader-load-themed-styles_v2.1.71", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.147`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.146` to `2.0.147`" + } + ] + } + }, + { + "version": "2.1.70", + "tag": "@microsoft/loader-load-themed-styles_v2.1.70", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.146`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.145` to `2.0.146`" + } + ] + } + }, { "version": "2.1.69", "tag": "@microsoft/loader-load-themed-styles_v2.1.69", diff --git a/webpack/loader-load-themed-styles/CHANGELOG.md b/webpack/loader-load-themed-styles/CHANGELOG.md index c93c5a51a0b..4360ebb3e8e 100644 --- a/webpack/loader-load-themed-styles/CHANGELOG.md +++ b/webpack/loader-load-themed-styles/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @microsoft/loader-load-themed-styles -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 2.1.82 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 2.1.81 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 2.1.80 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 2.1.79 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 2.1.78 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 2.1.77 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 2.1.76 +Tue, 03 Dec 2024 16:11:07 GMT + +_Version update only_ + +## 2.1.75 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 2.1.74 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 2.1.73 +Thu, 24 Oct 2024 00:15:47 GMT + +_Version update only_ + +## 2.1.72 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 2.1.71 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 2.1.70 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 2.1.69 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/webpack/loader-load-themed-styles/package.json b/webpack/loader-load-themed-styles/package.json index d4dda303647..258fe02d633 100644 --- a/webpack/loader-load-themed-styles/package.json +++ b/webpack/loader-load-themed-styles/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/loader-load-themed-styles", - "version": "2.1.69", + "version": "2.1.82", "description": "This simple loader wraps the loading of CSS in script equivalent to `require('load-themed-styles').loadStyles( /* css text */ )`. It is designed to be a replacement for style-loader.", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -22,7 +22,7 @@ }, "peerDependencies": { "@types/webpack": "^4", - "@microsoft/load-themed-styles": "^2.0.145" + "@microsoft/load-themed-styles": "^2.0.158" }, "dependencies": { "loader-utils": "1.4.2" diff --git a/webpack/loader-raw-script/CHANGELOG.json b/webpack/loader-raw-script/CHANGELOG.json index 447528987e2..30f54a204b4 100644 --- a/webpack/loader-raw-script/CHANGELOG.json +++ b/webpack/loader-raw-script/CHANGELOG.json @@ -1,6 +1,162 @@ { "name": "@rushstack/loader-raw-script", "entries": [ + { + "version": "1.4.82", + "tag": "@rushstack/loader-raw-script_v1.4.82", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "1.4.81", + "tag": "@rushstack/loader-raw-script_v1.4.81", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "1.4.80", + "tag": "@rushstack/loader-raw-script_v1.4.80", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "1.4.79", + "tag": "@rushstack/loader-raw-script_v1.4.79", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "1.4.78", + "tag": "@rushstack/loader-raw-script_v1.4.78", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "1.4.77", + "tag": "@rushstack/loader-raw-script_v1.4.77", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "1.4.76", + "tag": "@rushstack/loader-raw-script_v1.4.76", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "1.4.75", + "tag": "@rushstack/loader-raw-script_v1.4.75", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "1.4.74", + "tag": "@rushstack/loader-raw-script_v1.4.74", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "1.4.73", + "tag": "@rushstack/loader-raw-script_v1.4.73", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "1.4.72", + "tag": "@rushstack/loader-raw-script_v1.4.72", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "1.4.71", + "tag": "@rushstack/loader-raw-script_v1.4.71", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "1.4.70", + "tag": "@rushstack/loader-raw-script_v1.4.70", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "1.4.69", "tag": "@rushstack/loader-raw-script_v1.4.69", diff --git a/webpack/loader-raw-script/CHANGELOG.md b/webpack/loader-raw-script/CHANGELOG.md index 34d0add5718..94f3862622b 100644 --- a/webpack/loader-raw-script/CHANGELOG.md +++ b/webpack/loader-raw-script/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/loader-raw-script -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 1.4.82 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 1.4.81 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 1.4.80 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 1.4.79 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 1.4.78 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 1.4.77 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 1.4.76 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 1.4.75 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 1.4.74 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 1.4.73 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 1.4.72 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 1.4.71 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 1.4.70 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 1.4.69 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/webpack/loader-raw-script/package.json b/webpack/loader-raw-script/package.json index 33178f6c800..ed9b4a59786 100644 --- a/webpack/loader-raw-script/package.json +++ b/webpack/loader-raw-script/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/loader-raw-script", - "version": "1.4.69", + "version": "1.4.82", "description": "", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/webpack/preserve-dynamic-require-plugin/CHANGELOG.json b/webpack/preserve-dynamic-require-plugin/CHANGELOG.json index e7f3faad3a5..f79f24d222c 100644 --- a/webpack/preserve-dynamic-require-plugin/CHANGELOG.json +++ b/webpack/preserve-dynamic-require-plugin/CHANGELOG.json @@ -1,6 +1,162 @@ { "name": "@rushstack/webpack-preserve-dynamic-require-plugin", "entries": [ + { + "version": "0.11.82", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.82", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.11.81", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.81", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.11.80", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.80", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.11.79", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.79", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.11.78", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.78", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.11.77", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.77", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.11.76", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.76", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.11.75", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.75", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.11.74", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.74", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.11.73", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.73", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.11.72", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.72", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.11.71", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.71", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.11.70", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.70", + "date": "Tue, 15 Oct 2024 00:12:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.11.69", "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.11.69", diff --git a/webpack/preserve-dynamic-require-plugin/CHANGELOG.md b/webpack/preserve-dynamic-require-plugin/CHANGELOG.md index c74ebd9e72e..470ef740dba 100644 --- a/webpack/preserve-dynamic-require-plugin/CHANGELOG.md +++ b/webpack/preserve-dynamic-require-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/webpack-preserve-dynamic-require-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.11.82 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.11.81 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.11.80 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.11.79 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.11.78 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.11.77 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.11.76 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.11.75 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.11.74 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.11.73 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.11.72 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.11.71 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.11.70 +Tue, 15 Oct 2024 00:12:32 GMT + +_Version update only_ ## 0.11.69 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/webpack/preserve-dynamic-require-plugin/package.json b/webpack/preserve-dynamic-require-plugin/package.json index 69dee4175e9..5d881277784 100644 --- a/webpack/preserve-dynamic-require-plugin/package.json +++ b/webpack/preserve-dynamic-require-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack-preserve-dynamic-require-plugin", - "version": "0.11.69", + "version": "0.11.82", "description": "This plugin tells webpack to leave dynamic calls to \"require\" as-is instead of trying to bundle them.", "main": "lib/index.js", "typings": "dist/webpack-preserve-dynamic-require-plugin.d.ts", diff --git a/webpack/set-webpack-public-path-plugin/CHANGELOG.json b/webpack/set-webpack-public-path-plugin/CHANGELOG.json index 96f7fe007a3..75c04ddac8a 100644 --- a/webpack/set-webpack-public-path-plugin/CHANGELOG.json +++ b/webpack/set-webpack-public-path-plugin/CHANGELOG.json @@ -1,6 +1,213 @@ { "name": "@rushstack/set-webpack-public-path-plugin", "entries": [ + { + "version": "5.1.66", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.66", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.66`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "5.1.65", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.65", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.65`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "5.1.64", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.64", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.64`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "5.1.63", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.63", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.63`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "5.1.62", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.62", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.62`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "5.1.61", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.61", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.61`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "5.1.60", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.60", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.60`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "5.1.59", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.59", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.59`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "5.1.58", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.58", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.58`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "5.1.57", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.57", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.57`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "5.1.56", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.56", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.56`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "5.1.55", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.55", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.55`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "5.1.54", + "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.54", + "date": "Tue, 15 Oct 2024 00:12:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.54`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "5.1.53", "tag": "@rushstack/set-webpack-public-path-plugin_v5.1.53", diff --git a/webpack/set-webpack-public-path-plugin/CHANGELOG.md b/webpack/set-webpack-public-path-plugin/CHANGELOG.md index 83fadfdbf14..79ffc6a6bd8 100644 --- a/webpack/set-webpack-public-path-plugin/CHANGELOG.md +++ b/webpack/set-webpack-public-path-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/set-webpack-public-path-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 5.1.66 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 5.1.65 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 5.1.64 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 5.1.63 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 5.1.62 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 5.1.61 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 5.1.60 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 5.1.59 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 5.1.58 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 5.1.57 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 5.1.56 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 5.1.55 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 5.1.54 +Tue, 15 Oct 2024 00:12:32 GMT + +_Version update only_ ## 5.1.53 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/webpack/set-webpack-public-path-plugin/package.json b/webpack/set-webpack-public-path-plugin/package.json index 1a604e32d7a..79eb9eca660 100644 --- a/webpack/set-webpack-public-path-plugin/package.json +++ b/webpack/set-webpack-public-path-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/set-webpack-public-path-plugin", - "version": "5.1.53", + "version": "5.1.66", "description": "This plugin sets the webpack public path at runtime.", "main": "lib/index.js", "typings": "dist/set-webpack-public-path-plugin.d.ts", diff --git a/webpack/webpack-deep-imports-plugin/src/DeepImportsPlugin.ts b/webpack/webpack-deep-imports-plugin/src/DeepImportsPlugin.ts index 223bc40b9d9..548e6977dcb 100644 --- a/webpack/webpack-deep-imports-plugin/src/DeepImportsPlugin.ts +++ b/webpack/webpack-deep-imports-plugin/src/DeepImportsPlugin.ts @@ -144,6 +144,7 @@ export class DeepImportsPlugin extends DllPlugin { interface ILibModuleDescriptor { libPathWithoutExtension: string; moduleId: string | number | null; + secondaryChunkId: string | undefined; } const pathsToIgnoreWithoutExtension: Set = this._pathsToIgnoreWithoutExtensions; @@ -152,8 +153,8 @@ export class DeepImportsPlugin extends DllPlugin { const encounteredLibPaths: Set = new Set(); for (const runtimeChunk of runtimeChunks) { const libModules: ILibModuleDescriptor[] = []; - for (const initialChunk of runtimeChunk.getAllInitialChunks()) { - for (const runtimeChunkModule of compilation.chunkGraph.getChunkModules(initialChunk)) { + function processChunks(chunk: Chunk, secondaryChunkId: string | undefined): void { + for (const runtimeChunkModule of compilation.chunkGraph.getChunkModules(chunk)) { if (runtimeChunkModule.type === 'javascript/auto') { const modulePath: string | undefined = (runtimeChunkModule as NormalModule)?.resource; if (modulePath?.startsWith(resolvedLibInFolder) && modulePath.endsWith(JS_EXTENSION)) { @@ -166,7 +167,8 @@ export class DeepImportsPlugin extends DllPlugin { if (!encounteredLibPaths.has(relativePathWithoutExtension)) { libModules.push({ libPathWithoutExtension: relativePathWithoutExtension, - moduleId: compilation.chunkGraph.getModuleId(runtimeChunkModule) + moduleId: compilation.chunkGraph.getModuleId(runtimeChunkModule), + secondaryChunkId }); encounteredLibPaths.add(relativePathWithoutExtension); @@ -177,6 +179,16 @@ export class DeepImportsPlugin extends DllPlugin { } } + for (const initialChunk of runtimeChunk.getAllInitialChunks()) { + processChunks(initialChunk, undefined); + } + + for (const secondaryChunk of runtimeChunk.getAllAsyncChunks()) { + if (secondaryChunk.id) { + processChunks(secondaryChunk, String(secondaryChunk.id)); + } + } + libModulesByChunk.set(runtimeChunk, libModules); } @@ -219,12 +231,22 @@ export class DeepImportsPlugin extends DllPlugin { await Async.forEachAsync( libModules, - async ({ libPathWithoutExtension, moduleId }) => { + async ({ libPathWithoutExtension, moduleId, secondaryChunkId }) => { const depth: number = countSlashes(libPathWithoutExtension); const requirePath: string = '../'.repeat(depth) + libOutFolderRelativeOutputPath; - const moduleText: string = [ - `module.exports = require(${JSON.stringify(requirePath)})(${JSON.stringify(moduleId)});` - ].join('\n'); + let moduleText: string; + if (secondaryChunkId) { + moduleText = [ + `const runtimeChunkRequire = require(${JSON.stringify(requirePath)});`, + `// Ensure the chunk containing the module is loaded`, + `runtimeChunkRequire.f.require(${JSON.stringify(secondaryChunkId)});`, + `module.exports = runtimeChunkRequire(${JSON.stringify(moduleId)});` + ].join('\n'); + } else { + moduleText = [ + `module.exports = require(${JSON.stringify(requirePath)})(${JSON.stringify(moduleId)});` + ].join('\n'); + } compilation.emitAsset( `${outputPathRelativeLibOutFolder}/${libPathWithoutExtension}${JS_EXTENSION}`, diff --git a/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.json b/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.json index 17724cec8a2..9170ef66bba 100644 --- a/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.json +++ b/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.json @@ -1,6 +1,213 @@ { "name": "@rushstack/webpack-embedded-dependencies-plugin", "entries": [ + { + "version": "0.2.83", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.83", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.66`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.2.82", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.82", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.65`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.2.81", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.81", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.64`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.2.80", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.80", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.63`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.2.79", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.79", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.62`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.2.78", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.78", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.61`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.2.77", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.77", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.60`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.2.76", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.76", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.59`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.2.75", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.75", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.58`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.2.74", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.74", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.57`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.2.73", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.73", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.56`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.2.72", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.72", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.55`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.2.71", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.71", + "date": "Tue, 15 Oct 2024 00:12:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.4.54`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.2.70", "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.2.70", diff --git a/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.md b/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.md index e0da8bc67d3..f9f94d0f63d 100644 --- a/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.md +++ b/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/webpack-embedded-dependencies-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.2.83 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.2.82 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.2.81 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.2.80 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.2.79 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.2.78 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.2.77 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.2.76 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.2.75 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.2.74 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.2.73 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.2.72 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.2.71 +Tue, 15 Oct 2024 00:12:32 GMT + +_Version update only_ ## 0.2.70 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/webpack/webpack-embedded-dependencies-plugin/package.json b/webpack/webpack-embedded-dependencies-plugin/package.json index d87f838cd6e..27919486237 100644 --- a/webpack/webpack-embedded-dependencies-plugin/package.json +++ b/webpack/webpack-embedded-dependencies-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack-embedded-dependencies-plugin", - "version": "0.2.70", + "version": "0.2.83", "description": "This plugin analyzes bundled dependencies from Node Modules for use with Component Governance and License Scanning.", "main": "lib/index.js", "typings": "dist/webpack-embedded-dependencies-plugin.d.ts", diff --git a/webpack/webpack-plugin-utilities/CHANGELOG.json b/webpack/webpack-plugin-utilities/CHANGELOG.json index a501357e737..2afc9e12f10 100644 --- a/webpack/webpack-plugin-utilities/CHANGELOG.json +++ b/webpack/webpack-plugin-utilities/CHANGELOG.json @@ -1,6 +1,162 @@ { "name": "@rushstack/webpack-plugin-utilities", "entries": [ + { + "version": "0.4.66", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.66", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.4.65", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.65", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.4.64", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.64", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.4.63", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.63", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.4.62", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.62", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.4.61", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.61", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.4.60", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.60", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.4.59", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.59", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.4.58", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.58", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.4.57", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.57", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.4.56", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.56", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.4.55", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.55", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.4.54", + "tag": "@rushstack/webpack-plugin-utilities_v0.4.54", + "date": "Tue, 15 Oct 2024 00:12:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.4.53", "tag": "@rushstack/webpack-plugin-utilities_v0.4.53", diff --git a/webpack/webpack-plugin-utilities/CHANGELOG.md b/webpack/webpack-plugin-utilities/CHANGELOG.md index 8eba16df05f..7a580bfd722 100644 --- a/webpack/webpack-plugin-utilities/CHANGELOG.md +++ b/webpack/webpack-plugin-utilities/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/webpack-plugin-utilities -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.4.66 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.4.65 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.4.64 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.4.63 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.4.62 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.4.61 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.4.60 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.4.59 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.4.58 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.4.57 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.4.56 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.4.55 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.4.54 +Tue, 15 Oct 2024 00:12:32 GMT + +_Version update only_ ## 0.4.53 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/webpack/webpack-plugin-utilities/package.json b/webpack/webpack-plugin-utilities/package.json index 2f40f250776..cbe83908efe 100644 --- a/webpack/webpack-plugin-utilities/package.json +++ b/webpack/webpack-plugin-utilities/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack-plugin-utilities", - "version": "0.4.53", + "version": "0.4.66", "description": "This plugin sets the webpack public path at runtime.", "main": "lib/index.js", "typings": "dist/webpack-plugin-utilities.d.ts", diff --git a/webpack/webpack-workspace-resolve-plugin/CHANGELOG.json b/webpack/webpack-workspace-resolve-plugin/CHANGELOG.json index 29d308c5206..8837fb5ec1b 100644 --- a/webpack/webpack-workspace-resolve-plugin/CHANGELOG.json +++ b/webpack/webpack-workspace-resolve-plugin/CHANGELOG.json @@ -1,6 +1,242 @@ { "name": "@rushstack/webpack-workspace-resolve-plugin", "entries": [ + { + "version": "0.4.2", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.4.2", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.5.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.4.1", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.4.1", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.5.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.4.0", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.4.0", + "date": "Tue, 14 Jan 2025 01:11:21 GMT", + "comments": { + "minor": [ + { + "comment": "(BREAKING CHANGE) Switch constructor to an options object. Add option to specify which webpack resolvers to apply the plugin to. Improve performance by using an object literal instead of the spread operator when updating the resolve request. Upgrade compilation target to not polyfill optional chaining." + } + ] + } + }, + { + "version": "0.3.20", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.20", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.5.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.3.19", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.19", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.5.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.3.18", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.18", + "date": "Wed, 18 Dec 2024 01:11:33 GMT", + "comments": { + "patch": [ + { + "comment": "Fix a bug with path handling on Windows. Tap hooks earlier to ensure that these plugins run before builtin behavior." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.5.0`" + } + ] + } + }, + { + "version": "0.3.17", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.17", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.4.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.3.16", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.16", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.4.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.3.15", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.15", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.4.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.3.14", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.14", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.4.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.3.13", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.13", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.4.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.3.12", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.12", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.4.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.3.11", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.11", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.4.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.3.10", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.10", + "date": "Thu, 17 Oct 2024 20:25:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.4.0`" + } + ] + } + }, + { + "version": "0.3.9", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.9", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.3.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.3.8", + "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.8", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/lookup-by-path\" to `0.3.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.3.7", "tag": "@rushstack/webpack-workspace-resolve-plugin_v0.3.7", diff --git a/webpack/webpack-workspace-resolve-plugin/CHANGELOG.md b/webpack/webpack-workspace-resolve-plugin/CHANGELOG.md index e35cea331a9..c90fddc6f19 100644 --- a/webpack/webpack-workspace-resolve-plugin/CHANGELOG.md +++ b/webpack/webpack-workspace-resolve-plugin/CHANGELOG.md @@ -1,6 +1,90 @@ # Change Log - @rushstack/webpack-workspace-resolve-plugin -This log was last generated on Thu, 03 Oct 2024 15:11:00 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.4.2 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.4.1 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.4.0 +Tue, 14 Jan 2025 01:11:21 GMT + +### Minor changes + +- (BREAKING CHANGE) Switch constructor to an options object. Add option to specify which webpack resolvers to apply the plugin to. Improve performance by using an object literal instead of the spread operator when updating the resolve request. Upgrade compilation target to not polyfill optional chaining. + +## 0.3.20 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.3.19 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.3.18 +Wed, 18 Dec 2024 01:11:33 GMT + +### Patches + +- Fix a bug with path handling on Windows. Tap hooks earlier to ensure that these plugins run before builtin behavior. + +## 0.3.17 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.3.16 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.3.15 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.3.14 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.3.13 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.3.12 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.3.11 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.3.10 +Thu, 17 Oct 2024 20:25:42 GMT + +_Version update only_ + +## 0.3.9 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.3.8 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.3.7 Thu, 03 Oct 2024 15:11:00 GMT diff --git a/webpack/webpack-workspace-resolve-plugin/package.json b/webpack/webpack-workspace-resolve-plugin/package.json index a29f05ea6d3..16bc6d18a82 100644 --- a/webpack/webpack-workspace-resolve-plugin/package.json +++ b/webpack/webpack-workspace-resolve-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack-workspace-resolve-plugin", - "version": "0.3.7", + "version": "0.4.2", "description": "This plugin leverages workspace-level metadata to greatly accelerate module resolution.", "main": "lib/index.js", "typings": "dist/webpack-workspace-resolve-plugin.d.ts", diff --git a/webpack/webpack-workspace-resolve-plugin/src/KnownDescriptionFilePlugin.ts b/webpack/webpack-workspace-resolve-plugin/src/KnownDescriptionFilePlugin.ts index 3c3eb6a5bc0..9fd920cb6a0 100644 --- a/webpack/webpack-workspace-resolve-plugin/src/KnownDescriptionFilePlugin.ts +++ b/webpack/webpack-workspace-resolve-plugin/src/KnownDescriptionFilePlugin.ts @@ -96,12 +96,27 @@ export class KnownDescriptionFilePlugin { // Store the resolver context since a WeakMap lookup is cheaper than walking the tree again contextForPackage.set(descriptionFileData, match); + // Using the object literal is an order of magnitude faster, at least on node 18.19.1 const obj: ResolveRequest = { - ...request, - descriptionFileRoot, + path: request.path, + context: request.context, descriptionFilePath, + descriptionFileRoot, descriptionFileData, - relativePath + relativePath, + ignoreSymlinks: request.ignoreSymlinks, + fullySpecified: request.fullySpecified, + __innerRequest: request.__innerRequest, + __innerRequest_request: request.__innerRequest_request, + __innerRequest_relativePath: request.__innerRequest_relativePath, + + request: request.request, + query: request.query, + fragment: request.fragment, + module: request.module, + directory: request.directory, + file: request.file, + internal: request.internal }; // Delegate to the resolver step at `target`. diff --git a/webpack/webpack-workspace-resolve-plugin/src/KnownPackageDependenciesPlugin.ts b/webpack/webpack-workspace-resolve-plugin/src/KnownPackageDependenciesPlugin.ts index 041d15751f0..cfbf33abd5c 100644 --- a/webpack/webpack-workspace-resolve-plugin/src/KnownPackageDependenciesPlugin.ts +++ b/webpack/webpack-workspace-resolve-plugin/src/KnownPackageDependenciesPlugin.ts @@ -56,7 +56,11 @@ export class KnownPackageDependenciesPlugin { let scope: IPrefixMatch | undefined = cache.contextForPackage.get(descriptionFileData); if (!scope) { - return callback(new Error(`Expected context for ${request.descriptionFileRoot}`)); + scope = cache.contextLookup.findLongestPrefixMatch(path); + if (!scope) { + return callback(new Error(`Expected context for ${request.descriptionFileRoot}`)); + } + cache.contextForPackage.set(descriptionFileData, scope); } let dependency: IPrefixMatch | undefined; @@ -76,16 +80,25 @@ export class KnownPackageDependenciesPlugin { (remainingPath.length > 1 && cache.normalizeToSlash?.(remainingPath)) || remainingPath; const { descriptionFileRoot } = dependency.value; const obj: ResolveRequest = { - ...request, path: descriptionFileRoot, + context: request.context, + descriptionFilePath: `${descriptionFileRoot}${cache.resolverPathSeparator}package.json`, descriptionFileRoot, descriptionFileData: undefined, - descriptionFilePath: `${descriptionFileRoot}${cache.resolverPathSeparator}package.json`, + relativePath, + ignoreSymlinks: request.ignoreSymlinks, + fullySpecified, + __innerRequest: request.__innerRequest, + __innerRequest_request: request.__innerRequest_request, + __innerRequest_relativePath: request.__innerRequest_relativePath, - relativePath: relativePath, request: relativePath, - fullySpecified, - module: false + query: request.query, + fragment: request.fragment, + module: false, + directory: request.directory, + file: request.file, + internal: request.internal }; // eslint-disable-next-line @rushstack/no-new-null resolver.doResolve(target, obj, null, resolveContext, callback); diff --git a/webpack/webpack-workspace-resolve-plugin/src/WorkspaceLayoutCache.ts b/webpack/webpack-workspace-resolve-plugin/src/WorkspaceLayoutCache.ts index 166099f7e41..0f2d988b634 100644 --- a/webpack/webpack-workspace-resolve-plugin/src/WorkspaceLayoutCache.ts +++ b/webpack/webpack-workspace-resolve-plugin/src/WorkspaceLayoutCache.ts @@ -150,9 +150,8 @@ export class WorkspaceLayoutCache { public get descriptionFileRoot(): string { if (!this._descriptionFileRoot) { - this._descriptionFileRoot = `${basePath}${ - normalizeToPlatform?.(this._serialized.root) ?? this._serialized.root - }`; + const merged: string = `${basePath}${this._serialized.root}`; + this._descriptionFileRoot = normalizeToPlatform?.(merged) ?? merged; } return this._descriptionFileRoot; } @@ -183,8 +182,14 @@ export class WorkspaceLayoutCache { const resolveContext: ResolveContext = new ResolveContext(serialized); resolveContexts.push(resolveContext); - const descriptionFileRoot: string = resolveContext.descriptionFileRoot; - contextLookup.setItem(descriptionFileRoot, resolveContext); + contextLookup.setItemFromSegments( + concat( + // All paths in the cache file are platform-agnostic + LookupByPath.iteratePathSegments(basePath, '/'), + LookupByPath.iteratePathSegments(serialized.root, '/') + ), + resolveContext + ); // Handle nested package.json files. These may modify some properties, but the dependency resolution // will match the original package root. Typically these are used to set the `type` field to `module`. @@ -192,9 +197,11 @@ export class WorkspaceLayoutCache { for (const file of serialized.dirInfoFiles) { contextLookup.setItemFromSegments( concat( - // Root is normalized to platform slashes - LookupByPath.iteratePathSegments(descriptionFileRoot, resolverPathSeparator), - // Subpaths are platform-agnostic + // All paths in the cache file are platform-agnostic + concat( + LookupByPath.iteratePathSegments(basePath, '/'), + LookupByPath.iteratePathSegments(serialized.root, '/') + ), LookupByPath.iteratePathSegments(file, '/') ), resolveContext diff --git a/webpack/webpack-workspace-resolve-plugin/src/WorkspaceResolvePlugin.ts b/webpack/webpack-workspace-resolve-plugin/src/WorkspaceResolvePlugin.ts index 432a736216c..a68a97aa5db 100644 --- a/webpack/webpack-workspace-resolve-plugin/src/WorkspaceResolvePlugin.ts +++ b/webpack/webpack-workspace-resolve-plugin/src/WorkspaceResolvePlugin.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import type { WebpackPluginInstance, Compiler } from 'webpack'; +import type { WebpackPluginInstance, Compiler, ResolveOptions } from 'webpack'; import type { WorkspaceLayoutCache } from './WorkspaceLayoutCache'; import { KnownDescriptionFilePlugin } from './KnownDescriptionFilePlugin'; @@ -17,6 +17,12 @@ export interface IWorkspaceResolvePluginOptions { * The cache of workspace layout information. */ cache: WorkspaceLayoutCache; + + /** + * Which webpack resolvers to apply the plugin to. + * @defaultValue ['normal', 'context', 'loader'] + */ + resolverNames?: Iterable; } /** @@ -26,43 +32,53 @@ export interface IWorkspaceResolvePluginOptions { */ export class WorkspaceResolvePlugin implements WebpackPluginInstance { private readonly _cache: WorkspaceLayoutCache; + private readonly _resolverNames: Set; - public constructor(cache: WorkspaceLayoutCache) { - this._cache = cache; + public constructor(options: IWorkspaceResolvePluginOptions) { + this._cache = options.cache; + this._resolverNames = new Set(options.resolverNames ?? ['normal', 'context', 'loader']); } public apply(compiler: Compiler): void { - compiler.resolverFactory.hooks.resolveOptions - .for('normal') - .tap(WorkspaceResolvePlugin.name, (resolveOptions) => { - // Omit default `node_modules` - if (resolveOptions.modules) { - resolveOptions.modules = resolveOptions.modules.filter((modulePath: string) => { - return modulePath !== 'node_modules'; - }); - } else { - resolveOptions.modules = []; - } + const cache: WorkspaceLayoutCache = this._cache; - const cache: WorkspaceLayoutCache = this._cache; + function handler(resolveOptions: ResolveOptions): ResolveOptions { + // Omit default `node_modules` + if (resolveOptions.modules) { + resolveOptions.modules = resolveOptions.modules.filter((modulePath: string) => { + return modulePath !== 'node_modules'; + }); + } else { + resolveOptions.modules = []; + } - resolveOptions.plugins ??= []; - resolveOptions.plugins.push( - // Optimize identifying the package.json file for the issuer - new KnownDescriptionFilePlugin(cache, 'parsed-resolve', 'described-resolve'), - // Optimize locating the installed dependencies of the current package - new KnownPackageDependenciesPlugin(cache, 'raw-module', 'resolve-as-module'), - // Optimize loading the package.json file for the destination package (bare specifier) - new KnownDescriptionFilePlugin(cache, 'resolve-as-module', 'resolve-in-package'), - // Optimize loading the package.json file for the destination package (relative path) - new KnownDescriptionFilePlugin(cache, 'relative', 'described-relative'), - // Optimize locating and loading nested package.json for a directory - new KnownDescriptionFilePlugin(cache, 'undescribed-existing-directory', 'existing-directory', true), - // Optimize locating and loading nested package.json for a file - new KnownDescriptionFilePlugin(cache, 'undescribed-raw-file', 'raw-file') - ); + resolveOptions.plugins ??= []; + resolveOptions.plugins.push( + // Optimize identifying the package.json file for the issuer + new KnownDescriptionFilePlugin(cache, 'before-parsed-resolve', 'described-resolve'), + // Optimize locating the installed dependencies of the current package + new KnownPackageDependenciesPlugin(cache, 'before-raw-module', 'resolve-as-module'), + // Optimize loading the package.json file for the destination package (bare specifier) + new KnownDescriptionFilePlugin(cache, 'before-resolve-as-module', 'resolve-in-package'), + // Optimize loading the package.json file for the destination package (relative path) + new KnownDescriptionFilePlugin(cache, 'before-relative', 'described-relative'), + // Optimize locating and loading nested package.json for a directory + new KnownDescriptionFilePlugin( + cache, + 'before-undescribed-existing-directory', + 'existing-directory', + true + ), + // Optimize locating and loading nested package.json for a file + new KnownDescriptionFilePlugin(cache, 'before-undescribed-raw-file', 'raw-file') + ); - return resolveOptions; - }); + return resolveOptions; + } + for (const resolverName of this._resolverNames) { + compiler.resolverFactory.hooks.resolveOptions + .for(resolverName) + .tap(WorkspaceResolvePlugin.name, handler); + } } } diff --git a/webpack/webpack-workspace-resolve-plugin/src/test/createResolveForTests.ts b/webpack/webpack-workspace-resolve-plugin/src/test/createResolveForTests.ts index 2a3ea512b92..bc47fa52857 100644 --- a/webpack/webpack-workspace-resolve-plugin/src/test/createResolveForTests.ts +++ b/webpack/webpack-workspace-resolve-plugin/src/test/createResolveForTests.ts @@ -35,7 +35,7 @@ export function createResolveForTests( const cache: WorkspaceLayoutCache = new WorkspaceLayoutCache({ cacheData: { - basePath: `${separator}workspace${separator}`, + basePath: `/workspace/`, contexts: [ { root: 'a', diff --git a/webpack/webpack-workspace-resolve-plugin/tsconfig.json b/webpack/webpack-workspace-resolve-plugin/tsconfig.json index 97c868d4e4d..c4bf22522fe 100644 --- a/webpack/webpack-workspace-resolve-plugin/tsconfig.json +++ b/webpack/webpack-workspace-resolve-plugin/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "./node_modules/local-node-rig/profiles/default/tsconfig-base.json", "compilerOptions": { - "target": "ES2019", + "target": "ES2020", "types": ["heft-jest", "node"] } } diff --git a/webpack/webpack4-localization-plugin/CHANGELOG.json b/webpack/webpack4-localization-plugin/CHANGELOG.json index 57554812aaf..ffda174d859 100644 --- a/webpack/webpack4-localization-plugin/CHANGELOG.json +++ b/webpack/webpack4-localization-plugin/CHANGELOG.json @@ -1,6 +1,225 @@ { "name": "@rushstack/webpack4-localization-plugin", "entries": [ + { + "version": "0.18.85", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.85", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.19`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.18.84", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.84", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.18`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.11.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.18.83", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.83", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.17`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.2`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.18.82", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.82", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.16`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.18.81", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.81", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.15`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.18.80", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.80", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.14`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.18.79", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.79", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.13`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.18.78", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.78", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.18.77", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.77", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `5.10.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.14.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.18.76", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.76", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.18.75", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.75", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.18.74", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.74", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.18.73", + "tag": "@rushstack/webpack4-localization-plugin_v0.18.73", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.12.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.18.72", "tag": "@rushstack/webpack4-localization-plugin_v0.18.72", diff --git a/webpack/webpack4-localization-plugin/CHANGELOG.md b/webpack/webpack4-localization-plugin/CHANGELOG.md index 3130e932a22..c0b37592306 100644 --- a/webpack/webpack4-localization-plugin/CHANGELOG.md +++ b/webpack/webpack4-localization-plugin/CHANGELOG.md @@ -1,6 +1,71 @@ # Change Log - @rushstack/webpack4-localization-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.18.85 +Thu, 30 Jan 2025 16:10:36 GMT + +_Version update only_ + +## 0.18.84 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.18.83 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.18.82 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.18.81 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.18.80 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.18.79 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.18.78 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.18.77 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.18.76 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.18.75 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.18.74 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.18.73 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.18.72 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/webpack/webpack4-localization-plugin/package.json b/webpack/webpack4-localization-plugin/package.json index a29537de186..f8e7745d52b 100644 --- a/webpack/webpack4-localization-plugin/package.json +++ b/webpack/webpack4-localization-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack4-localization-plugin", - "version": "0.18.72", + "version": "0.18.85", "description": "This plugin facilitates localization with Webpack.", "main": "lib/index.js", "typings": "dist/webpack4-localization-plugin.d.ts", diff --git a/webpack/webpack4-module-minifier-plugin/CHANGELOG.json b/webpack/webpack4-module-minifier-plugin/CHANGELOG.json index aee2ce0f612..76aa3428359 100644 --- a/webpack/webpack4-module-minifier-plugin/CHANGELOG.json +++ b/webpack/webpack4-module-minifier-plugin/CHANGELOG.json @@ -1,6 +1,260 @@ { "name": "@rushstack/webpack4-module-minifier-plugin", "entries": [ + { + "version": "0.13.85", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.85", + "date": "Thu, 30 Jan 2025 16:10:36 GMT", + "comments": { + "patch": [ + { + "comment": "Prefer `os.availableParallelism()` to `os.cpus().length`." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.7.2`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.5.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.15`" + } + ] + } + }, + { + "version": "0.13.84", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.84", + "date": "Thu, 30 Jan 2025 01:11:42 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.7.1`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.5.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.14`" + } + ] + } + }, + { + "version": "0.13.83", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.83", + "date": "Wed, 22 Jan 2025 03:03:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.7.0`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.5.0`" + } + ] + } + }, + { + "version": "0.13.82", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.82", + "date": "Thu, 09 Jan 2025 01:10:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.36`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.81`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.13`" + } + ] + } + }, + { + "version": "0.13.81", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.81", + "date": "Tue, 07 Jan 2025 22:17:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.35`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.80`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.12`" + } + ] + } + }, + { + "version": "0.13.80", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.80", + "date": "Sat, 14 Dec 2024 01:11:07 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.34`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.79`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.11`" + } + ] + } + }, + { + "version": "0.13.79", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.79", + "date": "Mon, 09 Dec 2024 20:31:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.33`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.78`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.10`" + } + ] + } + }, + { + "version": "0.13.78", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.78", + "date": "Tue, 03 Dec 2024 16:11:08 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.32`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.77`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.9`" + } + ] + } + }, + { + "version": "0.13.77", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.77", + "date": "Sat, 23 Nov 2024 01:18:55 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.31`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.76`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.8`" + } + ] + } + }, + { + "version": "0.13.76", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.76", + "date": "Fri, 22 Nov 2024 01:10:43 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.30`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.75`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.7`" + } + ] + } + }, + { + "version": "0.13.75", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.75", + "date": "Thu, 24 Oct 2024 00:15:48 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.29`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.74`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.6`" + } + ] + } + }, + { + "version": "0.13.74", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.74", + "date": "Mon, 21 Oct 2024 18:50:10 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.28`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.73`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.5`" + } + ] + } + }, + { + "version": "0.13.73", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.73", + "date": "Thu, 17 Oct 2024 08:35:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.27`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.72`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.4`" + } + ] + } + }, + { + "version": "0.13.72", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.72", + "date": "Tue, 15 Oct 2024 00:12:31 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.6.26`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.4.71`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.68.3`" + } + ] + } + }, { "version": "0.13.71", "tag": "@rushstack/webpack4-module-minifier-plugin_v0.13.71", diff --git a/webpack/webpack4-module-minifier-plugin/CHANGELOG.md b/webpack/webpack4-module-minifier-plugin/CHANGELOG.md index 3cb4c0e41f6..406af201caa 100644 --- a/webpack/webpack4-module-minifier-plugin/CHANGELOG.md +++ b/webpack/webpack4-module-minifier-plugin/CHANGELOG.md @@ -1,6 +1,78 @@ # Change Log - @rushstack/webpack4-module-minifier-plugin -This log was last generated on Wed, 02 Oct 2024 00:11:19 GMT and should not be manually modified. +This log was last generated on Thu, 30 Jan 2025 16:10:36 GMT and should not be manually modified. + +## 0.13.85 +Thu, 30 Jan 2025 16:10:36 GMT + +### Patches + +- Prefer `os.availableParallelism()` to `os.cpus().length`. + +## 0.13.84 +Thu, 30 Jan 2025 01:11:42 GMT + +_Version update only_ + +## 0.13.83 +Wed, 22 Jan 2025 03:03:48 GMT + +_Version update only_ + +## 0.13.82 +Thu, 09 Jan 2025 01:10:10 GMT + +_Version update only_ + +## 0.13.81 +Tue, 07 Jan 2025 22:17:32 GMT + +_Version update only_ + +## 0.13.80 +Sat, 14 Dec 2024 01:11:07 GMT + +_Version update only_ + +## 0.13.79 +Mon, 09 Dec 2024 20:31:43 GMT + +_Version update only_ + +## 0.13.78 +Tue, 03 Dec 2024 16:11:08 GMT + +_Version update only_ + +## 0.13.77 +Sat, 23 Nov 2024 01:18:55 GMT + +_Version update only_ + +## 0.13.76 +Fri, 22 Nov 2024 01:10:43 GMT + +_Version update only_ + +## 0.13.75 +Thu, 24 Oct 2024 00:15:48 GMT + +_Version update only_ + +## 0.13.74 +Mon, 21 Oct 2024 18:50:10 GMT + +_Version update only_ + +## 0.13.73 +Thu, 17 Oct 2024 08:35:06 GMT + +_Version update only_ + +## 0.13.72 +Tue, 15 Oct 2024 00:12:31 GMT + +_Version update only_ ## 0.13.71 Wed, 02 Oct 2024 00:11:19 GMT diff --git a/webpack/webpack4-module-minifier-plugin/package.json b/webpack/webpack4-module-minifier-plugin/package.json index a9458aad546..426db9aad8d 100644 --- a/webpack/webpack4-module-minifier-plugin/package.json +++ b/webpack/webpack4-module-minifier-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack4-module-minifier-plugin", - "version": "0.13.71", + "version": "0.13.85", "description": "This plugin splits minification of webpack compilations into smaller units.", "main": "lib/index.js", "typings": "dist/webpack4-module-minifier-plugin.d.ts", diff --git a/webpack/webpack4-module-minifier-plugin/src/ParallelCompiler.ts b/webpack/webpack4-module-minifier-plugin/src/ParallelCompiler.ts index a033217271d..7c99eb87581 100644 --- a/webpack/webpack4-module-minifier-plugin/src/ParallelCompiler.ts +++ b/webpack/webpack4-module-minifier-plugin/src/ParallelCompiler.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { cpus } from 'os'; +import os from 'os'; import { resolve } from 'path'; import type { Worker } from 'worker_threads'; @@ -61,7 +61,7 @@ export async function runParallel(options: IParallelWebpackOptions): Promise