diff --git a/README.md b/README.md index bbe6d6211f6..ae8e7af499e 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ These GitHub repositories provide supplementary resources for Rush Stack: | [/build-tests/heft-example-plugin-01](./build-tests/heft-example-plugin-01/) | This is an example heft plugin that exposes hooks for other plugins | | [/build-tests/heft-example-plugin-02](./build-tests/heft-example-plugin-02/) | This is an example heft plugin that taps the hooks exposed from heft-example-plugin-01 | | [/build-tests/heft-fastify-test](./build-tests/heft-fastify-test/) | This project tests Heft support for the Fastify framework for Node.js services | +| [/build-tests/heft-jest-preset-test](./build-tests/heft-jest-preset-test/) | This project illustrates configuring a Jest preset in a minimal Heft project | | [/build-tests/heft-jest-reporters-test](./build-tests/heft-jest-reporters-test/) | This project illustrates configuring Jest reporters in a minimal Heft project | | [/build-tests/heft-minimal-rig-test](./build-tests/heft-minimal-rig-test/) | This is a minimal rig package that is imported by the 'heft-minimal-rig-usage-test' project | | [/build-tests/heft-minimal-rig-usage-test](./build-tests/heft-minimal-rig-usage-test/) | A test project for Heft that resolves its compiler from the 'heft-minimal-rig-test' package | @@ -145,6 +146,9 @@ These GitHub repositories provide supplementary resources for Rush Stack: | [/build-tests/heft-parameter-plugin-test](./build-tests/heft-parameter-plugin-test/) | This project exercises a built-in Heft action with a custom parameter | | [/build-tests/heft-sass-test](./build-tests/heft-sass-test/) | This project illustrates a minimal tutorial Heft project targeting the web browser runtime | | [/build-tests/heft-typescript-composite-test](./build-tests/heft-typescript-composite-test/) | Building this project tests behavior of Heft when the tsconfig.json file uses project references. | +| [/build-tests/heft-typescript-v2-test](./build-tests/heft-typescript-v2-test/) | Building this project tests building with TypeScript v2 | +| [/build-tests/heft-typescript-v3-test](./build-tests/heft-typescript-v3-test/) | Building this project tests building with TypeScript v3 | +| [/build-tests/heft-typescript-v4-test](./build-tests/heft-typescript-v4-test/) | Building this project tests building with TypeScript v4 | | [/build-tests/heft-web-rig-library-test](./build-tests/heft-web-rig-library-test/) | A test project for Heft that exercises the '@rushstack/heft-web-rig' package | | [/build-tests/heft-webpack4-everything-test](./build-tests/heft-webpack4-everything-test/) | Building this project tests every task and config file for Heft when targeting the web browser runtime using Webpack 4 | | [/build-tests/heft-webpack5-everything-test](./build-tests/heft-webpack5-everything-test/) | Building this project tests every task and config file for Heft when targeting the web browser runtime using Webpack 5 | diff --git a/apps/api-documenter/CHANGELOG.json b/apps/api-documenter/CHANGELOG.json index 9429436f3e1..afc33fb85b3 100644 --- a/apps/api-documenter/CHANGELOG.json +++ b/apps/api-documenter/CHANGELOG.json @@ -1,6 +1,114 @@ { "name": "@microsoft/api-documenter", "entries": [ + { + "version": "7.22.6", + "tag": "@microsoft/api-documenter_v7.22.6", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.27.0`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.13.3`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "7.22.5", + "tag": "@microsoft/api-documenter_v7.22.5", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.26.9`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "7.22.4", + "tag": "@microsoft/api-documenter_v7.22.4", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.26.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "7.22.3", + "tag": "@microsoft/api-documenter_v7.22.3", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.26.7`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "7.22.2", + "tag": "@microsoft/api-documenter_v7.22.2", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.26.6`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "7.22.1", "tag": "@microsoft/api-documenter_v7.22.1", diff --git a/apps/api-documenter/CHANGELOG.md b/apps/api-documenter/CHANGELOG.md index 04a7dee4b69..cdd1cc3a52d 100644 --- a/apps/api-documenter/CHANGELOG.md +++ b/apps/api-documenter/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @microsoft/api-documenter -This log was last generated on Thu, 27 Apr 2023 17:18:42 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 7.22.6 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 7.22.5 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 7.22.4 +Thu, 04 May 2023 00:20:28 GMT + +_Version update only_ + +## 7.22.3 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 7.22.2 +Sat, 29 Apr 2023 00:23:02 GMT + +_Version update only_ ## 7.22.1 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/apps/api-documenter/package.json b/apps/api-documenter/package.json index f546095170d..3ec81c23780 100644 --- a/apps/api-documenter/package.json +++ b/apps/api-documenter/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/api-documenter", - "version": "7.22.1", + "version": "7.22.6", "description": "Read JSON files from api-extractor, generate documentation pages", "repository": { "type": "git", diff --git a/apps/api-extractor/CHANGELOG.json b/apps/api-extractor/CHANGELOG.json index 453011a4346..ee600dcfa63 100644 --- a/apps/api-extractor/CHANGELOG.json +++ b/apps/api-extractor/CHANGELOG.json @@ -1,6 +1,92 @@ { "name": "@microsoft/api-extractor", "entries": [ + { + "version": "7.35.0", + "tag": "@microsoft/api-extractor_v7.35.0", + "date": "Mon, 22 May 2023 06:34:32 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade the TypeScript dependency to ~5.0.4" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.27.0`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/rig-package\" to `0.3.19`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.13.3`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + } + ] + } + }, + { + "version": "7.34.9", + "tag": "@microsoft/api-extractor_v7.34.9", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.26.9`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + } + ] + } + }, + { + "version": "7.34.8", + "tag": "@microsoft/api-extractor_v7.34.8", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.26.8`" + } + ] + } + }, + { + "version": "7.34.7", + "tag": "@microsoft/api-extractor_v7.34.7", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.26.7`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + } + ] + } + }, + { + "version": "7.34.6", + "tag": "@microsoft/api-extractor_v7.34.6", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.26.6`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + } + ] + } + }, { "version": "7.34.5", "tag": "@microsoft/api-extractor_v7.34.5", diff --git a/apps/api-extractor/CHANGELOG.md b/apps/api-extractor/CHANGELOG.md index 5bb9a78608a..a93efc6575d 100644 --- a/apps/api-extractor/CHANGELOG.md +++ b/apps/api-extractor/CHANGELOG.md @@ -1,6 +1,33 @@ # Change Log - @microsoft/api-extractor -This log was last generated on Thu, 27 Apr 2023 17:18:42 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:32 GMT and should not be manually modified. + +## 7.35.0 +Mon, 22 May 2023 06:34:32 GMT + +### Minor changes + +- Upgrade the TypeScript dependency to ~5.0.4 + +## 7.34.9 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 7.34.8 +Thu, 04 May 2023 00:20:28 GMT + +_Version update only_ + +## 7.34.7 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 7.34.6 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 7.34.5 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/apps/api-extractor/package.json b/apps/api-extractor/package.json index 94cfc1364f1..35efa5c2325 100644 --- a/apps/api-extractor/package.json +++ b/apps/api-extractor/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/api-extractor", - "version": "7.34.5", + "version": "7.35.0", "description": "Analyze the exported API for a TypeScript library and generate reviews, documentation, and .d.ts rollups", "keywords": [ "typescript", @@ -48,12 +48,12 @@ "resolve": "~1.22.1", "semver": "~7.3.0", "source-map": "~0.6.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@types/heft-jest": "1.0.1", "@types/lodash": "4.14.116", "@types/node": "14.18.36", diff --git a/apps/heft/CHANGELOG.json b/apps/heft/CHANGELOG.json index 8411ed38ed6..86f3953d33a 100644 --- a/apps/heft/CHANGELOG.json +++ b/apps/heft/CHANGELOG.json @@ -2,82 +2,99 @@ "name": "@rushstack/heft", "entries": [ { - "version": "0.51.0-rc.5", - "tag": "@rushstack/heft_v0.51.0-rc.5", - "date": "Thu, 27 Apr 2023 17:25:52 GMT", + "version": "0.50.6", + "tag": "@rushstack/heft_v0.50.6", + "date": "Mon, 22 May 2023 06:34:33 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Update with latest main." - } - ] - } - }, - { - "version": "0.50.0-rc.4", - "tag": "@rushstack/heft_v0.50.0-rc.4", - "date": "Wed, 15 Mar 2023 20:22:44 GMT", - "comments": { - "minor": [ + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.12.2`" + }, { - "comment": "Fix an issue with `watchGlobAsync`" + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/rig-package\" to `0.3.19`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.13.3`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.35.0`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" } ] } }, { - "version": "0.50.0-rc.3", - "tag": "@rushstack/heft_v0.50.0-rc.3", - "date": "Fri, 20 Jan 2023 20:13:16 GMT", + "version": "0.50.5", + "tag": "@rushstack/heft_v0.50.5", + "date": "Fri, 12 May 2023 00:23:05 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Fix issues with SASS incremental builds." + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.12.1`" }, { - "comment": "Add support for TypeScript solution incremental builds." + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" }, { - "comment": "Improve responsiveness of watcher loop." + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.9`" } ] } }, { - "version": "0.49.0-rc.2", - "tag": "@rushstack/heft_v0.49.0-rc.2", - "date": "Fri, 2 Dec 2022 05:28:24 GMT", + "version": "0.50.4", + "tag": "@rushstack/heft_v0.50.4", + "date": "Thu, 04 May 2023 00:20:28 GMT", "comments": { - "minor": [ - { - "comment": "Improve watch mode performance." - }, + "dependency": [ { - "comment": "Improve logging output." + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.8`" } ] } }, { - "version": "0.49.0-rc.1", - "tag": "@rushstack/heft_v0.49.0-rc.1", - "date": "Fri, 18 Nov 2022 02:34:26 GMT", + "version": "0.50.3", + "tag": "@rushstack/heft_v0.50.3", + "date": "Mon, 01 May 2023 15:23:19 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.12.0`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, { - "comment": "Fix incremental TypeScript compilation." + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.7`" } ] } }, { - "version": "0.49.0-rc.0", - "tag": "@rushstack/heft_v0.49.0-rc.0", - "date": "Tue, 15 Nov 2022 22:59:35 GMT", + "version": "0.50.2", + "tag": "@rushstack/heft_v0.50.2", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", "comments": { - "minor": [ + "patch": [ + { + "comment": "Fix issues where a terminal logging prefix may be added multiple times to the same line, or only to the first line" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.11.11`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, { - "comment": "General fixes and improvements, in preparation for a general release." + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.6`" } ] } diff --git a/apps/heft/CHANGELOG.md b/apps/heft/CHANGELOG.md index db1e0ef4587..3af73209e43 100644 --- a/apps/heft/CHANGELOG.md +++ b/apps/heft/CHANGELOG.md @@ -1,51 +1,33 @@ # Change Log - @rushstack/heft -This log was last generated on Thu, 27 Apr 2023 17:25:52 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. -## 0.51.0-rc.5 -Thu, 27 Apr 2023 17:25:52 GMT +## 0.50.6 +Mon, 22 May 2023 06:34:33 GMT -### Prerelease Changes - -- Update with latest main. - -## 0.50.0-rc.4 -Wed, 15 Mar 2023 20:22:44 GMT - -### Prerelease Changes - -- Fix an issue with `watchGlobAsync` - -## 0.50.0-rc.3 -Fri, 20 Jan 2023 20:13:16 GMT - -### Prerelease Changes - -- Fix issues with SASS incremental builds. -- Add support for TypeScript solution incremental builds. -- Improve responsiveness of watcher loop. +_Version update only_ -## 0.49.0-rc.2 -Fri, 2 Dec 2022 05:28:24 GMT +## 0.50.5 +Fri, 12 May 2023 00:23:05 GMT -### Prerelease Changes +_Version update only_ -- Improve watch mode performance. -- Improve logging output. +## 0.50.4 +Thu, 04 May 2023 00:20:28 GMT -## 0.49.0-rc.1 -Fri, 18 Nov 2022 02:34:26 GMT +_Version update only_ -### Prerelease Changes +## 0.50.3 +Mon, 01 May 2023 15:23:19 GMT -- Fix incremental TypeScript compilation. +_Version update only_ -## 0.49.0-rc.0 -Tue, 15 Nov 2022 22:59:35 GMT +## 0.50.2 +Sat, 29 Apr 2023 00:23:02 GMT -### Prerelease Changes +### Patches -- General fixes and improvements, in preparation for a general release. +- Fix issues where a terminal logging prefix may be added multiple times to the same line, or only to the first line ## 0.50.1 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/apps/heft/package.json b/apps/heft/package.json index e627cb60cac..bfa38ac6dbf 100644 --- a/apps/heft/package.json +++ b/apps/heft/package.json @@ -53,12 +53,12 @@ "@nodelib/fs.scandir": "2.1.5", "@nodelib/fs.stat": "2.0.5", "@rushstack/eslint-config": "workspace:*", - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@types/argparse": "1.0.38", "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", "@types/watchpack": "2.4.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/apps/heft/src/pluginFramework/logging/ScopedLogger.ts b/apps/heft/src/pluginFramework/logging/ScopedLogger.ts index c8c74521d8f..a67e4e51c55 100644 --- a/apps/heft/src/pluginFramework/logging/ScopedLogger.ts +++ b/apps/heft/src/pluginFramework/logging/ScopedLogger.ts @@ -1,9 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { type ITerminal, Terminal, ITerminalProvider } from '@rushstack/node-core-library'; +import { + PrefixProxyTerminalProvider, + Terminal, + type ITerminalProvider, + type ITerminal +} from '@rushstack/node-core-library'; -import { PrefixProxyTerminalProvider } from '../../utilities/PrefixProxyTerminalProvider'; import { LoggingManager } from './LoggingManager'; /** @@ -82,10 +86,10 @@ export class ScopedLogger implements IScopedLogger { this._options = options; this.loggerName = options.loggerName; - this.terminalProvider = new PrefixProxyTerminalProvider( - options.terminalProvider, - `[${this.loggerName}] ` - ); + this.terminalProvider = new PrefixProxyTerminalProvider({ + terminalProvider: options.terminalProvider, + prefix: `[${this.loggerName}] ` + }); this.terminal = new Terminal(this.terminalProvider); } diff --git a/apps/heft/src/utilities/PrefixProxyTerminalProvider.ts b/apps/heft/src/utilities/PrefixProxyTerminalProvider.ts deleted file mode 100644 index 192fad47d70..00000000000 --- a/apps/heft/src/utilities/PrefixProxyTerminalProvider.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See LICENSE in the project root for license information. - -import { - ITerminal, - Terminal, - ITerminalProvider, - TerminalProviderSeverity -} from '@rushstack/node-core-library'; - -export class PrefixProxyTerminalProvider implements ITerminalProvider { - private _parent: ITerminalProvider; - private _prefix: string; - - public constructor(parent: ITerminalProvider, prefix: string) { - this._parent = parent; - this._prefix = prefix; - } - - public static getTerminal(parent: ITerminalProvider, prefix: string): ITerminal { - const provider: ITerminalProvider = new PrefixProxyTerminalProvider(parent, prefix); - return new Terminal(provider); - } - - public get supportsColor(): boolean { - return this._parent.supportsColor; - } - - public get eolCharacter(): string { - return this._parent.eolCharacter; - } - - public write(data: string, severity: TerminalProviderSeverity): void { - this._parent.write(this._prefix + data, severity); - } -} diff --git a/apps/lockfile-explorer/CHANGELOG.json b/apps/lockfile-explorer/CHANGELOG.json index 7384283133c..5b2b1877235 100644 --- a/apps/lockfile-explorer/CHANGELOG.json +++ b/apps/lockfile-explorer/CHANGELOG.json @@ -1,6 +1,96 @@ { "name": "@rushstack/lockfile-explorer", "entries": [ + { + "version": "1.0.16", + "tag": "@rushstack/lockfile-explorer_v1.0.16", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + } + ] + } + }, + { + "version": "1.0.15", + "tag": "@rushstack/lockfile-explorer_v1.0.15", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + } + ] + } + }, + { + "version": "1.0.14", + "tag": "@rushstack/lockfile-explorer_v1.0.14", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + } + ] + } + }, + { + "version": "1.0.13", + "tag": "@rushstack/lockfile-explorer_v1.0.13", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + } + ] + } + }, + { + "version": "1.0.12", + "tag": "@rushstack/lockfile-explorer_v1.0.12", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + } + ] + } + }, { "version": "1.0.11", "tag": "@rushstack/lockfile-explorer_v1.0.11", diff --git a/apps/lockfile-explorer/CHANGELOG.md b/apps/lockfile-explorer/CHANGELOG.md index 039cd4d77cd..de96897e6ae 100644 --- a/apps/lockfile-explorer/CHANGELOG.md +++ b/apps/lockfile-explorer/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/lockfile-explorer -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 1.0.16 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 1.0.15 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 1.0.14 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 1.0.13 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 1.0.12 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 1.0.11 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/apps/lockfile-explorer/package.json b/apps/lockfile-explorer/package.json index 8d2f5c6ec1e..655351de8f4 100644 --- a/apps/lockfile-explorer/package.json +++ b/apps/lockfile-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/lockfile-explorer", - "version": "1.0.11", + "version": "1.0.16", "description": "Rush Lockfile Explorer: The UI for solving version conflicts quickly in a large monorepo", "keywords": [ "conflict", diff --git a/apps/rundown/CHANGELOG.json b/apps/rundown/CHANGELOG.json index fbc3aafcf0d..7c9eaddefd5 100644 --- a/apps/rundown/CHANGELOG.json +++ b/apps/rundown/CHANGELOG.json @@ -1,6 +1,99 @@ { "name": "@rushstack/rundown", "entries": [ + { + "version": "1.0.250", + "tag": "@rushstack/rundown_v1.0.250", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.13.3`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "1.0.249", + "tag": "@rushstack/rundown_v1.0.249", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "1.0.248", + "tag": "@rushstack/rundown_v1.0.248", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "1.0.247", + "tag": "@rushstack/rundown_v1.0.247", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "1.0.246", + "tag": "@rushstack/rundown_v1.0.246", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "1.0.245", "tag": "@rushstack/rundown_v1.0.245", diff --git a/apps/rundown/CHANGELOG.md b/apps/rundown/CHANGELOG.md index 41e6e2dfd45..3abcbc6df39 100644 --- a/apps/rundown/CHANGELOG.md +++ b/apps/rundown/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/rundown -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 1.0.250 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 1.0.249 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 1.0.248 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 1.0.247 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 1.0.246 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 1.0.245 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/apps/rundown/package.json b/apps/rundown/package.json index 2a6d4da21c4..d87dc60cfca 100644 --- a/apps/rundown/package.json +++ b/apps/rundown/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rundown", - "version": "1.0.245", + "version": "1.0.250", "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 37ccd8070ed..388424dfe6f 100644 --- a/apps/rush/CHANGELOG.json +++ b/apps/rush/CHANGELOG.json @@ -1,6 +1,36 @@ { "name": "@microsoft/rush", "entries": [ + { + "version": "5.98.0", + "tag": "@microsoft/rush_v5.98.0", + "date": "Sun, 21 May 2023 00:18:35 GMT", + "comments": { + "none": [ + { + "comment": "Add a \"forbidPhantomResolvableNodeModuleFolders\" experiment that forbids node_modules folders in the repo root and in parent folders." + }, + { + "comment": "Update the `RushSession.registerCloudBuildCacheProviderFactory` API to allow a cache provider's factory function to return a promise." + }, + { + "comment": "Add built-in plugin rush-http-build-cache-plugin" + }, + { + "comment": "Fix an issue where the last character in a project's path is ignored when determining which files contribute to the project's cache ID." + }, + { + "comment": "Fix a performance bug in `rush version` when using `workspace:` protocol." + }, + { + "comment": "(BREAKING API CHANGE) Add a property `missingScriptBehavior` to phase definitions that can be used to silence missing scripts to reduce log noise. This replaces the `ignoreMissingScript` property visible to the plugin API, although the `ignoreMissingScript` property is still supported in the `common/config/rush/command-line.json` config file for backwards compatibility." + }, + { + "comment": "Flatten watch status into a single line with TTY rewrites." + } + ] + } + }, { "version": "5.97.1", "tag": "@microsoft/rush_v5.97.1", diff --git a/apps/rush/CHANGELOG.md b/apps/rush/CHANGELOG.md index d73d20ca6e1..3b0d65f2964 100644 --- a/apps/rush/CHANGELOG.md +++ b/apps/rush/CHANGELOG.md @@ -1,6 +1,19 @@ # Change Log - @microsoft/rush -This log was last generated on Tue, 18 Apr 2023 16:39:03 GMT and should not be manually modified. +This log was last generated on Sun, 21 May 2023 00:18:35 GMT and should not be manually modified. + +## 5.98.0 +Sun, 21 May 2023 00:18:35 GMT + +### Updates + +- Add a "forbidPhantomResolvableNodeModuleFolders" experiment that forbids node_modules folders in the repo root and in parent folders. +- Update the `RushSession.registerCloudBuildCacheProviderFactory` API to allow a cache provider's factory function to return a promise. +- Add built-in plugin rush-http-build-cache-plugin +- Fix an issue where the last character in a project's path is ignored when determining which files contribute to the project's cache ID. +- Fix a performance bug in `rush version` when using `workspace:` protocol. +- (BREAKING API CHANGE) Add a property `missingScriptBehavior` to phase definitions that can be used to silence missing scripts to reduce log noise. This replaces the `ignoreMissingScript` property visible to the plugin API, although the `ignoreMissingScript` property is still supported in the `common/config/rush/command-line.json` config file for backwards compatibility. +- Flatten watch status into a single line with TTY rewrites. ## 5.97.1 Tue, 18 Apr 2023 16:39:03 GMT diff --git a/apps/rush/package.json b/apps/rush/package.json index b987b883f03..bd9211859a1 100644 --- a/apps/rush/package.json +++ b/apps/rush/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/rush", - "version": "5.97.1", + "version": "5.98.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 eca40aa5714..bc54044f15d 100644 --- a/apps/trace-import/CHANGELOG.json +++ b/apps/trace-import/CHANGELOG.json @@ -1,6 +1,104 @@ { "name": "@rushstack/trace-import", "entries": [ + { + "version": "0.2.0", + "tag": "@rushstack/trace-import_v0.2.0", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade the TypeScript dependency to ~5.0.4" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/ts-command-line\" to `4.13.3`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.1.18", + "tag": "@rushstack/trace-import_v0.1.18", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.1.17", + "tag": "@rushstack/trace-import_v0.1.17", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.1.16", + "tag": "@rushstack/trace-import_v0.1.16", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.1.15", + "tag": "@rushstack/trace-import_v0.1.15", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.1.14", "tag": "@rushstack/trace-import_v0.1.14", diff --git a/apps/trace-import/CHANGELOG.md b/apps/trace-import/CHANGELOG.md index 776d4854ba7..6711df0363a 100644 --- a/apps/trace-import/CHANGELOG.md +++ b/apps/trace-import/CHANGELOG.md @@ -1,6 +1,33 @@ # Change Log - @rushstack/trace-import -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.2.0 +Mon, 22 May 2023 06:34:33 GMT + +### Minor changes + +- Upgrade the TypeScript dependency to ~5.0.4 + +## 0.1.18 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.1.17 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.1.16 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 0.1.15 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.1.14 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/apps/trace-import/package.json b/apps/trace-import/package.json index af21d7a759b..596a3ab65d0 100644 --- a/apps/trace-import/package.json +++ b/apps/trace-import/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/trace-import", - "version": "0.1.14", + "version": "0.2.0", "description": "CLI tool for understanding how require() and \"import\" statements get resolved", "repository": { "type": "git", @@ -23,7 +23,7 @@ "colors": "~1.2.1", "resolve": "~1.22.1", "semver": "~7.3.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", diff --git a/build-tests-samples/heft-node-basic-tutorial/package.json b/build-tests-samples/heft-node-basic-tutorial/package.json index e98bbdb1367..ecd031b6e5f 100644 --- a/build-tests-samples/heft-node-basic-tutorial/package.json +++ b/build-tests-samples/heft-node-basic-tutorial/package.json @@ -19,6 +19,6 @@ "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests-samples/heft-node-jest-tutorial/package.json b/build-tests-samples/heft-node-jest-tutorial/package.json index f44f23255ce..9cc2f5704f5 100644 --- a/build-tests-samples/heft-node-jest-tutorial/package.json +++ b/build-tests-samples/heft-node-jest-tutorial/package.json @@ -18,6 +18,6 @@ "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests-samples/heft-serverless-stack-tutorial/package.json b/build-tests-samples/heft-serverless-stack-tutorial/package.json index ce351d3f889..5a279252150 100644 --- a/build-tests-samples/heft-serverless-stack-tutorial/package.json +++ b/build-tests-samples/heft-serverless-stack-tutorial/package.json @@ -28,6 +28,6 @@ "aws-cdk-lib": "2.7.0", "constructs": "~10.0.98", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests-samples/heft-storybook-react-tutorial-storykit/package.json b/build-tests-samples/heft-storybook-react-tutorial-storykit/package.json index 2a2fd09d520..1b0124db004 100644 --- a/build-tests-samples/heft-storybook-react-tutorial-storykit/package.json +++ b/build-tests-samples/heft-storybook-react-tutorial-storykit/package.json @@ -32,7 +32,7 @@ "react": "~16.13.1", "style-loader": "~2.0.0", "terser-webpack-plugin": "~3.0.8", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack": "~4.44.2" } } diff --git a/build-tests-samples/heft-storybook-react-tutorial/package.json b/build-tests-samples/heft-storybook-react-tutorial/package.json index a8611ed769a..644fa447981 100644 --- a/build-tests-samples/heft-storybook-react-tutorial/package.json +++ b/build-tests-samples/heft-storybook-react-tutorial/package.json @@ -37,7 +37,7 @@ "html-webpack-plugin": "~4.5.2", "source-map-loader": "~1.1.3", "style-loader": "~2.0.0", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack": "~4.44.2" } } diff --git a/build-tests-samples/heft-web-rig-app-tutorial/package.json b/build-tests-samples/heft-web-rig-app-tutorial/package.json index 07530147c38..17ac515d92f 100644 --- a/build-tests-samples/heft-web-rig-app-tutorial/package.json +++ b/build-tests-samples/heft-web-rig-app-tutorial/package.json @@ -22,6 +22,6 @@ "@types/react-dom": "16.9.14", "@types/react": "16.14.23", "@types/webpack-env": "1.18.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests-samples/heft-web-rig-library-tutorial/package.json b/build-tests-samples/heft-web-rig-library-tutorial/package.json index 076806ade1d..5876ed449b1 100644 --- a/build-tests-samples/heft-web-rig-library-tutorial/package.json +++ b/build-tests-samples/heft-web-rig-library-tutorial/package.json @@ -24,6 +24,6 @@ "@types/react-dom": "16.9.14", "@types/react": "16.14.23", "@types/webpack-env": "1.18.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests-samples/heft-webpack-basic-tutorial/package.json b/build-tests-samples/heft-webpack-basic-tutorial/package.json index 8987b8cfadb..8665e3cfad7 100644 --- a/build-tests-samples/heft-webpack-basic-tutorial/package.json +++ b/build-tests-samples/heft-webpack-basic-tutorial/package.json @@ -30,7 +30,7 @@ "html-webpack-plugin": "~5.5.0", "source-map-loader": "~3.0.1", "style-loader": "~3.3.1", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack": "~5.80.0" } } diff --git a/build-tests-samples/packlets-tutorial/package.json b/build-tests-samples/packlets-tutorial/package.json index 4fb672fd3c1..abedcccc3c3 100644 --- a/build-tests-samples/packlets-tutorial/package.json +++ b/build-tests-samples/packlets-tutorial/package.json @@ -16,6 +16,6 @@ "@rushstack/heft-typescript-plugin": "workspace:*", "@types/node": "14.18.36", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json b/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json index 9118d0a598f..372fac3f034 100644 --- a/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json +++ b/build-tests/api-documenter-scenarios/etc/inheritedMembers/api-documenter-scenarios.api.json @@ -883,7 +883,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "export declare type IInterfaceLikeTypeAlias = " + "text": "export type IInterfaceLikeTypeAlias = " }, { "kind": "Content", diff --git a/build-tests/api-documenter-scenarios/etc/inheritedMembers/markdown/api-documenter-scenarios.iinterfaceliketypealias.md b/build-tests/api-documenter-scenarios/etc/inheritedMembers/markdown/api-documenter-scenarios.iinterfaceliketypealias.md index 35892b1be67..6bb472700ea 100644 --- a/build-tests/api-documenter-scenarios/etc/inheritedMembers/markdown/api-documenter-scenarios.iinterfaceliketypealias.md +++ b/build-tests/api-documenter-scenarios/etc/inheritedMembers/markdown/api-documenter-scenarios.iinterfaceliketypealias.md @@ -9,7 +9,7 @@ Some interface-like type alias. **Signature:** ```typescript -export declare type IInterfaceLikeTypeAlias = { +export type IInterfaceLikeTypeAlias = { someProp: number; }; ``` diff --git a/build-tests/api-documenter-scenarios/package.json b/build-tests/api-documenter-scenarios/package.json index b57ca02f3b7..0de2bd91da2 100644 --- a/build-tests/api-documenter-scenarios/package.json +++ b/build-tests/api-documenter-scenarios/package.json @@ -16,6 +16,6 @@ "@types/jest": "29.2.5", "@types/node": "14.18.36", "fs-extra": "~7.0.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/api-documenter-test/etc/api-documenter-test.api.json b/build-tests/api-documenter-test/etc/api-documenter-test.api.json index 4b8d0a7951b..8d070ccc44c 100644 --- a/build-tests/api-documenter-test/etc/api-documenter-test.api.json +++ b/build-tests/api-documenter-test/etc/api-documenter-test.api.json @@ -1397,7 +1397,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "export declare type ExampleDuplicateTypeAlias = " + "text": "export type ExampleDuplicateTypeAlias = " }, { "kind": "Reference", @@ -1496,7 +1496,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "export declare type ExampleTypeAlias = " + "text": "export type ExampleTypeAlias = " }, { "kind": "Reference", @@ -1527,7 +1527,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "export declare type ExampleUnionTypeAlias = " + "text": "export type ExampleUnionTypeAlias = " }, { "kind": "Reference", @@ -1594,7 +1594,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "export declare type GenericTypeAlias = " + "text": "export type GenericTypeAlias = " }, { "kind": "Content", @@ -2725,7 +2725,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "export declare type TypeAlias = " + "text": "export type TypeAlias = " }, { "kind": "Content", diff --git a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampleduplicatetypealias.md b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampleduplicatetypealias.md index f20d492a8e4..a8aa327934f 100644 --- a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampleduplicatetypealias.md +++ b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampleduplicatetypealias.md @@ -9,7 +9,7 @@ A type alias that has duplicate references. **Signature:** ```typescript -export declare type ExampleDuplicateTypeAlias = SystemEvent | typeof SystemEvent; +export type ExampleDuplicateTypeAlias = SystemEvent | typeof SystemEvent; ``` **References:** [SystemEvent](./api-documenter-test.systemevent.md) diff --git a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampletypealias.md b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampletypealias.md index 11d67ba93c2..c6b401aadaa 100644 --- a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampletypealias.md +++ b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampletypealias.md @@ -9,5 +9,5 @@ A type alias **Signature:** ```typescript -export declare type ExampleTypeAlias = Promise; +export type ExampleTypeAlias = Promise; ``` diff --git a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampleuniontypealias.md b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampleuniontypealias.md index f3caddca82e..d305e374539 100644 --- a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampleuniontypealias.md +++ b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.exampleuniontypealias.md @@ -9,7 +9,7 @@ A type alias that references multiple other types. **Signature:** ```typescript -export declare type ExampleUnionTypeAlias = IDocInterface1 | IDocInterface3; +export type ExampleUnionTypeAlias = IDocInterface1 | IDocInterface3; ``` **References:** [IDocInterface1](./api-documenter-test.idocinterface1.md), [IDocInterface3](./api-documenter-test.idocinterface3.md) diff --git a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.generictypealias.md b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.generictypealias.md index a0104e3cb3b..a574c6868f9 100644 --- a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.generictypealias.md +++ b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.generictypealias.md @@ -8,5 +8,5 @@ **Signature:** ```typescript -export declare type GenericTypeAlias = T[]; +export type GenericTypeAlias = T[]; ``` diff --git a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.typealias.md b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.typealias.md index 8709cd788d4..560476c6753 100644 --- a/build-tests/api-documenter-test/etc/markdown/api-documenter-test.typealias.md +++ b/build-tests/api-documenter-test/etc/markdown/api-documenter-test.typealias.md @@ -8,5 +8,5 @@ **Signature:** ```typescript -export declare type TypeAlias = number; +export type TypeAlias = number; ``` diff --git a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampleduplicatetypealias.yml b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampleduplicatetypealias.yml index 2c065b421d5..9527b848c90 100644 --- a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampleduplicatetypealias.yml +++ b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampleduplicatetypealias.yml @@ -8,4 +8,4 @@ remarks: '' example: [] isPreview: false isDeprecated: false -syntax: export declare type ExampleDuplicateTypeAlias = SystemEvent | typeof SystemEvent; +syntax: export type ExampleDuplicateTypeAlias = SystemEvent | typeof SystemEvent; diff --git a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampletypealias.yml b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampletypealias.yml index 01d3006166a..f3dcfaaf267 100644 --- a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampletypealias.yml +++ b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampletypealias.yml @@ -8,4 +8,4 @@ remarks: '' example: [] isPreview: false isDeprecated: false -syntax: export declare type ExampleTypeAlias = Promise; +syntax: export type ExampleTypeAlias = Promise; diff --git a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampleuniontypealias.yml b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampleuniontypealias.yml index 6b0dd45603e..282875feb1c 100644 --- a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampleuniontypealias.yml +++ b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/exampleuniontypealias.yml @@ -8,4 +8,4 @@ remarks: '' example: [] isPreview: false isDeprecated: false -syntax: export declare type ExampleUnionTypeAlias = IDocInterface1 | IDocInterface3; +syntax: export type ExampleUnionTypeAlias = IDocInterface1 | IDocInterface3; diff --git a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/generictypealias.yml b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/generictypealias.yml index b30ce13447f..9dfddbb4304 100644 --- a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/generictypealias.yml +++ b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/generictypealias.yml @@ -8,4 +8,4 @@ remarks: '' example: [] isPreview: false isDeprecated: false -syntax: 'export declare type GenericTypeAlias = T[];' +syntax: 'export type GenericTypeAlias = T[];' diff --git a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/typealias.yml b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/typealias.yml index 5c80d9ef6ef..242b7ab1b18 100644 --- a/build-tests/api-documenter-test/etc/yaml/api-documenter-test/typealias.yml +++ b/build-tests/api-documenter-test/etc/yaml/api-documenter-test/typealias.yml @@ -8,4 +8,4 @@ remarks: '' example: [] isPreview: false isDeprecated: false -syntax: export declare type TypeAlias = number; +syntax: export type TypeAlias = number; diff --git a/build-tests/api-documenter-test/package.json b/build-tests/api-documenter-test/package.json index b77077e2810..401ad54b239 100644 --- a/build-tests/api-documenter-test/package.json +++ b/build-tests/api-documenter-test/package.json @@ -15,6 +15,6 @@ "@types/jest": "29.2.5", "@types/node": "14.18.36", "fs-extra": "~7.0.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/api-extractor-lib2-test/package.json b/build-tests/api-extractor-lib2-test/package.json index 49b2649b4a1..f7a1d9f1a58 100644 --- a/build-tests/api-extractor-lib2-test/package.json +++ b/build-tests/api-extractor-lib2-test/package.json @@ -14,6 +14,6 @@ "@types/jest": "29.2.5", "@types/node": "14.18.36", "fs-extra": "~7.0.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/api-extractor-lib3-test/package.json b/build-tests/api-extractor-lib3-test/package.json index 6733e6665ff..d3dc7149586 100644 --- a/build-tests/api-extractor-lib3-test/package.json +++ b/build-tests/api-extractor-lib3-test/package.json @@ -17,6 +17,6 @@ "@types/jest": "29.2.5", "@types/node": "14.18.36", "fs-extra": "~7.0.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json index 5399ba5ef08..64b88b41b1e 100644 --- a/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/apiItemKinds/api-extractor-scenarios.api.json @@ -919,7 +919,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "export declare type SomeType = " + "text": "export type SomeType = " }, { "kind": "Content", diff --git a/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json index edf03124928..9a755f8d5cf 100644 --- a/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/includeForgottenExports/api-extractor-scenarios.api.json @@ -215,7 +215,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "declare type DuplicateName = " + "text": "type DuplicateName = " }, { "kind": "Content", @@ -241,7 +241,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "export declare type DuplicateName = " + "text": "export type DuplicateName = " }, { "kind": "Content", @@ -332,7 +332,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "declare type ForgottenExport2 = " + "text": "type ForgottenExport2 = " }, { "kind": "Content", diff --git a/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json b/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json index c50dc7eb1bb..e4a3a2edda9 100644 --- a/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json +++ b/build-tests/api-extractor-scenarios/etc/typeParameters/api-extractor-scenarios.api.json @@ -422,7 +422,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "export declare type GenericTypeAlias = " + "text": "export type GenericTypeAlias = " }, { "kind": "Content", diff --git a/build-tests/api-extractor-scenarios/package.json b/build-tests/api-extractor-scenarios/package.json index 50977b17c1d..c8f82b4a910 100644 --- a/build-tests/api-extractor-scenarios/package.json +++ b/build-tests/api-extractor-scenarios/package.json @@ -20,6 +20,6 @@ "api-extractor-lib3-test": "workspace:*", "colors": "~1.2.1", "fs-extra": "~7.0.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/api-extractor-test-01/package.json b/build-tests/api-extractor-test-01/package.json index f85f53dbf3b..217134d3da7 100644 --- a/build-tests/api-extractor-test-01/package.json +++ b/build-tests/api-extractor-test-01/package.json @@ -19,6 +19,6 @@ "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", "fs-extra": "~7.0.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/api-extractor-test-02/package.json b/build-tests/api-extractor-test-02/package.json index 3492bf6eca8..049ff0375b1 100644 --- a/build-tests/api-extractor-test-02/package.json +++ b/build-tests/api-extractor-test-02/package.json @@ -18,6 +18,6 @@ "@microsoft/api-extractor": "workspace:*", "@types/node": "14.18.36", "fs-extra": "~7.0.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/api-extractor-test-02/src/index.ts b/build-tests/api-extractor-test-02/src/index.ts index 5311608f198..3ef4f5e585c 100644 --- a/build-tests/api-extractor-test-02/src/index.ts +++ b/build-tests/api-extractor-test-02/src/index.ts @@ -13,7 +13,7 @@ */ export { SubclassWithImport } from './SubclassWithImport'; -export * from './TypeFromImportedModule'; +export type * from './TypeFromImportedModule'; export { importDeduping1 } from './ImportDeduping1'; export { importDeduping2 } from './ImportDeduping2'; diff --git a/build-tests/api-extractor-test-03/package.json b/build-tests/api-extractor-test-03/package.json index e5f140a31c3..aecbd224d81 100644 --- a/build-tests/api-extractor-test-03/package.json +++ b/build-tests/api-extractor-test-03/package.json @@ -12,6 +12,6 @@ "@types/node": "14.18.36", "api-extractor-test-02": "workspace:*", "fs-extra": "~7.0.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/api-extractor-test-04/package.json b/build-tests/api-extractor-test-04/package.json index bfeca554ac4..680dc57dd49 100644 --- a/build-tests/api-extractor-test-04/package.json +++ b/build-tests/api-extractor-test-04/package.json @@ -13,6 +13,6 @@ "@microsoft/api-extractor": "workspace:*", "api-extractor-lib1-test": "workspace:*", "fs-extra": "~7.0.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/eslint-7-test/package.json b/build-tests/eslint-7-test/package.json index e3bf415c972..23ef008a9c7 100644 --- a/build-tests/eslint-7-test/package.json +++ b/build-tests/eslint-7-test/package.json @@ -14,8 +14,8 @@ "@rushstack/heft": "workspace:*", "@rushstack/heft-node-rig": "workspace:*", "@types/node": "14.18.36", - "@typescript-eslint/parser": "~5.38.0", + "@typescript-eslint/parser": "~5.59.2", "eslint": "~7.30.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/hashed-folder-copy-plugin-webpack4-test/package.json b/build-tests/hashed-folder-copy-plugin-webpack4-test/package.json index 57bb1b80a3b..ae2f4ae0289 100644 --- a/build-tests/hashed-folder-copy-plugin-webpack4-test/package.json +++ b/build-tests/hashed-folder-copy-plugin-webpack4-test/package.json @@ -18,7 +18,7 @@ "@rushstack/set-webpack-public-path-plugin": "workspace:*", "@types/webpack-env": "1.18.0", "html-webpack-plugin": "~4.5.2", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack-bundle-analyzer": "~4.5.0", "webpack": "~4.44.2" } diff --git a/build-tests/hashed-folder-copy-plugin-webpack5-test/package.json b/build-tests/hashed-folder-copy-plugin-webpack5-test/package.json index 6e525993461..3fc1035307a 100644 --- a/build-tests/hashed-folder-copy-plugin-webpack5-test/package.json +++ b/build-tests/hashed-folder-copy-plugin-webpack5-test/package.json @@ -16,7 +16,7 @@ "@rushstack/heft-webpack5-plugin": "workspace:*", "@types/webpack-env": "1.18.0", "html-webpack-plugin": "~4.5.2", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack-bundle-analyzer": "~4.5.0", "webpack": "~5.80.0" } diff --git a/build-tests/heft-example-plugin-01/package.json b/build-tests/heft-example-plugin-01/package.json index e4d31d715ab..c8beb07e9ad 100644 --- a/build-tests/heft-example-plugin-01/package.json +++ b/build-tests/heft-example-plugin-01/package.json @@ -21,6 +21,6 @@ "@types/node": "14.18.36", "@types/tapable": "1.0.6", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/heft-example-plugin-02/package.json b/build-tests/heft-example-plugin-02/package.json index e7c593cbe28..a1cd4507af1 100644 --- a/build-tests/heft-example-plugin-02/package.json +++ b/build-tests/heft-example-plugin-02/package.json @@ -26,6 +26,6 @@ "@types/node": "14.18.36", "eslint": "~8.7.0", "heft-example-plugin-01": "workspace:*", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/heft-fastify-test/package.json b/build-tests/heft-fastify-test/package.json index 463b80c79ef..b019158dc9f 100644 --- a/build-tests/heft-fastify-test/package.json +++ b/build-tests/heft-fastify-test/package.json @@ -19,7 +19,7 @@ "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" }, "dependencies": { "fastify": "~3.16.1" diff --git a/build-tests/install-test-workspace/workspace/typescript-v3-test/.eslintrc.js b/build-tests/heft-jest-preset-test/.eslintrc.js similarity index 100% rename from build-tests/install-test-workspace/workspace/typescript-v3-test/.eslintrc.js rename to build-tests/heft-jest-preset-test/.eslintrc.js diff --git a/build-tests/heft-jest-preset-test/README.md b/build-tests/heft-jest-preset-test/README.md new file mode 100644 index 00000000000..346353fb6be --- /dev/null +++ b/build-tests/heft-jest-preset-test/README.md @@ -0,0 +1,8 @@ +# heft-jest-preset-test + +This project illustrates configuring a Jest preset in a minimal [Heft](https://www.npmjs.com/package/@rushstack/heft) project + + +Please see the [Jest configuration](./config/jest.config.json), +the [Getting started with Heft](https://rushstack.io/pages/heft_tutorials/getting_started/), +and ["jest" task](https://rushstack.io/pages/heft_tasks/jest/) articles for more information. diff --git a/build-tests/heft-jest-preset-test/config/heft.json b/build-tests/heft-jest-preset-test/config/heft.json new file mode 100644 index 00000000000..974e29216ef --- /dev/null +++ b/build-tests/heft-jest-preset-test/config/heft.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json", + + "eventActions": [ + { + "actionKind": "deleteGlobs", + "heftEvent": "clean", + "actionId": "defaultClean", + "globsToDelete": ["dist", "lib", "lib-commonjs", "temp"] + } + ], + + /** + * The list of Heft plugins to be loaded. + */ + "heftPlugins": [ + { + "plugin": "@rushstack/heft-jest-plugin" + + /** + * An optional object that provides additional settings that may be defined by the plugin. + */ + // "options": { } + } + ] +} diff --git a/build-tests/heft-jest-preset-test/config/jest-preset.js b/build-tests/heft-jest-preset-test/config/jest-preset.js new file mode 100644 index 00000000000..564abccf7d9 --- /dev/null +++ b/build-tests/heft-jest-preset-test/config/jest-preset.js @@ -0,0 +1,3 @@ +module.exports = { + collectCoverage: true +}; diff --git a/build-tests/heft-jest-preset-test/config/jest.config.json b/build-tests/heft-jest-preset-test/config/jest.config.json new file mode 100644 index 00000000000..872720725a0 --- /dev/null +++ b/build-tests/heft-jest-preset-test/config/jest.config.json @@ -0,0 +1,80 @@ +{ + // THIS SHARED JEST CONFIGURATION FILE IS INTENDED TO BE REFERENCED BY THE JEST CONFIGURATION IN + // CONSUMING PACKAGE AND REQUIRES PRESET-RELATIVE MODULE RESOLUTION TO BE ENABLED. IF YOU HAVE + // DISABLED THIS FEATURE YOU MUST CREATE YOUR OWN JEST CONFIGURATION + + "preset": "/config/jest-preset.js", + + // By default, don't hide console output + "silent": false, + + // In order for HeftJestReporter to receive console.log() events, we must set verbose=false + "verbose": false, + + // If mocks are not cleared between tests, it opens the door to accidental reliance on + // ordering of tests or describe blocks, eventually resulting in intermittent failures. + // + // We suggest this setting for any heft project (in a monorepo or not). + "clearMocks": true, + + // "Adding '/src' here enables src/__mocks__ to be used for mocking Node.js system modules + "roots": ["/src"], + + // Retain pre-Jest 29 snapshot behavior + "snapshotFormat": { + "escapeString": true, + "printBasicPrototype": true + }, + + "testEnvironmentOptions": { + "url": "http://localhost/" + }, + + "testMatch": ["/src/**/*.test.{ts,tsx}"], + "testPathIgnorePatterns": ["/node_modules/"], + + // Code coverage tracking is disabled by default; set this to true to enable it + // This is set to true in the preset for the "heft" package + // "collectCoverage": false, + + "coverageDirectory": "/temp/coverage", + + "collectCoverageFrom": [ + "src/**/*.{ts,tsx}", + "!src/**/*.d.ts", + "!src/**/*.test.{ts,tsx}", + "!src/**/test/**", + "!src/**/__tests__/**", + "!src/**/__fixtures__/**", + "!src/**/__mocks__/**" + ], + "coveragePathIgnorePatterns": ["/node_modules/"], + + "transformIgnorePatterns": [], + + // jest-identity-mock-transform returns a proxy for exported key/value pairs, where Webpack would return a module + // jest-string-mock-transform returns the filename, where Webpack would return a URL + // When using the heft-jest-plugin, these will be replaced with the resolved module location + "transform": { + "\\.(ts|tsx)$": "../node_modules/@rushstack/heft-jest-plugin/lib/exports/jest-build-transform.js", + + "\\.(css|sass|scss)$": "../node_modules/@rushstack/heft-jest-plugin/lib/exports/jest-identity-mock-transform.js", + + "\\.(aac|eot|gif|jpeg|jpg|m4a|mp3|mp4|oga|otf|png|svg|ttf|wav|webm|webp|woff|woff2)$": "../node_modules/@rushstack/heft-jest-plugin/lib/exports/jest-string-mock-transform.js" + }, + + // The modulePathIgnorePatterns below accepts these sorts of paths: + // - /src + // - /src/file.ts + // ...and ignores anything else under + "modulePathIgnorePatterns": [], + + // Prefer .cjs to .js to catch explicit commonjs output. Optimize for local files, which will be .ts or .tsx + "moduleFileExtensions": ["ts", "tsx", "cjs", "js", "json", "node"], + + // When using the heft-jest-plugin, these will be replaced with the resolved module location + "setupFiles": ["../node_modules/@rushstack/heft-jest-plugin/lib/exports/jest-global-setup.js"], + + // When using the heft-jest-plugin, these will be replaced with the resolved module location + "resolver": "../node_modules/@rushstack/heft-jest-plugin/lib/exports/jest-improved-resolver.js" +} diff --git a/build-tests/heft-jest-preset-test/config/rush-project.json b/build-tests/heft-jest-preset-test/config/rush-project.json new file mode 100644 index 00000000000..9af7b46f8af --- /dev/null +++ b/build-tests/heft-jest-preset-test/config/rush-project.json @@ -0,0 +1,12 @@ +{ + "operationSettings": [ + { + "operationName": "build", + "outputFolderNames": ["lib", "dist"] + }, + { + "operationName": "_phase:build", + "outputFolderNames": ["lib", "dist"] + } + ] +} diff --git a/build-tests/heft-jest-preset-test/config/typescript.json b/build-tests/heft-jest-preset-test/config/typescript.json new file mode 100644 index 00000000000..5a5a48e9b29 --- /dev/null +++ b/build-tests/heft-jest-preset-test/config/typescript.json @@ -0,0 +1,78 @@ +/** + * Configures the TypeScript plugin for Heft. This plugin also manages linting. + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/typescript.schema.json", + + /** + * If provided, emit these module kinds in addition to the modules specified in the tsconfig. + * Note that this option only applies to the main tsconfig.json configuration. + */ + "additionalModuleKindsToEmit": [ + // { + // /** + // * (Required) Must be one of "commonjs", "amd", "umd", "system", "es2015", "esnext" + // */ + // "moduleKind": "amd", + // + // /** + // * (Required) The name of the folder where the output will be written. + // */ + // "outFolderName": "lib-amd" + // } + ], + + /** + * If true, emit ESNext module output to the folder specified in the tsconfig "outDir" compiler option with the .mjs extension alongside (or instead of, if TSConfig specifies ESNext) the default compilation output. + */ + "emitCjsExtensionForCommonJS": true, + + /** + * If true, emit ESNext module output to the folder specified in the tsconfig "outDir" compiler option with the .mjs extension alongside (or instead of, if TSConfig specifies ESNext) the default compilation output. + */ + // "emitMjsExtensionForESModule": true, + + /** + * Specifies the intermediary folder that tests will use. Because Jest uses the + * Node.js runtime to execute tests, the module format must be CommonJS. + * + * The default value is "lib". + */ + // "emitFolderNameForTests": "lib", + + /** + * If set to "true", the TSlint task will not be invoked. + */ + // "disableTslint": true, + + /** + * Set this to change the maximum number of file handles that will be opened concurrently for writing. + * The default is 50. + */ + // "maxWriteParallelism": 50, + + /** + * Describes the way files should be statically coped from src to TS output folders + */ + "staticAssetsToCopy": { + /** + * File extensions that should be copied from the src folder to the destination folder(s). + */ + "fileExtensions": [".css", ".png"] + + /** + * Glob patterns that should be explicitly included. + */ + // "includeGlobs": [ + // "some/path/*.js" + // ], + + /** + * Glob patterns that should be explicitly excluded. This takes precedence over globs listed + * in "includeGlobs" and files that match the file extensions provided in "fileExtensions". + */ + // "excludeGlobs": [ + // "some/path/*.css" + // ] + } +} diff --git a/build-tests/heft-jest-preset-test/config/verify-coverage.js b/build-tests/heft-jest-preset-test/config/verify-coverage.js new file mode 100644 index 00000000000..5360470b42b --- /dev/null +++ b/build-tests/heft-jest-preset-test/config/verify-coverage.js @@ -0,0 +1,6 @@ +const fs = require('fs'); +// Verify that the coverage folder exists, since it would only exist +// if the preset was used. +if (!fs.existsSync(`${__dirname}/../temp/coverage`)) { + throw new Error('Coverage folder does not exist'); +} diff --git a/build-tests/heft-jest-preset-test/package.json b/build-tests/heft-jest-preset-test/package.json new file mode 100644 index 00000000000..eb0a5721c41 --- /dev/null +++ b/build-tests/heft-jest-preset-test/package.json @@ -0,0 +1,21 @@ +{ + "name": "heft-jest-preset-test", + "description": "This project illustrates configuring a Jest preset in a minimal Heft project", + "version": "1.0.0", + "private": true, + "scripts": { + "build": "heft build --clean", + "start": "heft start", + "_phase:build": "heft build --clean", + "_phase:test": "heft test --no-build && node ./config/verify-coverage.js" + }, + "devDependencies": { + "@jest/types": "29.5.0", + "@rushstack/eslint-config": "workspace:*", + "@rushstack/heft": "workspace:*", + "@rushstack/heft-jest-plugin": "workspace:*", + "@types/heft-jest": "1.0.1", + "eslint": "~8.7.0", + "typescript": "~5.0.4" + } +} diff --git a/build-tests/heft-jest-preset-test/src/index.ts b/build-tests/heft-jest-preset-test/src/index.ts new file mode 100644 index 00000000000..ee7c45de9e1 --- /dev/null +++ b/build-tests/heft-jest-preset-test/src/index.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +export function addThreeStars(input: string): string { + return `${input}***`; +} diff --git a/build-tests/heft-jest-preset-test/src/test/index.test.ts b/build-tests/heft-jest-preset-test/src/test/index.test.ts new file mode 100644 index 00000000000..af48b27f97d --- /dev/null +++ b/build-tests/heft-jest-preset-test/src/test/index.test.ts @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { addThreeStars } from '..'; + +describe(addThreeStars.name, () => { + it('adds three stars', () => { + expect(addThreeStars('***Hello World')).toEqual('***Hello World***'); + }); +}); diff --git a/build-tests/heft-jest-preset-test/tsconfig.json b/build-tests/heft-jest-preset-test/tsconfig.json new file mode 100644 index 00000000000..0ad08cab8f8 --- /dev/null +++ b/build-tests/heft-jest-preset-test/tsconfig.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + + "compilerOptions": { + "outDir": "lib", + "rootDir": "src", + + "forceConsistentCasingInFileNames": true, + "declaration": true, + "sourceMap": true, + "declarationMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictNullChecks": true, + "noUnusedLocals": true, + "types": ["heft-jest"], + + "module": "esnext", + "moduleResolution": "node", + "target": "ES2015", + "lib": ["ES2015"] + }, + "include": ["src/**/*.ts", "src/**/*.tsx"], + "exclude": ["node_modules", "lib"] +} diff --git a/build-tests/heft-jest-reporters-test/package.json b/build-tests/heft-jest-reporters-test/package.json index 07e988ee032..55f0e100e1c 100644 --- a/build-tests/heft-jest-reporters-test/package.json +++ b/build-tests/heft-jest-reporters-test/package.json @@ -19,6 +19,6 @@ "@rushstack/heft-typescript-plugin": "workspace:*", "@types/heft-jest": "1.0.1", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/heft-minimal-rig-test/package.json b/build-tests/heft-minimal-rig-test/package.json index 3a1db44e848..59c07c47bea 100644 --- a/build-tests/heft-minimal-rig-test/package.json +++ b/build-tests/heft-minimal-rig-test/package.json @@ -9,7 +9,7 @@ "_phase:build": "" }, "dependencies": { - "typescript": "~4.8.4", + "typescript": "~5.0.4", "@microsoft/api-extractor": "workspace:*", "@rushstack/heft-api-extractor-plugin": "workspace:*", "@rushstack/heft-jest-plugin": "workspace:*", diff --git a/build-tests/heft-node-everything-esm-module-test/config/rush-project.json b/build-tests/heft-node-everything-esm-module-test/config/rush-project.json index 247dc17187a..a9116e7e1f5 100644 --- a/build-tests/heft-node-everything-esm-module-test/config/rush-project.json +++ b/build-tests/heft-node-everything-esm-module-test/config/rush-project.json @@ -2,7 +2,7 @@ "operationSettings": [ { "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "outputFolderNames": ["dist", "lib", "lib-esnext", "lib-umd"] } ] } diff --git a/build-tests/heft-node-everything-esm-module-test/config/typescript.json b/build-tests/heft-node-everything-esm-module-test/config/typescript.json index dfe1589fe96..c48926f4c34 100644 --- a/build-tests/heft-node-everything-esm-module-test/config/typescript.json +++ b/build-tests/heft-node-everything-esm-module-test/config/typescript.json @@ -17,7 +17,11 @@ "moduleKind": "umd", "outFolderName": "lib-umd" } - ] + ], + + "staticAssetsToCopy": { + "fileExtensions": [".txt"] + } /** * Set this to change the maximum number of file handles that will be opened concurrently for writing. diff --git a/build-tests/heft-node-everything-esm-module-test/package.json b/build-tests/heft-node-everything-esm-module-test/package.json index cddcc84ad35..ca8f0338307 100644 --- a/build-tests/heft-node-everything-esm-module-test/package.json +++ b/build-tests/heft-node-everything-esm-module-test/package.json @@ -26,6 +26,6 @@ "heft-example-plugin-02": "workspace:*", "tslint": "~5.20.1", "tslint-microsoft-contrib": "~6.2.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/heft-node-everything-test/config/rush-project.json b/build-tests/heft-node-everything-test/config/rush-project.json index 247dc17187a..a9116e7e1f5 100644 --- a/build-tests/heft-node-everything-test/config/rush-project.json +++ b/build-tests/heft-node-everything-test/config/rush-project.json @@ -2,7 +2,7 @@ "operationSettings": [ { "operationName": "build", - "outputFolderNames": ["lib", "dist"] + "outputFolderNames": ["dist", "lib", "lib-esnext", "lib-umd"] } ] } diff --git a/build-tests/heft-node-everything-test/config/typescript.json b/build-tests/heft-node-everything-test/config/typescript.json index dfe1589fe96..c48926f4c34 100644 --- a/build-tests/heft-node-everything-test/config/typescript.json +++ b/build-tests/heft-node-everything-test/config/typescript.json @@ -17,7 +17,11 @@ "moduleKind": "umd", "outFolderName": "lib-umd" } - ] + ], + + "staticAssetsToCopy": { + "fileExtensions": [".txt"] + } /** * Set this to change the maximum number of file handles that will be opened concurrently for writing. diff --git a/build-tests/heft-node-everything-test/package.json b/build-tests/heft-node-everything-test/package.json index 93f797c4e8a..2ad7036df62 100644 --- a/build-tests/heft-node-everything-test/package.json +++ b/build-tests/heft-node-everything-test/package.json @@ -25,6 +25,6 @@ "heft-example-plugin-02": "workspace:*", "tslint": "~5.20.1", "tslint-microsoft-contrib": "~6.2.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/heft-parameter-plugin-test/package.json b/build-tests/heft-parameter-plugin-test/package.json index 020d7a3ad93..e07306fda24 100644 --- a/build-tests/heft-parameter-plugin-test/package.json +++ b/build-tests/heft-parameter-plugin-test/package.json @@ -17,6 +17,6 @@ "@rushstack/node-core-library": "workspace:*", "@types/heft-jest": "1.0.1", "heft-parameter-plugin": "workspace:*", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/heft-parameter-plugin/package.json b/build-tests/heft-parameter-plugin/package.json index 8bb8bfe69f6..0352b0a8b76 100644 --- a/build-tests/heft-parameter-plugin/package.json +++ b/build-tests/heft-parameter-plugin/package.json @@ -16,7 +16,7 @@ "@rushstack/heft-typescript-plugin": "workspace:*", "@types/node": "14.18.36", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" }, "dependencies": { "@rushstack/node-core-library": "workspace:*" diff --git a/build-tests/heft-sass-test/package.json b/build-tests/heft-sass-test/package.json index 8088500f57e..3600f1c1889 100644 --- a/build-tests/heft-sass-test/package.json +++ b/build-tests/heft-sass-test/package.json @@ -32,7 +32,7 @@ "sass-loader": "~10.0.0", "sass": "~1.3.0", "style-loader": "~2.0.0", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack": "~4.44.2" }, "dependencies": { diff --git a/build-tests/heft-typescript-composite-test/package.json b/build-tests/heft-typescript-composite-test/package.json index e9cb2870d2f..b275f935e9d 100644 --- a/build-tests/heft-typescript-composite-test/package.json +++ b/build-tests/heft-typescript-composite-test/package.json @@ -21,6 +21,6 @@ "eslint": "~8.7.0", "tslint": "~5.20.1", "tslint-microsoft-contrib": "~6.2.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/heft-typescript-v2-test/.gitignore b/build-tests/heft-typescript-v2-test/.gitignore new file mode 100644 index 00000000000..69667d9ce25 --- /dev/null +++ b/build-tests/heft-typescript-v2-test/.gitignore @@ -0,0 +1 @@ +lib-* \ No newline at end of file diff --git a/build-tests/heft-typescript-v2-test/config/api-extractor.json b/build-tests/heft-typescript-v2-test/config/api-extractor.json new file mode 100644 index 00000000000..e451cf705d0 --- /dev/null +++ b/build-tests/heft-typescript-v2-test/config/api-extractor.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + "mainEntryPointFilePath": "/lib/index.d.ts", + "apiReport": { + "enabled": true, + "reportFolder": "/etc" + }, + "docModel": { + "enabled": true + }, + "dtsRollup": { + "enabled": true, + "alphaTrimmedFilePath": "/dist/-alpha.d.ts", + "betaTrimmedFilePath": "/dist/.d.ts" + } +} diff --git a/build-tests/heft-typescript-v2-test/config/heft.json b/build-tests/heft-typescript-v2-test/config/heft.json new file mode 100644 index 00000000000..10f16a46b2c --- /dev/null +++ b/build-tests/heft-typescript-v2-test/config/heft.json @@ -0,0 +1,58 @@ +/** + * Defines configuration used by core Heft. + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json", + + "eventActions": [ + { + /** + * The kind of built-in operation that should be performed. + * The "deleteGlobs" action deletes files or folders that match the + * specified glob patterns. + */ + "actionKind": "deleteGlobs", + + /** + * The stage of the Heft run during which this action should occur. Note that actions specified in heft.json + * occur at the end of the stage of the Heft run. + */ + "heftEvent": "clean", + + /** + * A user-defined tag whose purpose is to allow configs to replace/delete handlers that were added by other + * configs. + */ + "actionId": "defaultClean", + + /** + * Glob patterns to be deleted. The paths are resolved relative to the project folder. + */ + "globsToDelete": ["dist", "lib", "lib-esnext", "lib-umd", "temp"] + } + ], + + /** + * The list of Heft plugins to be loaded. + */ + "heftPlugins": [ + // { + // /** + // * The path to the plugin package. + // */ + // "plugin": "path/to/my-plugin", + // + // /** + // * An optional object that provides additional settings that may be defined by the plugin. + // */ + // // "options": { } + // } + + { + /** + * The path to the plugin package. + */ + "plugin": "@rushstack/heft-jest-plugin" + } + ] +} diff --git a/build-tests/heft-typescript-v2-test/config/jest.config.json b/build-tests/heft-typescript-v2-test/config/jest.config.json new file mode 100644 index 00000000000..b6f305ec886 --- /dev/null +++ b/build-tests/heft-typescript-v2-test/config/jest.config.json @@ -0,0 +1,3 @@ +{ + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" +} diff --git a/build-tests/heft-typescript-v2-test/config/rush-project.json b/build-tests/heft-typescript-v2-test/config/rush-project.json new file mode 100644 index 00000000000..a9116e7e1f5 --- /dev/null +++ b/build-tests/heft-typescript-v2-test/config/rush-project.json @@ -0,0 +1,8 @@ +{ + "operationSettings": [ + { + "operationName": "build", + "outputFolderNames": ["dist", "lib", "lib-esnext", "lib-umd"] + } + ] +} diff --git a/build-tests/heft-typescript-v2-test/config/typescript.json b/build-tests/heft-typescript-v2-test/config/typescript.json new file mode 100644 index 00000000000..2128e2c9596 --- /dev/null +++ b/build-tests/heft-typescript-v2-test/config/typescript.json @@ -0,0 +1,32 @@ +/** + * Configures the TypeScript plugin for Heft. This plugin also manages linting. + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/typescript.schema.json", + + /** + * If provided, emit these module kinds in addition to the modules specified in the tsconfig. + * Note that this option only applies to the main tsconfig.json configuration. + */ + "additionalModuleKindsToEmit": [ + { + "moduleKind": "esnext", + "outFolderName": "lib-esnext" + }, + { + "moduleKind": "umd", + "outFolderName": "lib-umd" + } + ] + + /** + * If set to "true", the TSlint task will not be invoked. + */ + // "disableTslint": true, + + /** + * Set this to change the maximum number of file handles that will be opened concurrently for writing. + * The default is 50. + */ + // "maxWriteParallelism": 50 +} diff --git a/build-tests/heft-typescript-v2-test/etc/heft-typescript-v2-test.api.md b/build-tests/heft-typescript-v2-test/etc/heft-typescript-v2-test.api.md new file mode 100644 index 00000000000..65d0b27c455 --- /dev/null +++ b/build-tests/heft-typescript-v2-test/etc/heft-typescript-v2-test.api.md @@ -0,0 +1,13 @@ +## API Report File for "heft-typescript-v2-test" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public (undocumented) +export class TestClass { +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/build-tests/heft-typescript-v2-test/package.json b/build-tests/heft-typescript-v2-test/package.json new file mode 100644 index 00000000000..216072356e1 --- /dev/null +++ b/build-tests/heft-typescript-v2-test/package.json @@ -0,0 +1,23 @@ +{ + "name": "heft-typescript-v2-test", + "description": "Building this project tests building with TypeScript v2", + "version": "1.0.0", + "private": true, + "main": "lib/index.js", + "license": "MIT", + "scripts": { + "build": "heft build --clean", + "_phase:build": "heft build --clean", + "_phase:test": "heft test --no-build" + }, + "devDependencies": { + "@microsoft/api-extractor": "workspace:*", + "@rushstack/heft": "workspace:*", + "@rushstack/heft-jest-plugin": "workspace:*", + "@types/jest": "ts2.9", + "@types/node": "ts2.9", + "tslint": "~5.20.1", + "tslint-microsoft-contrib": "~6.2.0", + "typescript": "~2.9.2" + } +} diff --git a/build-tests/install-test-workspace/workspace/typescript-v3-test/src/index.ts b/build-tests/heft-typescript-v2-test/src/index.ts similarity index 100% rename from build-tests/install-test-workspace/workspace/typescript-v3-test/src/index.ts rename to build-tests/heft-typescript-v2-test/src/index.ts diff --git a/build-tests/heft-typescript-v2-test/src/test/ExampleTest.test.ts b/build-tests/heft-typescript-v2-test/src/test/ExampleTest.test.ts new file mode 100644 index 00000000000..ccae242d321 --- /dev/null +++ b/build-tests/heft-typescript-v2-test/src/test/ExampleTest.test.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +interface IInterface { + element: string; +} + +describe('Example Test', () => { + it('Correctly tests stuff', () => { + expect(true).toBeTruthy(); + }); + + it('Correctly handles snapshots', () => { + expect({ a: 1, b: 2, c: 3 }).toMatchSnapshot(); + }); + + it('Correctly handles TypeScript constructs', () => { + const interfaceInstance: IInterface = { + element: 'a' + }; + expect(interfaceInstance).toBeTruthy(); + }); +}); diff --git a/build-tests/heft-typescript-v2-test/src/test/__snapshots__/ExampleTest.test.ts.snap b/build-tests/heft-typescript-v2-test/src/test/__snapshots__/ExampleTest.test.ts.snap new file mode 100644 index 00000000000..1ca0d3b526a --- /dev/null +++ b/build-tests/heft-typescript-v2-test/src/test/__snapshots__/ExampleTest.test.ts.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Example Test Correctly handles snapshots 1`] = ` +Object { + "a": 1, + "b": 2, + "c": 3, +} +`; diff --git a/build-tests/heft-typescript-v2-test/tsconfig.json b/build-tests/heft-typescript-v2-test/tsconfig.json new file mode 100644 index 00000000000..a24c429ddf6 --- /dev/null +++ b/build-tests/heft-typescript-v2-test/tsconfig.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + + "compilerOptions": { + "outDir": "lib", + "rootDir": "src", + + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "declaration": true, + "sourceMap": true, + "declarationMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictNullChecks": true, + "noUnusedLocals": true, + "types": ["jest", "node"], + + "module": "commonjs", + "target": "es2017", + "lib": ["es2017"] + }, + "include": ["src/**/*.ts", "src/**/*.tsx"], + "exclude": ["node_modules", "lib"] +} diff --git a/build-tests/heft-typescript-v2-test/tslint.json b/build-tests/heft-typescript-v2-test/tslint.json new file mode 100644 index 00000000000..f55613b66cc --- /dev/null +++ b/build-tests/heft-typescript-v2-test/tslint.json @@ -0,0 +1,103 @@ +{ + "$schema": "http://json.schemastore.org/tslint", + + "rulesDirectory": ["tslint-microsoft-contrib"], + "rules": { + "class-name": true, + "comment-format": [true, "check-space"], + "curly": true, + "eofline": false, + "export-name": true, + "forin": true, + "indent": [true, "spaces", 2], + "interface-name": true, + "label-position": true, + "max-line-length": [true, 120], + "member-access": true, + "member-ordering": [ + true, + { + "order": [ + "public-static-field", + "protected-static-field", + "private-static-field", + "public-instance-field", + "protected-instance-field", + "private-instance-field", + "public-static-method", + "protected-static-method", + "private-static-method", + "public-constructor", + "public-instance-method", + "protected-constructor", + "protected-instance-method", + "private-constructor", + "private-instance-method" + ] + } + ], + "missing-optional-annotation": true, + "no-arg": true, + "no-any": true, + "no-bitwise": true, + "no-consecutive-blank-lines": true, + "no-console": [true, "debug", "info", "time", "timeEnd", "trace"], + "no-constant-condition": true, + "no-construct": true, + "no-debugger": true, + "no-duplicate-switch-case": true, + "no-duplicate-parameter-names": true, + "no-duplicate-variable": true, + "no-empty": true, + "no-eval": true, + "no-floating-promises": true, + "no-function-expression": true, + "no-inferrable-types": false, + "no-internal-module": true, + "no-null-keyword": true, + "no-shadowed-variable": true, + "no-string-literal": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-semicolons": true, + "no-unused-expression": true, + "no-with-statement": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [true, "check-open-brace", "check-catch", "check-else", "check-whitespace"], + "quotemark": [true, "single", "avoid-escape"], + "prefer-const": true, + "radix": true, + "semicolon": true, + "trailing-comma": [ + true, + { + "multiline": "never", + "singleline": "never" + } + ], + "triple-equals": [true, "allow-null-check"], + "typedef": [ + true, + "call-signature", + "parameter", + "property-declaration", + "variable-declaration", + "member-variable-declaration" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "use-isnan": true, + "use-named-parameter": true, + "variable-name": [true, "check-format", "allow-leading-underscore", "ban-keywords"], + "whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type"] + } +} diff --git a/build-tests/heft-typescript-v3-test/.gitignore b/build-tests/heft-typescript-v3-test/.gitignore new file mode 100644 index 00000000000..69667d9ce25 --- /dev/null +++ b/build-tests/heft-typescript-v3-test/.gitignore @@ -0,0 +1 @@ +lib-* \ No newline at end of file diff --git a/build-tests/heft-typescript-v3-test/config/api-extractor.json b/build-tests/heft-typescript-v3-test/config/api-extractor.json new file mode 100644 index 00000000000..e451cf705d0 --- /dev/null +++ b/build-tests/heft-typescript-v3-test/config/api-extractor.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + "mainEntryPointFilePath": "/lib/index.d.ts", + "apiReport": { + "enabled": true, + "reportFolder": "/etc" + }, + "docModel": { + "enabled": true + }, + "dtsRollup": { + "enabled": true, + "alphaTrimmedFilePath": "/dist/-alpha.d.ts", + "betaTrimmedFilePath": "/dist/.d.ts" + } +} diff --git a/build-tests/heft-typescript-v3-test/config/heft.json b/build-tests/heft-typescript-v3-test/config/heft.json new file mode 100644 index 00000000000..10f16a46b2c --- /dev/null +++ b/build-tests/heft-typescript-v3-test/config/heft.json @@ -0,0 +1,58 @@ +/** + * Defines configuration used by core Heft. + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json", + + "eventActions": [ + { + /** + * The kind of built-in operation that should be performed. + * The "deleteGlobs" action deletes files or folders that match the + * specified glob patterns. + */ + "actionKind": "deleteGlobs", + + /** + * The stage of the Heft run during which this action should occur. Note that actions specified in heft.json + * occur at the end of the stage of the Heft run. + */ + "heftEvent": "clean", + + /** + * A user-defined tag whose purpose is to allow configs to replace/delete handlers that were added by other + * configs. + */ + "actionId": "defaultClean", + + /** + * Glob patterns to be deleted. The paths are resolved relative to the project folder. + */ + "globsToDelete": ["dist", "lib", "lib-esnext", "lib-umd", "temp"] + } + ], + + /** + * The list of Heft plugins to be loaded. + */ + "heftPlugins": [ + // { + // /** + // * The path to the plugin package. + // */ + // "plugin": "path/to/my-plugin", + // + // /** + // * An optional object that provides additional settings that may be defined by the plugin. + // */ + // // "options": { } + // } + + { + /** + * The path to the plugin package. + */ + "plugin": "@rushstack/heft-jest-plugin" + } + ] +} diff --git a/build-tests/heft-typescript-v3-test/config/jest.config.json b/build-tests/heft-typescript-v3-test/config/jest.config.json new file mode 100644 index 00000000000..b6f305ec886 --- /dev/null +++ b/build-tests/heft-typescript-v3-test/config/jest.config.json @@ -0,0 +1,3 @@ +{ + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" +} diff --git a/build-tests/heft-typescript-v3-test/config/rush-project.json b/build-tests/heft-typescript-v3-test/config/rush-project.json new file mode 100644 index 00000000000..a9116e7e1f5 --- /dev/null +++ b/build-tests/heft-typescript-v3-test/config/rush-project.json @@ -0,0 +1,8 @@ +{ + "operationSettings": [ + { + "operationName": "build", + "outputFolderNames": ["dist", "lib", "lib-esnext", "lib-umd"] + } + ] +} diff --git a/build-tests/heft-typescript-v3-test/config/typescript.json b/build-tests/heft-typescript-v3-test/config/typescript.json new file mode 100644 index 00000000000..2128e2c9596 --- /dev/null +++ b/build-tests/heft-typescript-v3-test/config/typescript.json @@ -0,0 +1,32 @@ +/** + * Configures the TypeScript plugin for Heft. This plugin also manages linting. + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/typescript.schema.json", + + /** + * If provided, emit these module kinds in addition to the modules specified in the tsconfig. + * Note that this option only applies to the main tsconfig.json configuration. + */ + "additionalModuleKindsToEmit": [ + { + "moduleKind": "esnext", + "outFolderName": "lib-esnext" + }, + { + "moduleKind": "umd", + "outFolderName": "lib-umd" + } + ] + + /** + * If set to "true", the TSlint task will not be invoked. + */ + // "disableTslint": true, + + /** + * Set this to change the maximum number of file handles that will be opened concurrently for writing. + * The default is 50. + */ + // "maxWriteParallelism": 50 +} diff --git a/build-tests/heft-typescript-v3-test/etc/heft-typescript-v3-test.api.md b/build-tests/heft-typescript-v3-test/etc/heft-typescript-v3-test.api.md new file mode 100644 index 00000000000..6bc9edbaf10 --- /dev/null +++ b/build-tests/heft-typescript-v3-test/etc/heft-typescript-v3-test.api.md @@ -0,0 +1,13 @@ +## API Report File for "heft-typescript-v3-test" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public (undocumented) +export class TestClass { +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/build-tests/heft-typescript-v3-test/package.json b/build-tests/heft-typescript-v3-test/package.json new file mode 100644 index 00000000000..7b54856e656 --- /dev/null +++ b/build-tests/heft-typescript-v3-test/package.json @@ -0,0 +1,23 @@ +{ + "name": "heft-typescript-v3-test", + "description": "Building this project tests building with TypeScript v3", + "version": "1.0.0", + "private": true, + "main": "lib/index.js", + "license": "MIT", + "scripts": { + "build": "heft build --clean", + "_phase:build": "heft build --clean", + "_phase:test": "heft test --no-build" + }, + "devDependencies": { + "@microsoft/api-extractor": "workspace:*", + "@rushstack/heft": "workspace:*", + "@rushstack/heft-jest-plugin": "workspace:*", + "@types/jest": "ts3.9", + "@types/node": "ts3.9", + "tslint": "~5.20.1", + "tslint-microsoft-contrib": "~6.2.0", + "typescript": "~3.9.10" + } +} diff --git a/build-tests/heft-typescript-v3-test/src/index.ts b/build-tests/heft-typescript-v3-test/src/index.ts new file mode 100644 index 00000000000..15a2bae17e3 --- /dev/null +++ b/build-tests/heft-typescript-v3-test/src/index.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. + +/** + * @public + */ +export class TestClass {} // tslint:disable-line:export-name diff --git a/build-tests/heft-typescript-v3-test/src/test/ExampleTest.test.ts b/build-tests/heft-typescript-v3-test/src/test/ExampleTest.test.ts new file mode 100644 index 00000000000..ccae242d321 --- /dev/null +++ b/build-tests/heft-typescript-v3-test/src/test/ExampleTest.test.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +interface IInterface { + element: string; +} + +describe('Example Test', () => { + it('Correctly tests stuff', () => { + expect(true).toBeTruthy(); + }); + + it('Correctly handles snapshots', () => { + expect({ a: 1, b: 2, c: 3 }).toMatchSnapshot(); + }); + + it('Correctly handles TypeScript constructs', () => { + const interfaceInstance: IInterface = { + element: 'a' + }; + expect(interfaceInstance).toBeTruthy(); + }); +}); diff --git a/build-tests/heft-typescript-v3-test/src/test/__snapshots__/ExampleTest.test.ts.snap b/build-tests/heft-typescript-v3-test/src/test/__snapshots__/ExampleTest.test.ts.snap new file mode 100644 index 00000000000..1ca0d3b526a --- /dev/null +++ b/build-tests/heft-typescript-v3-test/src/test/__snapshots__/ExampleTest.test.ts.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Example Test Correctly handles snapshots 1`] = ` +Object { + "a": 1, + "b": 2, + "c": 3, +} +`; diff --git a/build-tests/heft-typescript-v3-test/tsconfig.json b/build-tests/heft-typescript-v3-test/tsconfig.json new file mode 100644 index 00000000000..a24c429ddf6 --- /dev/null +++ b/build-tests/heft-typescript-v3-test/tsconfig.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + + "compilerOptions": { + "outDir": "lib", + "rootDir": "src", + + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "declaration": true, + "sourceMap": true, + "declarationMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictNullChecks": true, + "noUnusedLocals": true, + "types": ["jest", "node"], + + "module": "commonjs", + "target": "es2017", + "lib": ["es2017"] + }, + "include": ["src/**/*.ts", "src/**/*.tsx"], + "exclude": ["node_modules", "lib"] +} diff --git a/build-tests/heft-typescript-v3-test/tslint.json b/build-tests/heft-typescript-v3-test/tslint.json new file mode 100644 index 00000000000..f55613b66cc --- /dev/null +++ b/build-tests/heft-typescript-v3-test/tslint.json @@ -0,0 +1,103 @@ +{ + "$schema": "http://json.schemastore.org/tslint", + + "rulesDirectory": ["tslint-microsoft-contrib"], + "rules": { + "class-name": true, + "comment-format": [true, "check-space"], + "curly": true, + "eofline": false, + "export-name": true, + "forin": true, + "indent": [true, "spaces", 2], + "interface-name": true, + "label-position": true, + "max-line-length": [true, 120], + "member-access": true, + "member-ordering": [ + true, + { + "order": [ + "public-static-field", + "protected-static-field", + "private-static-field", + "public-instance-field", + "protected-instance-field", + "private-instance-field", + "public-static-method", + "protected-static-method", + "private-static-method", + "public-constructor", + "public-instance-method", + "protected-constructor", + "protected-instance-method", + "private-constructor", + "private-instance-method" + ] + } + ], + "missing-optional-annotation": true, + "no-arg": true, + "no-any": true, + "no-bitwise": true, + "no-consecutive-blank-lines": true, + "no-console": [true, "debug", "info", "time", "timeEnd", "trace"], + "no-constant-condition": true, + "no-construct": true, + "no-debugger": true, + "no-duplicate-switch-case": true, + "no-duplicate-parameter-names": true, + "no-duplicate-variable": true, + "no-empty": true, + "no-eval": true, + "no-floating-promises": true, + "no-function-expression": true, + "no-inferrable-types": false, + "no-internal-module": true, + "no-null-keyword": true, + "no-shadowed-variable": true, + "no-string-literal": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-semicolons": true, + "no-unused-expression": true, + "no-with-statement": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [true, "check-open-brace", "check-catch", "check-else", "check-whitespace"], + "quotemark": [true, "single", "avoid-escape"], + "prefer-const": true, + "radix": true, + "semicolon": true, + "trailing-comma": [ + true, + { + "multiline": "never", + "singleline": "never" + } + ], + "triple-equals": [true, "allow-null-check"], + "typedef": [ + true, + "call-signature", + "parameter", + "property-declaration", + "variable-declaration", + "member-variable-declaration" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "use-isnan": true, + "use-named-parameter": true, + "variable-name": [true, "check-format", "allow-leading-underscore", "ban-keywords"], + "whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type"] + } +} diff --git a/build-tests/heft-typescript-v4-test/.eslintrc.js b/build-tests/heft-typescript-v4-test/.eslintrc.js new file mode 100644 index 00000000000..60160b354c4 --- /dev/null +++ b/build-tests/heft-typescript-v4-test/.eslintrc.js @@ -0,0 +1,7 @@ +// This is a workaround for https://github.com/eslint/eslint/issues/3458 +require('@rushstack/eslint-config/patch/modern-module-resolution'); + +module.exports = { + extends: ['@rushstack/eslint-config/profile/node'], + parserOptions: { tsconfigRootDir: __dirname } +}; diff --git a/build-tests/heft-typescript-v4-test/.gitignore b/build-tests/heft-typescript-v4-test/.gitignore new file mode 100644 index 00000000000..69667d9ce25 --- /dev/null +++ b/build-tests/heft-typescript-v4-test/.gitignore @@ -0,0 +1 @@ +lib-* \ No newline at end of file diff --git a/build-tests/heft-typescript-v4-test/config/api-extractor.json b/build-tests/heft-typescript-v4-test/config/api-extractor.json new file mode 100644 index 00000000000..e451cf705d0 --- /dev/null +++ b/build-tests/heft-typescript-v4-test/config/api-extractor.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + "mainEntryPointFilePath": "/lib/index.d.ts", + "apiReport": { + "enabled": true, + "reportFolder": "/etc" + }, + "docModel": { + "enabled": true + }, + "dtsRollup": { + "enabled": true, + "alphaTrimmedFilePath": "/dist/-alpha.d.ts", + "betaTrimmedFilePath": "/dist/.d.ts" + } +} diff --git a/build-tests/heft-typescript-v4-test/config/heft.json b/build-tests/heft-typescript-v4-test/config/heft.json new file mode 100644 index 00000000000..10f16a46b2c --- /dev/null +++ b/build-tests/heft-typescript-v4-test/config/heft.json @@ -0,0 +1,58 @@ +/** + * Defines configuration used by core Heft. + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json", + + "eventActions": [ + { + /** + * The kind of built-in operation that should be performed. + * The "deleteGlobs" action deletes files or folders that match the + * specified glob patterns. + */ + "actionKind": "deleteGlobs", + + /** + * The stage of the Heft run during which this action should occur. Note that actions specified in heft.json + * occur at the end of the stage of the Heft run. + */ + "heftEvent": "clean", + + /** + * A user-defined tag whose purpose is to allow configs to replace/delete handlers that were added by other + * configs. + */ + "actionId": "defaultClean", + + /** + * Glob patterns to be deleted. The paths are resolved relative to the project folder. + */ + "globsToDelete": ["dist", "lib", "lib-esnext", "lib-umd", "temp"] + } + ], + + /** + * The list of Heft plugins to be loaded. + */ + "heftPlugins": [ + // { + // /** + // * The path to the plugin package. + // */ + // "plugin": "path/to/my-plugin", + // + // /** + // * An optional object that provides additional settings that may be defined by the plugin. + // */ + // // "options": { } + // } + + { + /** + * The path to the plugin package. + */ + "plugin": "@rushstack/heft-jest-plugin" + } + ] +} diff --git a/build-tests/heft-typescript-v4-test/config/jest.config.json b/build-tests/heft-typescript-v4-test/config/jest.config.json new file mode 100644 index 00000000000..b6f305ec886 --- /dev/null +++ b/build-tests/heft-typescript-v4-test/config/jest.config.json @@ -0,0 +1,3 @@ +{ + "extends": "@rushstack/heft-jest-plugin/includes/jest-shared.config.json" +} diff --git a/build-tests/heft-typescript-v4-test/config/rush-project.json b/build-tests/heft-typescript-v4-test/config/rush-project.json new file mode 100644 index 00000000000..a9116e7e1f5 --- /dev/null +++ b/build-tests/heft-typescript-v4-test/config/rush-project.json @@ -0,0 +1,8 @@ +{ + "operationSettings": [ + { + "operationName": "build", + "outputFolderNames": ["dist", "lib", "lib-esnext", "lib-umd"] + } + ] +} diff --git a/build-tests/heft-typescript-v4-test/config/typescript.json b/build-tests/heft-typescript-v4-test/config/typescript.json new file mode 100644 index 00000000000..2128e2c9596 --- /dev/null +++ b/build-tests/heft-typescript-v4-test/config/typescript.json @@ -0,0 +1,32 @@ +/** + * Configures the TypeScript plugin for Heft. This plugin also manages linting. + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/typescript.schema.json", + + /** + * If provided, emit these module kinds in addition to the modules specified in the tsconfig. + * Note that this option only applies to the main tsconfig.json configuration. + */ + "additionalModuleKindsToEmit": [ + { + "moduleKind": "esnext", + "outFolderName": "lib-esnext" + }, + { + "moduleKind": "umd", + "outFolderName": "lib-umd" + } + ] + + /** + * If set to "true", the TSlint task will not be invoked. + */ + // "disableTslint": true, + + /** + * Set this to change the maximum number of file handles that will be opened concurrently for writing. + * The default is 50. + */ + // "maxWriteParallelism": 50 +} diff --git a/build-tests/heft-typescript-v4-test/etc/heft-typescript-v4-test.api.md b/build-tests/heft-typescript-v4-test/etc/heft-typescript-v4-test.api.md new file mode 100644 index 00000000000..a7ac069d53b --- /dev/null +++ b/build-tests/heft-typescript-v4-test/etc/heft-typescript-v4-test.api.md @@ -0,0 +1,13 @@ +## API Report File for "heft-typescript-v4-test" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public (undocumented) +export class TestClass { +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/build-tests/heft-typescript-v4-test/package.json b/build-tests/heft-typescript-v4-test/package.json new file mode 100644 index 00000000000..751b65a917e --- /dev/null +++ b/build-tests/heft-typescript-v4-test/package.json @@ -0,0 +1,25 @@ +{ + "name": "heft-typescript-v4-test", + "description": "Building this project tests building with TypeScript v4", + "version": "1.0.0", + "private": true, + "main": "lib/index.js", + "license": "MIT", + "scripts": { + "build": "heft build --clean", + "_phase:build": "heft build --clean", + "_phase:test": "heft test --no-build" + }, + "devDependencies": { + "@microsoft/api-extractor": "workspace:*", + "@rushstack/eslint-config": "workspace:*", + "@rushstack/heft": "workspace:*", + "@rushstack/heft-jest-plugin": "workspace:*", + "@types/jest": "ts4.9", + "@types/node": "ts4.9", + "eslint": "~8.7.0", + "tslint": "~5.20.1", + "tslint-microsoft-contrib": "~6.2.0", + "typescript": "~4.9.5" + } +} diff --git a/build-tests/heft-typescript-v4-test/src/index.ts b/build-tests/heft-typescript-v4-test/src/index.ts new file mode 100644 index 00000000000..15a2bae17e3 --- /dev/null +++ b/build-tests/heft-typescript-v4-test/src/index.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. + +/** + * @public + */ +export class TestClass {} // tslint:disable-line:export-name diff --git a/build-tests/heft-typescript-v4-test/src/test/ExampleTest.test.ts b/build-tests/heft-typescript-v4-test/src/test/ExampleTest.test.ts new file mode 100644 index 00000000000..ccae242d321 --- /dev/null +++ b/build-tests/heft-typescript-v4-test/src/test/ExampleTest.test.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +interface IInterface { + element: string; +} + +describe('Example Test', () => { + it('Correctly tests stuff', () => { + expect(true).toBeTruthy(); + }); + + it('Correctly handles snapshots', () => { + expect({ a: 1, b: 2, c: 3 }).toMatchSnapshot(); + }); + + it('Correctly handles TypeScript constructs', () => { + const interfaceInstance: IInterface = { + element: 'a' + }; + expect(interfaceInstance).toBeTruthy(); + }); +}); diff --git a/build-tests/heft-typescript-v4-test/src/test/__snapshots__/ExampleTest.test.ts.snap b/build-tests/heft-typescript-v4-test/src/test/__snapshots__/ExampleTest.test.ts.snap new file mode 100644 index 00000000000..1ca0d3b526a --- /dev/null +++ b/build-tests/heft-typescript-v4-test/src/test/__snapshots__/ExampleTest.test.ts.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Example Test Correctly handles snapshots 1`] = ` +Object { + "a": 1, + "b": 2, + "c": 3, +} +`; diff --git a/build-tests/heft-typescript-v4-test/tsconfig.json b/build-tests/heft-typescript-v4-test/tsconfig.json new file mode 100644 index 00000000000..a24c429ddf6 --- /dev/null +++ b/build-tests/heft-typescript-v4-test/tsconfig.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + + "compilerOptions": { + "outDir": "lib", + "rootDir": "src", + + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "declaration": true, + "sourceMap": true, + "declarationMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictNullChecks": true, + "noUnusedLocals": true, + "types": ["jest", "node"], + + "module": "commonjs", + "target": "es2017", + "lib": ["es2017"] + }, + "include": ["src/**/*.ts", "src/**/*.tsx"], + "exclude": ["node_modules", "lib"] +} diff --git a/build-tests/heft-typescript-v4-test/tslint.json b/build-tests/heft-typescript-v4-test/tslint.json new file mode 100644 index 00000000000..f55613b66cc --- /dev/null +++ b/build-tests/heft-typescript-v4-test/tslint.json @@ -0,0 +1,103 @@ +{ + "$schema": "http://json.schemastore.org/tslint", + + "rulesDirectory": ["tslint-microsoft-contrib"], + "rules": { + "class-name": true, + "comment-format": [true, "check-space"], + "curly": true, + "eofline": false, + "export-name": true, + "forin": true, + "indent": [true, "spaces", 2], + "interface-name": true, + "label-position": true, + "max-line-length": [true, 120], + "member-access": true, + "member-ordering": [ + true, + { + "order": [ + "public-static-field", + "protected-static-field", + "private-static-field", + "public-instance-field", + "protected-instance-field", + "private-instance-field", + "public-static-method", + "protected-static-method", + "private-static-method", + "public-constructor", + "public-instance-method", + "protected-constructor", + "protected-instance-method", + "private-constructor", + "private-instance-method" + ] + } + ], + "missing-optional-annotation": true, + "no-arg": true, + "no-any": true, + "no-bitwise": true, + "no-consecutive-blank-lines": true, + "no-console": [true, "debug", "info", "time", "timeEnd", "trace"], + "no-constant-condition": true, + "no-construct": true, + "no-debugger": true, + "no-duplicate-switch-case": true, + "no-duplicate-parameter-names": true, + "no-duplicate-variable": true, + "no-empty": true, + "no-eval": true, + "no-floating-promises": true, + "no-function-expression": true, + "no-inferrable-types": false, + "no-internal-module": true, + "no-null-keyword": true, + "no-shadowed-variable": true, + "no-string-literal": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-semicolons": true, + "no-unused-expression": true, + "no-with-statement": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [true, "check-open-brace", "check-catch", "check-else", "check-whitespace"], + "quotemark": [true, "single", "avoid-escape"], + "prefer-const": true, + "radix": true, + "semicolon": true, + "trailing-comma": [ + true, + { + "multiline": "never", + "singleline": "never" + } + ], + "triple-equals": [true, "allow-null-check"], + "typedef": [ + true, + "call-signature", + "parameter", + "property-declaration", + "variable-declaration", + "member-variable-declaration" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "use-isnan": true, + "use-named-parameter": true, + "variable-name": [true, "check-format", "allow-leading-underscore", "ban-keywords"], + "whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type"] + } +} diff --git a/build-tests/heft-webpack4-everything-test/package.json b/build-tests/heft-webpack4-everything-test/package.json index bd054a1895f..61434a3c6e8 100644 --- a/build-tests/heft-webpack4-everything-test/package.json +++ b/build-tests/heft-webpack4-everything-test/package.json @@ -23,7 +23,7 @@ "file-loader": "~6.0.0", "tslint": "~5.20.1", "tslint-microsoft-contrib": "~6.2.0", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack": "~4.44.2" } } diff --git a/build-tests/heft-webpack5-everything-test/package.json b/build-tests/heft-webpack5-everything-test/package.json index 34de9de476a..4cc873b93df 100644 --- a/build-tests/heft-webpack5-everything-test/package.json +++ b/build-tests/heft-webpack5-everything-test/package.json @@ -25,7 +25,7 @@ "html-webpack-plugin": "~5.5.0", "tslint": "~5.20.1", "tslint-microsoft-contrib": "~6.2.0", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack": "~5.80.0" } } diff --git a/build-tests/install-test-workspace/workspace/pnpm-workspace.yaml b/build-tests/install-test-workspace/workspace/pnpm-workspace.yaml index 57ea73e35fa..4eb08f9ecac 100644 --- a/build-tests/install-test-workspace/workspace/pnpm-workspace.yaml +++ b/build-tests/install-test-workspace/workspace/pnpm-workspace.yaml @@ -2,4 +2,4 @@ packages: - rush-lib-test - rush-sdk-test - typescript-newest-test - - typescript-v3-test + - typescript-v4-test diff --git a/build-tests/install-test-workspace/workspace/rush-lib-test/package.json b/build-tests/install-test-workspace/workspace/rush-lib-test/package.json index 124ffbbbdd9..7a61cf98e58 100644 --- a/build-tests/install-test-workspace/workspace/rush-lib-test/package.json +++ b/build-tests/install-test-workspace/workspace/rush-lib-test/package.json @@ -15,6 +15,6 @@ "devDependencies": { "@types/node": "14.18.36", "rimraf": "^4.1.2", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/build-tests/install-test-workspace/workspace/rush-sdk-test/package.json b/build-tests/install-test-workspace/workspace/rush-sdk-test/package.json index 9d0df0bb2f9..6b46612c93e 100644 --- a/build-tests/install-test-workspace/workspace/rush-sdk-test/package.json +++ b/build-tests/install-test-workspace/workspace/rush-sdk-test/package.json @@ -15,7 +15,7 @@ "devDependencies": { "@microsoft/rush-lib": "*", "@types/node": "14.18.36", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "rimraf": "^4.1.2" } } diff --git a/build-tests/install-test-workspace/workspace/rush-sdk-test/src/start.ts b/build-tests/install-test-workspace/workspace/rush-sdk-test/src/start.ts index 9db90dcf62d..4eafb857e20 100644 --- a/build-tests/install-test-workspace/workspace/rush-sdk-test/src/start.ts +++ b/build-tests/install-test-workspace/workspace/rush-sdk-test/src/start.ts @@ -13,5 +13,5 @@ console.log(config.commonFolder); console.log('Calling an internal API...'); // Use a path-based import to access an internal API (do so at your own risk!) -import { GitEmailPolicy } from '@rushstack/rush-sdk/lib/logic/policy/GitEmailPolicy'; +import * as GitEmailPolicy from '@rushstack/rush-sdk/lib/logic/policy/GitEmailPolicy'; console.log(GitEmailPolicy.getEmailExampleLines(config)); diff --git a/build-tests/install-test-workspace/workspace/typescript-newest-test/package.json b/build-tests/install-test-workspace/workspace/typescript-newest-test/package.json index 7284e796538..776c3eae121 100644 --- a/build-tests/install-test-workspace/workspace/typescript-newest-test/package.json +++ b/build-tests/install-test-workspace/workspace/typescript-newest-test/package.json @@ -13,7 +13,7 @@ "@rushstack/heft": "*", "@rushstack/heft-lint-plugin": "*", "@rushstack/heft-typescript-plugin": "*", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "tslint": "~5.20.1", "eslint": "~8.7.0" } diff --git a/build-tests/install-test-workspace/workspace/typescript-v4-test/.eslintrc.js b/build-tests/install-test-workspace/workspace/typescript-v4-test/.eslintrc.js new file mode 100644 index 00000000000..60160b354c4 --- /dev/null +++ b/build-tests/install-test-workspace/workspace/typescript-v4-test/.eslintrc.js @@ -0,0 +1,7 @@ +// This is a workaround for https://github.com/eslint/eslint/issues/3458 +require('@rushstack/eslint-config/patch/modern-module-resolution'); + +module.exports = { + extends: ['@rushstack/eslint-config/profile/node'], + parserOptions: { tsconfigRootDir: __dirname } +}; diff --git a/build-tests/install-test-workspace/workspace/typescript-v3-test/config/heft.json b/build-tests/install-test-workspace/workspace/typescript-v4-test/config/heft.json similarity index 100% rename from build-tests/install-test-workspace/workspace/typescript-v3-test/config/heft.json rename to build-tests/install-test-workspace/workspace/typescript-v4-test/config/heft.json diff --git a/build-tests/install-test-workspace/workspace/typescript-v3-test/config/rush-project.json b/build-tests/install-test-workspace/workspace/typescript-v4-test/config/rush-project.json similarity index 100% rename from build-tests/install-test-workspace/workspace/typescript-v3-test/config/rush-project.json rename to build-tests/install-test-workspace/workspace/typescript-v4-test/config/rush-project.json diff --git a/build-tests/install-test-workspace/workspace/typescript-v3-test/package.json b/build-tests/install-test-workspace/workspace/typescript-v4-test/package.json similarity index 69% rename from build-tests/install-test-workspace/workspace/typescript-v3-test/package.json rename to build-tests/install-test-workspace/workspace/typescript-v4-test/package.json index 7284e796538..6d851f87386 100644 --- a/build-tests/install-test-workspace/workspace/typescript-v3-test/package.json +++ b/build-tests/install-test-workspace/workspace/typescript-v4-test/package.json @@ -1,6 +1,6 @@ { - "name": "typescript-newest-test", - "description": "Building this project tests Heft with the newest supported TypeScript compiler version", + "name": "typescript-v4-test", + "description": "Building this project tests Heft with TypeScript v4", "version": "1.0.0", "private": true, "main": "lib/index.js", @@ -13,7 +13,7 @@ "@rushstack/heft": "*", "@rushstack/heft-lint-plugin": "*", "@rushstack/heft-typescript-plugin": "*", - "typescript": "~4.8.4", + "typescript": "~4.7.0", "tslint": "~5.20.1", "eslint": "~8.7.0" } diff --git a/build-tests/install-test-workspace/workspace/typescript-v4-test/src/index.ts b/build-tests/install-test-workspace/workspace/typescript-v4-test/src/index.ts new file mode 100644 index 00000000000..15a2bae17e3 --- /dev/null +++ b/build-tests/install-test-workspace/workspace/typescript-v4-test/src/index.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. + +/** + * @public + */ +export class TestClass {} // tslint:disable-line:export-name diff --git a/build-tests/install-test-workspace/workspace/typescript-v3-test/tsconfig.json b/build-tests/install-test-workspace/workspace/typescript-v4-test/tsconfig.json similarity index 100% rename from build-tests/install-test-workspace/workspace/typescript-v3-test/tsconfig.json rename to build-tests/install-test-workspace/workspace/typescript-v4-test/tsconfig.json diff --git a/build-tests/install-test-workspace/workspace/typescript-v3-test/tslint.json b/build-tests/install-test-workspace/workspace/typescript-v4-test/tslint.json similarity index 100% rename from build-tests/install-test-workspace/workspace/typescript-v3-test/tslint.json rename to build-tests/install-test-workspace/workspace/typescript-v4-test/tslint.json diff --git a/build-tests/localization-plugin-test-01/package.json b/build-tests/localization-plugin-test-01/package.json index fd7e1fc268a..12c1d14dcaa 100644 --- a/build-tests/localization-plugin-test-01/package.json +++ b/build-tests/localization-plugin-test-01/package.json @@ -16,7 +16,7 @@ "@types/webpack-env": "1.18.0", "html-webpack-plugin": "~4.5.2", "ts-loader": "6.0.0", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack": "~4.44.2", "webpack-bundle-analyzer": "~4.5.0", "webpack-cli": "~3.3.2", diff --git a/build-tests/localization-plugin-test-02/package.json b/build-tests/localization-plugin-test-02/package.json index f6c173b611d..408cf58b866 100644 --- a/build-tests/localization-plugin-test-02/package.json +++ b/build-tests/localization-plugin-test-02/package.json @@ -18,7 +18,7 @@ "html-webpack-plugin": "~4.5.2", "lodash": "~4.17.15", "ts-loader": "6.0.0", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack-bundle-analyzer": "~4.5.0", "webpack-cli": "~3.3.2", "webpack-dev-server": "~4.9.3", diff --git a/build-tests/localization-plugin-test-02/src/indexA.ts b/build-tests/localization-plugin-test-02/src/indexA.ts index 7f1cfd4cbf7..56097124821 100644 --- a/build-tests/localization-plugin-test-02/src/indexA.ts +++ b/build-tests/localization-plugin-test-02/src/indexA.ts @@ -28,6 +28,11 @@ import(/* webpackChunkName: 'chunk-without-strings' */ './chunks/chunkWithoutStr } ); +// @ts-expect-error +import('non-existent').then(() => { + // Do nothing. +}); + console.log(strings5.string1); console.log(strings5.stringWithQuotes); console.log(strings5.stringWithTabsAndNewlines); diff --git a/build-tests/localization-plugin-test-02/webpack.config.js b/build-tests/localization-plugin-test-02/webpack.config.js index 785c0119116..421cb97712e 100644 --- a/build-tests/localization-plugin-test-02/webpack.config.js +++ b/build-tests/localization-plugin-test-02/webpack.config.js @@ -54,6 +54,9 @@ function generateConfiguration(mode, outputFolderName) { devtool: 'source-map', plugins: [ new webpack.optimize.ModuleConcatenationPlugin(), + new webpack.IgnorePlugin({ + resourceRegExp: /^non-existent$/ + }), new LocalizationPlugin({ localizedData: { defaultLocale: { diff --git a/build-tests/localization-plugin-test-03/package.json b/build-tests/localization-plugin-test-03/package.json index 3fe70d099e7..a0770ac7242 100644 --- a/build-tests/localization-plugin-test-03/package.json +++ b/build-tests/localization-plugin-test-03/package.json @@ -15,7 +15,7 @@ "@types/webpack-env": "1.18.0", "html-webpack-plugin": "~4.5.2", "ts-loader": "6.0.0", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack-bundle-analyzer": "~4.5.0", "webpack-cli": "~3.3.2", "webpack-dev-server": "~4.9.3", 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 3e143b5e9b5..7e50921c892 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 @@ -18,7 +18,7 @@ "@rushstack/node-core-library": "workspace:*", "@types/node": "14.18.36", "eslint": "~8.7.0", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "http-proxy": "~1.18.1", "@types/http-proxy": "~1.17.8" } diff --git a/build-tests/set-webpack-public-path-plugin-webpack4-test/package.json b/build-tests/set-webpack-public-path-plugin-webpack4-test/package.json index 40bb88b8bcc..a566c985cb0 100644 --- a/build-tests/set-webpack-public-path-plugin-webpack4-test/package.json +++ b/build-tests/set-webpack-public-path-plugin-webpack4-test/package.json @@ -18,7 +18,7 @@ "@types/webpack-env": "1.18.0", "eslint": "~8.7.0", "html-webpack-plugin": "~4.5.2", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "webpack": "~4.44.2" } } diff --git a/build-tests/ts-command-line-test/package.json b/build-tests/ts-command-line-test/package.json index 8d61f3936fe..7a557f8caa2 100644 --- a/build-tests/ts-command-line-test/package.json +++ b/build-tests/ts-command-line-test/package.json @@ -12,6 +12,6 @@ "@rushstack/ts-command-line": "workspace:*", "@types/node": "14.18.36", "fs-extra": "~7.0.1", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/common/changes/@microsoft/api-extractor-model/bump-cyclics_2023-05-22-06-43.json b/common/changes/@microsoft/api-extractor-model/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..52f6a7d52bc --- /dev/null +++ b/common/changes/@microsoft/api-extractor-model/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@microsoft/api-extractor-model" + } + ], + "packageName": "@microsoft/api-extractor-model", + "email": "iclanton@users.noreply.github.com" +} \ No newline at end of file diff --git a/common/changes/@microsoft/api-extractor/bump-cyclics_2023-05-22-06-43.json b/common/changes/@microsoft/api-extractor/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..f7c3a8a84e4 --- /dev/null +++ b/common/changes/@microsoft/api-extractor/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@microsoft/api-extractor" + } + ], + "packageName": "@microsoft/api-extractor", + "email": "iclanton@users.noreply.github.com" +} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/enelson-http-cache_2023-02-15-13-36.json b/common/changes/@microsoft/rush/enelson-http-cache_2023-02-15-13-36.json deleted file mode 100644 index 94560cc615a..00000000000 --- a/common/changes/@microsoft/rush/enelson-http-cache_2023-02-15-13-36.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/rush", - "comment": "Add built-in plugin rush-http-build-cache-plugin", - "type": "none" - } - ], - "packageName": "@microsoft/rush" -} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/fix-look-by-path_2023-04-25-09-41.json b/common/changes/@microsoft/rush/fix-look-by-path_2023-04-25-09-41.json deleted file mode 100644 index d5b4c94712a..00000000000 --- a/common/changes/@microsoft/rush/fix-look-by-path_2023-04-25-09-41.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/rush", - "comment": "Fix an issue where the last character in a project's path is ignored when determining which files contribute to the project's cache ID.", - "type": "none" - } - ], - "packageName": "@microsoft/rush" -} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/main_2023-04-19-18-11.json b/common/changes/@microsoft/rush/main_2023-04-19-18-11.json deleted file mode 100644 index 5058551ff8c..00000000000 --- a/common/changes/@microsoft/rush/main_2023-04-19-18-11.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/rush", - "comment": "Update webpack to v5.80.0", - "type": "patch" - } - ], - "packageName": "@microsoft/rush" -} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/octogonz-fix-version-policy_2023-04-22-19-38.json b/common/changes/@microsoft/rush/octogonz-fix-version-policy_2023-04-22-19-38.json deleted file mode 100644 index bd7ff97cb34..00000000000 --- a/common/changes/@microsoft/rush/octogonz-fix-version-policy_2023-04-22-19-38.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/rush", - "comment": "", - "type": "none" - } - ], - "packageName": "@microsoft/rush" -} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/rush-version-performance_2023-04-20-20-57.json b/common/changes/@microsoft/rush/rush-version-performance_2023-04-20-20-57.json deleted file mode 100644 index c1f293d5625..00000000000 --- a/common/changes/@microsoft/rush/rush-version-performance_2023-04-20-20-57.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/rush", - "comment": "Improve performance of 'rush version' when using 'workspace:' protocol.", - "type": "none" - } - ], - "packageName": "@microsoft/rush" -} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/rush-version-workspace-perf_2023-04-20-22-52.json b/common/changes/@microsoft/rush/rush-version-workspace-perf_2023-04-20-22-52.json deleted file mode 100644 index 03f7218f366..00000000000 --- a/common/changes/@microsoft/rush/rush-version-workspace-perf_2023-04-20-22-52.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/rush", - "comment": "Fix a performance bug in `rush version` when using `workspace:` protocol.", - "type": "none" - } - ], - "packageName": "@microsoft/rush" -} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/user-danade-RefactorDeployManager_2023-04-19-20-01.json b/common/changes/@microsoft/rush/user-danade-RefactorDeployManager_2023-04-19-20-01.json deleted file mode 100644 index bd7ff97cb34..00000000000 --- a/common/changes/@microsoft/rush/user-danade-RefactorDeployManager_2023-04-19-20-01.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@microsoft/rush", - "comment": "", - "type": "none" - } - ], - "packageName": "@microsoft/rush" -} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-patch/bump-cyclics_2023-05-22-06-43.json b/common/changes/@rushstack/eslint-patch/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..6a61cc13329 --- /dev/null +++ b/common/changes/@rushstack/eslint-patch/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/eslint-patch" + } + ], + "packageName": "@rushstack/eslint-patch", + "email": "iclanton@users.noreply.github.com" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-patch/enelson-package-update_2023-01-27-06-53.json b/common/changes/@rushstack/eslint-patch/enelson-package-update_2023-01-27-06-53.json deleted file mode 100644 index ceefa44d69e..00000000000 --- a/common/changes/@rushstack/eslint-patch/enelson-package-update_2023-01-27-06-53.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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-patch/octogonz-bump-decoupled_2023-01-28-02-57.json b/common/changes/@rushstack/eslint-patch/octogonz-bump-decoupled_2023-01-28-02-57.json deleted file mode 100644 index ceefa44d69e..00000000000 --- a/common/changes/@rushstack/eslint-patch/octogonz-bump-decoupled_2023-01-28-02-57.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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/bump-cyclics_2023-05-22-06-43.json b/common/changes/@rushstack/eslint-plugin-packlets/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..a04cd0021ef --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-packlets/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/eslint-plugin-packlets" + } + ], + "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-packlets/enelson-package-update_2023-01-27-06-53.json b/common/changes/@rushstack/eslint-plugin-packlets/enelson-package-update_2023-01-27-06-53.json deleted file mode 100644 index ff918c1ad1d..00000000000 --- a/common/changes/@rushstack/eslint-plugin-packlets/enelson-package-update_2023-01-27-06-53.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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_2023-01-28-02-57.json b/common/changes/@rushstack/eslint-plugin-packlets/octogonz-bump-decoupled_2023-01-28-02-57.json deleted file mode 100644 index ff918c1ad1d..00000000000 --- a/common/changes/@rushstack/eslint-plugin-packlets/octogonz-bump-decoupled_2023-01-28-02-57.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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-security/bump-cyclics_2023-05-22-06-43.json b/common/changes/@rushstack/eslint-plugin-security/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..e8c34c96411 --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin-security/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/eslint-plugin-security" + } + ], + "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-security/enelson-package-update_2023-01-27-06-53.json b/common/changes/@rushstack/eslint-plugin-security/enelson-package-update_2023-01-27-06-53.json deleted file mode 100644 index a4477ef1a61..00000000000 --- a/common/changes/@rushstack/eslint-plugin-security/enelson-package-update_2023-01-27-06-53.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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_2023-01-28-02-57.json b/common/changes/@rushstack/eslint-plugin-security/octogonz-bump-decoupled_2023-01-28-02-57.json deleted file mode 100644 index a4477ef1a61..00000000000 --- a/common/changes/@rushstack/eslint-plugin-security/octogonz-bump-decoupled_2023-01-28-02-57.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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/bump-cyclics_2023-05-22-06-43.json b/common/changes/@rushstack/eslint-plugin/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..5669a1df6aa --- /dev/null +++ b/common/changes/@rushstack/eslint-plugin/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/eslint-plugin" + } + ], + "packageName": "@rushstack/eslint-plugin", + "email": "iclanton@users.noreply.github.com" +} \ No newline at end of file diff --git a/common/changes/@rushstack/eslint-plugin/enelson-package-update_2023-01-27-06-53.json b/common/changes/@rushstack/eslint-plugin/enelson-package-update_2023-01-27-06-53.json deleted file mode 100644 index dcf93469653..00000000000 --- a/common/changes/@rushstack/eslint-plugin/enelson-package-update_2023-01-27-06-53.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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_2023-01-28-02-57.json b/common/changes/@rushstack/eslint-plugin/octogonz-bump-decoupled_2023-01-28-02-57.json deleted file mode 100644 index dcf93469653..00000000000 --- a/common/changes/@rushstack/eslint-plugin/octogonz-bump-decoupled_2023-01-28-02-57.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@rushstack/eslint-plugin", - "comment": "", - "type": "none" - } - ], - "packageName": "@rushstack/eslint-plugin" -} \ No newline at end of file diff --git a/common/changes/@rushstack/heft-config-file/bump-cyclics_2023-05-22-06-43.json b/common/changes/@rushstack/heft-config-file/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..ebc8dd79c07 --- /dev/null +++ b/common/changes/@rushstack/heft-config-file/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/heft-config-file" + } + ], + "packageName": "@rushstack/heft-config-file", + "email": "iclanton@users.noreply.github.com" +} \ No newline at end of file diff --git a/common/changes/@microsoft/rush/fix-rush-serve-version_2023-04-27-16-52.json b/common/changes/@rushstack/heft/bump-cyclics_2023-05-22-06-43.json similarity index 62% rename from common/changes/@microsoft/rush/fix-rush-serve-version_2023-04-27-16-52.json rename to common/changes/@rushstack/heft/bump-cyclics_2023-05-22-06-43.json index efcd84c45fb..ef525830e37 100644 --- a/common/changes/@microsoft/rush/fix-rush-serve-version_2023-04-27-16-52.json +++ b/common/changes/@rushstack/heft/bump-cyclics_2023-05-22-06-43.json @@ -3,9 +3,9 @@ { "comment": "", "type": "none", - "packageName": "@microsoft/rush" + "packageName": "@rushstack/heft" } ], - "packageName": "@microsoft/rush", + "packageName": "@rushstack/heft", "email": "iclanton@users.noreply.github.com" } \ No newline at end of file diff --git a/common/changes/@rushstack/node-core-library/bump-cyclics_2023-05-22-06-43.json b/common/changes/@rushstack/node-core-library/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..db57b2feb86 --- /dev/null +++ b/common/changes/@rushstack/node-core-library/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "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/rig-package/bump-cyclics_2023-05-22-06-43.json b/common/changes/@rushstack/rig-package/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..c66505525a1 --- /dev/null +++ b/common/changes/@rushstack/rig-package/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/rig-package" + } + ], + "packageName": "@rushstack/rig-package", + "email": "iclanton@users.noreply.github.com" +} \ No newline at end of file diff --git a/common/changes/@rushstack/tree-pattern/bump-cyclics_2023-05-22-06-43.json b/common/changes/@rushstack/tree-pattern/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..619a10c75e3 --- /dev/null +++ b/common/changes/@rushstack/tree-pattern/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@rushstack/tree-pattern" + } + ], + "packageName": "@rushstack/tree-pattern", + "email": "iclanton@users.noreply.github.com" +} \ No newline at end of file diff --git a/common/changes/@rushstack/tree-pattern/typescript-5_2023-05-05-23-13.json b/common/changes/@rushstack/tree-pattern/typescript-5_2023-05-05-23-13.json new file mode 100644 index 00000000000..120c33a1f7e --- /dev/null +++ b/common/changes/@rushstack/tree-pattern/typescript-5_2023-05-05-23-13.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/ts-command-line/bump-cyclics_2023-05-22-06-43.json b/common/changes/@rushstack/ts-command-line/bump-cyclics_2023-05-22-06-43.json new file mode 100644 index 00000000000..1f3658b8dc4 --- /dev/null +++ b/common/changes/@rushstack/ts-command-line/bump-cyclics_2023-05-22-06-43.json @@ -0,0 +1,11 @@ +{ + "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/rush/common-versions.json b/common/config/rush/common-versions.json index 959371baa05..60bc27da376 100644 --- a/common/config/rush/common-versions.json +++ b/common/config/rush/common-versions.json @@ -29,7 +29,7 @@ // Preferring it avoids errors for indirect dependencies that request it as a peer dependency. // It's also the newest supported compiler, used by most build tests and used as the bundled compiler // engine for API Extractor. - "typescript": "~4.8.4", + "typescript": "~5.0.4", // Workaround for https://github.com/microsoft/rushstack/issues/1466 "eslint": "~8.7.0" @@ -69,10 +69,14 @@ * (in addition to whatever "usual" version is being used by other projects in the repo): */ "typescript": [ - // "~4.7.4" is the (inferred, not alternative) range used by most projects in this repo + // "~5.0.4" is the (inferred, not alternative) range used by most projects in this repo // The oldest supported compiler, used by build-tests/api-extractor-lib1-test - "~2.9.2" + "~2.9.2", + // For testing Heft with TS V3 + "~3.9.10", + // For testing Heft with TS V4 + "~4.9.5" ], "source-map": [ "~0.6.1" // API Extractor is using an older version of source-map because newer versions are async @@ -91,6 +95,18 @@ "style-loader": ["~2.0.0"], "terser-webpack-plugin": ["~3.0.8"], "terser": ["~4.8.0"], - "webpack": ["~4.44.2"] + "webpack": ["~4.44.2"], + "@types/node": [ + // These versions are used by testing projects + "ts2.9", + "ts3.9", + "ts4.9" + ], + "@types/jest": [ + // These versions are used by testing projects + "ts2.9", + "ts3.9", + "ts4.9" + ] } } diff --git a/common/config/rush/nonbrowser-approved-packages.json b/common/config/rush/nonbrowser-approved-packages.json index 62bc0386ff0..20c80835eb7 100644 --- a/common/config/rush/nonbrowser-approved-packages.json +++ b/common/config/rush/nonbrowser-approved-packages.json @@ -658,6 +658,10 @@ "name": "sass", "allowedCategories": [ "libraries", "tests" ] }, + { + "name": "sass-embedded", + "allowedCategories": [ "libraries" ] + }, { "name": "sass-loader", "allowedCategories": [ "libraries", "tests" ] diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index b414a70a18e..7bafbd41a9d 100644 --- a/common/config/rush/version-policies.json +++ b/common/config/rush/version-policies.json @@ -102,8 +102,8 @@ { "policyName": "rush", "definitionName": "lockStepVersion", - "version": "5.97.1", - "nextBump": "patch", + "version": "5.98.0", + "nextBump": "minor", "mainProject": "@microsoft/rush" } ] diff --git a/common/reviews/api/heft-config-file.api.md b/common/reviews/api/heft-config-file.api.md index 0bda735760b..f73abcc5e94 100644 --- a/common/reviews/api/heft-config-file.api.md +++ b/common/reviews/api/heft-config-file.api.md @@ -24,7 +24,7 @@ export type IConfigurationFileOptions = IConfigurationFileOp // @beta (undocumented) export interface IConfigurationFileOptionsBase { - jsonPathMetadata?: IJsonPathsMetadata; + jsonPathMetadata?: IJsonPathsMetadata; projectRelativeFilePath: string; propertyInheritance?: IPropertiesInheritance; propertyInheritanceDefaults?: IPropertyInheritanceDefaults; @@ -45,8 +45,8 @@ export interface IConfigurationFileOptionsWithJsonSchemaObject string; +export interface ICustomJsonPathMetadata { + customResolver?: (resolverOptions: IJsonPathMetadataResolverOptions) => string; pathResolutionMethod?: PathResolutionMethod.custom; } @@ -56,12 +56,20 @@ export interface ICustomPropertyInheritance extends IPropertyInheritanc } // @beta (undocumented) -export type IJsonPathMetadata = ICustomJsonPathMetadata | INonCustomJsonPathMetadata; +export type IJsonPathMetadata = ICustomJsonPathMetadata | INonCustomJsonPathMetadata; // @beta -export interface IJsonPathsMetadata { +export interface IJsonPathMetadataResolverOptions { + configurationFile: Partial; + configurationFilePath: string; + propertyName: string; + propertyValue: string; +} + +// @beta +export interface IJsonPathsMetadata { // (undocumented) - [jsonPath: string]: IJsonPathMetadata; + [jsonPath: string]: IJsonPathMetadata; } // @beta (undocumented) diff --git a/common/reviews/api/node-core-library.api.md b/common/reviews/api/node-core-library.api.md index 4ff544d2d43..7aeb8d3a89c 100644 --- a/common/reviews/api/node-core-library.api.md +++ b/common/reviews/api/node-core-library.api.md @@ -8,6 +8,8 @@ import * as child_process from 'child_process'; import * as fs from 'fs'; +import { Writable } from 'stream'; +import { WritableOptions } from 'stream'; // @public export enum AlreadyExistsBehavior { @@ -337,6 +339,11 @@ export interface IConsoleTerminalProviderOptions { verboseEnabled: boolean; } +// @beta +export interface IDynamicPrefixProxyTerminalProviderOptions extends IPrefixProxyTerminalProviderOptionsBase { + getPrefix: () => string; +} + // @public export interface IEnvironmentEntry { name: string; @@ -634,6 +641,14 @@ export interface IPeerDependenciesMetaTable { }; } +// @beta (undocumented) +export type IPrefixProxyTerminalProviderOptions = IStaticPrefixProxyTerminalProviderOptions | IDynamicPrefixProxyTerminalProviderOptions; + +// @beta (undocumented) +export interface IPrefixProxyTerminalProviderOptionsBase { + terminalProvider: ITerminalProvider; +} + // @public export interface IProtectableMapParameters { onClear?: (source: ProtectableMap) => void; @@ -651,6 +666,11 @@ export interface IRunWithRetriesOptions { retryDelayMs?: number; } +// @beta +export interface IStaticPrefixProxyTerminalProviderOptions extends IPrefixProxyTerminalProviderOptionsBase { + prefix: string; +} + // @beta (undocumented) export interface IStringBufferOutputOptions { normalizeSpecialCharacters: boolean; @@ -690,6 +710,13 @@ export interface ITerminalProvider { write(data: string, severity: TerminalProviderSeverity): void; } +// @beta +export interface ITerminalWritableOptions { + severity: TerminalProviderSeverity; + terminal: ITerminal; + writableOptions?: WritableOptions; +} + // @public export class JsonFile { // @internal (undocumented) @@ -843,6 +870,17 @@ export enum PosixModeBits { UserWrite = 128 } +// @beta +export class PrefixProxyTerminalProvider implements ITerminalProvider { + constructor(options: IPrefixProxyTerminalProviderOptions); + // @override (undocumented) + get eolCharacter(): string; + // @override (undocumented) + get supportsColor(): boolean; + // @override (undocumented) + write(data: string, severity: TerminalProviderSeverity): void; +} + // @public export class ProtectableMap { constructor(parameters: IProtectableMapParameters); @@ -925,12 +963,20 @@ export enum TerminalProviderSeverity { warning = 1 } +// @beta +export class TerminalWritable extends Writable { + constructor(options: ITerminalWritableOptions); + // (undocumented) + _write(chunk: string | Buffer | Uint8Array, encoding: string, callback: (error?: Error | null) => void): void; +} + // @public export class Text { static convertTo(input: string, newlineKind: NewlineKind): string; static convertToCrLf(input: string): string; static convertToLf(input: string): string; static ensureTrailingNewline(s: string, newlineKind?: NewlineKind): string; + static escapeRegExp(literal: string): string; static getNewline(newlineKind: NewlineKind): string; static padEnd(s: string, minimumLength: number, paddingCharacter?: string): string; static padStart(s: string, minimumLength: number, paddingCharacter?: string): string; diff --git a/common/reviews/api/package-extractor.api.md b/common/reviews/api/package-extractor.api.md index 6277712776b..da60437e10d 100644 --- a/common/reviews/api/package-extractor.api.md +++ b/common/reviews/api/package-extractor.api.md @@ -7,6 +7,13 @@ import { IPackageJson } from '@rushstack/node-core-library'; import { ITerminal } from '@rushstack/node-core-library'; +// @public +export interface IExtractorMetadataJson { + links: ILinkInfo[]; + mainProjectName: string; + projects: IProjectInfoJson[]; +} + // @public export interface IExtractorOptions { createArchiveFilePath?: string; @@ -34,6 +41,19 @@ export interface IExtractorProjectConfiguration { projectName: string; } +// @public +export interface ILinkInfo { + kind: 'fileLink' | 'folderLink'; + linkPath: string; + targetPath: string; +} + +// @public +export interface IProjectInfoJson { + path: string; + projectName: string; +} + // @public export class PackageExtractor { extractAsync(options: IExtractorOptions): Promise; diff --git a/common/reviews/api/rush-lib.api.md b/common/reviews/api/rush-lib.api.md index 9e050f485ac..72abe516241 100644 --- a/common/reviews/api/rush-lib.api.md +++ b/common/reviews/api/rush-lib.api.md @@ -93,7 +93,7 @@ export class ChangeManager { // Warning: (ae-forgotten-export) The symbol "IBuildCacheJson" needs to be exported by the entry point index.d.ts // // @beta (undocumented) -export type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider; +export type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider | Promise; // @public export class CommonVersionsConfiguration { @@ -303,6 +303,7 @@ export interface IExecutionResult { export interface IExperimentsJson { buildCacheWithAllowWarningsInSuccessfulBuild?: boolean; cleanInstallAfterNpmrcChanges?: boolean; + forbidPhantomResolvableNodeModulesFolders?: boolean; noChmodFieldInTarHeaderNormalization?: boolean; omitImportersFromPreventManualShrinkwrapChanges?: boolean; phasedCommands?: boolean; @@ -466,13 +467,16 @@ export interface IPhase { self: Set; upstream: Set; }; - ignoreMissingScript: boolean; isSynthetic: boolean; logFilenameIdentifier: string; + missingScriptBehavior: IPhaseBehaviorForMissingScript; name: string; shellCommand?: string; } +// @alpha +export type IPhaseBehaviorForMissingScript = 'silent' | 'log' | 'error'; + // @beta export interface IPhasedCommand extends IRushCommand { // @alpha @@ -911,6 +915,8 @@ export class RushConfiguration { readonly tempShrinkwrapPreinstallFilename: string; static tryFindRushJsonLocation(options?: ITryFindRushJsonLocationOptions): string | undefined; tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined; + // (undocumented) + static tryLoadFromDefaultLocation(options?: ITryFindRushJsonLocationOptions): RushConfiguration | undefined; // @beta (undocumented) readonly versionPolicyConfiguration: VersionPolicyConfiguration; // @beta (undocumented) @@ -967,6 +973,7 @@ export class RushConstants { static readonly buildCacheVersion: number; static readonly buildCommandName: string; static readonly bulkCommandKind: 'bulk'; + static readonly bypassPolicyFlagLongName: '--bypass-policy'; static readonly changeFilesFolderName: string; static readonly commandLineFilename: string; static readonly commonFolderName: string; diff --git a/eslint/eslint-config/CHANGELOG.json b/eslint/eslint-config/CHANGELOG.json index 2f3d30f95c6..51d23925b96 100644 --- a/eslint/eslint-config/CHANGELOG.json +++ b/eslint/eslint-config/CHANGELOG.json @@ -1,6 +1,32 @@ { "name": "@rushstack/eslint-config", "entries": [ + { + "version": "3.3.0", + "tag": "@rushstack/eslint-config_v3.3.0", + "date": "Mon, 22 May 2023 06:34:32 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade the @typescript-eslint/* dependencies to ~5.59.2" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-patch\" to `1.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-plugin\" to `0.12.0`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-plugin-packlets\" to `0.7.0`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-plugin-security\" to `0.6.0`" + } + ] + } + }, { "version": "3.2.0", "tag": "@rushstack/eslint-config_v3.2.0", diff --git a/eslint/eslint-config/CHANGELOG.md b/eslint/eslint-config/CHANGELOG.md index 6035ec8f9cd..9be9b02e626 100644 --- a/eslint/eslint-config/CHANGELOG.md +++ b/eslint/eslint-config/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @rushstack/eslint-config -This log was last generated on Fri, 10 Feb 2023 01:18:50 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:32 GMT and should not be manually modified. + +## 3.3.0 +Mon, 22 May 2023 06:34:32 GMT + +### Minor changes + +- Upgrade the @typescript-eslint/* dependencies to ~5.59.2 ## 3.2.0 Fri, 10 Feb 2023 01:18:50 GMT diff --git a/eslint/eslint-config/package.json b/eslint/eslint-config/package.json index 24792c82842..3280c6e13fe 100644 --- a/eslint/eslint-config/package.json +++ b/eslint/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/eslint-config", - "version": "3.2.0", + "version": "3.3.0", "description": "A TypeScript ESLint ruleset designed for large teams and projects", "license": "MIT", "repository": { @@ -31,16 +31,16 @@ "@rushstack/eslint-plugin": "workspace:*", "@rushstack/eslint-plugin-packlets": "workspace:*", "@rushstack/eslint-plugin-security": "workspace:*", - "@typescript-eslint/eslint-plugin": "~5.38.0", - "@typescript-eslint/experimental-utils": "~5.38.0", - "@typescript-eslint/parser": "~5.38.0", - "@typescript-eslint/typescript-estree": "~5.38.0", + "@typescript-eslint/eslint-plugin": "~5.59.2", + "@typescript-eslint/experimental-utils": "~5.59.2", + "@typescript-eslint/parser": "~5.59.2", + "@typescript-eslint/typescript-estree": "~5.59.2", "eslint-plugin-promise": "~6.0.0", "eslint-plugin-react": "~7.27.1", "eslint-plugin-tsdoc": "~0.2.16" }, "devDependencies": { "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/eslint/eslint-patch/CHANGELOG.json b/eslint/eslint-patch/CHANGELOG.json index 93049189c00..c11db6cb532 100644 --- a/eslint/eslint-patch/CHANGELOG.json +++ b/eslint/eslint-patch/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@rushstack/eslint-patch", "entries": [ + { + "version": "1.3.0", + "tag": "@rushstack/eslint-patch_v1.3.0", + "date": "Mon, 22 May 2023 06:34:32 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade the @typescript-eslint/* dependencies to ~5.59.2" + } + ] + } + }, { "version": "1.2.0", "tag": "@rushstack/eslint-patch_v1.2.0", diff --git a/eslint/eslint-patch/CHANGELOG.md b/eslint/eslint-patch/CHANGELOG.md index ad3035b85ef..842ca3953ec 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 Thu, 15 Sep 2022 00:18:51 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:32 GMT and should not be manually modified. + +## 1.3.0 +Mon, 22 May 2023 06:34:32 GMT + +### Minor changes + +- Upgrade the @typescript-eslint/* dependencies to ~5.59.2 ## 1.2.0 Thu, 15 Sep 2022 00:18:51 GMT diff --git a/eslint/eslint-patch/package.json b/eslint/eslint-patch/package.json index 21afd2e12ca..85050870218 100644 --- a/eslint/eslint-patch/package.json +++ b/eslint/eslint-patch/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/eslint-patch", - "version": "1.2.0", + "version": "1.3.0", "description": "A patch that improves how ESLint loads plugins when working in a monorepo with a reusable toolchain", "main": "lib/usage.js", "license": "MIT", @@ -25,8 +25,8 @@ "package" ], "devDependencies": { - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@types/node": "14.18.36" } } diff --git a/eslint/eslint-plugin-packlets/CHANGELOG.json b/eslint/eslint-plugin-packlets/CHANGELOG.json index 40c06b4d108..9875e56a62e 100644 --- a/eslint/eslint-plugin-packlets/CHANGELOG.json +++ b/eslint/eslint-plugin-packlets/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@rushstack/eslint-plugin-packlets", "entries": [ + { + "version": "0.7.0", + "tag": "@rushstack/eslint-plugin-packlets_v0.7.0", + "date": "Mon, 22 May 2023 06:34:32 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade the @typescript-eslint/* dependencies to ~5.59.2" + } + ] + } + }, { "version": "0.6.1", "tag": "@rushstack/eslint-plugin-packlets_v0.6.1", diff --git a/eslint/eslint-plugin-packlets/CHANGELOG.md b/eslint/eslint-plugin-packlets/CHANGELOG.md index bac7cd01ab6..e6eb17a5605 100644 --- a/eslint/eslint-plugin-packlets/CHANGELOG.md +++ b/eslint/eslint-plugin-packlets/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @rushstack/eslint-plugin-packlets -This log was last generated on Mon, 10 Oct 2022 15:23:44 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:32 GMT and should not be manually modified. + +## 0.7.0 +Mon, 22 May 2023 06:34:32 GMT + +### Minor changes + +- Upgrade the @typescript-eslint/* dependencies to ~5.59.2 ## 0.6.1 Mon, 10 Oct 2022 15:23:44 GMT diff --git a/eslint/eslint-plugin-packlets/package.json b/eslint/eslint-plugin-packlets/package.json index dbe38642973..58377dcb5b4 100644 --- a/eslint/eslint-plugin-packlets/package.json +++ b/eslint/eslint-plugin-packlets/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/eslint-plugin-packlets", - "version": "0.6.1", + "version": "0.7.0", "description": "A lightweight alternative to NPM packages for organizing source files within a single project", "license": "MIT", "repository": { @@ -24,21 +24,21 @@ }, "dependencies": { "@rushstack/tree-pattern": "workspace:*", - "@typescript-eslint/experimental-utils": "~5.38.0" + "@typescript-eslint/experimental-utils": "~5.59.2" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "devDependencies": { - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@types/eslint": "8.2.0", "@types/estree": "0.0.50", "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", - "@typescript-eslint/parser": "~5.38.0", - "@typescript-eslint/typescript-estree": "~5.38.0", + "@typescript-eslint/parser": "~5.59.2", + "@typescript-eslint/typescript-estree": "~5.59.2", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/eslint/eslint-plugin-security/CHANGELOG.json b/eslint/eslint-plugin-security/CHANGELOG.json index d2ca236ad6d..02d3bfcb222 100644 --- a/eslint/eslint-plugin-security/CHANGELOG.json +++ b/eslint/eslint-plugin-security/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@rushstack/eslint-plugin-security", "entries": [ + { + "version": "0.6.0", + "tag": "@rushstack/eslint-plugin-security_v0.6.0", + "date": "Mon, 22 May 2023 06:34:32 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade the @typescript-eslint/* dependencies to ~5.59.2" + } + ] + } + }, { "version": "0.5.0", "tag": "@rushstack/eslint-plugin-security_v0.5.0", diff --git a/eslint/eslint-plugin-security/CHANGELOG.md b/eslint/eslint-plugin-security/CHANGELOG.md index 192d784c0ce..3bb2aad5686 100644 --- a/eslint/eslint-plugin-security/CHANGELOG.md +++ b/eslint/eslint-plugin-security/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @rushstack/eslint-plugin-security -This log was last generated on Thu, 29 Sep 2022 07:13:06 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:32 GMT and should not be manually modified. + +## 0.6.0 +Mon, 22 May 2023 06:34:32 GMT + +### Minor changes + +- Upgrade the @typescript-eslint/* dependencies to ~5.59.2 ## 0.5.0 Thu, 29 Sep 2022 07:13:06 GMT diff --git a/eslint/eslint-plugin-security/package.json b/eslint/eslint-plugin-security/package.json index 584791be277..a61132195bd 100644 --- a/eslint/eslint-plugin-security/package.json +++ b/eslint/eslint-plugin-security/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/eslint-plugin-security", - "version": "0.5.0", + "version": "0.6.0", "description": "An ESLint plugin providing rules that identify common security vulnerabilities for browser applications, Node.js tools, and Node.js services", "license": "MIT", "repository": { @@ -23,21 +23,21 @@ }, "dependencies": { "@rushstack/tree-pattern": "workspace:*", - "@typescript-eslint/experimental-utils": "~5.38.0" + "@typescript-eslint/experimental-utils": "~5.59.2" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "devDependencies": { - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@types/eslint": "8.2.0", "@types/estree": "0.0.50", "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", - "@typescript-eslint/parser": "~5.38.0", - "@typescript-eslint/typescript-estree": "~5.38.0", + "@typescript-eslint/parser": "~5.59.2", + "@typescript-eslint/typescript-estree": "~5.59.2", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/eslint/eslint-plugin/CHANGELOG.json b/eslint/eslint-plugin/CHANGELOG.json index 30e464848dc..c9fc72a2fe1 100644 --- a/eslint/eslint-plugin/CHANGELOG.json +++ b/eslint/eslint-plugin/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@rushstack/eslint-plugin", "entries": [ + { + "version": "0.12.0", + "tag": "@rushstack/eslint-plugin_v0.12.0", + "date": "Mon, 22 May 2023 06:34:32 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade the @typescript-eslint/* dependencies to ~5.59.2" + } + ] + } + }, { "version": "0.11.0", "tag": "@rushstack/eslint-plugin_v0.11.0", diff --git a/eslint/eslint-plugin/CHANGELOG.md b/eslint/eslint-plugin/CHANGELOG.md index 0cd6d04a417..5ac7f180b0f 100644 --- a/eslint/eslint-plugin/CHANGELOG.md +++ b/eslint/eslint-plugin/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @rushstack/eslint-plugin -This log was last generated on Thu, 29 Sep 2022 07:13:06 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:32 GMT and should not be manually modified. + +## 0.12.0 +Mon, 22 May 2023 06:34:32 GMT + +### Minor changes + +- Upgrade the @typescript-eslint/* dependencies to ~5.59.2 ## 0.11.0 Thu, 29 Sep 2022 07:13:06 GMT diff --git a/eslint/eslint-plugin/package.json b/eslint/eslint-plugin/package.json index cb338a853d3..a00f1542257 100644 --- a/eslint/eslint-plugin/package.json +++ b/eslint/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/eslint-plugin", - "version": "0.11.0", + "version": "0.12.0", "description": "An ESLint plugin providing supplementary rules for use with the @rushstack/eslint-config package", "license": "MIT", "repository": { @@ -27,21 +27,21 @@ }, "dependencies": { "@rushstack/tree-pattern": "workspace:*", - "@typescript-eslint/experimental-utils": "~5.38.0" + "@typescript-eslint/experimental-utils": "~5.59.2" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "devDependencies": { - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@types/eslint": "8.2.0", "@types/estree": "0.0.50", "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", - "@typescript-eslint/parser": "~5.38.0", - "@typescript-eslint/typescript-estree": "~5.38.0", + "@typescript-eslint/parser": "~5.59.2", + "@typescript-eslint/typescript-estree": "~5.59.2", "eslint": "~8.7.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/eslint/eslint-plugin/src/no-untyped-underscore.ts b/eslint/eslint-plugin/src/no-untyped-underscore.ts index 2fb6f5694e0..4225c72fb56 100644 --- a/eslint/eslint-plugin/src/no-untyped-underscore.ts +++ b/eslint/eslint-plugin/src/no-untyped-underscore.ts @@ -43,7 +43,7 @@ const noUntypedUnderscoreRule: TSESLint.RuleModule = { // Is it an expression like "x.y"? // Ignore expressions such as "super.y", "this.y", and "that.y" - const memberObject: TSESTree.LeftHandSideExpression = node.object; + const memberObject: TSESTree.Expression = node.object; if (memberObject) { if (memberObject.type === 'Super' || memberObject.type === 'ThisExpression') { return; // no match diff --git a/eslint/eslint-plugin/src/hoist-jest-mock.test.ts b/eslint/eslint-plugin/src/test/hoist-jest-mock.test.ts similarity index 99% rename from eslint/eslint-plugin/src/hoist-jest-mock.test.ts rename to eslint/eslint-plugin/src/test/hoist-jest-mock.test.ts index e259fdcaf7b..b921a46442d 100644 --- a/eslint/eslint-plugin/src/hoist-jest-mock.test.ts +++ b/eslint/eslint-plugin/src/test/hoist-jest-mock.test.ts @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import { ESLintUtils } from '@typescript-eslint/experimental-utils'; -import { hoistJestMock } from './hoist-jest-mock'; +import { hoistJestMock } from '../hoist-jest-mock'; const { RuleTester } = ESLintUtils; const ruleTester = new RuleTester({ diff --git a/eslint/eslint-plugin/src/no-new-null.test.ts b/eslint/eslint-plugin/src/test/no-new-null.test.ts similarity index 98% rename from eslint/eslint-plugin/src/no-new-null.test.ts rename to eslint/eslint-plugin/src/test/no-new-null.test.ts index fbc27cbf684..9c08f48f0b8 100644 --- a/eslint/eslint-plugin/src/no-new-null.test.ts +++ b/eslint/eslint-plugin/src/test/no-new-null.test.ts @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import { ESLintUtils } from '@typescript-eslint/experimental-utils'; -import { noNewNullRule } from './no-new-null'; +import { noNewNullRule } from '../no-new-null'; const { RuleTester } = ESLintUtils; const ruleTester = new RuleTester({ diff --git a/eslint/eslint-plugin/src/test/no-untyped-underscore.test.ts b/eslint/eslint-plugin/src/test/no-untyped-underscore.test.ts new file mode 100644 index 00000000000..ae89fba73be --- /dev/null +++ b/eslint/eslint-plugin/src/test/no-untyped-underscore.test.ts @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { ESLintUtils } from '@typescript-eslint/experimental-utils'; +import { noUntypedUnderscoreRule } from '../no-untyped-underscore'; + +const { RuleTester } = ESLintUtils; +const ruleTester = new RuleTester({ + /* + * The underlying API requires an absolute path. `@typescript-eslint/utils` calls `require.resolve()` on the input + * and forces it to be of type '@typescript-eslint/parser' but does not have a dependency on `@typescript-eslint/parser` + * This means that it will always fail to resolve in a strict environment. + * Fortunately `require.resolve(absolutePath)` returns `absolutePath`, so we can resolve it first and cast. + */ + parser: require.resolve('@typescript-eslint/parser') as '@typescript-eslint/parser' +}); + +ruleTester.run('no-untyped-underscore', noUntypedUnderscoreRule, { + invalid: [ + { + // prettier-ignore + code: [ + 'let x: any;', + 'x._privateMember = 123;' + ].join('\n'), + errors: [{ messageId: 'error-untyped-underscore' }] + }, + { + // prettier-ignore + code: [ + 'let x: { [key: string]: number };', + 'x._privateMember = 123;' + ].join('\n'), + errors: [{ messageId: 'error-untyped-underscore' }] + } + ], + valid: [ + { + // prettier-ignore + code: [ + 'let x: { _privateMember: any };', + 'x._privateMember = 123;' + ].join('\n') + }, + { + // prettier-ignore + code: [ + 'let x = { _privateMember: 0 };', + 'x._privateMember = 123;' + ].join('\n') + }, + { + // prettier-ignore + code: [ + 'enum E {', + ' _PrivateMember', + '}', + 'let e: E._PrivateMember = E._PrivateMember;' + ].join('\n') + } + ] +}); diff --git a/eslint/eslint-plugin/src/typedef-var.test.ts b/eslint/eslint-plugin/src/test/typedef-var.test.ts similarity index 97% rename from eslint/eslint-plugin/src/typedef-var.test.ts rename to eslint/eslint-plugin/src/test/typedef-var.test.ts index 1b34fe3d6bd..1dd833a2fcb 100644 --- a/eslint/eslint-plugin/src/typedef-var.test.ts +++ b/eslint/eslint-plugin/src/test/typedef-var.test.ts @@ -2,7 +2,7 @@ // See LICENSE in the project root for license information. import { ESLintUtils } from '@typescript-eslint/experimental-utils'; -import { typedefVar } from './typedef-var'; +import { typedefVar } from '../typedef-var'; const { RuleTester } = ESLintUtils; const ruleTester = new RuleTester({ diff --git a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json index f7581213f26..750c849b6e7 100644 --- a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json +++ b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.json @@ -2,82 +2,136 @@ "name": "@rushstack/heft-dev-cert-plugin", "entries": [ { - "version": "0.3.0-rc.5", - "tag": "@rushstack/heft-dev-cert-plugin_v0.3.0-rc.5", - "date": "Thu, 27 Apr 2023 17:25:52 GMT", + "version": "0.2.30", + "tag": "@rushstack/heft-dev-cert-plugin_v0.2.30", + "date": "Mon, 22 May 2023 06:34:33 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Update with latest main." - } - ] - } - }, - { - "version": "0.3.0-rc.4", - "tag": "@rushstack/heft-dev-cert-plugin_v0.3.0-rc.4", - "date": "Wed, 15 Mar 2023 20:22:44 GMT", - "comments": { - "minor": [ + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.2.27`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.35.0`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, { - "comment": "Fix an issue with `watchGlobAsync`" + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.5` to `^0.50.6`" } ] } }, { - "version": "0.3.0-rc.3", - "tag": "@rushstack/heft-dev-cert-plugin_v0.3.0-rc.3", - "date": "Fri, 20 Jan 2023 20:13:16 GMT", + "version": "0.2.29", + "tag": "@rushstack/heft-dev-cert-plugin_v0.2.29", + "date": "Fri, 12 May 2023 00:23:05 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Fix issues with SASS incremental builds." + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.2.26`" }, { - "comment": "Add support for TypeScript solution incremental builds." + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" }, { - "comment": "Improve responsiveness of watcher loop." + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.4` to `^0.50.5`" } ] } }, { - "version": "0.3.0-rc.2", - "tag": "@rushstack/heft-dev-cert-plugin_v0.3.0-rc.2", - "date": "Fri, 2 Dec 2022 05:28:24 GMT", + "version": "0.2.28", + "tag": "@rushstack/heft-dev-cert-plugin_v0.2.28", + "date": "Thu, 04 May 2023 00:20:28 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Improve watch mode performance." + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.2.25`" }, { - "comment": "Improve logging output." + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.3` to `^0.50.4`" } ] } }, { - "version": "0.3.0-rc.1", - "tag": "@rushstack/heft-dev-cert-plugin_v0.3.0-rc.1", - "date": "Fri, 18 Nov 2022 02:34:26 GMT", + "version": "0.2.27", + "tag": "@rushstack/heft-dev-cert-plugin_v0.2.27", + "date": "Mon, 01 May 2023 15:23:19 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.2.24`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, { - "comment": "Fix incremental TypeScript compilation." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.2` to `^0.50.3`" } ] } }, { - "version": "0.3.0-rc.0", - "tag": "@rushstack/heft-dev-cert-plugin_v0.3.0-rc.0", - "date": "Tue, 15 Nov 2022 22:59:35 GMT", + "version": "0.2.26", + "tag": "@rushstack/heft-dev-cert-plugin_v0.2.26", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/debug-certificate-manager\" to `1.2.23`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, { - "comment": "General fixes and improvements, in preparation for a general release." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.1` to `^0.50.2`" } ] } diff --git a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md index 27030a0150b..c58309c621f 100644 --- a/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md +++ b/heft-plugins/heft-dev-cert-plugin/CHANGELOG.md @@ -1,51 +1,31 @@ # Change Log - @rushstack/heft-dev-cert-plugin -This log was last generated on Thu, 27 Apr 2023 17:25:52 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. -## 0.3.0-rc.5 -Thu, 27 Apr 2023 17:25:52 GMT +## 0.2.30 +Mon, 22 May 2023 06:34:33 GMT -### Prerelease Changes - -- Update with latest main. - -## 0.3.0-rc.4 -Wed, 15 Mar 2023 20:22:44 GMT - -### Prerelease Changes - -- Fix an issue with `watchGlobAsync` - -## 0.3.0-rc.3 -Fri, 20 Jan 2023 20:13:16 GMT - -### Prerelease Changes - -- Fix issues with SASS incremental builds. -- Add support for TypeScript solution incremental builds. -- Improve responsiveness of watcher loop. - -## 0.3.0-rc.2 -Fri, 2 Dec 2022 05:28:24 GMT +_Version update only_ -### Prerelease Changes +## 0.2.29 +Fri, 12 May 2023 00:23:05 GMT -- Improve watch mode performance. -- Improve logging output. +_Version update only_ -## 0.3.0-rc.1 -Fri, 18 Nov 2022 02:34:26 GMT +## 0.2.28 +Thu, 04 May 2023 00:20:28 GMT -### Prerelease Changes +_Version update only_ -- Fix incremental TypeScript compilation. +## 0.2.27 +Mon, 01 May 2023 15:23:19 GMT -## 0.3.0-rc.0 -Tue, 15 Nov 2022 22:59:35 GMT +_Version update only_ -### Prerelease Changes +## 0.2.26 +Sat, 29 Apr 2023 00:23:02 GMT -- General fixes and improvements, in preparation for a general release. +_Version update only_ ## 0.2.25 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/heft-plugins/heft-dev-cert-plugin/package.json b/heft-plugins/heft-dev-cert-plugin/package.json index e3c348bef30..dc8b56a42e0 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.3.0-rc.5", + "version": "0.2.30", "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.51.0-rc.5" + "@rushstack/heft": "^0.50.6" }, "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 b368cc84c14..4802589e5b8 100644 --- a/heft-plugins/heft-jest-plugin/CHANGELOG.json +++ b/heft-plugins/heft-jest-plugin/CHANGELOG.json @@ -2,82 +2,123 @@ "name": "@rushstack/heft-jest-plugin", "entries": [ { - "version": "0.6.0-rc.5", - "tag": "@rushstack/heft-jest-plugin_v0.6.0-rc.5", - "date": "Thu, 27 Apr 2023 17:25:52 GMT", + "version": "0.5.12", + "tag": "@rushstack/heft-jest-plugin_v0.5.12", + "date": "Mon, 22 May 2023 06:34:32 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Update with latest main." - } - ] - } - }, - { - "version": "0.6.0-rc.4", - "tag": "@rushstack/heft-jest-plugin_v0.6.0-rc.4", - "date": "Wed, 15 Mar 2023 20:22:44 GMT", - "comments": { - "minor": [ + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.12.2`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.35.0`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, { - "comment": "Fix an issue with `watchGlobAsync`" + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.5` to `^0.50.6`" } ] } }, { - "version": "0.6.0-rc.3", - "tag": "@rushstack/heft-jest-plugin_v0.6.0-rc.3", - "date": "Fri, 20 Jan 2023 20:13:16 GMT", + "version": "0.5.11", + "tag": "@rushstack/heft-jest-plugin_v0.5.11", + "date": "Fri, 12 May 2023 00:23:05 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Fix issues with SASS incremental builds." + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.12.1`" }, { - "comment": "Add support for TypeScript solution incremental builds." + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" }, { - "comment": "Improve responsiveness of watcher loop." + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.4` to `^0.50.5`" } ] } }, { - "version": "0.5.6-rc.2", - "tag": "@rushstack/heft-jest-plugin_v0.5.6-rc.2", - "date": "Fri, 2 Dec 2022 05:28:24 GMT", + "version": "0.5.10", + "tag": "@rushstack/heft-jest-plugin_v0.5.10", + "date": "Thu, 04 May 2023 00:20:28 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Improve watch mode performance." + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.8`" }, { - "comment": "Improve logging output." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.3` to `^0.50.4`" } ] } }, { - "version": "0.5.6-rc.1", - "tag": "@rushstack/heft-jest-plugin_v0.5.6-rc.1", - "date": "Fri, 18 Nov 2022 02:34:26 GMT", + "version": "0.5.9", + "tag": "@rushstack/heft-jest-plugin_v0.5.9", + "date": "Mon, 01 May 2023 15:23:19 GMT", "comments": { - "minor": [ + "patch": [ + { + "comment": "Allow \"preset\" configuration value to be used when extending Jest configuration files" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.12.0`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, { - "comment": "Fix incremental TypeScript compilation." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.2` to `^0.50.3`" } ] } }, { - "version": "0.5.6-rc.0", - "tag": "@rushstack/heft-jest-plugin_v0.5.6-rc.0", - "date": "Tue, 15 Nov 2022 22:59:35 GMT", + "version": "0.5.8", + "tag": "@rushstack/heft-jest-plugin_v0.5.8", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.11.11`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, { - "comment": "General fixes and improvements, in preparation for a general release." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.1` to `^0.50.2`" } ] } diff --git a/heft-plugins/heft-jest-plugin/CHANGELOG.md b/heft-plugins/heft-jest-plugin/CHANGELOG.md index 6b7038d5145..698d49e48da 100644 --- a/heft-plugins/heft-jest-plugin/CHANGELOG.md +++ b/heft-plugins/heft-jest-plugin/CHANGELOG.md @@ -1,51 +1,33 @@ # Change Log - @rushstack/heft-jest-plugin -This log was last generated on Thu, 27 Apr 2023 17:25:52 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:32 GMT and should not be manually modified. -## 0.6.0-rc.5 -Thu, 27 Apr 2023 17:25:52 GMT +## 0.5.12 +Mon, 22 May 2023 06:34:32 GMT -### Prerelease Changes - -- Update with latest main. - -## 0.6.0-rc.4 -Wed, 15 Mar 2023 20:22:44 GMT - -### Prerelease Changes - -- Fix an issue with `watchGlobAsync` - -## 0.6.0-rc.3 -Fri, 20 Jan 2023 20:13:16 GMT - -### Prerelease Changes - -- Fix issues with SASS incremental builds. -- Add support for TypeScript solution incremental builds. -- Improve responsiveness of watcher loop. +_Version update only_ -## 0.5.6-rc.2 -Fri, 2 Dec 2022 05:28:24 GMT +## 0.5.11 +Fri, 12 May 2023 00:23:05 GMT -### Prerelease Changes +_Version update only_ -- Improve watch mode performance. -- Improve logging output. +## 0.5.10 +Thu, 04 May 2023 00:20:28 GMT -## 0.5.6-rc.1 -Fri, 18 Nov 2022 02:34:26 GMT +_Version update only_ -### Prerelease Changes +## 0.5.9 +Mon, 01 May 2023 15:23:19 GMT -- Fix incremental TypeScript compilation. +### Patches -## 0.5.6-rc.0 -Tue, 15 Nov 2022 22:59:35 GMT +- Allow "preset" configuration value to be used when extending Jest configuration files -### Prerelease Changes +## 0.5.8 +Sat, 29 Apr 2023 00:23:02 GMT -- General fixes and improvements, in preparation for a general release. +_Version update only_ ## 0.5.7 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/heft-plugins/heft-jest-plugin/package.json b/heft-plugins/heft-jest-plugin/package.json index 831c23a79b2..a68a9966d65 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.6.0-rc.5", + "version": "0.5.12", "description": "Heft plugin for Jest", "repository": { "type": "git", @@ -16,7 +16,7 @@ "_phase:test": "node ./node_modules/@rushstack/heft-legacy/bin/heft --unmanaged test --no-build" }, "peerDependencies": { - "@rushstack/heft": "0.51.0-rc.5" + "@rushstack/heft": "^0.50.6" }, "dependencies": { "@jest/core": "~29.5.0", @@ -42,6 +42,6 @@ "jest-environment-jsdom": "~29.5.0", "jest-environment-node": "~29.5.0", "jest-watch-select-projects": "2.0.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/heft-plugins/heft-jest-plugin/src/JestPlugin.ts b/heft-plugins/heft-jest-plugin/src/JestPlugin.ts index 9d25071322b..62916fa46aa 100644 --- a/heft-plugins/heft-jest-plugin/src/JestPlugin.ts +++ b/heft-plugins/heft-jest-plugin/src/JestPlugin.ts @@ -25,11 +25,20 @@ import type { } from '@rushstack/heft'; import { ConfigurationFile, - type IJsonPathMetadata, + type ICustomJsonPathMetadata, + type IJsonPathMetadataResolverOptions, InheritanceType, PathResolutionMethod } from '@rushstack/heft-config-file'; -import { FileSystem, Import, JsonFile, PackageName, type ITerminal } from '@rushstack/node-core-library'; +import { + FileSystem, + Path, + Import, + JsonFile, + JsonSchema, + PackageName, + type ITerminal +} from '@rushstack/node-core-library'; import type { IHeftJestReporterOptions } from './HeftJestReporter'; import { jestResolve } from './JestUtils'; @@ -107,14 +116,22 @@ export interface IJestPluginOptions { export interface IHeftJestConfiguration extends Config.InitialOptions {} -const PLUGIN_NAME: 'jest-plugin' = 'jest-plugin'; -const PLUGIN_PACKAGE_NAME: string = '@rushstack/heft-jest-plugin'; +interface IHeftJestConfigurationWithExtends extends IHeftJestConfiguration { + extends?: string; +} + +interface IExtendedHeftJestConfiguration extends IHeftJestConfiguration { + extends: string | undefined; +} + +const PLUGIN_NAME: 'jest-plugin' = 'JestPlugin'; +const PLUGIN_PACKAGE_NAME: '@rushstack/heft-jest-plugin' = '@rushstack/heft-jest-plugin'; const PLUGIN_PACKAGE_FOLDER: string = path.resolve(__dirname, '..'); -const JEST_CONFIGURATION_LOCATION: string = `config/jest.config.json`; +const JEST_CONFIGURATION_LOCATION: 'config/jest.config.json' = `config/jest.config.json`; -const ROOTDIR_TOKEN: string = ''; -const CONFIGDIR_TOKEN: string = ''; -const PACKAGE_CAPTUREGROUP: string = 'package'; +const ROOTDIR_TOKEN: '' = ''; +const CONFIGDIR_TOKEN: '' = ''; +const PACKAGE_CAPTUREGROUP: 'package' = 'package'; const PACKAGEDIR_REGEX: RegExp = /^[^\s>]+)\s*>/; const JSONPATHPROPERTY_REGEX: RegExp = /^\$\['([^']+)'\]/; @@ -508,6 +525,15 @@ export default class JestPlugin implements IHeftTaskPlugin { return; } jestConfig = await JsonFile.loadAsync(jestConfigPath); + const extendedJestConfig: IExtendedHeftJestConfiguration = jestConfig as IExtendedHeftJestConfiguration; + if (extendedJestConfig.extends) { + throw new Error( + 'The provided jest.config.json specifies an "extends" property while resolved modules are disabled. ' + + 'You must either remove the "extends" property from your Jest configuration, use the "preset" ' + + 'property, or set the "disableConfigurationModuleResolution" option to "false" on the Jest ' + + 'plugin in heft.json.' + ); + } } else { // Load in and resolve the config file using the "extends" field jestConfig = await JestPlugin._getJestConfigurationLoader( @@ -518,14 +544,6 @@ export default class JestPlugin implements IHeftTaskPlugin { heftConfiguration.buildFolderPath, heftConfiguration.rigConfig ); - if (jestConfig.preset) { - throw new Error( - 'The provided jest.config.json specifies a "preset" property while using resolved modules. ' + - 'You must either remove all "preset" values from your Jest configuration, use the "extends" ' + - 'property, or set the "disableConfigurationModuleResolution" option to "true" on the Jest ' + - 'plugin in heft.json' - ); - } } // If no displayName is provided, use the package name. This field is used by Jest to @@ -639,13 +657,15 @@ export default class JestPlugin implements IHeftTaskPlugin { }) as T; }; - const tokenResolveMetadata: IJsonPathMetadata = JestPlugin._getJsonPathMetadata({ - rootDir: buildFolder - }); - const jestResolveMetadata: IJsonPathMetadata = JestPlugin._getJsonPathMetadata({ - rootDir: buildFolder, - resolveAsModule: true - }); + const tokenResolveMetadata: ICustomJsonPathMetadata = + JestPlugin._getJsonPathMetadata({ + rootDir: buildFolder + }); + const jestResolveMetadata: ICustomJsonPathMetadata = + JestPlugin._getJsonPathMetadata({ + rootDir: buildFolder, + resolveAsModule: true + }); JestPlugin._jestConfigurationFileLoader = new ConfigurationFile({ projectRelativeFilePath: projectRelativeFilePath, @@ -685,6 +705,7 @@ export default class JestPlugin implements IHeftTaskPlugin { '$.globalSetup': jestResolveMetadata, '$.globalTeardown': jestResolveMetadata, '$.moduleLoader': jestResolveMetadata, + '$.preset': jestResolveMetadata, '$.prettierPath': jestResolveMetadata, '$.resolver': jestResolveMetadata, '$.runner': jestResolveMetadata, @@ -792,9 +813,14 @@ export default class JestPlugin implements IHeftTaskPlugin { * - replace `` with the directory containing the current configuration file * - replace `` with the path to the resolved package (NOT module) */ - private static _getJsonPathMetadata(options: IJestResolutionOptions): IJsonPathMetadata { + private static _getJsonPathMetadata( + options: IJestResolutionOptions + ): ICustomJsonPathMetadata { return { - customResolver: (configurationFilePath: string, propertyName: string, propertyValue: string) => { + customResolver: (resolverOptions: IJsonPathMetadataResolverOptions) => { + const { propertyName, configurationFilePath, configurationFile } = resolverOptions; + let { propertyValue } = resolverOptions; + const configDir: string = path.dirname(configurationFilePath); const parsedPropertyName: string | undefined = propertyName?.match(JSONPATHPROPERTY_REGEX)?.[1]; @@ -893,6 +919,46 @@ export default class JestPlugin implements IHeftTaskPlugin { filePath: propertyValue, requireResolveFunction }); + case 'preset': + // Do not allow use of presets and extends together, since that would create a + // confusing heirarchy. + if ( + configurationFile.preset && + (configurationFile as IHeftJestConfigurationWithExtends).extends + ) { + throw new Error( + `The configuration file at "${configurationFilePath}" cannot specify both "preset" and ` + + `"extends" properties.` + ); + } + + // Preset is an odd value, since it can either be a relative path to a preset module + // from the rootDir, or a path to the parent directory of a preset module. So to + // determine which it is, we will attempt to resolve it as a module from the rootDir, + // as per the spec. If it resolves, then we will return the relative path to the + // resolved value from the rootDir. If it does not resolve, then we will return the + // original value to allow Jest to resolve within the target directory. + // See: https://github.com/jestjs/jest/blob/268afca708199c0e64ef26f35995907faf4454ff/packages/jest-config/src/normalize.ts#L123 + // eslint-disable-next-line @rushstack/no-null + let resolvedValue: string | null | undefined; + try { + resolvedValue = jestResolve(/*resolver:*/ undefined, { + rootDir: options.rootDir, + filePath: propertyValue, + key: propertyName + }); + } catch (e) { + // Swallow + } + if (resolvedValue) { + // Jest will resolve relative module paths to files only if they use forward slashes. + // They must also start with a '.' otherwise the preset resolution will assume it is a + // folder path and will path.join() it with the default 'jest-preset' filename. + // See: https://github.com/jestjs/jest/blob/268afca708199c0e64ef26f35995907faf4454ff/packages/jest-config/src/normalize.ts#L123 + return Path.convertToSlashes(`./${path.relative(options.rootDir, resolvedValue)}`); + } 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-sass-plugin/CHANGELOG.json b/heft-plugins/heft-sass-plugin/CHANGELOG.json index bf39b2b754c..1a53c323f31 100644 --- a/heft-plugins/heft-sass-plugin/CHANGELOG.json +++ b/heft-plugins/heft-sass-plugin/CHANGELOG.json @@ -2,82 +2,160 @@ "name": "@rushstack/heft-sass-plugin", "entries": [ { - "version": "0.9.0-rc.5", - "tag": "@rushstack/heft-sass-plugin_v0.9.0-rc.5", - "date": "Thu, 27 Apr 2023 17:25:52 GMT", + "version": "0.9.2", + "tag": "@rushstack/heft-sass-plugin_v0.9.2", + "date": "Mon, 22 May 2023 06:34:33 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.12.2`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.10.10`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.35.0`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, { - "comment": "Update with latest main." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.5` to `^0.50.6`" } ] } }, { - "version": "0.9.0-rc.4", - "tag": "@rushstack/heft-sass-plugin_v0.9.0-rc.4", - "date": "Wed, 15 Mar 2023 20:22:44 GMT", + "version": "0.9.1", + "tag": "@rushstack/heft-sass-plugin_v0.9.1", + "date": "Fri, 12 May 2023 00:23:05 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Fix an issue with `watchGlobAsync`" + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.12.1`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.10.9`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.4` to `^0.50.5`" } ] } }, { - "version": "0.9.0-rc.3", - "tag": "@rushstack/heft-sass-plugin_v0.9.0-rc.3", - "date": "Fri, 20 Jan 2023 20:13:16 GMT", + "version": "0.9.0", + "tag": "@rushstack/heft-sass-plugin_v0.9.0", + "date": "Thu, 11 May 2023 00:17:21 GMT", "comments": { "minor": [ { - "comment": "Fix issues with SASS incremental builds." - }, - { - "comment": "Add support for TypeScript solution incremental builds." - }, - { - "comment": "Improve responsiveness of watcher loop." + "comment": "Switch from sass to sass-embedded for better performance." } ] } }, { - "version": "0.8.0-rc.2", - "tag": "@rushstack/heft-sass-plugin_v0.8.0-rc.2", - "date": "Fri, 2 Dec 2022 05:28:24 GMT", + "version": "0.8.9", + "tag": "@rushstack/heft-sass-plugin_v0.8.9", + "date": "Thu, 04 May 2023 00:20:28 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.10.8`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.8`" + }, { - "comment": "Improve watch mode performance." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" }, { - "comment": "Improve logging output." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.3` to `^0.50.4`" } ] } }, { - "version": "0.8.0-rc.1", - "tag": "@rushstack/heft-sass-plugin_v0.8.0-rc.1", - "date": "Fri, 18 Nov 2022 02:34:26 GMT", + "version": "0.8.8", + "tag": "@rushstack/heft-sass-plugin_v0.8.8", + "date": "Mon, 01 May 2023 15:23:19 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Fix incremental TypeScript compilation." + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.12.0`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.10.7`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.2` to `^0.50.3`" } ] } }, { - "version": "0.8.0-rc.0", - "tag": "@rushstack/heft-sass-plugin_v0.8.0-rc.0", - "date": "Tue, 15 Nov 2022 22:59:35 GMT", + "version": "0.8.7", + "tag": "@rushstack/heft-sass-plugin_v0.8.7", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-config-file\" to `0.11.11`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.10.6`" + }, + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, { - "comment": "General fixes and improvements, in preparation for a general release." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.1` to `^0.50.2`" } ] } diff --git a/heft-plugins/heft-sass-plugin/CHANGELOG.md b/heft-plugins/heft-sass-plugin/CHANGELOG.md index 5106120e6a4..48ad538885a 100644 --- a/heft-plugins/heft-sass-plugin/CHANGELOG.md +++ b/heft-plugins/heft-sass-plugin/CHANGELOG.md @@ -1,51 +1,38 @@ # Change Log - @rushstack/heft-sass-plugin -This log was last generated on Thu, 27 Apr 2023 17:25:53 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. -## 0.9.0-rc.5 -Thu, 27 Apr 2023 17:25:52 GMT +## 0.9.2 +Mon, 22 May 2023 06:34:33 GMT -### Prerelease Changes - -- Update with latest main. - -## 0.9.0-rc.4 -Wed, 15 Mar 2023 20:22:44 GMT - -### Prerelease Changes - -- Fix an issue with `watchGlobAsync` - -## 0.9.0-rc.3 -Fri, 20 Jan 2023 20:13:16 GMT +_Version update only_ -### Prerelease Changes +## 0.9.1 +Fri, 12 May 2023 00:23:05 GMT -- Fix issues with SASS incremental builds. -- Add support for TypeScript solution incremental builds. -- Improve responsiveness of watcher loop. +_Version update only_ -## 0.8.0-rc.2 -Fri, 2 Dec 2022 05:28:24 GMT +## 0.9.0 +Thu, 11 May 2023 00:17:21 GMT -### Prerelease Changes +### Minor changes -- Improve watch mode performance. -- Improve logging output. +- Switch from sass to sass-embedded for better performance. -## 0.8.0-rc.1 -Fri, 18 Nov 2022 02:34:26 GMT +## 0.8.9 +Thu, 04 May 2023 00:20:28 GMT -### Prerelease Changes +_Version update only_ -- Fix incremental TypeScript compilation. +## 0.8.8 +Mon, 01 May 2023 15:23:19 GMT -## 0.8.0-rc.0 -Tue, 15 Nov 2022 22:59:35 GMT +_Version update only_ -### Prerelease Changes +## 0.8.7 +Sat, 29 Apr 2023 00:23:03 GMT -- General fixes and improvements, in preparation for a general release. +_Version update only_ ## 0.8.6 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/heft-plugins/heft-sass-plugin/README.md b/heft-plugins/heft-sass-plugin/README.md index c59c1f003d2..1d6602caf7e 100644 --- a/heft-plugins/heft-sass-plugin/README.md +++ b/heft-plugins/heft-sass-plugin/README.md @@ -1,6 +1,7 @@ # @rushstack/heft-sass-plugin -This is a Heft plugin for using node-sass during the "build" stage. +This is a Heft plugin for using sass-embedded during the "build" stage. +If `sass-embedded` is not supported on your platform, you can override the dependency via npm alias to use the `sass` package instead. ## Links diff --git a/heft-plugins/heft-sass-plugin/package.json b/heft-plugins/heft-sass-plugin/package.json index 444e3f3c232..0582398eaaa 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.9.0-rc.5", + "version": "0.9.2", "description": "Heft plugin for SASS", "repository": { "type": "git", @@ -16,13 +16,13 @@ "_phase:test": "heft run --only test -- --clean" }, "peerDependencies": { - "@rushstack/heft": "0.51.0-rc.5" + "@rushstack/heft": "^0.50.6" }, "dependencies": { "@rushstack/heft-config-file": "workspace:*", "@rushstack/node-core-library": "workspace:*", "@rushstack/typings-generator": "workspace:*", - "sass": "~1.49.7", + "sass-embedded": "~1.49.7", "postcss": "~8.4.6", "postcss-modules": "~1.5.0" }, diff --git a/heft-plugins/heft-sass-plugin/src/SassProcessor.ts b/heft-plugins/heft-sass-plugin/src/SassProcessor.ts index 1e9d1b7ff14..676aa6eb54e 100644 --- a/heft-plugins/heft-sass-plugin/src/SassProcessor.ts +++ b/heft-plugins/heft-sass-plugin/src/SassProcessor.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { URL, pathToFileURL, fileURLToPath } from 'url'; -import { CompileResult, Syntax, Exception, compileString } from 'sass'; +import { CompileResult, Syntax, Exception, compileStringAsync } from 'sass-embedded'; import * as postcss from 'postcss'; import cssModules from 'postcss-modules'; import { FileSystem, Sort } from '@rushstack/node-core-library'; @@ -212,7 +212,7 @@ export class SassProcessor extends StringValuesTypingsGenerator { let result: CompileResult; const nodeModulesUrl: URL = pathToFileURL(`${buildFolder}/node_modules/`); try { - result = compileString(fileContents, { + result = await compileStringAsync(fileContents, { importers: [ { findFileUrl: (url: string): URL | null => { diff --git a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json index 006cc145295..0bc453bd61b 100644 --- a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json +++ b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.json @@ -2,82 +2,106 @@ "name": "@rushstack/heft-serverless-stack-plugin", "entries": [ { - "version": "0.2.0-rc.5", - "tag": "@rushstack/heft-serverless-stack-plugin_v0.2.0-rc.5", - "date": "Thu, 27 Apr 2023 17:25:52 GMT", + "version": "0.1.76", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.1.76", + "date": "Mon, 22 May 2023 06:34:33 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Update with latest main." - } - ] - } - }, - { - "version": "0.2.0-rc.4", - "tag": "@rushstack/heft-serverless-stack-plugin_v0.2.0-rc.4", - "date": "Wed, 15 Mar 2023 20:22:44 GMT", - "comments": { - "minor": [ + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, { - "comment": "Fix an issue with `watchGlobAsync`" + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.5` to `^0.50.6`" } ] } }, { - "version": "0.2.0-rc.3", - "tag": "@rushstack/heft-serverless-stack-plugin_v0.2.0-rc.3", - "date": "Fri, 20 Jan 2023 20:13:16 GMT", + "version": "0.1.75", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.1.75", + "date": "Fri, 12 May 2023 00:23:05 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, { - "comment": "Fix issues with SASS incremental builds." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" }, { - "comment": "Add support for TypeScript solution incremental builds." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" }, { - "comment": "Improve responsiveness of watcher loop." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.4` to `^0.50.5`" } ] } }, { - "version": "0.2.0-rc.2", - "tag": "@rushstack/heft-serverless-stack-plugin_v0.2.0-rc.2", - "date": "Fri, 2 Dec 2022 05:28:24 GMT", + "version": "0.1.74", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.1.74", + "date": "Thu, 04 May 2023 00:20:28 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Improve watch mode performance." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" }, { - "comment": "Improve logging output." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.3` to `^0.50.4`" } ] } }, { - "version": "0.2.0-rc.1", - "tag": "@rushstack/heft-serverless-stack-plugin_v0.2.0-rc.1", - "date": "Fri, 18 Nov 2022 02:34:26 GMT", + "version": "0.1.73", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.1.73", + "date": "Mon, 01 May 2023 15:23:19 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, { - "comment": "Fix incremental TypeScript compilation." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.2` to `^0.50.3`" } ] } }, { - "version": "0.2.0-rc.0", - "tag": "@rushstack/heft-serverless-stack-plugin_v0.2.0-rc.0", - "date": "Tue, 15 Nov 2022 22:59:35 GMT", + "version": "0.1.72", + "tag": "@rushstack/heft-serverless-stack-plugin_v0.1.72", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, { - "comment": "General fixes and improvements, in preparation for a general release." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.1` to `^0.50.2`" } ] } diff --git a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md index 622a0c6e3bf..bcf3679be04 100644 --- a/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md +++ b/heft-plugins/heft-serverless-stack-plugin/CHANGELOG.md @@ -1,51 +1,31 @@ # Change Log - @rushstack/heft-serverless-stack-plugin -This log was last generated on Thu, 27 Apr 2023 17:25:53 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. -## 0.2.0-rc.5 -Thu, 27 Apr 2023 17:25:52 GMT +## 0.1.76 +Mon, 22 May 2023 06:34:33 GMT -### Prerelease Changes - -- Update with latest main. - -## 0.2.0-rc.4 -Wed, 15 Mar 2023 20:22:44 GMT - -### Prerelease Changes - -- Fix an issue with `watchGlobAsync` - -## 0.2.0-rc.3 -Fri, 20 Jan 2023 20:13:16 GMT - -### Prerelease Changes - -- Fix issues with SASS incremental builds. -- Add support for TypeScript solution incremental builds. -- Improve responsiveness of watcher loop. - -## 0.2.0-rc.2 -Fri, 2 Dec 2022 05:28:24 GMT +_Version update only_ -### Prerelease Changes +## 0.1.75 +Fri, 12 May 2023 00:23:05 GMT -- Improve watch mode performance. -- Improve logging output. +_Version update only_ -## 0.2.0-rc.1 -Fri, 18 Nov 2022 02:34:26 GMT +## 0.1.74 +Thu, 04 May 2023 00:20:28 GMT -### Prerelease Changes +_Version update only_ -- Fix incremental TypeScript compilation. +## 0.1.73 +Mon, 01 May 2023 15:23:19 GMT -## 0.2.0-rc.0 -Tue, 15 Nov 2022 22:59:35 GMT +_Version update only_ -### Prerelease Changes +## 0.1.72 +Sat, 29 Apr 2023 00:23:03 GMT -- General fixes and improvements, in preparation for a general release. +_Version update only_ ## 0.1.71 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/heft-plugins/heft-serverless-stack-plugin/package.json b/heft-plugins/heft-serverless-stack-plugin/package.json index 2ae8f5739af..898eb6db202 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.2.0-rc.5", + "version": "0.1.76", "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.51.0-rc.5" + "@rushstack/heft": "^0.50.6" }, "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 6c0f837c8a1..5f3406440e5 100644 --- a/heft-plugins/heft-storybook-plugin/CHANGELOG.json +++ b/heft-plugins/heft-storybook-plugin/CHANGELOG.json @@ -2,82 +2,106 @@ "name": "@rushstack/heft-storybook-plugin", "entries": [ { - "version": "0.3.0-rc.5", - "tag": "@rushstack/heft-storybook-plugin_v0.3.0-rc.5", - "date": "Thu, 27 Apr 2023 17:25:52 GMT", + "version": "0.2.11", + "tag": "@rushstack/heft-storybook-plugin_v0.2.11", + "date": "Mon, 22 May 2023 06:34:33 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Update with latest main." - } - ] - } - }, - { - "version": "0.3.0-rc.4", - "tag": "@rushstack/heft-storybook-plugin_v0.3.0-rc.4", - "date": "Wed, 15 Mar 2023 20:22:44 GMT", - "comments": { - "minor": [ + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, { - "comment": "Fix an issue with `watchGlobAsync`" + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.5` to `^0.50.6`" } ] } }, { - "version": "0.3.0-rc.3", - "tag": "@rushstack/heft-storybook-plugin_v0.3.0-rc.3", - "date": "Fri, 20 Jan 2023 20:13:16 GMT", + "version": "0.2.10", + "tag": "@rushstack/heft-storybook-plugin_v0.2.10", + "date": "Fri, 12 May 2023 00:23:05 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, { - "comment": "Fix issues with SASS incremental builds." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" }, { - "comment": "Add support for TypeScript solution incremental builds." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" }, { - "comment": "Improve responsiveness of watcher loop." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.4` to `^0.50.5`" } ] } }, { - "version": "0.2.0-rc.2", - "tag": "@rushstack/heft-storybook-plugin_v0.2.0-rc.2", - "date": "Fri, 2 Dec 2022 05:28:24 GMT", + "version": "0.2.9", + "tag": "@rushstack/heft-storybook-plugin_v0.2.9", + "date": "Thu, 04 May 2023 00:20:28 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Improve watch mode performance." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" }, { - "comment": "Improve logging output." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.3` to `^0.50.4`" } ] } }, { - "version": "0.2.0-rc.1", - "tag": "@rushstack/heft-storybook-plugin_v0.2.0-rc.1", - "date": "Fri, 18 Nov 2022 02:34:26 GMT", + "version": "0.2.8", + "tag": "@rushstack/heft-storybook-plugin_v0.2.8", + "date": "Mon, 01 May 2023 15:23:19 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, { - "comment": "Fix incremental TypeScript compilation." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.2` to `^0.50.3`" } ] } }, { - "version": "0.2.0-rc.0", - "tag": "@rushstack/heft-storybook-plugin_v0.2.0-rc.0", - "date": "Tue, 15 Nov 2022 22:59:35 GMT", + "version": "0.2.7", + "tag": "@rushstack/heft-storybook-plugin_v0.2.7", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, { - "comment": "General fixes and improvements, in preparation for a general release." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.1` to `^0.50.2`" } ] } diff --git a/heft-plugins/heft-storybook-plugin/CHANGELOG.md b/heft-plugins/heft-storybook-plugin/CHANGELOG.md index 2cc6d074f32..efc51ff8b83 100644 --- a/heft-plugins/heft-storybook-plugin/CHANGELOG.md +++ b/heft-plugins/heft-storybook-plugin/CHANGELOG.md @@ -1,51 +1,31 @@ # Change Log - @rushstack/heft-storybook-plugin -This log was last generated on Thu, 27 Apr 2023 17:25:53 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. -## 0.3.0-rc.5 -Thu, 27 Apr 2023 17:25:52 GMT +## 0.2.11 +Mon, 22 May 2023 06:34:33 GMT -### Prerelease Changes - -- Update with latest main. - -## 0.3.0-rc.4 -Wed, 15 Mar 2023 20:22:44 GMT - -### Prerelease Changes - -- Fix an issue with `watchGlobAsync` - -## 0.3.0-rc.3 -Fri, 20 Jan 2023 20:13:16 GMT - -### Prerelease Changes - -- Fix issues with SASS incremental builds. -- Add support for TypeScript solution incremental builds. -- Improve responsiveness of watcher loop. - -## 0.2.0-rc.2 -Fri, 2 Dec 2022 05:28:24 GMT +_Version update only_ -### Prerelease Changes +## 0.2.10 +Fri, 12 May 2023 00:23:05 GMT -- Improve watch mode performance. -- Improve logging output. +_Version update only_ -## 0.2.0-rc.1 -Fri, 18 Nov 2022 02:34:26 GMT +## 0.2.9 +Thu, 04 May 2023 00:20:28 GMT -### Prerelease Changes +_Version update only_ -- Fix incremental TypeScript compilation. +## 0.2.8 +Mon, 01 May 2023 15:23:19 GMT -## 0.2.0-rc.0 -Tue, 15 Nov 2022 22:59:35 GMT +_Version update only_ -### Prerelease Changes +## 0.2.7 +Sat, 29 Apr 2023 00:23:03 GMT -- General fixes and improvements, in preparation for a general release. +_Version update only_ ## 0.2.6 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/heft-plugins/heft-storybook-plugin/package.json b/heft-plugins/heft-storybook-plugin/package.json index ac89e207406..476c38e00bf 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.3.0-rc.5", + "version": "0.2.11", "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.51.0-rc.5" + "@rushstack/heft": "^0.50.6" }, "dependencies": { "@rushstack/node-core-library": "workspace:*" diff --git a/heft-plugins/heft-webpack4-plugin/CHANGELOG.json b/heft-plugins/heft-webpack4-plugin/CHANGELOG.json index 4530dceec75..b9d6bf1e8ea 100644 --- a/heft-plugins/heft-webpack4-plugin/CHANGELOG.json +++ b/heft-plugins/heft-webpack4-plugin/CHANGELOG.json @@ -2,82 +2,106 @@ "name": "@rushstack/heft-webpack4-plugin", "entries": [ { - "version": "0.6.0-rc.5", - "tag": "@rushstack/heft-webpack4-plugin_v0.6.0-rc.5", - "date": "Thu, 27 Apr 2023 17:25:52 GMT", + "version": "0.5.47", + "tag": "@rushstack/heft-webpack4-plugin_v0.5.47", + "date": "Mon, 22 May 2023 06:34:33 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Update with latest main." - } - ] - } - }, - { - "version": "0.6.0-rc.4", - "tag": "@rushstack/heft-webpack4-plugin_v0.6.0-rc.4", - "date": "Wed, 15 Mar 2023 20:22:44 GMT", - "comments": { - "minor": [ + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, { - "comment": "Fix an issue with `watchGlobAsync`" + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.5` to `^0.50.6`" } ] } }, { - "version": "0.6.0-rc.3", - "tag": "@rushstack/heft-webpack4-plugin_v0.6.0-rc.3", - "date": "Fri, 20 Jan 2023 20:13:16 GMT", + "version": "0.5.46", + "tag": "@rushstack/heft-webpack4-plugin_v0.5.46", + "date": "Fri, 12 May 2023 00:23:05 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, { - "comment": "Fix issues with SASS incremental builds." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" }, { - "comment": "Add support for TypeScript solution incremental builds." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" }, { - "comment": "Improve responsiveness of watcher loop." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.4` to `^0.50.5`" } ] } }, { - "version": "0.6.0-rc.2", - "tag": "@rushstack/heft-webpack4-plugin_v0.6.0-rc.2", - "date": "Fri, 2 Dec 2022 05:28:24 GMT", + "version": "0.5.45", + "tag": "@rushstack/heft-webpack4-plugin_v0.5.45", + "date": "Thu, 04 May 2023 00:20:28 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Improve watch mode performance." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" }, { - "comment": "Improve logging output." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.3` to `^0.50.4`" } ] } }, { - "version": "0.6.0-rc.1", - "tag": "@rushstack/heft-webpack4-plugin_v0.6.0-rc.1", - "date": "Fri, 18 Nov 2022 02:34:26 GMT", + "version": "0.5.44", + "tag": "@rushstack/heft-webpack4-plugin_v0.5.44", + "date": "Mon, 01 May 2023 15:23:19 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, { - "comment": "Fix incremental TypeScript compilation." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.2` to `^0.50.3`" } ] } }, { - "version": "0.6.0-rc.0", - "tag": "@rushstack/heft-webpack4-plugin_v0.6.0-rc.0", - "date": "Tue, 15 Nov 2022 22:59:35 GMT", + "version": "0.5.43", + "tag": "@rushstack/heft-webpack4-plugin_v0.5.43", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, { - "comment": "General fixes and improvements, in preparation for a general release." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.1` to `^0.50.2`" } ] } diff --git a/heft-plugins/heft-webpack4-plugin/CHANGELOG.md b/heft-plugins/heft-webpack4-plugin/CHANGELOG.md index 87a86384fe4..284348d6c74 100644 --- a/heft-plugins/heft-webpack4-plugin/CHANGELOG.md +++ b/heft-plugins/heft-webpack4-plugin/CHANGELOG.md @@ -1,51 +1,31 @@ # Change Log - @rushstack/heft-webpack4-plugin -This log was last generated on Thu, 27 Apr 2023 17:25:53 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. -## 0.6.0-rc.5 -Thu, 27 Apr 2023 17:25:52 GMT +## 0.5.47 +Mon, 22 May 2023 06:34:33 GMT -### Prerelease Changes - -- Update with latest main. - -## 0.6.0-rc.4 -Wed, 15 Mar 2023 20:22:44 GMT - -### Prerelease Changes - -- Fix an issue with `watchGlobAsync` - -## 0.6.0-rc.3 -Fri, 20 Jan 2023 20:13:16 GMT - -### Prerelease Changes - -- Fix issues with SASS incremental builds. -- Add support for TypeScript solution incremental builds. -- Improve responsiveness of watcher loop. - -## 0.6.0-rc.2 -Fri, 2 Dec 2022 05:28:24 GMT +_Version update only_ -### Prerelease Changes +## 0.5.46 +Fri, 12 May 2023 00:23:05 GMT -- Improve watch mode performance. -- Improve logging output. +_Version update only_ -## 0.6.0-rc.1 -Fri, 18 Nov 2022 02:34:26 GMT +## 0.5.45 +Thu, 04 May 2023 00:20:28 GMT -### Prerelease Changes +_Version update only_ -- Fix incremental TypeScript compilation. +## 0.5.44 +Mon, 01 May 2023 15:23:19 GMT -## 0.6.0-rc.0 -Tue, 15 Nov 2022 22:59:35 GMT +_Version update only_ -### Prerelease Changes +## 0.5.43 +Sat, 29 Apr 2023 00:23:03 GMT -- General fixes and improvements, in preparation for a general release. +_Version update only_ ## 0.5.42 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/heft-plugins/heft-webpack4-plugin/package.json b/heft-plugins/heft-webpack4-plugin/package.json index a64492bf4e5..6af45e99d52 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.6.0-rc.5", + "version": "0.5.47", "description": "Heft plugin for Webpack 4", "repository": { "type": "git", @@ -23,7 +23,7 @@ } }, "peerDependencies": { - "@rushstack/heft": "0.51.0-rc.5", + "@rushstack/heft": "^0.50.6", "@types/webpack": "^4", "webpack": "~4.44.2" }, diff --git a/heft-plugins/heft-webpack5-plugin/CHANGELOG.json b/heft-plugins/heft-webpack5-plugin/CHANGELOG.json index 26a9b8b78bb..6f4e860bd11 100644 --- a/heft-plugins/heft-webpack5-plugin/CHANGELOG.json +++ b/heft-plugins/heft-webpack5-plugin/CHANGELOG.json @@ -2,82 +2,106 @@ "name": "@rushstack/heft-webpack5-plugin", "entries": [ { - "version": "0.7.0-rc.5", - "tag": "@rushstack/heft-webpack5-plugin_v0.7.0-rc.5", - "date": "Thu, 27 Apr 2023 17:25:52 GMT", + "version": "0.6.11", + "tag": "@rushstack/heft-webpack5-plugin_v0.6.11", + "date": "Mon, 22 May 2023 06:34:33 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Update with latest main." - } - ] - } - }, - { - "version": "0.7.0-rc.4", - "tag": "@rushstack/heft-webpack5-plugin_v0.7.0-rc.4", - "date": "Wed, 15 Mar 2023 20:22:44 GMT", - "comments": { - "minor": [ + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, { - "comment": "Fix an issue with `watchGlobAsync`" + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.5` to `^0.50.6`" } ] } }, { - "version": "0.7.0-rc.3", - "tag": "@rushstack/heft-webpack5-plugin_v0.7.0-rc.3", - "date": "Fri, 20 Jan 2023 20:13:16 GMT", + "version": "0.6.10", + "tag": "@rushstack/heft-webpack5-plugin_v0.6.10", + "date": "Fri, 12 May 2023 00:23:05 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, { - "comment": "Fix issues with SASS incremental builds." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" }, { - "comment": "Add support for TypeScript solution incremental builds." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" }, { - "comment": "Improve responsiveness of watcher loop." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.4` to `^0.50.5`" } ] } }, { - "version": "0.6.0-rc.2", - "tag": "@rushstack/heft-webpack5-plugin_v0.6.0-rc.2", - "date": "Fri, 2 Dec 2022 05:28:24 GMT", + "version": "0.6.9", + "tag": "@rushstack/heft-webpack5-plugin_v0.6.9", + "date": "Thu, 04 May 2023 00:20:28 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Improve watch mode performance." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" }, { - "comment": "Improve logging output." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.3` to `^0.50.4`" } ] } }, { - "version": "0.6.0-rc.1", - "tag": "@rushstack/heft-webpack5-plugin_v0.6.0-rc.1", - "date": "Fri, 18 Nov 2022 02:34:26 GMT", + "version": "0.6.8", + "tag": "@rushstack/heft-webpack5-plugin_v0.6.8", + "date": "Mon, 01 May 2023 15:23:19 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, { - "comment": "Fix incremental TypeScript compilation." + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.2` to `^0.50.3`" } ] } }, { - "version": "0.6.0-rc.0", - "tag": "@rushstack/heft-webpack5-plugin_v0.6.0-rc.0", - "date": "Tue, 15 Nov 2022 22:59:35 GMT", + "version": "0.6.7", + "tag": "@rushstack/heft-webpack5-plugin_v0.6.7", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, { - "comment": "General fixes and improvements, in preparation for a general release." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.1` to `^0.50.2`" } ] } diff --git a/heft-plugins/heft-webpack5-plugin/CHANGELOG.md b/heft-plugins/heft-webpack5-plugin/CHANGELOG.md index 79c420e84a5..1edb77d77d4 100644 --- a/heft-plugins/heft-webpack5-plugin/CHANGELOG.md +++ b/heft-plugins/heft-webpack5-plugin/CHANGELOG.md @@ -1,51 +1,31 @@ # Change Log - @rushstack/heft-webpack5-plugin -This log was last generated on Thu, 27 Apr 2023 17:25:53 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. -## 0.7.0-rc.5 -Thu, 27 Apr 2023 17:25:52 GMT +## 0.6.11 +Mon, 22 May 2023 06:34:33 GMT -### Prerelease Changes - -- Update with latest main. - -## 0.7.0-rc.4 -Wed, 15 Mar 2023 20:22:44 GMT - -### Prerelease Changes - -- Fix an issue with `watchGlobAsync` - -## 0.7.0-rc.3 -Fri, 20 Jan 2023 20:13:16 GMT - -### Prerelease Changes - -- Fix issues with SASS incremental builds. -- Add support for TypeScript solution incremental builds. -- Improve responsiveness of watcher loop. - -## 0.6.0-rc.2 -Fri, 2 Dec 2022 05:28:24 GMT +_Version update only_ -### Prerelease Changes +## 0.6.10 +Fri, 12 May 2023 00:23:05 GMT -- Improve watch mode performance. -- Improve logging output. +_Version update only_ -## 0.6.0-rc.1 -Fri, 18 Nov 2022 02:34:26 GMT +## 0.6.9 +Thu, 04 May 2023 00:20:28 GMT -### Prerelease Changes +_Version update only_ -- Fix incremental TypeScript compilation. +## 0.6.8 +Mon, 01 May 2023 15:23:19 GMT -## 0.6.0-rc.0 -Tue, 15 Nov 2022 22:59:35 GMT +_Version update only_ -### Prerelease Changes +## 0.6.7 +Sat, 29 Apr 2023 00:23:03 GMT -- General fixes and improvements, in preparation for a general release. +_Version update only_ ## 0.6.6 Thu, 27 Apr 2023 17:18:43 GMT @@ -64,7 +44,7 @@ Tue, 11 Apr 2023 00:23:22 GMT ### Patches -- Fix bug where peerDep of webpack was not properly updated with regular dependency version. +- Fix bug where peerDep of webpack was not properly updated with regular dependency version. ## 0.6.3 Fri, 07 Apr 2023 22:19:21 GMT diff --git a/heft-plugins/heft-webpack5-plugin/package.json b/heft-plugins/heft-webpack5-plugin/package.json index bdc0df2e493..3d5049bf97b 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.7.0-rc.5", + "version": "0.6.11", "description": "Heft plugin for Webpack 5", "repository": { "type": "git", @@ -18,7 +18,7 @@ "_phase:test": "heft run --only test -- --clean" }, "peerDependencies": { - "@rushstack/heft": "0.51.0-rc.5", + "@rushstack/heft": "^0.50.6", "webpack": "~5.80.0" }, "dependencies": { diff --git a/libraries/api-extractor-model/CHANGELOG.json b/libraries/api-extractor-model/CHANGELOG.json index b6e75f7a051..ec297b9be11 100644 --- a/libraries/api-extractor-model/CHANGELOG.json +++ b/libraries/api-extractor-model/CHANGELOG.json @@ -1,6 +1,74 @@ { "name": "@microsoft/api-extractor-model", "entries": [ + { + "version": "7.27.0", + "tag": "@microsoft/api-extractor-model_v7.27.0", + "date": "Mon, 22 May 2023 06:34:32 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade the TypeScript dependency to ~5.0.4" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + } + ] + } + }, + { + "version": "7.26.9", + "tag": "@microsoft/api-extractor-model_v7.26.9", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + } + ] + } + }, + { + "version": "7.26.8", + "tag": "@microsoft/api-extractor-model_v7.26.8", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "patch": [ + { + "comment": "Fix a mistake in the documentation for ApiParameterListMixin.overloadIndex" + } + ] + } + }, + { + "version": "7.26.7", + "tag": "@microsoft/api-extractor-model_v7.26.7", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + } + ] + } + }, + { + "version": "7.26.6", + "tag": "@microsoft/api-extractor-model_v7.26.6", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + } + ] + } + }, { "version": "7.26.5", "tag": "@microsoft/api-extractor-model_v7.26.5", diff --git a/libraries/api-extractor-model/CHANGELOG.md b/libraries/api-extractor-model/CHANGELOG.md index d184a2d9ce4..906b643da46 100644 --- a/libraries/api-extractor-model/CHANGELOG.md +++ b/libraries/api-extractor-model/CHANGELOG.md @@ -1,6 +1,35 @@ # Change Log - @microsoft/api-extractor-model -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:32 GMT and should not be manually modified. + +## 7.27.0 +Mon, 22 May 2023 06:34:32 GMT + +### Minor changes + +- Upgrade the TypeScript dependency to ~5.0.4 + +## 7.26.9 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 7.26.8 +Thu, 04 May 2023 00:20:28 GMT + +### Patches + +- Fix a mistake in the documentation for ApiParameterListMixin.overloadIndex + +## 7.26.7 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 7.26.6 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 7.26.5 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/libraries/api-extractor-model/package.json b/libraries/api-extractor-model/package.json index 61f55c99a91..512c770f6a6 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.26.5", + "version": "7.27.0", "description": "A helper library for loading and saving the .api.json files created by API Extractor", "repository": { "type": "git", @@ -23,8 +23,8 @@ }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@types/heft-jest": "1.0.1", "@types/node": "14.18.36" } diff --git a/libraries/api-extractor-model/src/mixins/ApiParameterListMixin.ts b/libraries/api-extractor-model/src/mixins/ApiParameterListMixin.ts index edee26545e6..db1ba6970dd 100644 --- a/libraries/api-extractor-model/src/mixins/ApiParameterListMixin.ts +++ b/libraries/api-extractor-model/src/mixins/ApiParameterListMixin.ts @@ -53,7 +53,7 @@ const _parameters: unique symbol = Symbol('ApiParameterListMixin._parameters'); // eslint-disable-next-line @typescript-eslint/naming-convention export interface ApiParameterListMixin extends ApiItem { /** - * When a function has multiple overloaded declarations, this zero-based integer index can be used to unqiuely + * When a function has multiple overloaded declarations, this one-based integer index can be used to uniquely * identify them. * * @remarks diff --git a/libraries/debug-certificate-manager/CHANGELOG.json b/libraries/debug-certificate-manager/CHANGELOG.json index 957b5c593dc..87af82bced3 100644 --- a/libraries/debug-certificate-manager/CHANGELOG.json +++ b/libraries/debug-certificate-manager/CHANGELOG.json @@ -1,6 +1,96 @@ { "name": "@rushstack/debug-certificate-manager", "entries": [ + { + "version": "1.2.27", + "tag": "@rushstack/debug-certificate-manager_v1.2.27", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "1.2.26", + "tag": "@rushstack/debug-certificate-manager_v1.2.26", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "1.2.25", + "tag": "@rushstack/debug-certificate-manager_v1.2.25", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "1.2.24", + "tag": "@rushstack/debug-certificate-manager_v1.2.24", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "1.2.23", + "tag": "@rushstack/debug-certificate-manager_v1.2.23", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "1.2.22", "tag": "@rushstack/debug-certificate-manager_v1.2.22", diff --git a/libraries/debug-certificate-manager/CHANGELOG.md b/libraries/debug-certificate-manager/CHANGELOG.md index 4196d4138a7..19cdc30a621 100644 --- a/libraries/debug-certificate-manager/CHANGELOG.md +++ b/libraries/debug-certificate-manager/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/debug-certificate-manager -This log was last generated on Thu, 27 Apr 2023 17:18:42 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 1.2.27 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 1.2.26 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 1.2.25 +Thu, 04 May 2023 00:20:28 GMT + +_Version update only_ + +## 1.2.24 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 1.2.23 +Sat, 29 Apr 2023 00:23:02 GMT + +_Version update only_ ## 1.2.22 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/libraries/debug-certificate-manager/package.json b/libraries/debug-certificate-manager/package.json index 6231d4f4089..fb763aeab7d 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.2.22", + "version": "1.2.27", "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 f582d13d51d..4ca3c61ab0c 100644 --- a/libraries/heft-config-file/CHANGELOG.json +++ b/libraries/heft-config-file/CHANGELOG.json @@ -1,6 +1,65 @@ { "name": "@rushstack/heft-config-file", "entries": [ + { + "version": "0.12.2", + "tag": "@rushstack/heft-config-file_v0.12.2", + "date": "Mon, 22 May 2023 06:34:32 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/rig-package\" to `0.3.19`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + } + ] + } + }, + { + "version": "0.12.1", + "tag": "@rushstack/heft-config-file_v0.12.1", + "date": "Fri, 12 May 2023 00:23:06 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + } + ] + } + }, + { + "version": "0.12.0", + "tag": "@rushstack/heft-config-file_v0.12.0", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "minor": [ + { + "comment": "BREAKING CHANGE: The custom resolver method now accepts an options parameter. This parameter includes all previously provided information and now includes the partially-resolved configuration file." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + } + ] + } + }, + { + "version": "0.11.11", + "tag": "@rushstack/heft-config-file_v0.11.11", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + } + ] + } + }, { "version": "0.11.10", "tag": "@rushstack/heft-config-file_v0.11.10", diff --git a/libraries/heft-config-file/CHANGELOG.md b/libraries/heft-config-file/CHANGELOG.md index 9d77e31761e..529ef28bc48 100644 --- a/libraries/heft-config-file/CHANGELOG.md +++ b/libraries/heft-config-file/CHANGELOG.md @@ -1,6 +1,28 @@ # Change Log - @rushstack/heft-config-file -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:32 GMT and should not be manually modified. + +## 0.12.2 +Mon, 22 May 2023 06:34:32 GMT + +_Version update only_ + +## 0.12.1 +Fri, 12 May 2023 00:23:06 GMT + +_Version update only_ + +## 0.12.0 +Mon, 01 May 2023 15:23:19 GMT + +### Minor changes + +- BREAKING CHANGE: The custom resolver method now accepts an options parameter. This parameter includes all previously provided information and now includes the partially-resolved configuration file. + +## 0.11.11 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.11.10 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/libraries/heft-config-file/package.json b/libraries/heft-config-file/package.json index 8047172e0f5..78b16252b88 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.11.10", + "version": "0.12.2", "description": "Configuration file loader for @rushstack/heft", "repository": { "type": "git", @@ -27,8 +27,8 @@ }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@types/heft-jest": "1.0.1", "@types/node": "14.18.36" } diff --git a/libraries/heft-config-file/src/ConfigurationFile.ts b/libraries/heft-config-file/src/ConfigurationFile.ts index 21526957cd3..0268c90f5d1 100644 --- a/libraries/heft-config-file/src/ConfigurationFile.ts +++ b/libraries/heft-config-file/src/ConfigurationFile.ts @@ -91,17 +91,41 @@ interface IConfigurationFileFieldAnnotation { originalValues: { [propertyName in keyof TField]: unknown }; } +/** + * Options provided to the custom resolver specified in {@link ICustomJsonPathMetadata}. + * + * @beta + */ +export interface IJsonPathMetadataResolverOptions { + /** + * The name of the property being resolved. + */ + propertyName: string; + /** + * The value of the path property being resolved. + */ + propertyValue: string; + /** + * The path to the configuration file the property was obtained from. + */ + configurationFilePath: string; + /** + * The configuration file the property was obtained from. + */ + configurationFile: Partial; +} + /** * Used to specify how node(s) in a JSON object should be processed after being loaded. * * @beta */ -export interface ICustomJsonPathMetadata { +export interface ICustomJsonPathMetadata { /** * If `ICustomJsonPathMetadata.pathResolutionMethod` is set to `PathResolutionMethod.custom`, * this property be used to resolve the path. */ - customResolver?: (configurationFilePath: string, propertyName: string, propertyValue: string) => string; + customResolver?: (resolverOptions: IJsonPathMetadataResolverOptions) => string; /** * If this property describes a filesystem path, use this property to describe @@ -174,7 +198,7 @@ export interface IPropertyInheritanceDefaults { /** * @beta */ -export type IJsonPathMetadata = ICustomJsonPathMetadata | INonCustomJsonPathMetadata; +export type IJsonPathMetadata = ICustomJsonPathMetadata | INonCustomJsonPathMetadata; /** * Keys in this object are JSONPaths {@link https://jsonpath.com/}, and values are objects @@ -182,8 +206,8 @@ export type IJsonPathMetadata = ICustomJsonPathMetadata | INonCustomJsonPathMeta * * @beta */ -export interface IJsonPathsMetadata { - [jsonPath: string]: IJsonPathMetadata; +export interface IJsonPathsMetadata { + [jsonPath: string]: IJsonPathMetadata; } /** @@ -198,7 +222,7 @@ export interface IConfigurationFileOptionsBase { /** * Use this property to specify how JSON nodes are postprocessed. */ - jsonPathMetadata?: IJsonPathsMetadata; + jsonPathMetadata?: IJsonPathsMetadata; /** * Use this property to control how root-level properties are handled between parent and child @@ -268,7 +292,7 @@ export class ConfigurationFile { /** {@inheritDoc IConfigurationFileOptionsBase.projectRelativeFilePath} */ public readonly projectRelativeFilePath: string; - private readonly _jsonPathMetadata: IJsonPathsMetadata; + private readonly _jsonPathMetadata: IJsonPathsMetadata; private readonly _propertyInheritanceTypes: IPropertiesInheritance; private readonly _defaultPropertyInheritance: IPropertyInheritanceDefaults; private __schema: JsonSchema | undefined; @@ -466,9 +490,12 @@ export class ConfigurationFile { json: configurationJson, callback: (payload: unknown, payloadType: string, fullPayload: IJsonPathCallbackObject) => { const resolvedPath: string = this._resolvePathProperty( - resolvedConfigurationFilePath, - fullPayload.path, - fullPayload.value, + { + propertyName: fullPayload.path, + propertyValue: fullPayload.value, + configurationFilePath: resolvedConfigurationFilePath, + configurationFile: configurationJson + }, metadata ); // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -583,11 +610,10 @@ export class ConfigurationFile { } private _resolvePathProperty( - configurationFilePath: string, - propertyName: string, - propertyValue: string, - metadata: IJsonPathMetadata + resolverOptions: IJsonPathMetadataResolverOptions, + metadata: IJsonPathMetadata ): string { + const { propertyValue, configurationFilePath } = resolverOptions; const resolutionMethod: PathResolutionMethod | undefined = metadata.pathResolutionMethod; if (resolutionMethod === undefined) { return propertyValue; @@ -628,7 +654,7 @@ export class ConfigurationFile { ); } - return metadata.customResolver(configurationFilePath, propertyName, propertyValue); + return metadata.customResolver(resolverOptions); } default: { diff --git a/libraries/heft-config-file/src/index.ts b/libraries/heft-config-file/src/index.ts index 884a30bce24..7650ea5fc68 100644 --- a/libraries/heft-config-file/src/index.ts +++ b/libraries/heft-config-file/src/index.ts @@ -16,6 +16,7 @@ export { IConfigurationFileOptions, ICustomJsonPathMetadata, ICustomPropertyInheritance, + IJsonPathMetadataResolverOptions, IJsonPathMetadata, IJsonPathsMetadata, InheritanceType, diff --git a/libraries/load-themed-styles/CHANGELOG.json b/libraries/load-themed-styles/CHANGELOG.json index 94fdf301f70..44f9197668d 100644 --- a/libraries/load-themed-styles/CHANGELOG.json +++ b/libraries/load-themed-styles/CHANGELOG.json @@ -1,6 +1,96 @@ { "name": "@microsoft/load-themed-styles", "entries": [ + { + "version": "2.0.42", + "tag": "@microsoft/load-themed-styles_v2.0.42", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-web-rig\" to `0.15.0`" + } + ] + } + }, + { + "version": "2.0.41", + "tag": "@microsoft/load-themed-styles_v2.0.41", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-web-rig\" to `0.14.17`" + } + ] + } + }, + { + "version": "2.0.40", + "tag": "@microsoft/load-themed-styles_v2.0.40", + "date": "Thu, 11 May 2023 00:17:21 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft-web-rig\" to `0.14.16`" + } + ] + } + }, + { + "version": "2.0.39", + "tag": "@microsoft/load-themed-styles_v2.0.39", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-web-rig\" to `0.14.15`" + } + ] + } + }, + { + "version": "2.0.38", + "tag": "@microsoft/load-themed-styles_v2.0.38", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-web-rig\" to `0.14.14`" + } + ] + } + }, + { + "version": "2.0.37", + "tag": "@microsoft/load-themed-styles_v2.0.37", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-web-rig\" to `0.14.13`" + } + ] + } + }, { "version": "2.0.36", "tag": "@microsoft/load-themed-styles_v2.0.36", diff --git a/libraries/load-themed-styles/CHANGELOG.md b/libraries/load-themed-styles/CHANGELOG.md index edd569d924a..51e5c39fc84 100644 --- a/libraries/load-themed-styles/CHANGELOG.md +++ b/libraries/load-themed-styles/CHANGELOG.md @@ -1,6 +1,36 @@ # Change Log - @microsoft/load-themed-styles -This log was last generated on Thu, 27 Apr 2023 17:18:42 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 2.0.42 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 2.0.41 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 2.0.40 +Thu, 11 May 2023 00:17:21 GMT + +_Version update only_ + +## 2.0.39 +Thu, 04 May 2023 00:20:28 GMT + +_Version update only_ + +## 2.0.38 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 2.0.37 +Sat, 29 Apr 2023 00:23:02 GMT + +_Version update only_ ## 2.0.36 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/libraries/load-themed-styles/package.json b/libraries/load-themed-styles/package.json index f780affb28f..37fa1ebd6a6 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.36", + "version": "2.0.42", "description": "Loads themed styles.", "license": "MIT", "repository": { diff --git a/libraries/localization-utilities/CHANGELOG.json b/libraries/localization-utilities/CHANGELOG.json index 47108fbc8bf..c20ba41f281 100644 --- a/libraries/localization-utilities/CHANGELOG.json +++ b/libraries/localization-utilities/CHANGELOG.json @@ -1,6 +1,111 @@ { "name": "@rushstack/localization-utilities", "entries": [ + { + "version": "0.8.54", + "tag": "@rushstack/localization-utilities_v0.8.54", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.10.10`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.8.53", + "tag": "@rushstack/localization-utilities_v0.8.53", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.10.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.8.52", + "tag": "@rushstack/localization-utilities_v0.8.52", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.10.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.8.51", + "tag": "@rushstack/localization-utilities_v0.8.51", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.10.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.8.50", + "tag": "@rushstack/localization-utilities_v0.8.50", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/typings-generator\" to `0.10.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.8.49", "tag": "@rushstack/localization-utilities_v0.8.49", diff --git a/libraries/localization-utilities/CHANGELOG.md b/libraries/localization-utilities/CHANGELOG.md index c36648bc62d..62fdc4a25d9 100644 --- a/libraries/localization-utilities/CHANGELOG.md +++ b/libraries/localization-utilities/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/localization-utilities -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.8.54 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.8.53 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.8.52 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.8.51 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 0.8.50 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.8.49 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/libraries/localization-utilities/package.json b/libraries/localization-utilities/package.json index 9624a608647..8ba9941fcce 100644 --- a/libraries/localization-utilities/package.json +++ b/libraries/localization-utilities/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/localization-utilities", - "version": "0.8.49", + "version": "0.8.54", "description": "This plugin contains some useful functions for localization.", "main": "lib/index.js", "typings": "dist/localization-utilities.d.ts", diff --git a/libraries/module-minifier/CHANGELOG.json b/libraries/module-minifier/CHANGELOG.json index 71a1e93eade..61999956e57 100644 --- a/libraries/module-minifier/CHANGELOG.json +++ b/libraries/module-minifier/CHANGELOG.json @@ -1,6 +1,111 @@ { "name": "@rushstack/module-minifier", "entries": [ + { + "version": "0.3.11", + "tag": "@rushstack/module-minifier_v0.3.11", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.10`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.3.10", + "tag": "@rushstack/module-minifier_v0.3.10", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.3.9", + "tag": "@rushstack/module-minifier_v0.3.9", + "date": "Thu, 04 May 2023 15:17:38 GMT", + "comments": { + "patch": [ + { + "comment": "Switch terser dependency to ^5.9.0." + } + ] + } + }, + { + "version": "0.3.8", + "tag": "@rushstack/module-minifier_v0.3.8", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.3.7", + "tag": "@rushstack/module-minifier_v0.3.7", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.3.6", + "tag": "@rushstack/module-minifier_v0.3.6", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.3.5", "tag": "@rushstack/module-minifier_v0.3.5", diff --git a/libraries/module-minifier/CHANGELOG.md b/libraries/module-minifier/CHANGELOG.md index 6ff3b355147..8d93106b7cf 100644 --- a/libraries/module-minifier/CHANGELOG.md +++ b/libraries/module-minifier/CHANGELOG.md @@ -1,6 +1,38 @@ # Change Log - @rushstack/module-minifier -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.3.11 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.3.10 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.3.9 +Thu, 04 May 2023 15:17:38 GMT + +### Patches + +- Switch terser dependency to ^5.9.0. + +## 0.3.8 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.3.7 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 0.3.6 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.3.5 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/libraries/module-minifier/package.json b/libraries/module-minifier/package.json index 2c0a174ddbf..dc4cf805eba 100644 --- a/libraries/module-minifier/package.json +++ b/libraries/module-minifier/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/module-minifier", - "version": "0.3.5", + "version": "0.3.11", "description": "Wrapper for terser to support bulk parallel minification.", "main": "lib/index.js", "typings": "dist/module-minifier.d.ts", @@ -19,7 +19,7 @@ "@rushstack/worker-pool": "workspace:*", "serialize-javascript": "6.0.0", "source-map": "~0.7.3", - "terser": "5.16.1" + "terser": "^5.9.0" }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", diff --git a/libraries/node-core-library/CHANGELOG.json b/libraries/node-core-library/CHANGELOG.json index 538ffebaf75..9ed3acff255 100644 --- a/libraries/node-core-library/CHANGELOG.json +++ b/libraries/node-core-library/CHANGELOG.json @@ -1,6 +1,57 @@ { "name": "@rushstack/node-core-library", "entries": [ + { + "version": "3.59.1", + "tag": "@rushstack/node-core-library_v3.59.1", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + } + ] + } + }, + { + "version": "3.59.0", + "tag": "@rushstack/node-core-library_v3.59.0", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "minor": [ + { + "comment": "Add an option to the `PrefixProxyTerminalProvider` to create a dynamic prefix, which can be used for something like prefixing logging lines with a timestamp." + } + ] + } + }, + { + "version": "3.58.0", + "tag": "@rushstack/node-core-library_v3.58.0", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "minor": [ + { + "comment": "Expose a `Text.escapeRegExp` function to escape regexp special characters." + } + ] + } + }, + { + "version": "3.57.0", + "tag": "@rushstack/node-core-library_v3.57.0", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", + "comments": { + "minor": [ + { + "comment": "Add PrefixProxyTerminalProvider to allow for prefixing a provided string before writing to a terminal provider" + }, + { + "comment": "Add a Writable stream adapter for ITerminal to allow writing to a terminal as a stream" + } + ] + } + }, { "version": "3.56.0", "tag": "@rushstack/node-core-library_v3.56.0", diff --git a/libraries/node-core-library/CHANGELOG.md b/libraries/node-core-library/CHANGELOG.md index 16b1d89c10a..783038e995f 100644 --- a/libraries/node-core-library/CHANGELOG.md +++ b/libraries/node-core-library/CHANGELOG.md @@ -1,6 +1,33 @@ # Change Log - @rushstack/node-core-library -This log was last generated on Thu, 27 Apr 2023 17:18:42 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 3.59.1 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 3.59.0 +Fri, 12 May 2023 00:23:05 GMT + +### Minor changes + +- Add an option to the `PrefixProxyTerminalProvider` to create a dynamic prefix, which can be used for something like prefixing logging lines with a timestamp. + +## 3.58.0 +Mon, 01 May 2023 15:23:19 GMT + +### Minor changes + +- Expose a `Text.escapeRegExp` function to escape regexp special characters. + +## 3.57.0 +Sat, 29 Apr 2023 00:23:02 GMT + +### Minor changes + +- Add PrefixProxyTerminalProvider to allow for prefixing a provided string before writing to a terminal provider +- Add a Writable stream adapter for ITerminal to allow writing to a terminal as a stream ## 3.56.0 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/libraries/node-core-library/package.json b/libraries/node-core-library/package.json index ee612205398..72d0088c603 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": "3.56.0", + "version": "3.59.1", "description": "Core libraries that every NodeJS toolchain project should use", "main": "lib/index.js", "typings": "dist/node-core-library.d.ts", @@ -26,8 +26,8 @@ }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@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/Terminal/PrefixProxyTerminalProvider.ts b/libraries/node-core-library/src/Terminal/PrefixProxyTerminalProvider.ts new file mode 100644 index 00000000000..f12163e6de0 --- /dev/null +++ b/libraries/node-core-library/src/Terminal/PrefixProxyTerminalProvider.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. + +import type { ITerminalProvider, TerminalProviderSeverity } from './ITerminalProvider'; +import { Text } from '../Text'; + +/** + * @beta + */ +export interface IPrefixProxyTerminalProviderOptionsBase { + /** + * The {@link ITerminalProvider} that will be wrapped. + */ + terminalProvider: ITerminalProvider; +} + +/** + * Options for {@link PrefixProxyTerminalProvider}, with a static prefix. + * + * @beta + */ +export interface IStaticPrefixProxyTerminalProviderOptions extends IPrefixProxyTerminalProviderOptionsBase { + /** + * The prefix that should be added to each line of output. + */ + prefix: string; +} + +/** + * Options for {@link PrefixProxyTerminalProvider}. + * + * @beta + */ +export interface IDynamicPrefixProxyTerminalProviderOptions extends IPrefixProxyTerminalProviderOptionsBase { + /** + * A function that returns the prefix that should be added to each line of output. This is useful + * for prefixing each line with a timestamp. + */ + getPrefix: () => string; +} + +/** + * @beta + */ +export type IPrefixProxyTerminalProviderOptions = + | IStaticPrefixProxyTerminalProviderOptions + | IDynamicPrefixProxyTerminalProviderOptions; + +/** + * Wraps an existing {@link ITerminalProvider} that prefixes each line of output with a specified + * prefix string. + * + * @beta + */ +export class PrefixProxyTerminalProvider implements ITerminalProvider { + private readonly _parentTerminalProvider: ITerminalProvider; + private readonly _getPrefix: () => string; + private readonly _newlineRegex: RegExp; + private _isOnNewline: boolean; + + public constructor(options: IPrefixProxyTerminalProviderOptions) { + const { terminalProvider } = options; + + this._parentTerminalProvider = terminalProvider; + + if ((options as IStaticPrefixProxyTerminalProviderOptions).prefix !== undefined) { + const { prefix } = options as IStaticPrefixProxyTerminalProviderOptions; + this._getPrefix = () => prefix; + } else { + const { getPrefix } = options as IDynamicPrefixProxyTerminalProviderOptions; + this._getPrefix = getPrefix; + } + + this._isOnNewline = true; + + // eslint-disable-next-line @rushstack/security/no-unsafe-regexp + this._newlineRegex = new RegExp(`${Text.escapeRegExp(terminalProvider.eolCharacter)}|\\n`, 'g'); + } + + /** @override */ + public get supportsColor(): boolean { + return this._parentTerminalProvider.supportsColor; + } + + /** @override */ + public get eolCharacter(): string { + return this._parentTerminalProvider.eolCharacter; + } + + /** @override */ + public write(data: string, severity: TerminalProviderSeverity): void { + // We need to track newlines to ensure that the prefix is added to each line + let currentIndex: number = 0; + // eslint-disable-next-line @rushstack/no-new-null + let newlineMatch: RegExpExecArray | null; + + while ((newlineMatch = this._newlineRegex.exec(data))) { + // Extract the line, add the prefix, and write it out with the newline + const newlineIndex: number = newlineMatch.index; + const newIndex: number = newlineIndex + newlineMatch[0].length; + const prefix: string = this._isOnNewline ? this._getPrefix() : ''; + const dataToWrite: string = `${prefix}${data.substring(currentIndex, newIndex)}`; + this._parentTerminalProvider.write(dataToWrite, severity); + // Update the currentIndex to start the search from the char after the newline + currentIndex = newIndex; + this._isOnNewline = true; + } + + // The remaining data is not postfixed by a newline, so write out the data and set _isNewline to false + const remainingData: string = data.substring(currentIndex); + if (remainingData.length) { + const prefix: string = this._isOnNewline ? this._getPrefix() : ''; + this._parentTerminalProvider.write(`${prefix}${remainingData}`, severity); + this._isOnNewline = false; + } + } +} diff --git a/libraries/node-core-library/src/Terminal/TerminalWritable.ts b/libraries/node-core-library/src/Terminal/TerminalWritable.ts new file mode 100644 index 00000000000..8681ac5af29 --- /dev/null +++ b/libraries/node-core-library/src/Terminal/TerminalWritable.ts @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import type { ITerminal } from './ITerminal'; +import { TerminalProviderSeverity } from './ITerminalProvider'; +import { Writable, type WritableOptions } from 'stream'; + +/** + * Options for {@link TerminalWritable}. + * + * @beta + */ +export interface ITerminalWritableOptions { + /** + * The {@link ITerminal} that the Writable will write to. + */ + terminal: ITerminal; + /** + * The severity of the messages that will be written to the {@link ITerminal}. + */ + severity: TerminalProviderSeverity; + /** + * Options for the underlying Writable. + */ + writableOptions?: WritableOptions; +} + +/** + * A adapter to allow writing to a provided terminal using Writable streams. + * + * @beta + */ +export class TerminalWritable extends Writable { + private _writeMethod: (data: string) => void; + + public constructor(options: ITerminalWritableOptions) { + const { terminal, severity, writableOptions } = options; + super(writableOptions); + + this._writev = undefined; + switch (severity) { + case TerminalProviderSeverity.log: + this._writeMethod = terminal.write.bind(terminal); + break; + case TerminalProviderSeverity.verbose: + this._writeMethod = terminal.writeVerbose.bind(terminal); + break; + case TerminalProviderSeverity.debug: + this._writeMethod = terminal.writeDebug.bind(terminal); + break; + case TerminalProviderSeverity.warning: + this._writeMethod = terminal.writeWarning.bind(terminal); + break; + case TerminalProviderSeverity.error: + this._writeMethod = terminal.writeError.bind(terminal); + break; + default: + throw new Error(`Unknown severity: ${severity}`); + } + } + + public _write( + chunk: string | Buffer | Uint8Array, + encoding: string, + // eslint-disable-next-line @rushstack/no-new-null + callback: (error?: Error | null) => void + ): void { + try { + const chunkData: string | Buffer = typeof chunk === 'string' ? chunk : Buffer.from(chunk); + this._writeMethod(chunkData.toString()); + } catch (e: unknown) { + callback(e as Error); + return; + } + callback(); + } +} diff --git a/libraries/node-core-library/src/Terminal/test/PrefixProxyTerminalProvider.test.ts b/libraries/node-core-library/src/Terminal/test/PrefixProxyTerminalProvider.test.ts new file mode 100644 index 00000000000..a7a62bff265 --- /dev/null +++ b/libraries/node-core-library/src/Terminal/test/PrefixProxyTerminalProvider.test.ts @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { Terminal } from '../Terminal'; +import { StringBufferTerminalProvider } from '../StringBufferTerminalProvider'; +import { PrefixProxyTerminalProvider } from '../PrefixProxyTerminalProvider'; +import { ITerminalProvider } from '../ITerminalProvider'; + +function runTestsForTerminalProvider( + getTerminalProvider: (terminalProvider: ITerminalProvider) => PrefixProxyTerminalProvider +): void { + let terminal: Terminal; + let baseProvider: StringBufferTerminalProvider; + + function verifyProvider(): void { + expect({ + log: baseProvider.getOutput(), + warning: baseProvider.getWarningOutput(), + error: baseProvider.getErrorOutput(), + verbose: baseProvider.getVerbose(), + debug: baseProvider.getDebugOutput() + }).toMatchSnapshot(); + } + + beforeEach(() => { + baseProvider = new StringBufferTerminalProvider(true); + const prefixProvider: PrefixProxyTerminalProvider = getTerminalProvider(baseProvider); + terminal = new Terminal(prefixProvider); + }); + + describe('write', () => { + test('writes a message', () => { + terminal.write('test message'); + verifyProvider(); + }); + + test('writes a message with newlines', () => { + terminal.write('message 1\nmessage 2\nmessage 3'); + verifyProvider(); + }); + + test('writes a message with provider newlines', () => { + terminal.write(`message 1${baseProvider.eolCharacter}message 2${baseProvider.eolCharacter}message 3`); + verifyProvider(); + }); + + test('writes messages without newlines', () => { + terminal.write('message 1'); + terminal.write('message 2'); + terminal.write('message 3'); + verifyProvider(); + }); + + test('writes a mix of messages with and without newlines', () => { + terminal.write('message 1'); + terminal.write('message 2\nmessage 3\n'); + terminal.write('message 4'); + terminal.write('message 5\nmessage 6'); + verifyProvider(); + }); + }); + + describe('writeLine', () => { + test('writes a message line', () => { + terminal.writeLine('test message'); + verifyProvider(); + }); + + test('writes a message line with newlines', () => { + terminal.writeLine('message 1\nmessage 2\nmessage 3'); + verifyProvider(); + }); + + test('writes a message line with provider newlines', () => { + terminal.writeLine( + `message 1${baseProvider.eolCharacter}message 2${baseProvider.eolCharacter}message 3` + ); + verifyProvider(); + }); + + test('writes a mix of message lines with and without newlines', () => { + terminal.writeLine('message 1'); + terminal.writeLine('message 2\nmessage 3\n'); + terminal.writeLine('message 4'); + terminal.writeLine('message 5\nmessage 6'); + verifyProvider(); + }); + }); +} + +describe(PrefixProxyTerminalProvider.name, () => { + describe('With a static prefix', () => { + runTestsForTerminalProvider( + (terminalProvider) => + new PrefixProxyTerminalProvider({ + terminalProvider, + prefix: '[prefix] ' + }) + ); + }); + + describe('With a dynamic prefix', () => { + runTestsForTerminalProvider((terminalProvider) => { + let counter: number = 0; + return new PrefixProxyTerminalProvider({ + terminalProvider, + getPrefix: () => `[prefix (${counter++})] ` + }); + }); + }); +}); diff --git a/libraries/node-core-library/src/Terminal/test/TerminalWritable.test.ts b/libraries/node-core-library/src/Terminal/test/TerminalWritable.test.ts new file mode 100644 index 00000000000..1bed1228e7c --- /dev/null +++ b/libraries/node-core-library/src/Terminal/test/TerminalWritable.test.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 { Terminal } from '../Terminal'; +import { StringBufferTerminalProvider } from '../StringBufferTerminalProvider'; +import { TerminalWritable } from '../TerminalWritable'; +import { TerminalProviderSeverity } from '../ITerminalProvider'; +import { Writable } from 'stream'; + +let terminal: Terminal; +let provider: StringBufferTerminalProvider; + +function verifyProvider(): void { + expect({ + log: provider.getOutput(), + warning: provider.getWarningOutput(), + error: provider.getErrorOutput(), + verbose: provider.getVerbose(), + debug: provider.getDebugOutput() + }).toMatchSnapshot(); +} + +async function writeAsync(writable: Writable, data: string): Promise { + await new Promise((resolve: () => void, reject: (error: Error) => void) => { + // eslint-disable-next-line @rushstack/no-new-null + writable.write(data, (error?: Error | null) => { + if (error) { + reject(error); + } else { + resolve(); + } + }); + }); +} + +describe(TerminalWritable.name, () => { + beforeEach(() => { + provider = new StringBufferTerminalProvider(true); + terminal = new Terminal(provider); + }); + + test('writes a message', async () => { + const writable: TerminalWritable = new TerminalWritable({ + terminal, + severity: TerminalProviderSeverity.log + }); + + await writeAsync(writable, 'test message'); + verifyProvider(); + }); + + test('writes a verbose message', async () => { + const writable: TerminalWritable = new TerminalWritable({ + terminal, + severity: TerminalProviderSeverity.verbose + }); + + await writeAsync(writable, 'test message'); + verifyProvider(); + }); + + test('writes a debug message', async () => { + const writable: TerminalWritable = new TerminalWritable({ + terminal, + severity: TerminalProviderSeverity.debug + }); + + await writeAsync(writable, 'test message'); + verifyProvider(); + }); + + test('writes a warning message', async () => { + const writable: TerminalWritable = new TerminalWritable({ + terminal, + severity: TerminalProviderSeverity.warning + }); + + await writeAsync(writable, 'test message'); + verifyProvider(); + }); + + test('writes an error message', async () => { + const writable: TerminalWritable = new TerminalWritable({ + terminal, + severity: TerminalProviderSeverity.error + }); + + await writeAsync(writable, 'test message'); + verifyProvider(); + }); +}); diff --git a/libraries/node-core-library/src/Terminal/test/__snapshots__/PrefixProxyTerminalProvider.test.ts.snap b/libraries/node-core-library/src/Terminal/test/__snapshots__/PrefixProxyTerminalProvider.test.ts.snap new file mode 100644 index 00000000000..561059efad4 --- /dev/null +++ b/libraries/node-core-library/src/Terminal/test/__snapshots__/PrefixProxyTerminalProvider.test.ts.snap @@ -0,0 +1,181 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix (0)] test message", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message with newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message with provider newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a mix of messages with and without newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix (0)] message 1message 2[n][prefix (1)] message 3[n][prefix (2)] message 4message 5[n][prefix (3)] message 6", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes messages without newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix (0)] message 1message 2message 3", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix (0)] test message[n]", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line with newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3[n]", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line with provider newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3[n]", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a mix of message lines with and without newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3[n][prefix (3)] [n][prefix (4)] message 4[n][prefix (5)] message 5[n][prefix (6)] message 6[n]", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a static prefix write writes a message 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix] test message", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a static prefix write writes a message with newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a static prefix write writes a message with provider newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a static prefix write writes a mix of messages with and without newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix] message 1message 2[n][prefix] message 3[n][prefix] message 4message 5[n][prefix] message 6", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a static prefix write writes messages without newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix] message 1message 2message 3", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix] test message[n]", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line with newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3[n]", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line with provider newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3[n]", + "verbose": "", + "warning": "", +} +`; + +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a mix of message lines with and without newlines 1`] = ` +Object { + "debug": "", + "error": "", + "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3[n][prefix] [n][prefix] message 4[n][prefix] message 5[n][prefix] message 6[n]", + "verbose": "", + "warning": "", +} +`; diff --git a/libraries/node-core-library/src/Terminal/test/__snapshots__/TerminalWritable.test.ts.snap b/libraries/node-core-library/src/Terminal/test/__snapshots__/TerminalWritable.test.ts.snap new file mode 100644 index 00000000000..1f17c94e56f --- /dev/null +++ b/libraries/node-core-library/src/Terminal/test/__snapshots__/TerminalWritable.test.ts.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`TerminalWritable writes a debug message 1`] = ` +Object { + "debug": "test message", + "error": "", + "log": "", + "verbose": "", + "warning": "", +} +`; + +exports[`TerminalWritable writes a message 1`] = ` +Object { + "debug": "", + "error": "", + "log": "test message", + "verbose": "", + "warning": "", +} +`; + +exports[`TerminalWritable writes a verbose message 1`] = ` +Object { + "debug": "", + "error": "", + "log": "", + "verbose": "test message", + "warning": "", +} +`; + +exports[`TerminalWritable writes a warning message 1`] = ` +Object { + "debug": "", + "error": "", + "log": "", + "verbose": "", + "warning": "[yellow]test message[default]", +} +`; + +exports[`TerminalWritable writes an error message 1`] = ` +Object { + "debug": "", + "error": "[red]test message[default]", + "log": "", + "verbose": "", + "warning": "", +} +`; diff --git a/libraries/node-core-library/src/Text.ts b/libraries/node-core-library/src/Text.ts index 36a6adc28fe..b7ab11139d4 100644 --- a/libraries/node-core-library/src/Text.ts +++ b/libraries/node-core-library/src/Text.ts @@ -171,4 +171,11 @@ export class Text { } return s + newlineKind; // no, add it } + + /** + * Escapes a string so that it can be treated as a literal string when used in a regular expression. + */ + public static escapeRegExp(literal: string): string { + return literal.replace(/[^A-Za-z0-9_]/g, '\\$&'); + } } diff --git a/libraries/node-core-library/src/index.ts b/libraries/node-core-library/src/index.ts index 96ebe2117d2..7f2563b47f6 100644 --- a/libraries/node-core-library/src/index.ts +++ b/libraries/node-core-library/src/index.ts @@ -104,4 +104,12 @@ export { StringBufferTerminalProvider, IStringBufferOutputOptions } from './Terminal/StringBufferTerminalProvider'; +export { + PrefixProxyTerminalProvider, + IPrefixProxyTerminalProviderOptions, + IDynamicPrefixProxyTerminalProviderOptions, + IPrefixProxyTerminalProviderOptionsBase, + IStaticPrefixProxyTerminalProviderOptions +} from './Terminal/PrefixProxyTerminalProvider'; +export { TerminalWritable, ITerminalWritableOptions } from './Terminal/TerminalWritable'; export { TypeUuid } from './TypeUuid'; diff --git a/libraries/node-core-library/src/test/Text.test.ts b/libraries/node-core-library/src/test/Text.test.ts index 330de0d81ae..5e6ce48f51c 100644 --- a/libraries/node-core-library/src/test/Text.test.ts +++ b/libraries/node-core-library/src/test/Text.test.ts @@ -98,4 +98,25 @@ describe(Text.name, () => { expect(Text.convertToLf('\r \n')).toEqual('\n \n'); }); }); + + describe(Text.escapeRegExp.name, () => { + it('escapes special characters', () => { + expect(Text.escapeRegExp('')).toEqual(''); + expect(Text.escapeRegExp('abc')).toEqual('abc'); + expect(Text.escapeRegExp('a.c')).toEqual('a\\.c'); + expect(Text.escapeRegExp('a*c')).toEqual('a\\*c'); + expect(Text.escapeRegExp('a?c')).toEqual('a\\?c'); + expect(Text.escapeRegExp('a+c')).toEqual('a\\+c'); + expect(Text.escapeRegExp('a{c')).toEqual('a\\{c'); + expect(Text.escapeRegExp('a}c')).toEqual('a\\}c'); + expect(Text.escapeRegExp('a(c')).toEqual('a\\(c'); + expect(Text.escapeRegExp('a)c')).toEqual('a\\)c'); + expect(Text.escapeRegExp('a[c')).toEqual('a\\[c'); + expect(Text.escapeRegExp('a]c')).toEqual('a\\]c'); + expect(Text.escapeRegExp('a|c')).toEqual('a\\|c'); + expect(Text.escapeRegExp('a^c')).toEqual('a\\^c'); + expect(Text.escapeRegExp('a$c')).toEqual('a\\$c'); + expect(Text.escapeRegExp('a\\c')).toEqual('a\\\\c'); + }); + }); }); diff --git a/libraries/package-deps-hash/CHANGELOG.json b/libraries/package-deps-hash/CHANGELOG.json index 2c7054a9b2a..0d8fc09e837 100644 --- a/libraries/package-deps-hash/CHANGELOG.json +++ b/libraries/package-deps-hash/CHANGELOG.json @@ -1,6 +1,108 @@ { "name": "@rushstack/package-deps-hash", "entries": [ + { + "version": "4.0.17", + "tag": "@rushstack/package-deps-hash_v4.0.17", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + } + ] + } + }, + { + "version": "4.0.16", + "tag": "@rushstack/package-deps-hash_v4.0.16", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + } + ] + } + }, + { + "version": "4.0.15", + "tag": "@rushstack/package-deps-hash_v4.0.15", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "4.0.14", + "tag": "@rushstack/package-deps-hash_v4.0.14", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + } + ] + } + }, + { + "version": "4.0.13", + "tag": "@rushstack/package-deps-hash_v4.0.13", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + } + ] + } + }, { "version": "4.0.12", "tag": "@rushstack/package-deps-hash_v4.0.12", diff --git a/libraries/package-deps-hash/CHANGELOG.md b/libraries/package-deps-hash/CHANGELOG.md index 796117f34ab..4c328bc6f63 100644 --- a/libraries/package-deps-hash/CHANGELOG.md +++ b/libraries/package-deps-hash/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/package-deps-hash -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 4.0.17 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 4.0.16 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 4.0.15 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 4.0.14 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 4.0.13 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 4.0.12 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/libraries/package-deps-hash/package.json b/libraries/package-deps-hash/package.json index cabaa72c97b..536cd8ce8dc 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.0.12", + "version": "4.0.17", "description": "", "main": "lib/index.js", "typings": "dist/package-deps-hash.d.ts", diff --git a/libraries/package-extractor/CHANGELOG.json b/libraries/package-extractor/CHANGELOG.json index 8325e9d74ad..d8144b8bd72 100644 --- a/libraries/package-extractor/CHANGELOG.json +++ b/libraries/package-extractor/CHANGELOG.json @@ -1,6 +1,165 @@ { "name": "@rushstack/package-extractor", "entries": [ + { + "version": "0.2.4", + "tag": "@rushstack/package-extractor_v0.2.4", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.5.10`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.10.13`" + } + ] + } + }, + { + "version": "0.2.3", + "tag": "@rushstack/package-extractor_v0.2.3", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.5.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.10.12`" + } + ] + } + }, + { + "version": "0.2.2", + "tag": "@rushstack/package-extractor_v0.2.2", + "date": "Fri, 05 May 2023 00:23:06 GMT", + "comments": { + "patch": [ + { + "comment": "Export typings for the extractor-metadata.json file" + } + ] + } + }, + { + "version": "0.2.1", + "tag": "@rushstack/package-extractor_v0.2.1", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.5.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-preserve-dynamic-require-plugin\" to `0.10.11`" + } + ] + } + }, + { + "version": "0.2.0", + "tag": "@rushstack/package-extractor_v0.2.0", + "date": "Wed, 03 May 2023 00:17:46 GMT", + "comments": { + "minor": [ + { + "comment": "Bundle the `create-links` script to ensure any imports that are added in the future don't cause issues." + } + ] + } + }, + { + "version": "0.1.3", + "tag": "@rushstack/package-extractor_v0.1.3", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.5.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + } + ] + } + }, + { + "version": "0.1.2", + "tag": "@rushstack/package-extractor_v0.1.2", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.5.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + } + ] + } + }, + { + "version": "0.1.1", + "tag": "@rushstack/package-extractor_v0.1.1", + "date": "Fri, 28 Apr 2023 19:36:47 GMT", + "comments": { + "patch": [ + { + "comment": "Fix typings reference in package.json" + } + ] + } + }, { "version": "0.1.0", "tag": "@rushstack/package-extractor_v0.1.0", diff --git a/libraries/package-extractor/CHANGELOG.md b/libraries/package-extractor/CHANGELOG.md index d04a67d761e..90d8b7a3096 100644 --- a/libraries/package-extractor/CHANGELOG.md +++ b/libraries/package-extractor/CHANGELOG.md @@ -1,6 +1,52 @@ # Change Log - @rushstack/package-extractor -This log was last generated on Thu, 27 Apr 2023 17:18:42 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.2.4 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.2.3 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.2.2 +Fri, 05 May 2023 00:23:06 GMT + +### Patches + +- Export typings for the extractor-metadata.json file + +## 0.2.1 +Thu, 04 May 2023 00:20:28 GMT + +_Version update only_ + +## 0.2.0 +Wed, 03 May 2023 00:17:46 GMT + +### Minor changes + +- Bundle the `create-links` script to ensure any imports that are added in the future don't cause issues. + +## 0.1.3 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 0.1.2 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ + +## 0.1.1 +Fri, 28 Apr 2023 19:36:47 GMT + +### Patches + +- Fix typings reference in package.json ## 0.1.0 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/libraries/package-extractor/config/heft.json b/libraries/package-extractor/config/heft.json new file mode 100644 index 00000000000..d13c06274e9 --- /dev/null +++ b/libraries/package-extractor/config/heft.json @@ -0,0 +1,14 @@ +/** + * Defines configuration used by core Heft. + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json", + + "extends": "@rushstack/heft-node-rig/profiles/default/config/heft.json", + + "heftPlugins": [ + { + "plugin": "@rushstack/heft-webpack5-plugin" + } + ] +} diff --git a/libraries/package-extractor/config/typescript.json b/libraries/package-extractor/config/typescript.json new file mode 100644 index 00000000000..3e128faa8f6 --- /dev/null +++ b/libraries/package-extractor/config/typescript.json @@ -0,0 +1,12 @@ +{ + "extends": "@rushstack/heft-node-rig/profiles/default/config/typescript.json", + + "additionalModuleKindsToEmit": [ + { + "moduleKind": "esnext", + "outFolderName": "lib-esnext" + } + ], + + "emitFolderNameForTests": "lib" +} diff --git a/libraries/package-extractor/package.json b/libraries/package-extractor/package.json index 6eebfc1994b..e98eebff627 100644 --- a/libraries/package-extractor/package.json +++ b/libraries/package-extractor/package.json @@ -1,13 +1,13 @@ { "name": "@rushstack/package-extractor", - "version": "0.1.0", + "version": "0.2.4", "description": "A library for bundling selected files and dependencies into a deployable package.", "main": "lib/index.js", - "typings": "dist/deploy-manager.d.ts", + "typings": "dist/package-extractor.d.ts", "repository": { "type": "git", "url": "https://github.com/microsoft/rushstack.git", - "directory": "libraries/deploy-manager" + "directory": "libraries/package-extractor" }, "scripts": { "build": "heft build --clean", @@ -27,11 +27,14 @@ "devDependencies": { "@rushstack/eslint-config": "workspace:*", "@rushstack/heft-node-rig": "workspace:*", + "@rushstack/heft-webpack5-plugin": "workspace:*", "@rushstack/heft": "workspace:*", + "@rushstack/webpack-preserve-dynamic-require-plugin": "workspace:*", "@types/glob": "7.1.1", "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", "@types/npm-packlist": "~1.1.1", - "eslint": "~8.7.0" + "eslint": "~8.7.0", + "webpack": "~5.80.0" } } diff --git a/libraries/package-extractor/src/PackageExtractor.ts b/libraries/package-extractor/src/PackageExtractor.ts index d0c80b82640..c3264c64fcd 100644 --- a/libraries/package-extractor/src/PackageExtractor.ts +++ b/libraries/package-extractor/src/PackageExtractor.ts @@ -37,20 +37,37 @@ declare module 'npm-packlist' { /** * Part of the extractor-matadata.json file format. Represents an extracted project. + * + * @public */ -interface IProjectInfoJson { +export interface IProjectInfoJson { /** - * This path is relative to the extractor target folder. + * The name of the project as specified in its package.json file. + */ + projectName: string; + /** + * This path is relative to the root of the extractor output folder */ path: string; } /** * The extractor-metadata.json file format. + * + * @public */ export interface IExtractorMetadataJson { + /** + * The name of the main project the extraction was performed for. + */ mainProjectName: string; + /** + * A list of all projects that were extracted. + */ projects: IProjectInfoJson[]; + /** + * A list of all links that are part of the extracted project. + */ links: ILinkInfo[]; } @@ -779,9 +796,10 @@ export class PackageExtractor { links: [] }; - for (const projectFolder of projectConfigurationsByPath.keys()) { + for (const { projectFolder, projectName } of projectConfigurationsByPath.values()) { if (state.foldersToCopy.has(projectFolder)) { extractorMetadataJson.projects.push({ + projectName, path: this._remapPathForExtractorMetadata(projectFolder, options) }); } diff --git a/libraries/package-extractor/src/PathConstants.ts b/libraries/package-extractor/src/PathConstants.ts index 337905d8a83..d2cff5814a9 100644 --- a/libraries/package-extractor/src/PathConstants.ts +++ b/libraries/package-extractor/src/PathConstants.ts @@ -1,3 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See the @microsoft/rush package's LICENSE file for license information. + +import { PackageJsonLookup } from '@rushstack/node-core-library'; + +const packageExtractorFolderRootPath: string = PackageJsonLookup.instance.tryGetPackageFolderFor(__dirname)!; export const createLinksScriptFilename: 'create-links.js' = 'create-links.js'; -export const scriptsFolderName: 'scripts' = 'scripts'; -export const scriptsFolderPath: string = `${__dirname}/${scriptsFolderName}`; +export const scriptsFolderPath: string = `${packageExtractorFolderRootPath}/dist/scripts`; diff --git a/libraries/package-extractor/src/SymlinkAnalyzer.ts b/libraries/package-extractor/src/SymlinkAnalyzer.ts index 6426d024ade..cf87975eb9e 100644 --- a/libraries/package-extractor/src/SymlinkAnalyzer.ts +++ b/libraries/package-extractor/src/SymlinkAnalyzer.ts @@ -40,13 +40,18 @@ export interface ILinkNode extends IPathNodeBase { export type PathNode = IFileNode | IFolderNode | ILinkNode; /** - * Represents a symbolic link reported by {@link SymlinkAnalyzer.reportSymlinks}. + * Represents a symbolic link. + * + * @public */ export interface ILinkInfo { + /** + * The type of link that was encountered. + */ kind: 'fileLink' | 'folderLink'; /** - * The path of the symbolic link. + * The path to the link, relative to the root of the extractor output folder. */ linkPath: string; diff --git a/libraries/package-extractor/src/Utils.ts b/libraries/package-extractor/src/Utils.ts index 8d40b5af827..4ac440c4511 100644 --- a/libraries/package-extractor/src/Utils.ts +++ b/libraries/package-extractor/src/Utils.ts @@ -1,6 +1,4 @@ -function escapeRegExp(literal: string): string { - return literal.replace(/[^A-Za-z0-9_]/g, '\\$&'); -} +import { Text } from '@rushstack/node-core-library'; export function matchesWithStar(patternWithStar: string, input: string): boolean { // Map "@types/*" --> "^\@types\/.*$" @@ -8,7 +6,7 @@ export function matchesWithStar(patternWithStar: string, input: string): boolean '^' + patternWithStar .split('*') - .map((x) => escapeRegExp(x)) + .map((x) => Text.escapeRegExp(x)) .join('.*') + '$'; // eslint-disable-next-line @rushstack/security/no-unsafe-regexp diff --git a/libraries/package-extractor/src/index.ts b/libraries/package-extractor/src/index.ts index 6e184671fc3..4d24f155d1c 100644 --- a/libraries/package-extractor/src/index.ts +++ b/libraries/package-extractor/src/index.ts @@ -4,5 +4,9 @@ export { PackageExtractor, type IExtractorOptions, - type IExtractorProjectConfiguration + type IExtractorProjectConfiguration, + type IExtractorMetadataJson, + type IProjectInfoJson } from './PackageExtractor'; + +export type { ILinkInfo } from './SymlinkAnalyzer'; diff --git a/libraries/package-extractor/webpack.config.js b/libraries/package-extractor/webpack.config.js new file mode 100644 index 00000000000..a3aa1698dd3 --- /dev/null +++ b/libraries/package-extractor/webpack.config.js @@ -0,0 +1,34 @@ +'use strict'; + +const webpack = require('webpack'); +const { PreserveDynamicRequireWebpackPlugin } = require('@rushstack/webpack-preserve-dynamic-require-plugin'); +const PathConstants = require('./lib/PathConstants'); + +module.exports = () => { + return { + context: __dirname, + mode: 'development', // So the output isn't minified + devtool: 'source-map', + entry: { + [PathConstants.createLinksScriptFilename]: { + import: `${__dirname}/lib-esnext/scripts/create-links.js`, + filename: `[name]` + } + }, + output: { + path: PathConstants.scriptsFolderPath, + filename: '[name].js', + chunkFilename: 'chunks/[name].js', // TODO: Don't allow any chunks to be created + library: { + type: 'commonjs2' + } + }, + target: 'node', + plugins: [ + new PreserveDynamicRequireWebpackPlugin(), + new webpack.ids.DeterministicModuleIdsPlugin({ + maxLength: 6 + }) + ] + }; +}; diff --git a/libraries/rig-package/CHANGELOG.json b/libraries/rig-package/CHANGELOG.json index b3223652403..cc8be9f8945 100644 --- a/libraries/rig-package/CHANGELOG.json +++ b/libraries/rig-package/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@rushstack/rig-package", "entries": [ + { + "version": "0.3.19", + "tag": "@rushstack/rig-package_v0.3.19", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + } + ] + } + }, { "version": "0.3.18", "tag": "@rushstack/rig-package_v0.3.18", diff --git a/libraries/rig-package/CHANGELOG.md b/libraries/rig-package/CHANGELOG.md index 1750a9f34d2..8cc0bb318c9 100644 --- a/libraries/rig-package/CHANGELOG.md +++ b/libraries/rig-package/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/rig-package -This log was last generated on Fri, 10 Feb 2023 01:18:50 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.3.19 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ ## 0.3.18 Fri, 10 Feb 2023 01:18:50 GMT diff --git a/libraries/rig-package/package.json b/libraries/rig-package/package.json index 9602874cee8..65f452ec069 100644 --- a/libraries/rig-package/package.json +++ b/libraries/rig-package/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rig-package", - "version": "0.3.18", + "version": "0.3.19", "description": "A system for sharing tool configurations between projects without duplicating config files.", "main": "lib/index.js", "typings": "dist/rig-package.d.ts", @@ -21,8 +21,8 @@ }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", - "@rushstack/heft-node-rig": "1.12.6", - "@rushstack/heft": "0.50.0", + "@rushstack/heft-node-rig": "1.13.0", + "@rushstack/heft": "0.50.6", "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", "@types/resolve": "1.20.2", 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 151718a75fd..de1549153a5 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 @@ -51,5 +51,10 @@ /** * If true, print the outputs of shell commands defined in event hooks to the console. */ - /*[LINE "HYPOTHETICAL"]*/ "printEventHooksOutputToConsole": true + /*[LINE "HYPOTHETICAL"]*/ "printEventHooksOutputToConsole": true, + + /** + * If true, Rush will not allow node_modules in the repo folder or in parent folders. + */ + /*[LINE "HYPOTHETICAL"]*/ "forbidPhantomResolvableNodeModulesFolders": true } diff --git a/libraries/rush-lib/package.json b/libraries/rush-lib/package.json index bd433c7f8c7..8355219f7c6 100644 --- a/libraries/rush-lib/package.json +++ b/libraries/rush-lib/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/rush-lib", - "version": "5.97.1", + "version": "5.98.0", "description": "A library for writing scripts that interact with the Rush tool", "repository": { "type": "git", diff --git a/libraries/rush-lib/src/api/ApprovedPackagesConfiguration.ts b/libraries/rush-lib/src/api/ApprovedPackagesConfiguration.ts index 98e678639cf..503f0b9c7d7 100644 --- a/libraries/rush-lib/src/api/ApprovedPackagesConfiguration.ts +++ b/libraries/rush-lib/src/api/ApprovedPackagesConfiguration.ts @@ -4,7 +4,6 @@ import * as path from 'path'; import { JsonFile, JsonSchema, FileSystem, NewlineKind, InternalError } from '@rushstack/node-core-library'; -import { Utilities } from '../utilities/Utilities'; import { JsonSchemaUrls } from '../logic/JsonSchemaUrls'; import schemaJson from '../schemas/approved-packages.schema.json'; @@ -155,8 +154,8 @@ export class ApprovedPackagesConfiguration { }); for (const item of this.items) { - // Sort the items from the set. Too bad we can't use the new Array.from(). - const allowedCategories: string[] = Utilities.getSetAsArray(item.allowedCategories); + // Sort the items from the set. + const allowedCategories: string[] = Array.from(item.allowedCategories); allowedCategories.sort(); const itemJson: IApprovedPackagesItemJson = { diff --git a/libraries/rush-lib/src/api/BuildCacheConfiguration.ts b/libraries/rush-lib/src/api/BuildCacheConfiguration.ts index 8aff90c0d8d..ef8eaddc649 100644 --- a/libraries/rush-lib/src/api/BuildCacheConfiguration.ts +++ b/libraries/rush-lib/src/api/BuildCacheConfiguration.ts @@ -56,6 +56,7 @@ interface IBuildCacheConfigurationOptions { rushConfiguration: RushConfiguration; rushUserConfiguration: RushUserConfiguration; rushSession: RushSession; + cloudCacheProvider: ICloudBuildCacheProvider | undefined; } /** @@ -88,28 +89,23 @@ export class BuildCacheConfiguration { */ public readonly cloudCacheProvider: ICloudBuildCacheProvider | undefined; - private constructor(options: IBuildCacheConfigurationOptions) { - this.buildCacheEnabled = - EnvironmentConfiguration.buildCacheEnabled ?? options.buildCacheJson.buildCacheEnabled; + private constructor({ + getCacheEntryId, + buildCacheJson, + rushUserConfiguration, + rushConfiguration, + cloudCacheProvider + }: IBuildCacheConfigurationOptions) { + this.buildCacheEnabled = EnvironmentConfiguration.buildCacheEnabled ?? buildCacheJson.buildCacheEnabled; this.cacheWriteEnabled = !!this.buildCacheEnabled && EnvironmentConfiguration.buildCacheWriteAllowed !== false; - this.getCacheEntryId = options.getCacheEntryId; + this.getCacheEntryId = getCacheEntryId; this.localCacheProvider = new FileSystemBuildCacheProvider({ - rushUserConfiguration: options.rushUserConfiguration, - rushConfiguration: options.rushConfiguration + rushUserConfiguration: rushUserConfiguration, + rushConfiguration: rushConfiguration }); - - const { buildCacheJson } = options; - // Don't configure a cloud cache provider if local-only - if (buildCacheJson.cacheProvider !== 'local-only') { - const cloudCacheProviderFactory: CloudBuildCacheProviderFactory | undefined = - options.rushSession.getCloudBuildCacheProviderFactory(buildCacheJson.cacheProvider); - if (!cloudCacheProviderFactory) { - throw new Error(`Unexpected cache provider: ${buildCacheJson.cacheProvider}`); - } - this.cloudCacheProvider = cloudCacheProviderFactory(buildCacheJson as ICloudBuildCacheJson); - } + this.cloudCacheProvider = cloudCacheProvider; } /** @@ -192,12 +188,24 @@ export class BuildCacheConfiguration { throw new AlreadyReportedError(); } + let cloudCacheProvider: ICloudBuildCacheProvider | undefined; + // Don't configure a cloud cache provider if local-only + if (buildCacheJson.cacheProvider !== 'local-only') { + const cloudCacheProviderFactory: CloudBuildCacheProviderFactory | undefined = + rushSession.getCloudBuildCacheProviderFactory(buildCacheJson.cacheProvider); + if (!cloudCacheProviderFactory) { + throw new Error(`Unexpected cache provider: ${buildCacheJson.cacheProvider}`); + } + cloudCacheProvider = await cloudCacheProviderFactory(buildCacheJson as ICloudBuildCacheJson); + } + return new BuildCacheConfiguration({ buildCacheJson, getCacheEntryId, rushConfiguration, rushUserConfiguration, - rushSession + rushSession, + cloudCacheProvider }); } } diff --git a/libraries/rush-lib/src/api/CommandLineConfiguration.ts b/libraries/rush-lib/src/api/CommandLineConfiguration.ts index b8366ba0da6..c49de0384d5 100644 --- a/libraries/rush-lib/src/api/CommandLineConfiguration.ts +++ b/libraries/rush-lib/src/api/CommandLineConfiguration.ts @@ -25,6 +25,12 @@ export interface IShellCommandTokenContext { packageFolder: string; } +/** + * The set of valid behaviors for a missing script in a project's package.json scripts for a given phase. + * @alpha + */ +export type PhaseBehaviorForMissingScript = 'silent' | 'log' | 'error'; + /** * Metadata about a phase. * @alpha @@ -61,18 +67,17 @@ export interface IPhase { upstream: Set; }; - /** - * Normally Rush requires that each project's package.json has a `"scripts"` entry matching the phase name. - * To disable this check, set `ignoreMissingScript` to true. - */ - ignoreMissingScript: boolean; - /** * By default, Rush returns a nonzero exit code if errors or warnings occur during a command. If this option is * set to `true`, Rush will return a zero exit code if warnings occur during the execution of this phase. */ allowWarningsOnSuccess: boolean; + /** + * What should happen if the script is not defined in a project's package.json scripts field. Default is "error". + */ + missingScriptBehavior: PhaseBehaviorForMissingScript; + /** * (Optional) If the `shellCommand` field is set for a bulk command, Rush will invoke it for each * selected project; otherwise, Rush will invoke the package.json `"scripts"` entry matching Rush command/phase name. @@ -238,6 +243,14 @@ export class CommandLineConfiguration { ); } + if (phase.ignoreMissingScript !== undefined && phase.missingScriptBehavior !== undefined) { + throw new Error( + `In ${RushConstants.commandLineFilename}, the phase "${phase.name}"'s defines ` + + 'both "ignoreMissingScript" and "missingScriptBehavior". If using the "missingScriptBehavior", ' + + `remove "ignoreMissingScript", since it subsumes the functionality.` + ); + } + // This is a completely fresh object. Avoid use of the `...` operator in its construction // to guarantee monomorphism. const processedPhase: IPhase = { @@ -249,7 +262,7 @@ export class CommandLineConfiguration { self: new Set(), upstream: new Set() }, - ignoreMissingScript: !!phase.ignoreMissingScript, + missingScriptBehavior: phase.missingScriptBehavior ?? (phase.ignoreMissingScript ? 'log' : 'error'), allowWarningsOnSuccess: !!phase.allowWarningsOnSuccess }; @@ -680,7 +693,7 @@ export class CommandLineConfiguration { self: new Set(), upstream: new Set() }, - ignoreMissingScript: !!command.ignoreMissingScript, + missingScriptBehavior: command.ignoreMissingScript ? 'log' : 'error', allowWarningsOnSuccess: !!command.allowWarningsInSuccessfulBuild, shellCommand: command.shellCommand }; diff --git a/libraries/rush-lib/src/api/CommandLineJson.ts b/libraries/rush-lib/src/api/CommandLineJson.ts index c9abe5468b2..ba4f412176f 100644 --- a/libraries/rush-lib/src/api/CommandLineJson.ts +++ b/libraries/rush-lib/src/api/CommandLineJson.ts @@ -98,6 +98,10 @@ export interface IPhaseJson { * Normally Rush requires that each project's package.json has a \"scripts\" entry matching the phase name. To disable this check, set \"ignoreMissingScript\" to true. */ ignoreMissingScript?: boolean; + /** + * What should happen if the script is not defined in a project's package.json scripts field. Default is "error". Supersedes \"ignoreMissingScript\". + */ + missingScriptBehavior?: 'silent' | 'log' | 'error'; /** * By default, Rush returns a nonzero exit code if errors or warnings occur during a command. If this option is set to \"true\", Rush will return a zero exit code if warnings occur during the execution of this phase. */ diff --git a/libraries/rush-lib/src/api/ExperimentsConfiguration.ts b/libraries/rush-lib/src/api/ExperimentsConfiguration.ts index b428d50d1f3..607b17a67b9 100644 --- a/libraries/rush-lib/src/api/ExperimentsConfiguration.ts +++ b/libraries/rush-lib/src/api/ExperimentsConfiguration.ts @@ -58,6 +58,11 @@ export interface IExperimentsJson { * If true, print the outputs of shell commands defined in event hooks to the console. */ printEventHooksOutputToConsole?: boolean; + + /** + * If true, Rush will not allow node_modules in the repo folder or in parent folders. + */ + forbidPhantomResolvableNodeModulesFolders?: boolean; } /** diff --git a/libraries/rush-lib/src/api/RushConfiguration.ts b/libraries/rush-lib/src/api/RushConfiguration.ts index 052e3e4ee29..ddec0bc65f2 100644 --- a/libraries/rush-lib/src/api/RushConfiguration.ts +++ b/libraries/rush-lib/src/api/RushConfiguration.ts @@ -935,11 +935,21 @@ export class RushConfiguration { return new RushConfiguration(rushConfigurationJson, resolvedRushJsonFilename); } - public static loadFromDefaultLocation(options?: ITryFindRushJsonLocationOptions): RushConfiguration { + public static tryLoadFromDefaultLocation( + options?: ITryFindRushJsonLocationOptions + ): RushConfiguration | undefined { const rushJsonLocation: string | undefined = RushConfiguration.tryFindRushJsonLocation(options); - if (rushJsonLocation) { return RushConfiguration.loadFromConfigurationFile(rushJsonLocation); + } + } + + public static loadFromDefaultLocation(options?: ITryFindRushJsonLocationOptions): RushConfiguration { + const rushConfiguration: RushConfiguration | undefined = + RushConfiguration.tryLoadFromDefaultLocation(options); + + if (rushConfiguration) { + return rushConfiguration; } else { throw Utilities.getRushConfigNotFoundError(); } diff --git a/libraries/rush-lib/src/api/test/RushConfiguration.test.ts b/libraries/rush-lib/src/api/test/RushConfiguration.test.ts index 893b0c30508..a8cccb9b227 100644 --- a/libraries/rush-lib/src/api/test/RushConfiguration.test.ts +++ b/libraries/rush-lib/src/api/test/RushConfiguration.test.ts @@ -7,7 +7,6 @@ import { JsonFile, Path, Text } from '@rushstack/node-core-library'; import { RushConfiguration } from '../RushConfiguration'; import { ApprovedPackagesPolicy } from '../ApprovedPackagesPolicy'; import { RushConfigurationProject } from '../RushConfigurationProject'; -import { Utilities } from '../../utilities/Utilities'; import { EnvironmentConfiguration } from '../EnvironmentConfiguration'; import { DependencyType } from '../PackageJsonEditor'; @@ -88,13 +87,13 @@ describe(RushConfiguration.name, () => { // "approvedPackagesPolicy" feature const approvedPackagesPolicy: ApprovedPackagesPolicy = rushConfiguration.approvedPackagesPolicy; expect(approvedPackagesPolicy.enabled).toEqual(true); - expect(Utilities.getSetAsArray(approvedPackagesPolicy.reviewCategories)).toEqual([ + expect(Array.from(approvedPackagesPolicy.reviewCategories)).toEqual([ 'first-party', 'third-party', 'prototype' ]); - expect(Utilities.getSetAsArray(approvedPackagesPolicy.ignoredNpmScopes)).toEqual(['@types', '@internal']); + expect(Array.from(approvedPackagesPolicy.ignoredNpmScopes)).toEqual(['@types', '@internal']); expect(approvedPackagesPolicy.browserApprovedPackages.items[0].packageName).toEqual('example'); expect(approvedPackagesPolicy.browserApprovedPackages.items[0].allowedCategories.size).toEqual(3); @@ -165,12 +164,12 @@ describe(RushConfiguration.name, () => { // "approvedPackagesPolicy" feature const approvedPackagesPolicy: ApprovedPackagesPolicy = rushConfiguration.approvedPackagesPolicy; expect(approvedPackagesPolicy.enabled).toBe(true); - expect(Utilities.getSetAsArray(approvedPackagesPolicy.reviewCategories)).toEqual([ + expect(Array.from(approvedPackagesPolicy.reviewCategories)).toEqual([ 'first-party', 'third-party', 'prototype' ]); - expect(Utilities.getSetAsArray(approvedPackagesPolicy.ignoredNpmScopes)).toEqual(['@types', '@internal']); + expect(Array.from(approvedPackagesPolicy.ignoredNpmScopes)).toEqual(['@types', '@internal']); expect(approvedPackagesPolicy.browserApprovedPackages.items[0].packageName).toEqual('example'); expect(approvedPackagesPolicy.browserApprovedPackages.items[0].allowedCategories.size).toEqual(3); diff --git a/libraries/rush-lib/src/cli/RushPnpmCommandLine.ts b/libraries/rush-lib/src/cli/RushPnpmCommandLine.ts index 5d755e9c4b1..6bd0ebb238e 100644 --- a/libraries/rush-lib/src/cli/RushPnpmCommandLine.ts +++ b/libraries/rush-lib/src/cli/RushPnpmCommandLine.ts @@ -8,9 +8,9 @@ export interface ILaunchRushPnpmInternalOptions extends ILaunchOptions {} export class RushPnpmCommandLine { public static launch(launcherVersion: string, options: ILaunchRushPnpmInternalOptions): void { - const rushPnpmCommandLineParser: RushPnpmCommandLineParser = new RushPnpmCommandLineParser(options); - - // RushPnpmCommandLineParser.executeAsync should never reject the promise - rushPnpmCommandLineParser.executeAsync().catch(console.error); + RushPnpmCommandLineParser.initializeAsync(options) + // RushPnpmCommandLineParser.executeAsync should never reject the promise + .then((rushPnpmCommandLineParser) => rushPnpmCommandLineParser.executeAsync()) + .catch(console.error); } } diff --git a/libraries/rush-lib/src/cli/RushPnpmCommandLineParser.ts b/libraries/rush-lib/src/cli/RushPnpmCommandLineParser.ts index 2f3570ee02a..25c2d7abd10 100644 --- a/libraries/rush-lib/src/cli/RushPnpmCommandLineParser.ts +++ b/libraries/rush-lib/src/cli/RushPnpmCommandLineParser.ts @@ -12,7 +12,6 @@ import { Executable, FileConstants, FileSystem, - Import, ITerminal, ITerminalProvider, JsonFile, @@ -29,9 +28,6 @@ import type { SpawnSyncReturns } from 'child_process'; import type { BaseInstallManager } from '../logic/base/BaseInstallManager'; import type { IInstallManagerOptions } from '../logic/base/BaseInstallManagerTypes'; -const lodash: typeof import('lodash') = Import.lazy('lodash', require); -const semver: typeof import('semver') = Import.lazy('semver', require); - const RUSH_SKIP_CHECKS_PARAMETER: string = '--rush-skip-checks'; /** @@ -43,85 +39,114 @@ export interface IRushPnpmCommandLineParserOptions { terminalProvider?: ITerminalProvider; } -export class RushPnpmCommandLineParser { - private _terminal: ITerminal; - private _rushConfiguration!: RushConfiguration; - private _pnpmArgs!: string[]; - private _commandName: string | undefined; - private _debugEnabled: boolean; - private _verboseEnabled: boolean; +function _reportErrorAndSetExitCode(error: Error, terminal: ITerminal, debugEnabled: boolean): never { + if (!(error instanceof AlreadyReportedError)) { + const prefix: string = 'ERROR: '; + terminal.writeErrorLine('\n' + PrintUtilities.wrapWords(prefix + error.message)); + } - public constructor(options: IRushPnpmCommandLineParserOptions) { - const { terminalProvider } = options; - this._debugEnabled = process.argv.indexOf('--debug') >= 0; - this._verboseEnabled = process.argv.indexOf('--verbose') >= 0; - const localTerminalProvider: ITerminalProvider = - terminalProvider ?? - new ConsoleTerminalProvider({ - debugEnabled: this._debugEnabled, - verboseEnabled: this._verboseEnabled - }); - this._terminal = new Terminal(localTerminalProvider); + if (debugEnabled) { + // If catchSyncErrors() called this, then show a call stack similar to what Node.js + // would show for an uncaught error + terminal.writeErrorLine('\n' + error.stack); + } - try { - // Are we in a Rush repo? - let rushConfiguration: RushConfiguration | undefined = undefined; - if (RushConfiguration.tryFindRushJsonLocation()) { - // showVerbose is false because the logging message may break JSON output - rushConfiguration = RushConfiguration.loadFromDefaultLocation({ showVerbose: false }); - } + process.exit(process.exitCode ?? 1); +} - NodeJsCompatibility.warnAboutCompatibilityIssues({ - isRushLib: true, - alreadyReportedNodeTooNewError: !!options.alreadyReportedNodeTooNewError, - rushConfiguration - }); +export class RushPnpmCommandLineParser { + private readonly _terminal: ITerminal; + private readonly _rushConfiguration: RushConfiguration; + private readonly _pnpmArgs: string[]; + private _commandName: string | undefined; + private readonly _debugEnabled: boolean; + + private constructor( + options: IRushPnpmCommandLineParserOptions, + terminal: ITerminal, + debugEnabled: boolean + ) { + this._debugEnabled = debugEnabled; + + this._terminal = terminal; + + // Are we in a Rush repo? + const rushConfiguration: RushConfiguration | undefined = RushConfiguration.tryLoadFromDefaultLocation({ + // showVerbose is false because the logging message may break JSON output + showVerbose: false + }); + NodeJsCompatibility.warnAboutCompatibilityIssues({ + isRushLib: true, + alreadyReportedNodeTooNewError: !!options.alreadyReportedNodeTooNewError, + rushConfiguration + }); + + if (!rushConfiguration) { + throw new Error( + 'The "rush-pnpm" command must be executed in a folder that is under a Rush workspace folder' + ); + } + this._rushConfiguration = rushConfiguration; - if (!rushConfiguration) { - throw new Error( - 'The "rush-pnpm" command must be executed in a folder that is under a Rush workspace folder' - ); - } - this._rushConfiguration = rushConfiguration; + if (rushConfiguration.packageManager !== 'pnpm') { + throw new Error( + 'The "rush-pnpm" command requires your rush.json to be configured to use the PNPM package manager' + ); + } - if (rushConfiguration.packageManager !== 'pnpm') { - throw new Error( - 'The "rush-pnpm" command requires your rush.json to be configured to use the PNPM package manager' - ); - } + if (!rushConfiguration.pnpmOptions.useWorkspaces) { + const pnpmConfigFilename: string = rushConfiguration.pnpmOptions.jsonFilename || 'rush.json'; + throw new Error( + `The "rush-pnpm" command requires the "useWorkspaces" setting to be enabled in ${pnpmConfigFilename}` + ); + } - if (!rushConfiguration.pnpmOptions.useWorkspaces) { - const pnpmConfigFilename: string = rushConfiguration.pnpmOptions.jsonFilename || 'rush.json'; - throw new Error( - `The "rush-pnpm" command requires the "useWorkspaces" setting to be enabled in ${pnpmConfigFilename}` - ); - } + const workspaceFolder: string = rushConfiguration.commonTempFolder; + const workspaceFilePath: string = path.join(workspaceFolder, 'pnpm-workspace.yaml'); - const workspaceFolder: string = rushConfiguration.commonTempFolder; - const workspaceFilePath: string = path.join(workspaceFolder, 'pnpm-workspace.yaml'); + if (!FileSystem.exists(workspaceFilePath)) { + this._terminal.writeErrorLine('Error: The PNPM workspace file has not been generated:'); + this._terminal.writeErrorLine(` ${workspaceFilePath}\n`); + this._terminal.writeLine(Colors.cyan(`Do you need to run "rush install" or "rush update"?`)); + throw new AlreadyReportedError(); + } - if (!FileSystem.exists(workspaceFilePath)) { - this._terminal.writeErrorLine('Error: The PNPM workspace file has not been generated:'); - this._terminal.writeErrorLine(` ${workspaceFilePath}\n`); - this._terminal.writeLine(Colors.cyan(`Do you need to run "rush install" or "rush update"?`)); - throw new AlreadyReportedError(); - } + if (!FileSystem.exists(rushConfiguration.packageManagerToolFilename)) { + this._terminal.writeErrorLine('Error: The PNPM local binary has not been installed yet.'); + this._terminal.writeLine('\n' + Colors.cyan(`Do you need to run "rush install" or "rush update"?`)); + throw new AlreadyReportedError(); + } - if (!FileSystem.exists(rushConfiguration.packageManagerToolFilename)) { - this._terminal.writeErrorLine('Error: The PNPM local binary has not been installed yet.'); - this._terminal.writeLine('\n' + Colors.cyan(`Do you need to run "rush install" or "rush update"?`)); - throw new AlreadyReportedError(); - } + // 0 = node.exe + // 1 = rush-pnpm + const pnpmArgs: string[] = process.argv.slice(2); - // 0 = node.exe - // 1 = rush-pnpm - const pnpmArgs: string[] = process.argv.slice(2); + this._pnpmArgs = pnpmArgs; + } - this._validatePnpmUsage(pnpmArgs); + public static async initializeAsync( + options: IRushPnpmCommandLineParserOptions + ): Promise { + const debugEnabled: boolean = process.argv.indexOf('--debug') >= 0; + const verboseEnabled: boolean = process.argv.indexOf('--verbose') >= 0; + const localTerminalProvider: ITerminalProvider = + options.terminalProvider ?? + new ConsoleTerminalProvider({ + debugEnabled, + verboseEnabled + }); + const terminal: ITerminal = new Terminal(localTerminalProvider); - this._pnpmArgs = pnpmArgs; + try { + const rushPnpmCommandLineParser: RushPnpmCommandLineParser = new RushPnpmCommandLineParser( + options, + terminal, + debugEnabled + ); + await rushPnpmCommandLineParser._validatePnpmUsageAsync(rushPnpmCommandLineParser._pnpmArgs); + return rushPnpmCommandLineParser; } catch (error) { - this._reportErrorAndSetExitCode(error as Error); + _reportErrorAndSetExitCode(error as Error, terminal, debugEnabled); } } @@ -137,7 +162,7 @@ export class RushPnpmCommandLineParser { } } - private _validatePnpmUsage(pnpmArgs: string[]): void { + private async _validatePnpmUsageAsync(pnpmArgs: string[]): Promise { if (pnpmArgs[0] === RUSH_SKIP_CHECKS_PARAMETER) { pnpmArgs.shift(); // Ignore other checks @@ -247,6 +272,7 @@ export class RushPnpmCommandLineParser { // Know safe after validation case 'patch': { + const semver: typeof import('semver') = await import('semver'); /** * If you were to accidentally attempt to use rush-pnpm patch with a pnpmVersion < 7.4.0, pnpm patch may fallback to the system patch command. * For instance, /usr/bin/patch which may just hangs forever @@ -377,7 +403,8 @@ export class RushPnpmCommandLineParser { const currentGlobalPatchedDependencies: Record | undefined = this._rushConfiguration.pnpmOptions.globalPatchedDependencies; - if (!lodash.isEqual(currentGlobalPatchedDependencies, newGlobalPatchedDependencies)) { + const { isEqual } = await import('lodash'); + if (!isEqual(currentGlobalPatchedDependencies, newGlobalPatchedDependencies)) { const commonTempPnpmPatchesFolder: string = `${this._rushConfiguration.commonTempFolder}/${RushConstants.pnpmPatchesFolderName}`; const rushPnpmPatchesFolder: string = `${this._rushConfiguration.commonFolder}/pnpm-${RushConstants.pnpmPatchesFolderName}`; // Copy (or delete) common\temp\patches\ --> common\pnpm-patches\ @@ -451,23 +478,4 @@ export class RushPnpmCommandLineParser { purgeManager.deleteAll(); } } - - private _reportErrorAndSetExitCode(error: Error): void { - if (!(error instanceof AlreadyReportedError)) { - const prefix: string = 'ERROR: '; - this._terminal.writeErrorLine('\n' + PrintUtilities.wrapWords(prefix + error.message)); - } - - if (this._debugEnabled) { - // If catchSyncErrors() called this, then show a call stack similar to what Node.js - // would show for an uncaught error - this._terminal.writeErrorLine('\n' + error.stack); - } - - if (process.exitCode !== undefined) { - process.exit(process.exitCode); - } else { - process.exit(1); - } - } } diff --git a/libraries/rush-lib/src/cli/RushXCommandLine.ts b/libraries/rush-lib/src/cli/RushXCommandLine.ts index 6c8623c4356..6c023f9c7cc 100644 --- a/libraries/rush-lib/src/cli/RushXCommandLine.ts +++ b/libraries/rush-lib/src/cli/RushXCommandLine.ts @@ -66,11 +66,9 @@ export class RushXCommandLine { try { // Are we in a Rush repo? - let rushConfiguration: RushConfiguration | undefined = undefined; - if (RushConfiguration.tryFindRushJsonLocation()) { - rushConfiguration = RushConfiguration.loadFromDefaultLocation({ showVerbose: false }); - } - + const rushConfiguration: RushConfiguration | undefined = RushConfiguration.tryLoadFromDefaultLocation({ + showVerbose: false + }); NodeJsCompatibility.warnAboutCompatibilityIssues({ isRushLib: true, alreadyReportedNodeTooNewError: !!options.alreadyReportedNodeTooNewError, diff --git a/libraries/rush-lib/src/cli/actions/BaseInstallAction.ts b/libraries/rush-lib/src/cli/actions/BaseInstallAction.ts index fa5c63835d2..151e7b80197 100644 --- a/libraries/rush-lib/src/cli/actions/BaseInstallAction.ts +++ b/libraries/rush-lib/src/cli/actions/BaseInstallAction.ts @@ -49,7 +49,7 @@ export abstract class BaseInstallAction extends BaseRushAction { description: 'Perform "rush purge" before starting the installation' }); this._bypassPolicyParameter = this.defineFlagParameter({ - parameterLongName: '--bypass-policy', + parameterLongName: RushConstants.bypassPolicyFlagLongName, description: 'Overrides enforcement of the "gitPolicy" rules from rush.json (use honorably!)' }); this._noLinkParameter = this.defineFlagParameter({ diff --git a/libraries/rush-lib/src/cli/actions/ChangeAction.ts b/libraries/rush-lib/src/cli/actions/ChangeAction.ts index c6945b8baf4..2e0c50e6b6a 100644 --- a/libraries/rush-lib/src/cli/actions/ChangeAction.ts +++ b/libraries/rush-lib/src/cli/actions/ChangeAction.ts @@ -13,7 +13,6 @@ import { import { FileSystem, AlreadyReportedError, - Import, Terminal, ITerminal, ConsoleTerminalProvider @@ -35,9 +34,8 @@ import { import { ProjectChangeAnalyzer } from '../../logic/ProjectChangeAnalyzer'; import { Git } from '../../logic/Git'; -import type * as inquirerTypes from 'inquirer'; +import type * as InquirerType from 'inquirer'; import { Utilities } from '../../utilities/Utilities'; -const inquirer: typeof inquirerTypes = Import.lazy('inquirer', require); const BULK_LONG_NAME: string = '--bulk'; const BULK_MESSAGE_LONG_NAME: string = '--message'; @@ -207,7 +205,8 @@ export class ChangeAction extends BaseRushAction { this._warnUnstagedChanges(); - const promptModule: inquirerTypes.PromptModule = inquirer.createPromptModule(); + const inquirer: typeof InquirerType = await import('inquirer'); + const promptModule: InquirerType.PromptModule = inquirer.createPromptModule(); let changeFileData: Map = new Map(); let interactiveMode: boolean = false; if (this._bulkChangeParameter.value) { @@ -403,7 +402,7 @@ export class ChangeAction extends BaseRushAction { * The main loop which prompts the user for information on changed projects. */ private async _promptForChangeFileData( - promptModule: inquirerTypes.PromptModule, + promptModule: InquirerType.PromptModule, sortedProjectList: string[], existingChangeComments: Map ): Promise> { @@ -438,7 +437,7 @@ export class ChangeAction extends BaseRushAction { * Asks all questions which are needed to generate changelist for a project. */ private async _askQuestions( - promptModule: inquirerTypes.PromptModule, + promptModule: InquirerType.PromptModule, packageName: string, existingChangeComments: Map ): Promise { @@ -477,7 +476,7 @@ export class ChangeAction extends BaseRushAction { } private async _promptForComments( - promptModule: inquirerTypes.PromptModule, + promptModule: InquirerType.PromptModule, packageName: string ): Promise { const bumpOptions: { [type: string]: string } = this._getBumpOptions(packageName); @@ -568,7 +567,7 @@ export class ChangeAction extends BaseRushAction { * Will determine a user's email by first detecting it from their Git config, * or will ask for it if it is not found or the Git config is wrong. */ - private async _detectOrAskForEmail(promptModule: inquirerTypes.PromptModule): Promise { + private async _detectOrAskForEmail(promptModule: InquirerType.PromptModule): Promise { return (await this._detectAndConfirmEmail(promptModule)) || (await this._promptForEmail(promptModule)); } @@ -588,9 +587,7 @@ export class ChangeAction extends BaseRushAction { * Detects the user's email address from their Git configuration, prompts the user to approve the * detected email. It returns undefined if it cannot be detected. */ - private async _detectAndConfirmEmail( - promptModule: inquirerTypes.PromptModule - ): Promise { + private async _detectAndConfirmEmail(promptModule: InquirerType.PromptModule): Promise { const email: string | undefined = this._detectEmail(); if (email) { @@ -611,7 +608,7 @@ export class ChangeAction extends BaseRushAction { /** * Asks the user for their email address */ - private async _promptForEmail(promptModule: inquirerTypes.PromptModule): Promise { + private async _promptForEmail(promptModule: InquirerType.PromptModule): Promise { const { email }: { email: string } = await promptModule([ { type: 'input', @@ -645,7 +642,7 @@ export class ChangeAction extends BaseRushAction { * Writes change files to the common/changes folder. Will prompt for overwrite if file already exists. */ private async _writeChangeFiles( - promptModule: inquirerTypes.PromptModule, + promptModule: InquirerType.PromptModule, changeFileData: Map, overwrite: boolean, interactiveMode: boolean @@ -666,7 +663,7 @@ export class ChangeAction extends BaseRushAction { } private async _writeChangeFile( - promptModule: inquirerTypes.PromptModule, + promptModule: InquirerType.PromptModule, changeFileData: IChangeFile, overwrite: boolean, interactiveMode: boolean @@ -692,7 +689,7 @@ export class ChangeAction extends BaseRushAction { } private async _promptForOverwrite( - promptModule: inquirerTypes.PromptModule, + promptModule: InquirerType.PromptModule, filePath: string ): Promise { const overwrite: boolean = await promptModule([ diff --git a/libraries/rush-lib/src/cli/actions/DeployAction.ts b/libraries/rush-lib/src/cli/actions/DeployAction.ts index 0be09959255..e3bf8956252 100644 --- a/libraries/rush-lib/src/cli/actions/DeployAction.ts +++ b/libraries/rush-lib/src/cli/actions/DeployAction.ts @@ -4,10 +4,7 @@ import * as path from 'path'; import type { IPackageJson } from '@rushstack/node-core-library'; import { CommandLineFlagParameter, CommandLineStringParameter } from '@rushstack/ts-command-line'; -import { - PackageExtractor, - IExtractorProjectConfiguration -} from '@rushstack/package-extractor/lib/PackageExtractor'; +import type { PackageExtractor, IExtractorProjectConfiguration } from '@rushstack/package-extractor'; import { BaseRushAction } from './BaseRushAction'; import type { RushCommandLineParser } from '../RushCommandLineParser'; @@ -173,8 +170,8 @@ export class DeployAction extends BaseRushAction { // Call the deploy manager const { PackageExtractor } = await import( - /* webpackChunkName: 'DeployManager' */ - '@rushstack/package-extractor/lib/PackageExtractor' + /* webpackChunkName: 'PackageExtractor' */ + '@rushstack/package-extractor' ); const deployManager: PackageExtractor = new PackageExtractor(); await deployManager.extractAsync({ diff --git a/libraries/rush-lib/src/cli/actions/InstallAction.ts b/libraries/rush-lib/src/cli/actions/InstallAction.ts index dee89d4fb84..888c3901083 100644 --- a/libraries/rush-lib/src/cli/actions/InstallAction.ts +++ b/libraries/rush-lib/src/cli/actions/InstallAction.ts @@ -49,6 +49,7 @@ export class InstallAction extends BaseInstallAction { return { debug: this.parser.isDebug, allowShrinkwrapUpdates: false, + bypassPolicyAllowed: true, bypassPolicy: this._bypassPolicyParameter.value!, noLink: this._noLinkParameter.value!, fullUpgrade: false, diff --git a/libraries/rush-lib/src/cli/actions/PublishAction.ts b/libraries/rush-lib/src/cli/actions/PublishAction.ts index 02bcef9deb2..496e41e35f5 100644 --- a/libraries/rush-lib/src/cli/actions/PublishAction.ts +++ b/libraries/rush-lib/src/cli/actions/PublishAction.ts @@ -21,7 +21,7 @@ import { PrereleaseToken } from '../../logic/PrereleaseToken'; import { ChangeManager } from '../../logic/ChangeManager'; import { BaseRushAction } from './BaseRushAction'; import { PublishGit } from '../../logic/PublishGit'; -import { PolicyValidator } from '../../logic/policy/PolicyValidator'; +import * as PolicyValidator from '../../logic/policy/PolicyValidator'; import { VersionPolicy } from '../../api/VersionPolicy'; import { DEFAULT_PACKAGE_UPDATE_MESSAGE } from './VersionAction'; import { Utilities } from '../../utilities/Utilities'; @@ -211,7 +211,7 @@ export class PublishAction extends BaseRushAction { * Executes the publish action, which will read change request files, apply changes to package.jsons, */ protected async runAsync(): Promise { - PolicyValidator.validatePolicy(this.rushConfiguration, { bypassPolicy: false }); + await PolicyValidator.validatePolicyAsync(this.rushConfiguration, { bypassPolicy: false }); // Example: "common\temp\publish-home" this._targetNpmrcPublishFolder = path.join(this.rushConfiguration.commonTempFolder, 'publish-home'); @@ -241,7 +241,7 @@ export class PublishAction extends BaseRushAction { this._suffix.value, this._partialPrerelease.value ); - this._publishChanges(git, publishGit, allPackages); + await this._publishChangesAsync(git, publishGit, allPackages); } console.log('\n' + colors.green('Rush publish finished successfully.')); @@ -262,13 +262,13 @@ export class PublishAction extends BaseRushAction { } } - private _publishChanges( + private async _publishChangesAsync( git: Git, publishGit: PublishGit, allPackages: Map - ): void { + ): Promise { const changeManager: ChangeManager = new ChangeManager(this.rushConfiguration); - changeManager.load( + await changeManager.loadAsync( this.rushConfiguration.changesFolder, this._prereleaseToken, this._addCommitDetails.value @@ -285,7 +285,7 @@ export class PublishAction extends BaseRushAction { // Make changes to package.json and change logs. changeManager.apply(this._apply.value); - changeManager.updateChangelog(this._apply.value); + await changeManager.updateChangelogAsync(this._apply.value); this._setDependenciesBeforeCommit(); diff --git a/libraries/rush-lib/src/cli/actions/ScanAction.ts b/libraries/rush-lib/src/cli/actions/ScanAction.ts index d5c1682cf53..3ae1305bda1 100644 --- a/libraries/rush-lib/src/cli/actions/ScanAction.ts +++ b/libraries/rush-lib/src/cli/actions/ScanAction.ts @@ -5,13 +5,11 @@ import colors from 'colors/safe'; import * as path from 'path'; import builtinPackageNames from 'builtin-modules'; -import { Import, FileSystem } from '@rushstack/node-core-library'; +import { FileSystem, LegacyAdapters } from '@rushstack/node-core-library'; import { RushCommandLineParser } from '../RushCommandLineParser'; import { CommandLineFlagParameter } from '@rushstack/ts-command-line'; import { BaseConfiglessRushAction } from './BaseRushAction'; -const glob: typeof import('glob') = Import.lazy('glob', require); - export interface IJsonOutput { /** * Dependencies scan from source code @@ -107,7 +105,12 @@ export class ScanAction extends BaseConfiglessRushAction { const requireMatches: Set = new Set(); - for (const filename of glob.sync('{./*.{ts,js,tsx,jsx},./{src,lib}/**/*.{ts,js,tsx,jsx}}')) { + const { default: glob } = await import('glob'); + const scanResults: string[] = await LegacyAdapters.convertCallbackToPromise( + glob, + '{./*.{ts,js,tsx,jsx},./{src,lib}/**/*.{ts,js,tsx,jsx}}' + ); + for (const filename of scanResults) { try { const contents: string = FileSystem.readFile(filename); const lines: string[] = contents.split('\n'); diff --git a/libraries/rush-lib/src/cli/actions/UpdateAction.ts b/libraries/rush-lib/src/cli/actions/UpdateAction.ts index 575d04f5291..27f61febcdc 100644 --- a/libraries/rush-lib/src/cli/actions/UpdateAction.ts +++ b/libraries/rush-lib/src/cli/actions/UpdateAction.ts @@ -66,6 +66,7 @@ export class UpdateAction extends BaseInstallAction { return { debug: this.parser.isDebug, allowShrinkwrapUpdates: true, + bypassPolicyAllowed: true, bypassPolicy: this._bypassPolicyParameter.value!, noLink: this._noLinkParameter.value!, fullUpgrade: this._fullParameter.value!, diff --git a/libraries/rush-lib/src/cli/actions/VersionAction.ts b/libraries/rush-lib/src/cli/actions/VersionAction.ts index 9f0327ddca8..0206e22aec5 100644 --- a/libraries/rush-lib/src/cli/actions/VersionAction.ts +++ b/libraries/rush-lib/src/cli/actions/VersionAction.ts @@ -10,10 +10,11 @@ import { VersionPolicyConfiguration } from '../../api/VersionPolicyConfiguration import { RushConfiguration } from '../../api/RushConfiguration'; import { VersionMismatchFinder } from '../../logic/versionMismatch/VersionMismatchFinder'; import { RushCommandLineParser } from '../RushCommandLineParser'; -import { PolicyValidator } from '../../logic/policy/PolicyValidator'; +import * as PolicyValidator from '../../logic/policy/PolicyValidator'; import { BaseRushAction } from './BaseRushAction'; import { PublishGit } from '../../logic/PublishGit'; import { Git } from '../../logic/Git'; +import { RushConstants } from '../../logic/RushConstants'; import type * as VersionManagerType from '../../logic/VersionManager'; @@ -61,7 +62,7 @@ export class VersionAction extends BaseRushAction { description: 'Bumps package version based on version policies.' }); this._bypassPolicy = this.defineFlagParameter({ - parameterLongName: '--bypass-policy', + parameterLongName: RushConstants.bypassPolicyFlagLongName, description: 'Overrides "gitPolicy" enforcement (use honorably!)' }); this._versionPolicy = this.defineStringParameter({ @@ -94,7 +95,10 @@ export class VersionAction extends BaseRushAction { } protected async runAsync(): Promise { - PolicyValidator.validatePolicy(this.rushConfiguration, { bypassPolicy: this._bypassPolicy.value }); + await PolicyValidator.validatePolicyAsync(this.rushConfiguration, { + bypassPolicyAllowed: true, + bypassPolicy: this._bypassPolicy.value + }); const git: Git = new Git(this.rushConfiguration); const userEmail: string = git.getGitEmail(); diff --git a/libraries/rush-lib/src/cli/test/RushXCommandLine.test.ts b/libraries/rush-lib/src/cli/test/RushXCommandLine.test.ts index 257020fe6b3..32d0cf7676c 100644 --- a/libraries/rush-lib/src/cli/test/RushXCommandLine.test.ts +++ b/libraries/rush-lib/src/cli/test/RushXCommandLine.test.ts @@ -67,8 +67,7 @@ describe(RushXCommandLine.name, () => { return projects.find((project) => project.projectFolder === path); } } as RushConfiguration; - jest.spyOn(RushConfiguration, 'tryFindRushJsonLocation').mockReturnValue('rush.json'); - jest.spyOn(RushConfiguration, 'loadFromDefaultLocation').mockReturnValue(rushConfiguration); + jest.spyOn(RushConfiguration, 'tryLoadFromDefaultLocation').mockReturnValue(rushConfiguration); // Mock command execution executeLifecycleCommandMock = jest.spyOn(Utilities, 'executeLifecycleCommand'); diff --git a/libraries/rush-lib/src/index.ts b/libraries/rush-lib/src/index.ts index d1860e96034..860553f9c41 100644 --- a/libraries/rush-lib/src/index.ts +++ b/libraries/rush-lib/src/index.ts @@ -37,7 +37,10 @@ export { IFileSystemBuildCacheProviderOptions } from './logic/buildCache/FileSystemBuildCacheProvider'; -export { IPhase } from './api/CommandLineConfiguration'; +export { + IPhase, + PhaseBehaviorForMissingScript as IPhaseBehaviorForMissingScript +} from './api/CommandLineConfiguration'; export { EnvironmentConfiguration, diff --git a/libraries/rush-lib/src/logic/ChangeFiles.ts b/libraries/rush-lib/src/logic/ChangeFiles.ts index e5c38fb8666..0ce554997e3 100644 --- a/libraries/rush-lib/src/logic/ChangeFiles.ts +++ b/libraries/rush-lib/src/logic/ChangeFiles.ts @@ -1,16 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { JsonFile, JsonSchema, Import } from '@rushstack/node-core-library'; +import { Async, FileSystem, JsonFile, JsonSchema, LegacyAdapters } from '@rushstack/node-core-library'; -import { Utilities } from '../utilities/Utilities'; import { IChangeInfo } from '../api/ChangeManagement'; import { IChangelog } from '../api/Changelog'; import { RushConfiguration } from '../api/RushConfiguration'; import schemaJson from '../schemas/change-file.schema.json'; -const glob: typeof import('glob') = Import.lazy('glob', require); - /** * This class represents the collection of change files existing in the repo and provides operations * for those change files. @@ -104,9 +101,11 @@ export class ChangeFiles { /** * Get the array of absolute paths of change files. */ - public getFiles(): string[] { + public async getFilesAsync(): Promise { if (!this._files) { - this._files = glob.sync(`${this._changesPath}/**/*.json`) || []; + const { default: glob } = await import('glob'); + this._files = + (await LegacyAdapters.convertCallbackToPromise(glob, `${this._changesPath}/**/*.json`)) || []; } return this._files; @@ -122,7 +121,7 @@ export class ChangeFiles { /** * Delete all change files */ - public deleteAll(shouldDelete: boolean, updatedChangelogs?: IChangelog[]): number { + public async deleteAllAsync(shouldDelete: boolean, updatedChangelogs?: IChangelog[]): Promise { if (updatedChangelogs) { // Skip changes files if the package's change log is not updated. const packagesToInclude: Set = new Set(); @@ -130,35 +129,51 @@ export class ChangeFiles { packagesToInclude.add(changelog.name); }); - const filesToDelete: string[] = this.getFiles().filter((filePath) => { - const changeRequest: IChangeInfo = JsonFile.load(filePath); - for (const changeInfo of changeRequest.changes!) { - if (!packagesToInclude.has(changeInfo.packageName)) { - return false; + const files: string[] = await this.getFilesAsync(); + const filesToDelete: string[] = []; + await Async.forEachAsync( + files, + async (filePath) => { + const changeRequest: IChangeInfo = await JsonFile.loadAsync(filePath); + let shouldDelete: boolean = true; + for (const changeInfo of changeRequest.changes!) { + if (!packagesToInclude.has(changeInfo.packageName)) { + shouldDelete = false; + break; + } } - } - return true; - }); - return this._deleteFiles(filesToDelete, shouldDelete); + if (shouldDelete) { + filesToDelete.push(filePath); + } + }, + { concurrency: 5 } + ); + + return await this._deleteFilesAsync(filesToDelete, shouldDelete); } else { // Delete all change files. - return this._deleteFiles(this.getFiles(), shouldDelete); + const files: string[] = await this.getFilesAsync(); + return await this._deleteFilesAsync(files, shouldDelete); } } - private _deleteFiles(files: string[], shouldDelete: boolean): number { + private async _deleteFilesAsync(files: string[], shouldDelete: boolean): Promise { if (files.length) { console.log(`\n* ${shouldDelete ? 'DELETING:' : 'DRYRUN: Deleting'} ${files.length} change file(s).`); - for (const filePath of files) { - console.log(` - ${filePath}`); - - if (shouldDelete) { - Utilities.deleteFile(filePath); - } - } + await Async.forEachAsync( + files, + async (filePath) => { + console.log(` - ${filePath}`); + if (shouldDelete) { + await FileSystem.deleteFileAsync(filePath); + } + }, + { concurrency: 5 } + ); } + return files.length; } } diff --git a/libraries/rush-lib/src/logic/ChangeManager.ts b/libraries/rush-lib/src/logic/ChangeManager.ts index 98f284b97a7..cca99018a6a 100644 --- a/libraries/rush-lib/src/logic/ChangeManager.ts +++ b/libraries/rush-lib/src/logic/ChangeManager.ts @@ -37,17 +37,17 @@ export class ChangeManager { * @param prereleaseToken - prerelease token * @param includeCommitDetails - whether commit details need to be included in changes */ - public load( + public async loadAsync( changesPath: string, prereleaseToken: PrereleaseToken = new PrereleaseToken(), includeCommitDetails: boolean = false - ): void { + ): Promise { this._allPackages = this._rushConfiguration.projectsByName; this._prereleaseToken = prereleaseToken; this._changeFiles = new ChangeFiles(changesPath); - this._allChanges = PublishUtilities.findChangeRequests( + this._allChanges = await PublishUtilities.findChangeRequestsAsync( this._allPackages, this._rushConfiguration, this._changeFiles, @@ -117,7 +117,7 @@ export class ChangeManager { return updatedPackages; } - public updateChangelog(shouldCommit: boolean): void { + public async updateChangelogAsync(shouldCommit: boolean): Promise { // Do not update changelog or delete the change files for prerelease. // Save them for the official release. if (!this._prereleaseToken.hasValue) { @@ -130,7 +130,7 @@ export class ChangeManager { ); // Remove the change request files only if "-a" was provided. - this._changeFiles.deleteAll(shouldCommit, updatedChangelogs); + await this._changeFiles.deleteAllAsync(shouldCommit, updatedChangelogs); } } } diff --git a/libraries/rush-lib/src/logic/Git.ts b/libraries/rush-lib/src/logic/Git.ts index 383e1219cbc..be54245f90e 100644 --- a/libraries/rush-lib/src/logic/Git.ts +++ b/libraries/rush-lib/src/logic/Git.ts @@ -11,7 +11,7 @@ import { Executable, AlreadyReportedError, Path, ITerminal } from '@rushstack/no import { ensureGitMinimumVersion } from '@rushstack/package-deps-hash'; import { Utilities } from '../utilities/Utilities'; -import { GitEmailPolicy } from './policy/GitEmailPolicy'; +import * as GitEmailPolicy from './policy/GitEmailPolicy'; import { RushConfiguration } from '../api/RushConfiguration'; import { EnvironmentConfiguration } from '../api/EnvironmentConfiguration'; import { IChangedGitStatusEntry, IGitStatusEntry, parseGitStatus } from './GitStatusParser'; diff --git a/libraries/rush-lib/src/logic/ProjectWatcher.ts b/libraries/rush-lib/src/logic/ProjectWatcher.ts index 0a477b7269b..756b5c3fd15 100644 --- a/libraries/rush-lib/src/logic/ProjectWatcher.ts +++ b/libraries/rush-lib/src/logic/ProjectWatcher.ts @@ -3,9 +3,10 @@ import * as fs from 'fs'; import * as os from 'os'; +import * as readline from 'readline'; import { once } from 'events'; import { getRepoRoot } from '@rushstack/package-deps-hash'; -import { Path, ITerminal, FileSystemStats, FileSystem } from '@rushstack/node-core-library'; +import { Colors, Path, ITerminal, FileSystemStats, FileSystem } from '@rushstack/node-core-library'; import { Git } from './Git'; import { ProjectChangeAnalyzer } from './ProjectChangeAnalyzer'; @@ -55,6 +56,8 @@ export class ProjectWatcher { private _initialState: ProjectChangeAnalyzer | undefined; private _previousState: ProjectChangeAnalyzer | undefined; + private _hasRenderedStatus: boolean; + public constructor(options: IProjectWatcherOptions) { const { debounceMs = 1000, rushConfiguration, projectsToWatch, terminal, initialState } = options; @@ -68,6 +71,8 @@ export class ProjectWatcher { this._initialState = initialState; this._previousState = initialState; + + this._hasRenderedStatus = false; } /** @@ -128,8 +133,12 @@ export class ProjectWatcher { let timeout: NodeJS.Timeout | undefined; let terminated: boolean = false; + const terminal: ITerminal = this._terminal; + const debounceMs: number = this._debounceMs; + this._hasRenderedStatus = false; + const resolveIfChanged = async (): Promise => { timeout = undefined; if (terminated) { @@ -137,15 +146,15 @@ export class ProjectWatcher { } try { - this._terminal.writeLine(`Evaluating changes to tracked files...`); + this._setStatus(`Evaluating changes to tracked files...`); const result: IProjectChangeResult = await this._computeChanged(); - this._terminal.writeLine(`Finished analyzing.`); + this._setStatus(`Finished analyzing.`); // Need an async tick to allow for more file system events to be handled process.nextTick(() => { if (timeout) { // If another file has changed, wait for another pass. - this._terminal.writeLine(`More file changes detected, aborting.`); + this._setStatus(`More file changes detected, aborting.`); return; } @@ -153,14 +162,16 @@ export class ProjectWatcher { if (result.changedProjects.size) { terminated = true; + terminal.writeLine(); resolve(result); } else { - this._terminal.writeLine(`No changes detected to tracked files.`); + this._setStatus(`No changes detected to tracked files.`); } }); } catch (err) { // eslint-disable-next-line require-atomic-updates terminated = true; + terminal.writeLine(); reject(err as NodeJS.ErrnoException); } }; @@ -179,6 +190,7 @@ export class ProjectWatcher { } terminated = true; + terminal.writeLine(); reject(err); } @@ -242,6 +254,7 @@ export class ProjectWatcher { timeout = setTimeout(resolveIfChanged, debounceMs); } catch (err) { terminated = true; + terminal.writeLine(); reject(err as NodeJS.ErrnoException); } } @@ -267,6 +280,16 @@ export class ProjectWatcher { return watchedResult; } + private _setStatus(status: string): void { + if (this._hasRenderedStatus) { + readline.clearLine(process.stdout, 0); + readline.cursorTo(process.stdout, 0); + } else { + this._hasRenderedStatus = true; + } + this._terminal.write(Colors.bold(Colors.cyan(`Watch Status: ${status}`))); + } + /** * Determines which, if any, projects (within the selection) have new hashes for files that are not in .gitignore */ diff --git a/libraries/rush-lib/src/logic/PublishUtilities.ts b/libraries/rush-lib/src/logic/PublishUtilities.ts index a6fa6dffd20..aab78b0751d 100644 --- a/libraries/rush-lib/src/logic/PublishUtilities.ts +++ b/libraries/rush-lib/src/logic/PublishUtilities.ts @@ -49,14 +49,14 @@ export class PublishUtilities { * @param changesPath Path to the changes folder. * @returns Dictionary of all change requests, keyed by package name. */ - public static findChangeRequests( + public static async findChangeRequestsAsync( allPackages: Map, rushConfiguration: RushConfiguration, changeFiles: ChangeFiles, includeCommitDetails?: boolean, prereleaseToken?: PrereleaseToken, projectsToExclude?: Set - ): IChangeRequests { + ): Promise { const allChanges: IChangeRequests = { packageChanges: new Map(), versionPolicyChanges: new Map() @@ -64,7 +64,7 @@ export class PublishUtilities { console.log(`Finding changes in: ${changeFiles.getChangesPath()}`); - const files: string[] = changeFiles.getFiles(); + const files: string[] = await changeFiles.getFilesAsync(); // Add the minimum changes defined by the change descriptions. for (const changeFilePath of files) { diff --git a/libraries/rush-lib/src/logic/RushConstants.ts b/libraries/rush-lib/src/logic/RushConstants.ts index bdbdff0b3a7..6b565f0f1c5 100644 --- a/libraries/rush-lib/src/logic/RushConstants.ts +++ b/libraries/rush-lib/src/logic/RushConstants.ts @@ -264,4 +264,9 @@ export class RushConstants { * file system event occurs in this interval, the timeout will reset. */ public static readonly defaultWatchDebounceMs: number = 1000; + + /** + * The name of the parameter that can be used to bypass policies. + */ + public static readonly bypassPolicyFlagLongName: '--bypass-policy' = '--bypass-policy'; } diff --git a/libraries/rush-lib/src/logic/VersionManager.ts b/libraries/rush-lib/src/logic/VersionManager.ts index f26e58a6b65..5170a487070 100644 --- a/libraries/rush-lib/src/logic/VersionManager.ts +++ b/libraries/rush-lib/src/logic/VersionManager.ts @@ -87,13 +87,13 @@ export class VersionManager { this._getManuallyVersionedProjects() ); - changeManager.load(this._rushConfiguration.changesFolder); + await changeManager.loadAsync(this._rushConfiguration.changesFolder); if (changeManager.hasChanges()) { changeManager.validateChanges(this._versionPolicyConfiguration); changeManager.apply(!!shouldCommit)!.forEach((packageJson) => { this.updatedProjects.set(packageJson.name, packageJson); }); - changeManager.updateChangelog(!!shouldCommit); + await changeManager.updateChangelogAsync(!!shouldCommit); } // Refresh rush configuration again, since we've further modified the package.json files diff --git a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts index 17c9a0dabb1..83f6d67f4b3 100644 --- a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts +++ b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts @@ -36,7 +36,7 @@ import { RushConstants } from '../RushConstants'; import { ShrinkwrapFileFactory } from '../ShrinkwrapFileFactory'; import { Utilities } from '../../utilities/Utilities'; import { InstallHelpers } from '../installManager/InstallHelpers'; -import { PolicyValidator } from '../policy/PolicyValidator'; +import * as PolicyValidator from '../policy/PolicyValidator'; import { WebClient, WebClientResponse } from '../../utilities/WebClient'; import { SetupPackageRegistry } from '../setup/SetupPackageRegistry'; import { PnpmfileConfiguration } from '../pnpm/PnpmfileConfiguration'; @@ -256,7 +256,7 @@ export abstract class BaseInstallManager { npmrcHash: string | undefined; }> { // Check the policies - PolicyValidator.validatePolicy(this.rushConfiguration, this.options); + await PolicyValidator.validatePolicyAsync(this.rushConfiguration, this.options); this._installGitHooks(); @@ -438,7 +438,8 @@ export abstract class BaseInstallManager { console.error( color( [ - '(Or, to temporarily ignore this problem, invoke Rush with the "--bypass-policy" option.)', + '(Or, to temporarily ignore this problem, invoke Rush with the ' + + `"${RushConstants.bypassPolicyFlagLongName}" option.)`, ' ' ].join('\n') ) @@ -747,7 +748,8 @@ export abstract class BaseInstallManager { console.error(); console.error( colors.bold( - '==> Please run "rush setup" to update your NPM token. (Or append "--bypass-policy" to proceed anyway.)' + '==> Please run "rush setup" to update your NPM token. ' + + `(Or append "${RushConstants.bypassPolicyFlagLongName}" to proceed anyway.)` ) ); throw new AlreadyReportedError(); diff --git a/libraries/rush-lib/src/logic/base/BaseInstallManagerTypes.ts b/libraries/rush-lib/src/logic/base/BaseInstallManagerTypes.ts index d5d5265fcb4..bab66d03e41 100644 --- a/libraries/rush-lib/src/logic/base/BaseInstallManagerTypes.ts +++ b/libraries/rush-lib/src/logic/base/BaseInstallManagerTypes.ts @@ -18,6 +18,11 @@ export interface IInstallManagerOptions { */ checkOnly: boolean; + /** + * Whether a "--bypass-policy" flag can be specified. + */ + bypassPolicyAllowed?: boolean; + /** * Whether to skip policy checks. */ diff --git a/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts b/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts index 4e3f136602a..acc4d4ded28 100644 --- a/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts +++ b/libraries/rush-lib/src/logic/buildCache/getHashesForGlobsAsync.ts @@ -1,23 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { Async, Import, LegacyAdapters } from '@rushstack/node-core-library'; + +import { Async, LegacyAdapters } from '@rushstack/node-core-library'; import { getGitHashForFiles } from '@rushstack/package-deps-hash'; import * as path from 'path'; import type { IOptions } from 'glob'; import type { IRawRepoState } from '../ProjectChangeAnalyzer'; -const glob: typeof import('glob') = Import.lazy('glob', require); - -const globAsync = (pattern: string, options: IOptions = {}): Promise => { - return LegacyAdapters.convertCallbackToPromise(glob, pattern, options); -}; - async function expandGlobPatternsAsync( globPatterns: Iterable, packagePath: string ): Promise { const allMatches: Set = new Set(); + const { default: glob } = await import('glob'); + const globAsync = (pattern: string, options: IOptions = {}): Promise => { + return LegacyAdapters.convertCallbackToPromise(glob, pattern, options); + }; await Async.forEachAsync( globPatterns, async (pattern) => { diff --git a/libraries/rush-lib/src/logic/installManager/RushInstallManager.ts b/libraries/rush-lib/src/logic/installManager/RushInstallManager.ts index 14847602cab..ad4f9a10bfa 100644 --- a/libraries/rush-lib/src/logic/installManager/RushInstallManager.ts +++ b/libraries/rush-lib/src/logic/installManager/RushInstallManager.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 * as glob from 'glob'; import colors from 'colors/safe'; import * as fs from 'fs'; import * as path from 'path'; @@ -14,7 +13,8 @@ import { FileConstants, Sort, InternalError, - AlreadyReportedError + AlreadyReportedError, + LegacyAdapters } from '@rushstack/node-core-library'; import { PrintUtilities } from '@rushstack/terminal'; @@ -527,8 +527,13 @@ export class RushInstallManager extends BaseInstallManager { '/' ); + const { default: glob } = await import('glob'); + const tempModulePaths: string[] = await LegacyAdapters.convertCallbackToPromise( + glob, + globEscape(normalizedpathToDeleteWithoutStar) + '/*' + ); // Example: "C:/MyRepo/common/temp/node_modules/@rush-temp/*" - for (const tempModulePath of glob.sync(globEscape(normalizedpathToDeleteWithoutStar) + '/*')) { + for (const tempModulePath of tempModulePaths) { // We could potentially use AsyncRecycler here, but in practice these folders tend // to be very small Utilities.dangerouslyDeletePath(tempModulePath); @@ -609,7 +614,7 @@ export class RushInstallManager extends BaseInstallManager { }); console.log('"npm shrinkwrap" completed\n'); - this._fixupNpm5Regression(); + await this._fixupNpm5RegressionAsync(); } } @@ -638,7 +643,7 @@ export class RushInstallManager extends BaseInstallManager { * Our workaround is to rewrite the package.json files for each of the @rush-temp projects * in the node_modules folder, after "npm install" completes. */ - private _fixupNpm5Regression(): void { + private async _fixupNpm5RegressionAsync(): Promise { const pathToDeleteWithoutStar: string = path.join( this.rushConfiguration.commonTempFolder, 'node_modules', @@ -649,10 +654,13 @@ export class RushInstallManager extends BaseInstallManager { let anyChanges: boolean = false; - // Example: "C:/MyRepo/common/temp/node_modules/@rush-temp/*/package.json" - for (const packageJsonPath of glob.sync( + const { default: glob } = await import('glob'); + const packageJsonPaths: string[] = await LegacyAdapters.convertCallbackToPromise( + glob, globEscape(normalizedPathToDeleteWithoutStar) + '/*/package.json' - )) { + ); + // Example: "C:/MyRepo/common/temp/node_modules/@rush-temp/*/package.json" + for (const packageJsonPath of packageJsonPaths) { // Example: "C:/MyRepo/common/temp/node_modules/@rush-temp/example/package.json" const packageJsonObject: IRushTempPackageJson = JsonFile.load(packageJsonPath); diff --git a/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts b/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts index d070fc1588b..d9a3e08a55b 100644 --- a/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts +++ b/libraries/rush-lib/src/logic/operations/ShellOperationRunnerPlugin.ts @@ -68,7 +68,7 @@ function createShellOperations( phase.shellCommand ); - if (commandToRun === undefined && !phase.ignoreMissingScript) { + if (commandToRun === undefined && phase.missingScriptBehavior === 'error') { throw new Error( `The project '${project.packageName}' does not define a '${phase.name}' command in the 'scripts' section of its package.json` ); @@ -93,7 +93,7 @@ function createShellOperations( operation.runner = new NullOperationRunner({ name: displayName, result: OperationStatus.NoOp, - silent: false + silent: phase.missingScriptBehavior === 'silent' }); } } diff --git a/libraries/rush-lib/src/logic/policy/EnvironmentPolicy.ts b/libraries/rush-lib/src/logic/policy/EnvironmentPolicy.ts new file mode 100644 index 00000000000..8990ac2855a --- /dev/null +++ b/libraries/rush-lib/src/logic/policy/EnvironmentPolicy.ts @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + +import { AlreadyReportedError, Async, FileSystem } from '@rushstack/node-core-library'; + +import type { RushConfiguration } from '../../api/RushConfiguration'; +import type { IPolicyValidatorOptions } from './PolicyValidator'; +import { RushConstants } from '../RushConstants'; + +/** + * Ensures the environment where the Rush repo exists is valid + */ +export async function validateAsync( + rushConfiguration: RushConfiguration, + options: IPolicyValidatorOptions +): Promise { + if (rushConfiguration.experimentsConfiguration.configuration.forbidPhantomResolvableNodeModulesFolders) { + const pathParts: string[] = rushConfiguration.rushJsonFolder.split(/[\/\\]/); + const existingNodeModulesPaths: string[] = []; + await Async.forEachAsync( + pathParts, + async (pathPart: string, index: number) => { + const potentialNodeModulesPath: string = `${pathParts.slice(0, index + 1).join('/')}/node_modules`; + const pathExists: boolean = await FileSystem.existsAsync(potentialNodeModulesPath); + if (pathExists) { + existingNodeModulesPaths.push(potentialNodeModulesPath); + } + }, + { concurrency: 5 } + ); + + if (existingNodeModulesPaths.length > 0) { + const paths: string = existingNodeModulesPaths.sort().join(', '); + let errorMessage: string = + `The following node_modules folders exist in the path to the Rush repo: ${paths}. ` + + `This is not supported, and may cause issues.`; + if (options.bypassPolicyAllowed) { + errorMessage += ` To ignore, use the "${RushConstants.bypassPolicyFlagLongName}" flag.`; + } + + console.error(errorMessage); + throw new AlreadyReportedError(); + } + } +} diff --git a/libraries/rush-lib/src/logic/policy/GitEmailPolicy.ts b/libraries/rush-lib/src/logic/policy/GitEmailPolicy.ts index 22b72c6cbdf..66c91c443db 100644 --- a/libraries/rush-lib/src/logic/policy/GitEmailPolicy.ts +++ b/libraries/rush-lib/src/logic/policy/GitEmailPolicy.ts @@ -4,130 +4,138 @@ import colors from 'colors/safe'; import { AlreadyReportedError } from '@rushstack/node-core-library'; -import { RushConfiguration } from '../../api/RushConfiguration'; +import type { RushConfiguration } from '../../api/RushConfiguration'; import { Utilities } from '../../utilities/Utilities'; import { Git } from '../Git'; +import { RushConstants } from '../RushConstants'; +import type { IPolicyValidatorOptions } from './PolicyValidator'; -export class GitEmailPolicy { - public static validate(rushConfiguration: RushConfiguration): void { - const git: Git = new Git(rushConfiguration); +export function validate(rushConfiguration: RushConfiguration, options: IPolicyValidatorOptions): void { + const git: Git = new Git(rushConfiguration); - if (!git.isGitPresent()) { - // If Git isn't installed, or this Rush project is not under a Git working folder, - // then we don't care about the Git email - console.log( - colors.cyan('Ignoring Git validation because the Git binary was not found in the shell path.') + '\n' - ); - return; - } + if (!git.isGitPresent()) { + // If Git isn't installed, or this Rush project is not under a Git working folder, + // then we don't care about the Git email + console.log( + colors.cyan('Ignoring Git validation because the Git binary was not found in the shell path.') + '\n' + ); + return; + } + + if (!git.isPathUnderGitWorkingTree()) { + // If Git isn't installed, or this Rush project is not under a Git working folder, + // then we don't care about the Git email + console.log(colors.cyan('Ignoring Git validation because this is not a Git working folder.') + '\n'); + return; + } - if (!git.isPathUnderGitWorkingTree()) { - // If Git isn't installed, or this Rush project is not under a Git working folder, - // then we don't care about the Git email - console.log(colors.cyan('Ignoring Git validation because this is not a Git working folder.') + '\n'); + // If there isn't a Git policy, then we don't care whether the person configured + // a Git email address at all. This helps people who don't + if (rushConfiguration.gitAllowedEmailRegExps.length === 0) { + if (git.tryGetGitEmail() === undefined) { return; } - // If there isn't a Git policy, then we don't care whether the person configured - // a Git email address at all. This helps people who don't - if (rushConfiguration.gitAllowedEmailRegExps.length === 0) { - if (git.tryGetGitEmail() === undefined) { - return; - } + // Otherwise, if an email *is* configured at all, then we still perform the basic + // sanity checks (e.g. no spaces in the address). + } - // Otherwise, if an email *is* configured at all, then we still perform the basic - // sanity checks (e.g. no spaces in the address). - } + let userEmail: string; + try { + userEmail = git.getGitEmail(); - let userEmail: string; - try { - userEmail = git.getGitEmail(); - - // sanity check; a valid email should not contain any whitespace - // if this fails, then we have another issue to report - if (!userEmail.match(/^\S+$/g)) { - console.log( - [ - colors.red('Your Git email address is invalid: ' + JSON.stringify(userEmail)), - '', - `To configure your Git email address, try something like this:`, - '', - ...GitEmailPolicy.getEmailExampleLines(rushConfiguration), - '' - ].join('\n') - ); - throw new AlreadyReportedError(); - } - } catch (e) { - if (e instanceof AlreadyReportedError) { - console.log( - colors.red('Aborting, so you can go fix your settings. (Or use --bypass-policy to skip.)') - ); - throw e; - } else { - throw e; - } + // sanity check; a valid email should not contain any whitespace + // if this fails, then we have another issue to report + if (!userEmail.match(/^\S+$/g)) { + console.log( + [ + colors.red('Your Git email address is invalid: ' + JSON.stringify(userEmail)), + '', + `To configure your Git email address, try something like this:`, + '', + ...getEmailExampleLines(rushConfiguration), + '' + ].join('\n') + ); + throw new AlreadyReportedError(); } + } catch (e) { + if (e instanceof AlreadyReportedError) { + let errorMessage: string = 'Aborting, so you can go fix your settings.'; + if (options.bypassPolicyAllowed) { + errorMessage += ` (Or use "${RushConstants.bypassPolicyFlagLongName}" to skip.)`; + } - if (rushConfiguration.gitAllowedEmailRegExps.length === 0) { - // If there is no policy, then we're good - return; + console.log(colors.red(errorMessage)); + throw e; + } else { + throw e; } + } - console.log('Checking Git policy for this repository.\n'); + if (rushConfiguration.gitAllowedEmailRegExps.length === 0) { + // If there is no policy, then we're good + return; + } - // If there is a policy, at least one of the RegExp's must match - for (const pattern of rushConfiguration.gitAllowedEmailRegExps) { - const regex: RegExp = new RegExp(`^${pattern}$`, 'i'); - if (userEmail.match(regex)) { - return; - } - } + console.log('Checking Git policy for this repository.\n'); - // Show the user's name as well. - // Ex. "Example Name " - let fancyEmail: string = colors.cyan(userEmail); - try { - const userName: string = Utilities.executeCommandAndCaptureOutput( - git.gitPath!, - ['config', 'user.name'], - '.' - ).trim(); - if (userName) { - fancyEmail = `${userName} <${fancyEmail}>`; - } - } catch (e) { - // but if it fails, this isn't critical, so don't bother them about it + // If there is a policy, at least one of the RegExp's must match + for (const pattern of rushConfiguration.gitAllowedEmailRegExps) { + const regex: RegExp = new RegExp(`^${pattern}$`, 'i'); + if (userEmail.match(regex)) { + return; } + } - console.log( - [ - 'Hey there! To keep things tidy, this repo asks you to submit your Git commits using an email like ' + - (rushConfiguration.gitAllowedEmailRegExps.length > 1 ? 'one of these patterns:' : 'this pattern:'), - '', - ...rushConfiguration.gitAllowedEmailRegExps.map((pattern) => ' ' + colors.cyan(pattern)), - '', - '...but yours is configured like this:', - '', - ` ${fancyEmail}`, - '', - 'To fix it, you can use commands like this:', - '', - ...GitEmailPolicy.getEmailExampleLines(rushConfiguration), - '' - ].join('\n') - ); - - console.log(colors.red('Aborting, so you can go fix your settings. (Or use --bypass-policy to skip.)')); - throw new AlreadyReportedError(); + // Show the user's name as well. + // Ex. "Example Name " + let fancyEmail: string = colors.cyan(userEmail); + try { + const userName: string = Utilities.executeCommandAndCaptureOutput( + git.gitPath!, + ['config', 'user.name'], + '.' + ).trim(); + if (userName) { + fancyEmail = `${userName} <${fancyEmail}>`; + } + } catch (e) { + // but if it fails, this isn't critical, so don't bother them about it } - public static getEmailExampleLines(rushConfiguration: RushConfiguration): string[] { - return [ - colors.cyan(' git config --local user.name "Example Name"'), - colors.cyan( - ` git config --local user.email "${rushConfiguration.gitSampleEmail || 'name@example.com'}"` - ) - ]; + console.log( + [ + 'Hey there! To keep things tidy, this repo asks you to submit your Git commits using an email like ' + + (rushConfiguration.gitAllowedEmailRegExps.length > 1 ? 'one of these patterns:' : 'this pattern:'), + '', + ...rushConfiguration.gitAllowedEmailRegExps.map((pattern) => ' ' + colors.cyan(pattern)), + '', + '...but yours is configured like this:', + '', + ` ${fancyEmail}`, + '', + 'To fix it, you can use commands like this:', + '', + ...getEmailExampleLines(rushConfiguration), + '' + ].join('\n') + ); + + let errorMessage: string = 'Aborting, so you can go fix your settings.'; + if (options.bypassPolicyAllowed) { + errorMessage += ` (Or use "${RushConstants.bypassPolicyFlagLongName}" to skip.)`; } + + console.log(colors.red(errorMessage)); + throw new AlreadyReportedError(); +} + +export function getEmailExampleLines(rushConfiguration: RushConfiguration): string[] { + return [ + colors.cyan(' git config --local user.name "Example Name"'), + colors.cyan( + ` git config --local user.email "${rushConfiguration.gitSampleEmail || 'name@example.com'}"` + ) + ]; } diff --git a/libraries/rush-lib/src/logic/policy/PolicyValidator.ts b/libraries/rush-lib/src/logic/policy/PolicyValidator.ts index 3e5dcaca9d4..26407bb1113 100644 --- a/libraries/rush-lib/src/logic/policy/PolicyValidator.ts +++ b/libraries/rush-lib/src/logic/policy/PolicyValidator.ts @@ -1,23 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { RushConfiguration } from '../../api/RushConfiguration'; -import { GitEmailPolicy } from './GitEmailPolicy'; -import { ShrinkwrapFilePolicy } from './ShrinkwrapFilePolicy'; +import type { RushConfiguration } from '../../api/RushConfiguration'; +import * as GitEmailPolicy from './GitEmailPolicy'; +import * as ShrinkwrapFilePolicy from './ShrinkwrapFilePolicy'; +import * as EnvironmentPolicy from './EnvironmentPolicy'; export interface IPolicyValidatorOptions { + bypassPolicyAllowed?: boolean; bypassPolicy?: boolean; allowShrinkwrapUpdates?: boolean; shrinkwrapVariant?: string; } -export class PolicyValidator { - public static validatePolicy(rushConfiguration: RushConfiguration, options: IPolicyValidatorOptions): void { - if (options.bypassPolicy) { - return; - } - - GitEmailPolicy.validate(rushConfiguration); +export async function validatePolicyAsync( + rushConfiguration: RushConfiguration, + options: IPolicyValidatorOptions +): Promise { + if (!options.bypassPolicy) { + GitEmailPolicy.validate(rushConfiguration, options); + await EnvironmentPolicy.validateAsync(rushConfiguration, options); if (!options.allowShrinkwrapUpdates) { // Don't validate the shrinkwrap if updates are allowed, as it's likely to change // It also may have merge conflict markers, which PNPM can gracefully handle, but the validator cannot diff --git a/libraries/rush-lib/src/logic/policy/RushPolicy.ts b/libraries/rush-lib/src/logic/policy/RushPolicy.ts deleted file mode 100644 index 16bbab6f5ae..00000000000 --- a/libraries/rush-lib/src/logic/policy/RushPolicy.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See LICENSE in the project root for license information. - -import { RushConfiguration } from '../../api/RushConfiguration'; - -export abstract class RushPolicy { - public abstract validate(rushConfiguration: RushConfiguration): void; -} diff --git a/libraries/rush-lib/src/logic/policy/ShrinkwrapFilePolicy.ts b/libraries/rush-lib/src/logic/policy/ShrinkwrapFilePolicy.ts index f1d484ee2b6..6ce4d44af85 100644 --- a/libraries/rush-lib/src/logic/policy/ShrinkwrapFilePolicy.ts +++ b/libraries/rush-lib/src/logic/policy/ShrinkwrapFilePolicy.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { RushConfiguration } from '../../api/RushConfiguration'; -import { IPolicyValidatorOptions } from './PolicyValidator'; -import { BaseShrinkwrapFile } from '../base/BaseShrinkwrapFile'; +import type { RushConfiguration } from '../../api/RushConfiguration'; +import type { IPolicyValidatorOptions } from './PolicyValidator'; +import type { BaseShrinkwrapFile } from '../base/BaseShrinkwrapFile'; import { ShrinkwrapFileFactory } from '../ShrinkwrapFileFactory'; -import { RepoStateFile } from '../RepoStateFile'; +import type { RepoStateFile } from '../RepoStateFile'; export interface IShrinkwrapFilePolicyValidatorOptions extends IPolicyValidatorOptions { repoState: RepoStateFile; @@ -14,28 +14,26 @@ export interface IShrinkwrapFilePolicyValidatorOptions extends IPolicyValidatorO /** * A policy that validates shrinkwrap files used by package managers. */ -export class ShrinkwrapFilePolicy { - public static validate(rushConfiguration: RushConfiguration, options: IPolicyValidatorOptions): void { - console.log('Validating package manager shrinkwrap file.\n'); - const shrinkwrapFile: BaseShrinkwrapFile | undefined = ShrinkwrapFileFactory.getShrinkwrapFile( - rushConfiguration.packageManager, - rushConfiguration.packageManagerOptions, - rushConfiguration.getCommittedShrinkwrapFilename(options.shrinkwrapVariant) - ); +export function validate(rushConfiguration: RushConfiguration, options: IPolicyValidatorOptions): void { + console.log('Validating package manager shrinkwrap file.\n'); + const shrinkwrapFile: BaseShrinkwrapFile | undefined = ShrinkwrapFileFactory.getShrinkwrapFile( + rushConfiguration.packageManager, + rushConfiguration.packageManagerOptions, + rushConfiguration.getCommittedShrinkwrapFilename(options.shrinkwrapVariant) + ); - if (!shrinkwrapFile) { - console.log('Shrinkwrap file could not be found, skipping validation.\n'); - return; - } - - // Run shrinkwrap-specific validation - shrinkwrapFile.validate( - rushConfiguration.packageManagerOptions, - { - ...options, - repoState: rushConfiguration.getRepoState(options.shrinkwrapVariant) - }, - rushConfiguration.experimentsConfiguration.configuration - ); + if (!shrinkwrapFile) { + console.log('Shrinkwrap file could not be found, skipping validation.\n'); + return; } + + // Run shrinkwrap-specific validation + shrinkwrapFile.validate( + rushConfiguration.packageManagerOptions, + { + ...options, + repoState: rushConfiguration.getRepoState(options.shrinkwrapVariant) + }, + rushConfiguration.experimentsConfiguration.configuration + ); } diff --git a/libraries/rush-lib/src/logic/test/ChangeFiles.test.ts b/libraries/rush-lib/src/logic/test/ChangeFiles.test.ts index ded2c1911f9..3d37c8208a6 100644 --- a/libraries/rush-lib/src/logic/test/ChangeFiles.test.ts +++ b/libraries/rush-lib/src/logic/test/ChangeFiles.test.ts @@ -14,24 +14,24 @@ describe(ChangeFiles.name, () => { rushConfiguration = {} as RushConfiguration; }); - describe(ChangeFiles.prototype.getFiles.name, () => { - it('returns correctly when there is one change file', () => { + describe(ChangeFiles.prototype.getFilesAsync.name, () => { + it('returns correctly when there is one change file', async () => { const changesPath: string = `${__dirname}/leafChange`; const changeFiles: ChangeFiles = new ChangeFiles(changesPath); const expectedPath: string = Path.convertToSlashes(`${changesPath}/change1.json`); - expect(changeFiles.getFiles()).toEqual([expectedPath]); + expect(await changeFiles.getFilesAsync()).toEqual([expectedPath]); }); - it('returns empty array when no change files', () => { + it('returns empty array when no change files', async () => { const changesPath: string = `${__dirname}/noChange`; const changeFiles: ChangeFiles = new ChangeFiles(changesPath); - expect(changeFiles.getFiles()).toHaveLength(0); + expect(await changeFiles.getFilesAsync()).toHaveLength(0); }); - it('returns correctly when change files are categorized', () => { + it('returns correctly when change files are categorized', async () => { const changesPath: string = `${__dirname}/categorizedChanges`; const changeFiles: ChangeFiles = new ChangeFiles(changesPath); - const files: string[] = changeFiles.getFiles(); + const files: string[] = await changeFiles.getFilesAsync(); expect(files).toHaveLength(3); const expectedPathA: string = Path.convertToSlashes(`${changesPath}/@ms/a/changeA.json`); @@ -96,14 +96,14 @@ describe(ChangeFiles.name, () => { }); }); - describe(ChangeFiles.prototype.deleteAll.name, () => { - it('delete all files when there are no prerelease packages', () => { + describe(ChangeFiles.prototype.deleteAllAsync.name, () => { + it('delete all files when there are no prerelease packages', async () => { const changesPath: string = `${__dirname}/multipleChangeFiles`; const changeFiles: ChangeFiles = new ChangeFiles(changesPath); - expect(changeFiles.deleteAll(false)).toEqual(3); + expect(await changeFiles.deleteAllAsync(false)).toEqual(3); }); - it('does not delete change files for package whose change logs do not get updated. ', () => { + it('does not delete change files for package whose change logs do not get updated. ', async () => { const changesPath: string = `${__dirname}/multipleChangeFiles`; const changeFiles: ChangeFiles = new ChangeFiles(changesPath); const updatedChangelogs: IChangelog[] = [ @@ -116,13 +116,13 @@ describe(ChangeFiles.name, () => { entries: [] } ]; - expect(changeFiles.deleteAll(false, updatedChangelogs)).toEqual(2); + expect(await changeFiles.deleteAllAsync(false, updatedChangelogs)).toEqual(2); }); - it('delete all files when there are hotfixes', () => { + it('delete all files when there are hotfixes', async () => { const changesPath: string = `${__dirname}/multipleHotfixChanges`; const changeFiles: ChangeFiles = new ChangeFiles(changesPath); - expect(changeFiles.deleteAll(false)).toEqual(3); + expect(await changeFiles.deleteAllAsync(false)).toEqual(3); }); }); }); diff --git a/libraries/rush-lib/src/logic/test/ChangeManager.test.ts b/libraries/rush-lib/src/logic/test/ChangeManager.test.ts index 3c5602066c0..7eb18a10a74 100644 --- a/libraries/rush-lib/src/logic/test/ChangeManager.test.ts +++ b/libraries/rush-lib/src/logic/test/ChangeManager.test.ts @@ -17,8 +17,8 @@ describe(ChangeManager.name, () => { }); /* eslint-disable dot-notation */ - it('can apply changes to the package.json files in the dictionary', () => { - changeManager.load(`${__dirname}/multipleChanges`); + it('can apply changes to the package.json files in the dictionary', async () => { + await changeManager.loadAsync(`${__dirname}/multipleChanges`); changeManager.apply(false); expect(changeManager.allPackages.get('a')!.packageJson.version).toEqual('2.0.0'); @@ -32,8 +32,8 @@ describe(ChangeManager.name, () => { expect(changeManager.allPackages.get('f')!.packageJson.peerDependencies!['b']).toEqual('>=1.0.1 <2.0.0'); }); - it('can update explicit version dependency', () => { - changeManager.load(`${__dirname}/explicitVersionChange`); + it('can update explicit version dependency', async () => { + await changeManager.loadAsync(`${__dirname}/explicitVersionChange`); changeManager.apply(false); expect(changeManager.allPackages.get('c')!.packageJson.version).toEqual('1.0.1'); @@ -41,8 +41,8 @@ describe(ChangeManager.name, () => { expect(changeManager.allPackages.get('d')!.packageJson.dependencies!['c']).toEqual('1.0.1'); }); - it('can update a project using lockStepVersion policy with no nextBump from changefiles', () => { - changeManager.load(`${__dirname}/lockstepWithoutNextBump`); + it('can update a project using lockStepVersion policy with no nextBump from changefiles', async () => { + await changeManager.loadAsync(`${__dirname}/lockstepWithoutNextBump`); changeManager.apply(false); const policy: LockStepVersionPolicy = rushConfiguration.versionPolicyConfiguration.getVersionPolicy( @@ -54,8 +54,8 @@ describe(ChangeManager.name, () => { expect(policy.version).toEqual('1.1.0'); }); - it('can update explicit cyclic dependency', () => { - changeManager.load(`${__dirname}/cyclicDepsExplicit`); + it('can update explicit cyclic dependency', async () => { + await changeManager.loadAsync(`${__dirname}/cyclicDepsExplicit`); changeManager.apply(false); expect(changeManager.allPackages.get('cyclic-dep-explicit-1')!.packageJson.version).toEqual('2.0.0'); @@ -72,11 +72,11 @@ describe(ChangeManager.name, () => { ).toEqual('>=1.0.0 <2.0.0'); }); - it('can update root with patch change for prerelease', () => { + it('can update root with patch change for prerelease', async () => { const prereleaseName: string = 'alpha.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(prereleaseName); - changeManager.load(`${__dirname}/rootPatchChange`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/rootPatchChange`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('a')!.packageJson.version).toEqual('1.0.1-' + prereleaseName); @@ -91,11 +91,11 @@ describe(ChangeManager.name, () => { ); }); - it('can update non-root with patch change for prerelease', () => { + it('can update non-root with patch change for prerelease', async () => { const prereleaseName: string = 'beta.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(prereleaseName); - changeManager.load(`${__dirname}/explicitVersionChange`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/explicitVersionChange`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('a')!.packageJson.version).toEqual('1.0.0'); @@ -108,11 +108,11 @@ describe(ChangeManager.name, () => { ); }); - it('can update cyclic dependency for non-explicit prerelease', () => { + it('can update cyclic dependency for non-explicit prerelease', async () => { const prereleaseName: string = 'beta.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(prereleaseName); - changeManager.load(`${__dirname}/cyclicDeps`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/cyclicDeps`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('cyclic-dep-1')!.packageJson.version).toEqual( @@ -129,11 +129,11 @@ describe(ChangeManager.name, () => { ); }); - it('can update root with patch change for adding version suffix', () => { + it('can update root with patch change for adding version suffix', async () => { const suffix: string = 'dk.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(undefined, suffix); - changeManager.load(`${__dirname}/rootPatchChange`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/rootPatchChange`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('a')!.packageJson.version).toEqual('1.0.0-' + suffix); @@ -144,11 +144,11 @@ describe(ChangeManager.name, () => { expect(changeManager.allPackages.get('d')!.packageJson.dependencies!['c']).toEqual('1.0.0-' + suffix); }); - it('can update non-root with patch change for version suffix', () => { + it('can update non-root with patch change for version suffix', async () => { const suffix: string = 'dk.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(undefined, suffix); - changeManager.load(`${__dirname}/explicitVersionChange`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/explicitVersionChange`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('a')!.packageJson.version).toEqual('1.0.0'); @@ -159,11 +159,11 @@ describe(ChangeManager.name, () => { expect(changeManager.allPackages.get('d')!.packageJson.dependencies!['c']).toEqual('1.0.0-' + suffix); }); - it('can update cyclic dependency for non-explicit suffix', () => { + it('can update cyclic dependency for non-explicit suffix', async () => { const suffix: string = 'dk.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(undefined, suffix); - changeManager.load(`${__dirname}/cyclicDeps`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/cyclicDeps`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('cyclic-dep-1')!.packageJson.version).toEqual('1.0.0-' + suffix); @@ -189,8 +189,8 @@ describe(`${ChangeManager.name} (workspace)`, () => { }); /* eslint-disable dot-notation */ - it('can apply changes to the package.json files in the dictionary', () => { - changeManager.load(`${__dirname}/multipleChanges`); + it('can apply changes to the package.json files in the dictionary', async () => { + await changeManager.loadAsync(`${__dirname}/multipleChanges`); changeManager.apply(false); expect(changeManager.allPackages.get('a')!.packageJson.version).toEqual('2.0.0'); @@ -212,8 +212,8 @@ describe(`${ChangeManager.name} (workspace)`, () => { expect(changeManager.allPackages.get('f')!.packageJson.peerDependencies!['b']).toEqual('>=1.0.1 <2.0.0'); }); - it('can update explicit version dependency', () => { - changeManager.load(`${__dirname}/explicitVersionChange`); + it('can update explicit version dependency', async () => { + await changeManager.loadAsync(`${__dirname}/explicitVersionChange`); changeManager.apply(false); expect(changeManager.allPackages.get('c')!.packageJson.version).toEqual('1.0.1'); @@ -221,8 +221,8 @@ describe(`${ChangeManager.name} (workspace)`, () => { expect(changeManager.allPackages.get('d')!.packageJson.dependencies!['c']).toEqual('workspace:1.0.1'); }); - it('can update explicit cyclic dependency', () => { - changeManager.load(`${__dirname}/cyclicDepsExplicit`); + it('can update explicit cyclic dependency', async () => { + await changeManager.loadAsync(`${__dirname}/cyclicDepsExplicit`); changeManager.apply(false); expect(changeManager.allPackages.get('cyclic-dep-explicit-1')!.packageJson.version).toEqual('2.0.0'); @@ -239,11 +239,11 @@ describe(`${ChangeManager.name} (workspace)`, () => { ).toEqual('>=1.0.0 <2.0.0'); }); - it('can update root with patch change for prerelease', () => { + it('can update root with patch change for prerelease', async () => { const prereleaseName: string = 'alpha.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(prereleaseName); - changeManager.load(`${__dirname}/rootPatchChange`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/rootPatchChange`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('a')!.packageJson.version).toEqual('1.0.1-' + prereleaseName); @@ -258,11 +258,11 @@ describe(`${ChangeManager.name} (workspace)`, () => { ); }); - it('can update non-root with patch change for prerelease', () => { + it('can update non-root with patch change for prerelease', async () => { const prereleaseName: string = 'beta.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(prereleaseName); - changeManager.load(`${__dirname}/explicitVersionChange`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/explicitVersionChange`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('a')!.packageJson.version).toEqual('1.0.0'); @@ -277,11 +277,11 @@ describe(`${ChangeManager.name} (workspace)`, () => { ); }); - it('can update cyclic dependency for non-explicit prerelease', () => { + it('can update cyclic dependency for non-explicit prerelease', async () => { const prereleaseName: string = 'beta.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(prereleaseName); - changeManager.load(`${__dirname}/cyclicDeps`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/cyclicDeps`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('cyclic-dep-1')!.packageJson.version).toEqual( @@ -298,11 +298,11 @@ describe(`${ChangeManager.name} (workspace)`, () => { ); }); - it('can update root with patch change for adding version suffix', () => { + it('can update root with patch change for adding version suffix', async () => { const suffix: string = 'dk.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(undefined, suffix); - changeManager.load(`${__dirname}/rootPatchChange`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/rootPatchChange`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('a')!.packageJson.version).toEqual('1.0.0-' + suffix); @@ -317,11 +317,11 @@ describe(`${ChangeManager.name} (workspace)`, () => { ); }); - it('can update non-root with patch change for version suffix', () => { + it('can update non-root with patch change for version suffix', async () => { const suffix: string = 'dk.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(undefined, suffix); - changeManager.load(`${__dirname}/explicitVersionChange`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/explicitVersionChange`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('a')!.packageJson.version).toEqual('1.0.0'); @@ -336,11 +336,11 @@ describe(`${ChangeManager.name} (workspace)`, () => { ); }); - it('can update cyclic dependency for non-explicit suffix', () => { + it('can update cyclic dependency for non-explicit suffix', async () => { const suffix: string = 'dk.1'; const prereleaseToken: PrereleaseToken = new PrereleaseToken(undefined, suffix); - changeManager.load(`${__dirname}/cyclicDeps`, prereleaseToken); + await changeManager.loadAsync(`${__dirname}/cyclicDeps`, prereleaseToken); changeManager.apply(false); expect(changeManager.allPackages.get('cyclic-dep-1')!.packageJson.version).toEqual('1.0.0-' + suffix); diff --git a/libraries/rush-lib/src/logic/test/PublishUtilities.test.ts b/libraries/rush-lib/src/logic/test/PublishUtilities.test.ts index 04f46cfcccf..1ec0bc5ffb6 100644 --- a/libraries/rush-lib/src/logic/test/PublishUtilities.test.ts +++ b/libraries/rush-lib/src/logic/test/PublishUtilities.test.ts @@ -55,7 +55,7 @@ function generateVersionPolicySnapshot(allChanges: IChangeRequests): string { return lines.join('\n'); } -describe(PublishUtilities.findChangeRequests.name, () => { +describe(PublishUtilities.findChangeRequestsAsync.name, () => { let packagesRushConfiguration: RushConfiguration; let repoRushConfiguration: RushConfiguration; @@ -81,9 +81,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { repoRushConfiguration = RushConfiguration.loadFromConfigurationFile(`${__dirname}/repo/rush.json`); }); - it('returns no changes in an empty change folder', () => { + it('returns no changes in an empty change folder', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/noChange`) @@ -93,9 +93,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(allChanges.versionPolicyChanges.size).toEqual(0); }); - it('returns 1 change when changing a leaf package', () => { + it('returns 1 change when changing a leaf package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/leafChange`) @@ -108,9 +108,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(allChanges.packageChanges.get('d')!.changeType).toEqual(ChangeType.patch); }); - it('returns 6 changes when patching a root package', () => { + it('returns 6 changes when patching a root package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/rootPatchChange`) @@ -141,9 +141,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { ); }); - it('returns 8 changes when hotfixing a root package', () => { + it('returns 8 changes when hotfixing a root package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/rootHotfixChange`) @@ -172,9 +172,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(generateVersionPolicySnapshot(allChanges)).toMatchInlineSnapshot(`""`); }); - it('returns 9 changes when major bumping a root package', () => { + it('returns 9 changes when major bumping a root package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/rootMajorChange`) @@ -205,9 +205,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { ); }); - it('updates policy project dependencies when updating a lockstep version policy with no nextBump', () => { + it('updates policy project dependencies when updating a lockstep version policy with no nextBump', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/lockstepWithoutNextBump`) @@ -238,9 +238,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { ); }); - it('returns 2 changes when bumping cyclic dependencies', () => { + it('returns 2 changes when bumping cyclic dependencies', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/cyclicDeps`) @@ -269,36 +269,36 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(generateVersionPolicySnapshot(allChanges)).toMatchInlineSnapshot(`""`); }); - it('returns error when mixing hotfix and non-hotfix changes', () => { + it('returns error when mixing hotfix and non-hotfix changes', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - expect( - PublishUtilities.findChangeRequests.bind( - PublishUtilities, - allPackages, - packagesRushConfiguration, - new ChangeFiles(`${__dirname}/hotfixWithPatchChanges`) - ) - ).toThrow('Cannot apply hotfix alongside patch change on same package'); + await expect( + async () => + await PublishUtilities.findChangeRequestsAsync( + allPackages, + packagesRushConfiguration, + new ChangeFiles(`${__dirname}/hotfixWithPatchChanges`) + ) + ).rejects.toThrow('Cannot apply hotfix alongside patch change on same package'); }); - it('returns error when adding hotfix with config disabled', () => { + it('returns error when adding hotfix with config disabled', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; // Overload hotfixChangeEnabled function (packagesRushConfiguration as unknown as Record).hotfixChangeEnabled = false; - expect( - PublishUtilities.findChangeRequests.bind( - PublishUtilities, - allPackages, - packagesRushConfiguration, - new ChangeFiles(`${__dirname}/rootHotfixChange`) - ) - ).toThrow('Cannot add hotfix change; hotfixChangeEnabled is false in configuration.'); + await expect( + async () => + await PublishUtilities.findChangeRequestsAsync( + allPackages, + packagesRushConfiguration, + new ChangeFiles(`${__dirname}/rootHotfixChange`) + ) + ).rejects.toThrow('Cannot add hotfix change; hotfixChangeEnabled is false in configuration.'); }); - it('can resolve multiple changes requests on the same package', () => { + it('can resolve multiple changes requests on the same package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/multipleChanges`) @@ -329,9 +329,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { ); }); - it('can resolve multiple reverse-ordered changes requests on the same package', () => { + it('can resolve multiple reverse-ordered changes requests on the same package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/orderedChanges`) @@ -362,9 +362,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { ); }); - it('can resolve multiple hotfix changes', () => { + it('can resolve multiple hotfix changes', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/multipleHotfixChanges`) @@ -393,9 +393,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(generateVersionPolicySnapshot(allChanges)).toMatchInlineSnapshot(`""`); }); - it('can update an explicit dependency', () => { + it('can update an explicit dependency', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/explicitVersionChange`) @@ -424,9 +424,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(generateVersionPolicySnapshot(allChanges)).toMatchInlineSnapshot(`""`); }); - it('can exclude lock step projects', () => { + it('can exclude lock step projects', async () => { const allPackages: Map = repoRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, repoRushConfiguration, new ChangeFiles(`${__dirname}/repo/changes`), @@ -464,9 +464,9 @@ describe(PublishUtilities.sortChangeRequests.name, () => { rushConfiguration = RushConfiguration.loadFromConfigurationFile(`${__dirname}/packages/rush.json`); }); - it('can return a sorted array of the change requests to be published in the correct order', () => { + it('can return a sorted array of the change requests to be published in the correct order', async () => { const allPackages: Map = rushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, rushConfiguration, new ChangeFiles(`${__dirname}/multipleChanges`) @@ -539,7 +539,7 @@ describe(PublishUtilities.getNewDependencyVersion.name, () => { }); }); -describe(PublishUtilities.findChangeRequests.name, () => { +describe(PublishUtilities.findChangeRequestsAsync.name, () => { let packagesRushConfiguration: RushConfiguration; let repoRushConfiguration: RushConfiguration; @@ -552,9 +552,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { ); }); - it('returns no changes in an empty change folder', () => { + it('returns no changes in an empty change folder', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/noChange`) @@ -564,9 +564,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(allChanges.versionPolicyChanges.size).toEqual(0); }); - it('returns 1 change when changing a leaf package', () => { + it('returns 1 change when changing a leaf package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/leafChange`) @@ -579,9 +579,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(allChanges.packageChanges.get('d')!.changeType).toEqual(ChangeType.patch); }); - it('returns 6 changes when patching a root package', () => { + it('returns 6 changes when patching a root package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/rootPatchChange`) @@ -612,9 +612,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { ); }); - it('returns 8 changes when hotfixing a root package', () => { + it('returns 8 changes when hotfixing a root package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/rootHotfixChange`) @@ -643,9 +643,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(generateVersionPolicySnapshot(allChanges)).toMatchInlineSnapshot(`""`); }); - it('returns 9 changes when major bumping a root package', () => { + it('returns 9 changes when major bumping a root package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/rootMajorChange`) @@ -676,9 +676,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { ); }); - it('returns 2 changes when bumping cyclic dependencies', () => { + it('returns 2 changes when bumping cyclic dependencies', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/cyclicDeps`) @@ -707,36 +707,36 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(generateVersionPolicySnapshot(allChanges)).toMatchInlineSnapshot(`""`); }); - it('returns error when mixing hotfix and non-hotfix changes', () => { + it('returns error when mixing hotfix and non-hotfix changes', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - expect( - PublishUtilities.findChangeRequests.bind( - PublishUtilities, - allPackages, - packagesRushConfiguration, - new ChangeFiles(`${__dirname}/hotfixWithPatchChanges`) - ) - ).toThrow('Cannot apply hotfix alongside patch change on same package'); + await expect( + async () => + await PublishUtilities.findChangeRequestsAsync( + allPackages, + packagesRushConfiguration, + new ChangeFiles(`${__dirname}/hotfixWithPatchChanges`) + ) + ).rejects.toThrow('Cannot apply hotfix alongside patch change on same package'); }); - it('returns error when adding hotfix with config disabled', () => { + it('returns error when adding hotfix with config disabled', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; // Overload hotfixChangeEnabled function (packagesRushConfiguration as unknown as Record).hotfixChangeEnabled = false; - expect( - PublishUtilities.findChangeRequests.bind( - PublishUtilities, - allPackages, - packagesRushConfiguration, - new ChangeFiles(`${__dirname}/rootHotfixChange`) - ) - ).toThrow('Cannot add hotfix change; hotfixChangeEnabled is false in configuration.'); + await expect( + async () => + await PublishUtilities.findChangeRequestsAsync( + allPackages, + packagesRushConfiguration, + new ChangeFiles(`${__dirname}/rootHotfixChange`) + ) + ).rejects.toThrow('Cannot add hotfix change; hotfixChangeEnabled is false in configuration.'); }); - it('can resolve multiple changes requests on the same package', () => { + it('can resolve multiple changes requests on the same package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/multipleChanges`) @@ -767,9 +767,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { ); }); - it('can resolve multiple reverse-ordered changes requests on the same package', () => { + it('can resolve multiple reverse-ordered changes requests on the same package', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/orderedChanges`) @@ -800,9 +800,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { ); }); - it('can resolve multiple hotfix changes', () => { + it('can resolve multiple hotfix changes', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/multipleHotfixChanges`) @@ -831,9 +831,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(generateVersionPolicySnapshot(allChanges)).toMatchInlineSnapshot(`""`); }); - it('can update an explicit dependency', () => { + it('can update an explicit dependency', async () => { const allPackages: Map = packagesRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, packagesRushConfiguration, new ChangeFiles(`${__dirname}/explicitVersionChange`) @@ -849,9 +849,9 @@ describe(PublishUtilities.findChangeRequests.name, () => { expect(allChanges.packageChanges.get('d')!.changeType).toEqual(ChangeType.patch); }); - it('can exclude lock step projects', () => { + it('can exclude lock step projects', async () => { const allPackages: Map = repoRushConfiguration.projectsByName; - const allChanges: IChangeRequests = PublishUtilities.findChangeRequests( + const allChanges: IChangeRequests = await PublishUtilities.findChangeRequestsAsync( allPackages, repoRushConfiguration, new ChangeFiles(`${__dirname}/repo/changes`), diff --git a/libraries/rush-lib/src/pluginFramework/RushSession.ts b/libraries/rush-lib/src/pluginFramework/RushSession.ts index aa644ccc4d5..edfd502455d 100644 --- a/libraries/rush-lib/src/pluginFramework/RushSession.ts +++ b/libraries/rush-lib/src/pluginFramework/RushSession.ts @@ -18,7 +18,9 @@ export interface IRushSessionOptions { /** * @beta */ -export type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider; +export type CloudBuildCacheProviderFactory = ( + buildCacheJson: IBuildCacheJson +) => ICloudBuildCacheProvider | Promise; /** * @beta @@ -60,6 +62,7 @@ export class RushSession { if (this._cloudBuildCacheProviderFactories.has(cacheProviderName)) { throw new Error(`A build cache provider factory for ${cacheProviderName} has already been registered`); } + this._cloudBuildCacheProviderFactories.set(cacheProviderName, factory); } diff --git a/libraries/rush-lib/src/schemas/command-line.schema.json b/libraries/rush-lib/src/schemas/command-line.schema.json index 3499274d003..62821dfd777 100644 --- a/libraries/rush-lib/src/schemas/command-line.schema.json +++ b/libraries/rush-lib/src/schemas/command-line.schema.json @@ -307,6 +307,13 @@ "title": "Allow Warnings on Success", "description": "By default, Rush returns a nonzero exit code if errors or warnings occur during a command. If this option is set to \"true\", Rush will return a zero exit code if warnings occur during the execution of this phase.", "type": "boolean" + }, + + "missingScriptBehavior": { + "title": "Missing Script Behavior", + "description": "What should happen if a project's package.json does not have a \"scripts\" entry matching the phase name, or it is an empty string. Supersedes \"ignoreMissingScript\". Defaults to \"error\".", + "type": "string", + "enum": ["silent", "log", "error"] } } }, diff --git a/libraries/rush-lib/src/schemas/experiments.schema.json b/libraries/rush-lib/src/schemas/experiments.schema.json index bb1e8e92602..e443f13cd84 100644 --- a/libraries/rush-lib/src/schemas/experiments.schema.json +++ b/libraries/rush-lib/src/schemas/experiments.schema.json @@ -41,6 +41,10 @@ "printEventHooksOutputToConsole": { "description": "If true, print the outputs of shell commands defined in event hooks to the console.", "type": "boolean" + }, + "forbidPhantomResolvableNodeModulesFolders": { + "description": "If true, Rush will not allow node_modules in the repo folder or in parent folders.", + "type": "boolean" } }, "additionalProperties": false diff --git a/libraries/rush-lib/src/utilities/Utilities.ts b/libraries/rush-lib/src/utilities/Utilities.ts index 9bbc1a3a0c0..d821e6a0644 100644 --- a/libraries/rush-lib/src/utilities/Utilities.ts +++ b/libraries/rush-lib/src/utilities/Utilities.ts @@ -154,14 +154,6 @@ export class Utilities { return performance.now(); } - /** - * Returns the values from a Set - */ - public static getSetAsArray(set: Set | ReadonlySet): T[] { - // When ES6 is supported, we can use Array.from() instead. - return Array.from(set); - } - /** * Retries a function until a timeout is reached. The function is expected to throw if it failed and * should be retried. @@ -232,22 +224,6 @@ export class Utilities { ); } - /** - * Determines if the path points to a file and that it exists. - */ - public static fileExists(filePath: string): boolean { - let exists: boolean = false; - - try { - const lstat: FileSystemStats = FileSystem.getLinkStatistics(filePath); - exists = lstat.isFile(); - } catch (e) { - /* no-op */ - } - - return exists; - } - /** * Determines if a path points to a directory and that it exists. */ @@ -280,16 +256,6 @@ export class Utilities { } } - /** - * Attempts to delete a file. If it does not exist, or the path is not a file, it no-ops. - */ - public static deleteFile(filePath: string): void { - if (Utilities.fileExists(filePath)) { - console.log(`Deleting: ${filePath}`); - FileSystem.deleteFile(filePath); - } - } - /* * Returns true if dateToCompare is more recent than all of the inputFilenames, which * would imply that we don't need to rebuild it. Returns false if any of the files @@ -510,18 +476,6 @@ export class Utilities { } } - public static async readStreamToBufferAsync(stream: stream.Readable): Promise { - return await new Promise((resolve: (result: Buffer) => void, reject: (error: Error) => void) => { - const parts: Uint8Array[] = []; - stream.on('data', (chunk) => parts.push(chunk)); - stream.on('error', (error) => reject(error)); - stream.on('end', () => { - const result: Buffer = Buffer.concat(parts); - resolve(result); - }); - }); - } - private static _executeLifecycleCommandInternal( command: string, spawnFunction: ( diff --git a/libraries/rush-sdk/package.json b/libraries/rush-sdk/package.json index 9f2595b8ae7..62e739399e6 100644 --- a/libraries/rush-sdk/package.json +++ b/libraries/rush-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/rush-sdk", - "version": "5.97.1", + "version": "5.98.0", "description": "An API for interacting with the Rush engine", "repository": { "type": "git", diff --git a/libraries/stream-collator/CHANGELOG.json b/libraries/stream-collator/CHANGELOG.json index c1635cb1107..906844d6e20 100644 --- a/libraries/stream-collator/CHANGELOG.json +++ b/libraries/stream-collator/CHANGELOG.json @@ -1,6 +1,111 @@ { "name": "@rushstack/stream-collator", "entries": [ + { + "version": "4.0.235", + "tag": "@rushstack/stream-collator_v4.0.235", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.5.10`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "4.0.234", + "tag": "@rushstack/stream-collator_v4.0.234", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.5.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "4.0.233", + "tag": "@rushstack/stream-collator_v4.0.233", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.5.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "4.0.232", + "tag": "@rushstack/stream-collator_v4.0.232", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.5.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "4.0.231", + "tag": "@rushstack/stream-collator_v4.0.231", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/terminal\" to `0.5.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "4.0.230", "tag": "@rushstack/stream-collator_v4.0.230", diff --git a/libraries/stream-collator/CHANGELOG.md b/libraries/stream-collator/CHANGELOG.md index 04b38405aea..ccd585c0c92 100644 --- a/libraries/stream-collator/CHANGELOG.md +++ b/libraries/stream-collator/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/stream-collator -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 4.0.235 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 4.0.234 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 4.0.233 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 4.0.232 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 4.0.231 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 4.0.230 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/libraries/stream-collator/package.json b/libraries/stream-collator/package.json index 7ebd923305e..ce043a89028 100644 --- a/libraries/stream-collator/package.json +++ b/libraries/stream-collator/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/stream-collator", - "version": "4.0.230", + "version": "4.0.235", "description": "Display intelligible realtime output from concurrent processes", "repository": { "type": "git", diff --git a/libraries/terminal/CHANGELOG.json b/libraries/terminal/CHANGELOG.json index 238524f02f3..83bbba4cb91 100644 --- a/libraries/terminal/CHANGELOG.json +++ b/libraries/terminal/CHANGELOG.json @@ -1,6 +1,96 @@ { "name": "@rushstack/terminal", "entries": [ + { + "version": "0.5.10", + "tag": "@rushstack/terminal_v0.5.10", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.5.9", + "tag": "@rushstack/terminal_v0.5.9", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.5.8", + "tag": "@rushstack/terminal_v0.5.8", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.5.7", + "tag": "@rushstack/terminal_v0.5.7", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.5.6", + "tag": "@rushstack/terminal_v0.5.6", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.5.5", "tag": "@rushstack/terminal_v0.5.5", diff --git a/libraries/terminal/CHANGELOG.md b/libraries/terminal/CHANGELOG.md index d6e32b76398..a7d9eeb7533 100644 --- a/libraries/terminal/CHANGELOG.md +++ b/libraries/terminal/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/terminal -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.5.10 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.5.9 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.5.8 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.5.7 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 0.5.6 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.5.5 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/libraries/terminal/package.json b/libraries/terminal/package.json index afddedc8606..e4a89ed1591 100644 --- a/libraries/terminal/package.json +++ b/libraries/terminal/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/terminal", - "version": "0.5.5", + "version": "0.5.10", "description": "User interface primitives for console applications", "main": "lib/index.js", "typings": "dist/terminal.d.ts", diff --git a/libraries/tree-pattern/package.json b/libraries/tree-pattern/package.json index 18a2037e406..91528698e50 100644 --- a/libraries/tree-pattern/package.json +++ b/libraries/tree-pattern/package.json @@ -16,12 +16,12 @@ "_phase:test": "heft test --no-build" }, "devDependencies": { - "@rushstack/eslint-config": "3.1.0", - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/eslint-config": "3.3.0", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@types/heft-jest": "1.0.1", "@types/node": "14.18.36", "eslint": "~7.30.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" } } diff --git a/libraries/ts-command-line/CHANGELOG.json b/libraries/ts-command-line/CHANGELOG.json index 8da63df282b..e29999345a0 100644 --- a/libraries/ts-command-line/CHANGELOG.json +++ b/libraries/ts-command-line/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@rushstack/ts-command-line", "entries": [ + { + "version": "4.13.3", + "tag": "@rushstack/ts-command-line_v4.13.3", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + } + ] + } + }, { "version": "4.13.2", "tag": "@rushstack/ts-command-line_v4.13.2", diff --git a/libraries/ts-command-line/CHANGELOG.md b/libraries/ts-command-line/CHANGELOG.md index fefe71144dd..d2bdf8ba6c1 100644 --- a/libraries/ts-command-line/CHANGELOG.md +++ b/libraries/ts-command-line/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @rushstack/ts-command-line -This log was last generated on Fri, 10 Feb 2023 01:18:50 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 4.13.3 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ ## 4.13.2 Fri, 10 Feb 2023 01:18:50 GMT diff --git a/libraries/ts-command-line/package.json b/libraries/ts-command-line/package.json index 7ae6b0a3b99..d04e37ea946 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.13.2", + "version": "4.13.3", "description": "An object-oriented command-line parser for TypeScript", "repository": { "type": "git", @@ -23,8 +23,8 @@ }, "devDependencies": { "@rushstack/eslint-config": "workspace:*", - "@rushstack/heft": "0.50.0", - "@rushstack/heft-node-rig": "1.12.6", + "@rushstack/heft": "0.50.6", + "@rushstack/heft-node-rig": "1.13.0", "@types/heft-jest": "1.0.1", "@types/node": "14.18.36" } diff --git a/libraries/typings-generator/CHANGELOG.json b/libraries/typings-generator/CHANGELOG.json index 5b8bc9830cf..ae5ec542357 100644 --- a/libraries/typings-generator/CHANGELOG.json +++ b/libraries/typings-generator/CHANGELOG.json @@ -1,6 +1,96 @@ { "name": "@rushstack/typings-generator", "entries": [ + { + "version": "0.10.10", + "tag": "@rushstack/typings-generator_v0.10.10", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.10.9", + "tag": "@rushstack/typings-generator_v0.10.9", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.10.8", + "tag": "@rushstack/typings-generator_v0.10.8", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.10.7", + "tag": "@rushstack/typings-generator_v0.10.7", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.10.6", + "tag": "@rushstack/typings-generator_v0.10.6", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.10.5", "tag": "@rushstack/typings-generator_v0.10.5", diff --git a/libraries/typings-generator/CHANGELOG.md b/libraries/typings-generator/CHANGELOG.md index a25b0f89a53..ed6b6ae3caf 100644 --- a/libraries/typings-generator/CHANGELOG.md +++ b/libraries/typings-generator/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/typings-generator -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.10.10 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.10.9 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.10.8 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.10.7 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 0.10.6 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.10.5 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/libraries/typings-generator/package.json b/libraries/typings-generator/package.json index 18569617b94..7a6a67b4415 100644 --- a/libraries/typings-generator/package.json +++ b/libraries/typings-generator/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/typings-generator", - "version": "0.10.5", + "version": "0.10.10", "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 e79ed10a4d2..4e7fa710ff2 100644 --- a/libraries/worker-pool/CHANGELOG.json +++ b/libraries/worker-pool/CHANGELOG.json @@ -1,6 +1,84 @@ { "name": "@rushstack/worker-pool", "entries": [ + { + "version": "0.3.10", + "tag": "@rushstack/worker-pool_v0.3.10", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.3.9", + "tag": "@rushstack/worker-pool_v0.3.9", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.3.8", + "tag": "@rushstack/worker-pool_v0.3.8", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.3.7", + "tag": "@rushstack/worker-pool_v0.3.7", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.3.6", + "tag": "@rushstack/worker-pool_v0.3.6", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.3.5", "tag": "@rushstack/worker-pool_v0.3.5", diff --git a/libraries/worker-pool/CHANGELOG.md b/libraries/worker-pool/CHANGELOG.md index 1e8e0ab7ce3..42683e35d67 100644 --- a/libraries/worker-pool/CHANGELOG.md +++ b/libraries/worker-pool/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/worker-pool -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.3.10 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.3.9 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.3.8 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.3.7 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 0.3.6 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.3.5 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/libraries/worker-pool/package.json b/libraries/worker-pool/package.json index 6ff4e124eb0..e3e68f1b73d 100644 --- a/libraries/worker-pool/package.json +++ b/libraries/worker-pool/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/worker-pool", - "version": "0.3.5", + "version": "0.3.10", "description": "Lightweight worker pool using NodeJS worker_threads", "main": "lib/index.js", "typings": "dist/worker-pool.d.ts", diff --git a/rigs/heft-node-rig/CHANGELOG.json b/rigs/heft-node-rig/CHANGELOG.json index 7640f43d055..5a890027bae 100644 --- a/rigs/heft-node-rig/CHANGELOG.json +++ b/rigs/heft-node-rig/CHANGELOG.json @@ -2,82 +2,111 @@ "name": "@rushstack/heft-node-rig", "entries": [ { - "version": "1.13.0-rc.5", - "tag": "@rushstack/heft-node-rig_v1.13.0-rc.5", - "date": "Thu, 27 Apr 2023 17:25:52 GMT", + "version": "1.13.0", + "tag": "@rushstack/heft-node-rig_v1.13.0", + "date": "Mon, 22 May 2023 06:34:32 GMT", "comments": { "minor": [ { - "comment": "Update with latest main." + "comment": "Upgrade TypeScript to ~5.0.4" } - ] - } - }, - { - "version": "1.13.0-rc.4", - "tag": "@rushstack/heft-node-rig_v1.13.0-rc.4", - "date": "Wed, 15 Mar 2023 20:22:44 GMT", - "comments": { - "minor": [ + ], + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.35.0`" + }, { - "comment": "Fix an issue with `watchGlobAsync`" + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.5.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.5` to `^0.50.6`" } ] } }, { - "version": "1.13.0-rc.3", - "tag": "@rushstack/heft-node-rig_v1.13.0-rc.3", - "date": "Fri, 20 Jan 2023 20:13:16 GMT", + "version": "1.12.11", + "tag": "@rushstack/heft-node-rig_v1.12.11", + "date": "Fri, 12 May 2023 00:23:05 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.9`" + }, { - "comment": "Fix issues with SASS incremental builds." + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.5.11`" }, { - "comment": "Add support for TypeScript solution incremental builds." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" }, { - "comment": "Improve responsiveness of watcher loop." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.4` to `^0.50.5`" } ] } }, { - "version": "1.12.0-rc.2", - "tag": "@rushstack/heft-node-rig_v1.12.0-rc.2", - "date": "Fri, 2 Dec 2022 05:28:24 GMT", + "version": "1.12.10", + "tag": "@rushstack/heft-node-rig_v1.12.10", + "date": "Thu, 04 May 2023 00:20:28 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Improve watch mode performance." + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.8`" }, { - "comment": "Improve logging output." + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.5.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.3` to `^0.50.4`" } ] } }, { - "version": "1.12.0-rc.1", - "tag": "@rushstack/heft-node-rig_v1.12.0-rc.1", - "date": "Fri, 18 Nov 2022 02:34:26 GMT", + "version": "1.12.9", + "tag": "@rushstack/heft-node-rig_v1.12.9", + "date": "Mon, 01 May 2023 15:23:19 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.5.9`" + }, { - "comment": "Fix incremental TypeScript compilation." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.2` to `^0.50.3`" } ] } }, { - "version": "1.12.0-rc.0", - "tag": "@rushstack/heft-node-rig_v1.12.0-rc.0", - "date": "Tue, 15 Nov 2022 22:59:35 GMT", + "version": "1.12.8", + "tag": "@rushstack/heft-node-rig_v1.12.8", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.5.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, { - "comment": "General fixes and improvements, in preparation for a general release." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.1` to `^0.50.2`" } ] } diff --git a/rigs/heft-node-rig/CHANGELOG.md b/rigs/heft-node-rig/CHANGELOG.md index e8f04a051fe..1eafd14250f 100644 --- a/rigs/heft-node-rig/CHANGELOG.md +++ b/rigs/heft-node-rig/CHANGELOG.md @@ -1,51 +1,33 @@ # Change Log - @rushstack/heft-node-rig -This log was last generated on Thu, 27 Apr 2023 17:25:53 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:32 GMT and should not be manually modified. -## 1.13.0-rc.5 -Thu, 27 Apr 2023 17:25:52 GMT +## 1.13.0 +Mon, 22 May 2023 06:34:32 GMT -### Prerelease Changes - -- Update with latest main. - -## 1.13.0-rc.4 -Wed, 15 Mar 2023 20:22:44 GMT - -### Prerelease Changes - -- Fix an issue with `watchGlobAsync` - -## 1.13.0-rc.3 -Fri, 20 Jan 2023 20:13:16 GMT - -### Prerelease Changes - -- Fix issues with SASS incremental builds. -- Add support for TypeScript solution incremental builds. -- Improve responsiveness of watcher loop. +### Minor changes -## 1.12.0-rc.2 -Fri, 2 Dec 2022 05:28:24 GMT +- Upgrade TypeScript to ~5.0.4 -### Prerelease Changes +## 1.12.11 +Fri, 12 May 2023 00:23:05 GMT -- Improve watch mode performance. -- Improve logging output. +_Version update only_ -## 1.12.0-rc.1 -Fri, 18 Nov 2022 02:34:26 GMT +## 1.12.10 +Thu, 04 May 2023 00:20:28 GMT -### Prerelease Changes +_Version update only_ -- Fix incremental TypeScript compilation. +## 1.12.9 +Mon, 01 May 2023 15:23:19 GMT -## 1.12.0-rc.0 -Tue, 15 Nov 2022 22:59:35 GMT +_Version update only_ -### Prerelease Changes +## 1.12.8 +Sat, 29 Apr 2023 00:23:02 GMT -- General fixes and improvements, in preparation for a general release. +_Version update only_ ## 1.12.7 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/rigs/heft-node-rig/package.json b/rigs/heft-node-rig/package.json index 7857e2e2283..396f316fd8e 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": "1.13.0-rc.5", + "version": "1.13.0", "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.51.0-rc.5" + "@rushstack/heft": "^0.50.6" }, "dependencies": { "@microsoft/api-extractor": "workspace:*", @@ -24,7 +24,7 @@ "@types/heft-jest": "1.0.1", "eslint": "~8.7.0", "jest-environment-node": "~29.5.0", - "typescript": "~4.8.4" + "typescript": "~5.0.4" }, "devDependencies": { "@rushstack/heft": "workspace:*" diff --git a/rigs/heft-web-rig/CHANGELOG.json b/rigs/heft-web-rig/CHANGELOG.json index 339474a1f9e..1b67b3e1e0e 100644 --- a/rigs/heft-web-rig/CHANGELOG.json +++ b/rigs/heft-web-rig/CHANGELOG.json @@ -2,82 +2,153 @@ "name": "@rushstack/heft-web-rig", "entries": [ { - "version": "0.15.0-rc.5", - "tag": "@rushstack/heft-web-rig_v0.15.0-rc.5", - "date": "Thu, 27 Apr 2023 17:25:52 GMT", + "version": "0.15.0", + "tag": "@rushstack/heft-web-rig_v0.15.0", + "date": "Mon, 22 May 2023 06:34:33 GMT", "comments": { "minor": [ { - "comment": "Update with latest main." + "comment": "Upgrade TypeScript to ~5.0.4" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.35.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.5.12`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.9.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.5` to `^0.50.6`" } ] } }, { - "version": "0.15.0-rc.4", - "tag": "@rushstack/heft-web-rig_v0.15.0-rc.4", - "date": "Wed, 15 Mar 2023 20:22:44 GMT", + "version": "0.14.17", + "tag": "@rushstack/heft-web-rig_v0.14.17", + "date": "Fri, 12 May 2023 00:23:05 GMT", "comments": { - "minor": [ + "dependency": [ { - "comment": "Fix an issue with `watchGlobAsync`" + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.5.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.9.1`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.4` to `^0.50.5`" } ] } }, { - "version": "0.15.0-rc.3", - "tag": "@rushstack/heft-web-rig_v0.15.0-rc.3", - "date": "Fri, 20 Jan 2023 20:13:16 GMT", + "version": "0.14.16", + "tag": "@rushstack/heft-web-rig_v0.14.16", + "date": "Thu, 11 May 2023 00:17:21 GMT", "comments": { - "minor": [ - { - "comment": "Fix issues with SASS incremental builds." - }, - { - "comment": "Add support for TypeScript solution incremental builds." - }, + "dependency": [ { - "comment": "Improve responsiveness of watcher loop." + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.9.0`" } ] } }, { - "version": "0.14.0-rc.2", - "tag": "@rushstack/heft-web-rig_v0.14.0-rc.2", - "date": "Fri, 2 Dec 2022 05:28:24 GMT", + "version": "0.14.15", + "tag": "@rushstack/heft-web-rig_v0.14.15", + "date": "Thu, 04 May 2023 00:20:28 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.5.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.8.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.9`" + }, { - "comment": "Improve watch mode performance." + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" }, { - "comment": "Improve logging output." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.3` to `^0.50.4`" } ] } }, { - "version": "0.14.0-rc.1", - "tag": "@rushstack/heft-web-rig_v0.14.0-rc.1", - "date": "Fri, 18 Nov 2022 02:34:26 GMT", + "version": "0.14.14", + "tag": "@rushstack/heft-web-rig_v0.14.14", + "date": "Mon, 01 May 2023 15:23:19 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.5.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.8.8`" + }, { - "comment": "Fix incremental TypeScript compilation." + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.2` to `^0.50.3`" } ] } }, { - "version": "0.14.0-rc.0", - "tag": "@rushstack/heft-web-rig_v0.14.0-rc.0", - "date": "Tue, 15 Nov 2022 22:59:35 GMT", + "version": "0.14.13", + "tag": "@rushstack/heft-web-rig_v0.14.13", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", "comments": { - "minor": [ + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/api-extractor\" to `7.34.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-jest-plugin\" to `0.5.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-sass-plugin\" to `0.8.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, { - "comment": "General fixes and improvements, in preparation for a general release." + "comment": "Updating dependency \"@rushstack/heft\" from `^0.50.1` to `^0.50.2`" } ] } diff --git a/rigs/heft-web-rig/CHANGELOG.md b/rigs/heft-web-rig/CHANGELOG.md index c60394a552a..f80a5947466 100644 --- a/rigs/heft-web-rig/CHANGELOG.md +++ b/rigs/heft-web-rig/CHANGELOG.md @@ -1,51 +1,38 @@ # Change Log - @rushstack/heft-web-rig -This log was last generated on Thu, 27 Apr 2023 17:25:53 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. -## 0.15.0-rc.5 -Thu, 27 Apr 2023 17:25:52 GMT +## 0.15.0 +Mon, 22 May 2023 06:34:33 GMT -### Prerelease Changes - -- Update with latest main. - -## 0.15.0-rc.4 -Wed, 15 Mar 2023 20:22:44 GMT - -### Prerelease Changes - -- Fix an issue with `watchGlobAsync` - -## 0.15.0-rc.3 -Fri, 20 Jan 2023 20:13:16 GMT +### Minor changes -### Prerelease Changes +- Upgrade TypeScript to ~5.0.4 -- Fix issues with SASS incremental builds. -- Add support for TypeScript solution incremental builds. -- Improve responsiveness of watcher loop. +## 0.14.17 +Fri, 12 May 2023 00:23:05 GMT -## 0.14.0-rc.2 -Fri, 2 Dec 2022 05:28:24 GMT +_Version update only_ -### Prerelease Changes +## 0.14.16 +Thu, 11 May 2023 00:17:21 GMT -- Improve watch mode performance. -- Improve logging output. +_Version update only_ -## 0.14.0-rc.1 -Fri, 18 Nov 2022 02:34:26 GMT +## 0.14.15 +Thu, 04 May 2023 00:20:28 GMT -### Prerelease Changes +_Version update only_ -- Fix incremental TypeScript compilation. +## 0.14.14 +Mon, 01 May 2023 15:23:19 GMT -## 0.14.0-rc.0 -Tue, 15 Nov 2022 22:59:35 GMT +_Version update only_ -### Prerelease Changes +## 0.14.13 +Sat, 29 Apr 2023 00:23:03 GMT -- General fixes and improvements, in preparation for a general release. +_Version update only_ ## 0.14.12 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/rigs/heft-web-rig/package.json b/rigs/heft-web-rig/package.json index 41aaf96db9c..fc2171d7bb2 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.15.0-rc.5", + "version": "0.15.0", "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.51.0-rc.5" + "@rushstack/heft": "^0.50.6" }, "dependencies": { "@microsoft/api-extractor": "workspace:*", @@ -38,7 +38,7 @@ "source-map-loader": "~3.0.1", "style-loader": "~3.3.1", "terser-webpack-plugin": "~5.3.1", - "typescript": "~4.8.4", + "typescript": "~5.0.4", "url-loader": "~4.1.1", "webpack-bundle-analyzer": "~4.5.0", "webpack-merge": "~5.8.0", 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 2c9f2d53f11..1a121df02ea 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.97.1", + "version": "5.98.0", "description": "Rush plugin for Amazon S3 cloud build cache", "repository": { "type": "git", diff --git a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/RushAmazonS3BuildCachePlugin.ts b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/RushAmazonS3BuildCachePlugin.ts index d90e5dc88dc..dc67e12a55e 100644 --- a/rush-plugins/rush-amazon-s3-build-cache-plugin/src/RushAmazonS3BuildCachePlugin.ts +++ b/rush-plugins/rush-amazon-s3-build-cache-plugin/src/RushAmazonS3BuildCachePlugin.ts @@ -1,19 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { Import } from '@rushstack/node-core-library'; import type { IRushPlugin, RushSession, RushConfiguration } from '@rushstack/rush-sdk'; import type { - AmazonS3BuildCacheProvider, IAmazonS3BuildCacheProviderOptionsAdvanced, IAmazonS3BuildCacheProviderOptionsSimple } from './AmazonS3BuildCacheProvider'; -const AmazonS3BuildCacheProviderModule: typeof import('./AmazonS3BuildCacheProvider') = Import.lazy( - './AmazonS3BuildCacheProvider', - require -); - const PLUGIN_NAME: string = 'AmazonS3BuildCachePlugin'; /** @@ -54,54 +47,53 @@ export class RushAmazonS3BuildCachePlugin implements IRushPlugin { public apply(rushSession: RushSession, rushConfig: RushConfiguration): void { rushSession.hooks.initialize.tap(PLUGIN_NAME, () => { - rushSession.registerCloudBuildCacheProviderFactory( - 'amazon-s3', - (buildCacheConfig): AmazonS3BuildCacheProvider => { - type IBuildCache = typeof buildCacheConfig & { - amazonS3Configuration: IAmazonS3ConfigurationJson; - }; - const { amazonS3Configuration } = buildCacheConfig as IBuildCache; - let options: - | IAmazonS3BuildCacheProviderOptionsAdvanced - | IAmazonS3BuildCacheProviderOptionsSimple - | undefined; - const { s3Endpoint, s3Bucket, s3Region } = amazonS3Configuration; - const s3Prefix: undefined | string = amazonS3Configuration.s3Prefix || undefined; - const isCacheWriteAllowed: boolean = !!amazonS3Configuration.isCacheWriteAllowed; + rushSession.registerCloudBuildCacheProviderFactory('amazon-s3', async (buildCacheConfig) => { + type IBuildCache = typeof buildCacheConfig & { + amazonS3Configuration: IAmazonS3ConfigurationJson; + }; + const { amazonS3Configuration } = buildCacheConfig as IBuildCache; + let options: + | IAmazonS3BuildCacheProviderOptionsAdvanced + | IAmazonS3BuildCacheProviderOptionsSimple + | undefined; + const { s3Endpoint, s3Bucket, s3Region } = amazonS3Configuration; + const s3Prefix: undefined | string = amazonS3Configuration.s3Prefix || undefined; + const isCacheWriteAllowed: boolean = !!amazonS3Configuration.isCacheWriteAllowed; - if (s3Prefix && s3Prefix[0] === '/') { - throw new Error('s3Prefix should not have a leading /'); - } + if (s3Prefix && s3Prefix[0] === '/') { + throw new Error('s3Prefix should not have a leading /'); + } - // mutually exclusive - if (s3Bucket && s3Endpoint) { - throw new Error('Only one of "s3Bucket" or "s3Endpoint" must be provided.'); - } + // mutually exclusive + if (s3Bucket && s3Endpoint) { + throw new Error('Only one of "s3Bucket" or "s3Endpoint" must be provided.'); + } - if (s3Endpoint) { - options = { - // IAmazonS3BuildCacheProviderOptionsAdvanced - s3Region, - s3Endpoint, - s3Prefix, - isCacheWriteAllowed - }; - } - if (s3Bucket) { - options = { - // IAmazonS3BuildCacheProviderOptionsSimple - s3Region, - s3Bucket, - s3Prefix, - isCacheWriteAllowed - }; - } - if (!options) { - throw new Error('You must provide either an s3Endpoint or s3Bucket'); - } - return new AmazonS3BuildCacheProviderModule.AmazonS3BuildCacheProvider(options, rushSession); + if (s3Endpoint) { + options = { + // IAmazonS3BuildCacheProviderOptionsAdvanced + s3Region, + s3Endpoint, + s3Prefix, + isCacheWriteAllowed + }; } - ); + if (s3Bucket) { + options = { + // IAmazonS3BuildCacheProviderOptionsSimple + s3Region, + s3Bucket, + s3Prefix, + isCacheWriteAllowed + }; + } + if (!options) { + throw new Error('You must provide either an s3Endpoint or s3Bucket'); + } + + const { AmazonS3BuildCacheProvider } = await import('./AmazonS3BuildCacheProvider'); + return new AmazonS3BuildCacheProvider(options, rushSession); + }); }); } } 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 abb5493217d..9dbb5b5bccd 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.97.1", + "version": "5.98.0", "description": "Rush plugin for Azure storage cloud build cache", "repository": { "type": "git", 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 7442408ab31..975a95553ed 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 @@ -1,15 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import { Import } from '@rushstack/node-core-library'; import type { IRushPlugin, RushSession, RushConfiguration } from '@rushstack/rush-sdk'; import type { AzureEnvironmentName } from './AzureAuthenticationBase'; -const AzureStorageBuildCacheProviderModule: typeof import('./AzureStorageBuildCacheProvider') = Import.lazy( - './AzureStorageBuildCacheProvider', - require -); - const PLUGIN_NAME: string = 'AzureStorageBuildCachePlugin'; /** @@ -50,12 +44,13 @@ export class RushAzureStorageBuildCachePlugin implements IRushPlugin { public apply(rushSession: RushSession, rushConfig: RushConfiguration): void { rushSession.hooks.initialize.tap(PLUGIN_NAME, () => { - rushSession.registerCloudBuildCacheProviderFactory('azure-blob-storage', (buildCacheConfig) => { + rushSession.registerCloudBuildCacheProviderFactory('azure-blob-storage', async (buildCacheConfig) => { type IBuildCache = typeof buildCacheConfig & { azureBlobStorageConfiguration: IAzureBlobStorageConfigurationJson; }; const { azureBlobStorageConfiguration } = buildCacheConfig as IBuildCache; - return new AzureStorageBuildCacheProviderModule.AzureStorageBuildCacheProvider({ + const { AzureStorageBuildCacheProvider } = await import('./AzureStorageBuildCacheProvider'); + return new AzureStorageBuildCacheProvider({ storageAccountName: azureBlobStorageConfiguration.storageAccountName, storageContainerName: azureBlobStorageConfiguration.storageContainerName, azureEnvironment: azureBlobStorageConfiguration.azureEnvironment, diff --git a/rush-plugins/rush-http-build-cache-plugin/package.json b/rush-plugins/rush-http-build-cache-plugin/package.json index 8b16e65763a..72d06304ada 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.97.1", + "version": "5.98.0", "description": "Rush plugin for generic HTTP cloud build cache", "repository": { "type": "git", diff --git a/rush-plugins/rush-http-build-cache-plugin/src/HttpBuildCacheProvider.test.ts b/rush-plugins/rush-http-build-cache-plugin/src/HttpBuildCacheProvider.test.ts deleted file mode 100644 index e5ec316a00a..00000000000 --- a/rush-plugins/rush-http-build-cache-plugin/src/HttpBuildCacheProvider.test.ts +++ /dev/null @@ -1,58 +0,0 @@ -jest.mock('node-fetch', function () { - return Object.assign(jest.fn(), jest.requireActual('node-fetch')); -}); - -import fetch, { Response } from 'node-fetch'; -import { HttpBuildCacheProvider } from './HttpBuildCacheProvider'; -import { RushSession, EnvironmentConfiguration } from '@rushstack/rush-sdk'; -import { StringBufferTerminalProvider, Terminal } from '@rushstack/node-core-library'; - -const EXAMPLE_OPTIONS = { - url: 'https://buildcache.example.acme.com', - tokenHandler: { - exec: 'node', - args: ['tokenHandler.js'] - }, - uploadMethod: 'POST', - isCacheWriteAllowed: false, - pluginName: 'example-plugin', - rushProjectRoot: '/repo' -}; - -describe('HttpBuildCacheProvider', () => { - let terminalBuffer: StringBufferTerminalProvider; - let terminal!: Terminal; - - beforeEach(() => { - terminalBuffer = new StringBufferTerminalProvider(); - terminal = new Terminal(terminalBuffer); - }); - - describe('tryGetCacheEntryBufferByIdAsync', () => { - it('prints warning if read credentials are not available', async () => { - jest.spyOn(EnvironmentConfiguration, 'buildCacheCredential', 'get').mockReturnValue(undefined); - - const session: RushSession = {} as RushSession; - const provider = new HttpBuildCacheProvider(EXAMPLE_OPTIONS, session); - - mocked(fetch).mockResolvedValue( - new Response('Unauthorized', { - status: 401, - statusText: 'Unauthorized' - }) - ); - - const result = await provider.tryGetCacheEntryBufferByIdAsync(terminal, 'some-key'); - expect(result).toBe(undefined); - expect(fetch).toHaveBeenCalledWith('https://buildcache.example.acme.com/some-key', { - body: undefined, - headers: {}, - 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]"` - ); - }); - }); -}); 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 cb77033abae..76e7d1b2bc4 100644 --- a/rush-plugins/rush-http-build-cache-plugin/src/HttpBuildCacheProvider.ts +++ b/rush-plugins/rush-http-build-cache-plugin/src/HttpBuildCacheProvider.ts @@ -1,4 +1,4 @@ -import { ITerminal, Executable } from '@rushstack/node-core-library'; +import { ITerminal, Executable, Async } from '@rushstack/node-core-library'; import { ICloudBuildCacheProvider, ICredentialCacheEntry, @@ -34,6 +34,7 @@ export interface IHttpBuildCacheProviderOptions { url: string; tokenHandler?: IHttpBuildCacheTokenHandler; uploadMethod?: string; + minHttpRetryDelayMs?: number; headers?: Record; cacheKeyPrefix?: string; isCacheWriteAllowed: boolean; @@ -41,6 +42,9 @@ export interface IHttpBuildCacheProviderOptions { rushProjectRoot: string; } +const MAX_HTTP_CACHE_ATTEMPTS: number = 3; +const DEFAULT_MIN_HTTP_RETRY_DELAY_MS = 2500; + export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { private readonly _pluginName: string; private readonly _rushSession: RushSession; @@ -52,6 +56,7 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { private readonly _headers: Record; private readonly _cacheKeyPrefix: string; private readonly _tokenHandler: IHttpBuildCacheTokenHandler | undefined; + private readonly _minHttpRetryDelayMs: number; private __credentialCacheId: string | undefined; public get isCacheWriteAllowed(): boolean { @@ -70,6 +75,7 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { this._headers = options.headers ?? {}; this._tokenHandler = options.tokenHandler; this._cacheKeyPrefix = options.cacheKeyPrefix ?? ''; + this._minHttpRetryDelayMs = options.minHttpRetryDelayMs ?? DEFAULT_MIN_HTTP_RETRY_DELAY_MS; } public async tryGetCacheEntryBufferByIdAsync( @@ -83,7 +89,8 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { method: 'GET', body: undefined, warningText: 'Could not get cache entry', - readBody: true + readBody: true, + maxAttempts: MAX_HTTP_CACHE_ATTEMPTS }); return Buffer.isBuffer(result) ? result : undefined; @@ -112,7 +119,8 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { method: this._uploadMethod, body: objectBuffer, warningText: 'Could not write cache entry', - readBody: false + readBody: false, + maxAttempts: MAX_HTTP_CACHE_ATTEMPTS }); return result !== false; @@ -197,6 +205,7 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { body: BodyInit | undefined; warningText: string; readBody: boolean; + maxAttempts: number; credentialOptions?: CredentialsOptions; }): Promise { const { terminal, relUrl, method, body, warningText, readBody, credentialOptions } = options; @@ -227,13 +236,33 @@ export class HttpBuildCacheProvider implements ICloudBuildCacheProvider { }); if (!response.ok) { - if (typeof credentials !== 'string' && safeCredentialOptions === CredentialsOptions.Optional) { - // We tried fetching the resource without credentials and that did not work out - // Try again but require credentials this time - // This will trigger the provider to request credentials + const isNonCredentialResponse = response.status >= 500 && response.status < 600; + + if ( + !isNonCredentialResponse && + typeof credentials !== 'string' && + safeCredentialOptions === CredentialsOptions.Optional + ) { + // If we don't already have credentials yet, and we got a response from the server + // that is a "normal" failure (4xx), then we assume that credentials are probably + // required. Re-attempt the request, requiring credentials this time. + // + // This counts as part of the "first attempt", so it is not included in the max attempts return await this._http({ ...options, credentialOptions: CredentialsOptions.Required }); } + if (options.maxAttempts > 1) { + // Pause a bit before retrying in case the server is busy + // Add some random jitter to the retry so we can spread out load on the remote service + // A proper solution might add exponential back off in case the retry count is high (10 or more) + const factor = 1.0 + Math.random(); // A random number between 1.0 and 2.0 + const retryDelay = Math.floor(factor * this._minHttpRetryDelayMs); + + await Async.sleep(retryDelay); + + return await this._http({ ...options, maxAttempts: options.maxAttempts - 1 }); + } + this._reportFailure(terminal, method, response, false, warningText); return false; } 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 00dda437c4c..fe09c250cc8 100644 --- a/rush-plugins/rush-http-build-cache-plugin/src/RushHttpBuildCachePlugin.ts +++ b/rush-plugins/rush-http-build-cache-plugin/src/RushHttpBuildCachePlugin.ts @@ -1,12 +1,9 @@ -import { Import } from '@rushstack/node-core-library'; +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. + import type { IRushPlugin, RushSession, RushConfiguration } from '@rushstack/rush-sdk'; import type { HttpBuildCacheProvider, IHttpBuildCacheProviderOptions } from './HttpBuildCacheProvider'; -const HttpBuildCacheProviderModule: typeof import('./HttpBuildCacheProvider') = Import.lazy( - './HttpBuildCacheProvider', - require -); - const PLUGIN_NAME: string = 'HttpBuildCachePlugin'; /** @@ -56,31 +53,29 @@ export class RushHttpBuildCachePlugin implements IRushPlugin { public apply(rushSession: RushSession, rushConfig: RushConfiguration): void { rushSession.hooks.initialize.tap(this.pluginName, () => { - rushSession.registerCloudBuildCacheProviderFactory( - 'http', - (buildCacheConfig): HttpBuildCacheProvider => { - const config: IRushHttpBuildCachePluginConfig = ( - buildCacheConfig as typeof buildCacheConfig & { - httpConfiguration: IRushHttpBuildCachePluginConfig; - } - ).httpConfiguration; + rushSession.registerCloudBuildCacheProviderFactory('http', async (buildCacheConfig) => { + const config: IRushHttpBuildCachePluginConfig = ( + buildCacheConfig as typeof buildCacheConfig & { + httpConfiguration: IRushHttpBuildCachePluginConfig; + } + ).httpConfiguration; - const { url, uploadMethod, headers, tokenHandler, cacheKeyPrefix, isCacheWriteAllowed } = config; + const { url, uploadMethod, headers, tokenHandler, cacheKeyPrefix, isCacheWriteAllowed } = config; - const options: IHttpBuildCacheProviderOptions = { - pluginName: this.pluginName, - rushProjectRoot: rushConfig.rushJsonFolder, - url: url, - uploadMethod: uploadMethod, - headers: headers, - tokenHandler: tokenHandler, - cacheKeyPrefix: cacheKeyPrefix, - isCacheWriteAllowed: !!isCacheWriteAllowed - }; + const options: IHttpBuildCacheProviderOptions = { + pluginName: this.pluginName, + rushProjectRoot: rushConfig.rushJsonFolder, + url: url, + uploadMethod: uploadMethod, + headers: headers, + tokenHandler: tokenHandler, + cacheKeyPrefix: cacheKeyPrefix, + isCacheWriteAllowed: !!isCacheWriteAllowed + }; - return new HttpBuildCacheProviderModule.HttpBuildCacheProvider(options, rushSession); - } - ); + const { HttpBuildCacheProvider } = await import('./HttpBuildCacheProvider'); + return new HttpBuildCacheProvider(options, rushSession); + }); }); } } 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 new file mode 100644 index 00000000000..ac66338de06 --- /dev/null +++ b/rush-plugins/rush-http-build-cache-plugin/src/test/HttpBuildCacheProvider.test.ts @@ -0,0 +1,115 @@ +// 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')); +}); + +import fetch, { Response } from 'node-fetch'; +import { RushSession, EnvironmentConfiguration } from '@rushstack/rush-sdk'; +import { StringBufferTerminalProvider, Terminal } from '@rushstack/node-core-library'; + +import { HttpBuildCacheProvider } from '../HttpBuildCacheProvider'; + +const EXAMPLE_OPTIONS = { + url: 'https://buildcache.example.acme.com', + tokenHandler: { + exec: 'node', + args: ['tokenHandler.js'] + }, + uploadMethod: 'POST', + isCacheWriteAllowed: false, + pluginName: 'example-plugin', + rushProjectRoot: '/repo', + minHttpRetryDelayMs: 1 +}; + +describe('HttpBuildCacheProvider', () => { + let terminalBuffer: StringBufferTerminalProvider; + let terminal!: Terminal; + + beforeEach(() => { + terminalBuffer = new StringBufferTerminalProvider(); + terminal = new Terminal(terminalBuffer); + }); + + describe('tryGetCacheEntryBufferByIdAsync', () => { + it('prints warning if read credentials are not available', async () => { + jest.spyOn(EnvironmentConfiguration, 'buildCacheCredential', 'get').mockReturnValue(undefined); + + const session: RushSession = {} as RushSession; + const provider = new HttpBuildCacheProvider(EXAMPLE_OPTIONS, session); + + mocked(fetch).mockResolvedValue( + new Response('Unauthorized', { + status: 401, + statusText: 'Unauthorized' + }) + ); + + 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(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]"` + ); + }); + + it('attempts up to 3 times to download a cache entry', async () => { + jest.spyOn(EnvironmentConfiguration, 'buildCacheCredential', 'get').mockReturnValue(undefined); + + const session: RushSession = {} as RushSession; + const provider = new HttpBuildCacheProvider(EXAMPLE_OPTIONS, session); + + mocked(fetch).mockResolvedValueOnce( + new Response('InternalServiceError', { + status: 500, + statusText: 'InternalServiceError' + }) + ); + mocked(fetch).mockResolvedValueOnce( + new Response('ServiceUnavailable', { + status: 503, + statusText: 'ServiceUnavailable' + }) + ); + mocked(fetch).mockResolvedValueOnce( + new Response('BadGateway', { + status: 504, + statusText: 'BadGateway' + }) + ); + + 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-serve-plugin/package.json b/rush-plugins/rush-serve-plugin/package.json index edd22d33394..43c3426671f 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.97.1", + "version": "5.98.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.json b/rush.json index bf06626ac95..4bc484f6792 100644 --- a/rush.json +++ b/rush.json @@ -652,6 +652,12 @@ "reviewCategory": "tests", "shouldPublish": false }, + { + "packageName": "heft-jest-preset-test", + "projectFolder": "build-tests/heft-jest-preset-test", + "reviewCategory": "tests", + "shouldPublish": false + }, { "packageName": "heft-jest-reporters-test", "projectFolder": "build-tests/heft-jest-reporters-test", @@ -712,6 +718,24 @@ "reviewCategory": "tests", "shouldPublish": false }, + { + "packageName": "heft-typescript-v2-test", + "projectFolder": "build-tests/heft-typescript-v2-test", + "reviewCategory": "tests", + "shouldPublish": false + }, + { + "packageName": "heft-typescript-v3-test", + "projectFolder": "build-tests/heft-typescript-v3-test", + "reviewCategory": "tests", + "shouldPublish": false + }, + { + "packageName": "heft-typescript-v4-test", + "projectFolder": "build-tests/heft-typescript-v4-test", + "reviewCategory": "tests", + "shouldPublish": false + }, { "packageName": "heft-web-rig-library-test", "projectFolder": "build-tests/heft-web-rig-library-test", diff --git a/webpack/hashed-folder-copy-plugin/CHANGELOG.json b/webpack/hashed-folder-copy-plugin/CHANGELOG.json index 7aa0553a9c8..0d11be20470 100644 --- a/webpack/hashed-folder-copy-plugin/CHANGELOG.json +++ b/webpack/hashed-folder-copy-plugin/CHANGELOG.json @@ -1,6 +1,126 @@ { "name": "@rushstack/hashed-folder-copy-plugin", "entries": [ + { + "version": "0.2.16", + "tag": "@rushstack/hashed-folder-copy-plugin_v0.2.16", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.10`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.11`" + } + ] + } + }, + { + "version": "0.2.15", + "tag": "@rushstack/hashed-folder-copy-plugin_v0.2.15", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.10`" + } + ] + } + }, + { + "version": "0.2.14", + "tag": "@rushstack/hashed-folder-copy-plugin_v0.2.14", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.9`" + } + ] + } + }, + { + "version": "0.2.13", + "tag": "@rushstack/hashed-folder-copy-plugin_v0.2.13", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.8`" + } + ] + } + }, + { + "version": "0.2.12", + "tag": "@rushstack/hashed-folder-copy-plugin_v0.2.12", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.7`" + } + ] + } + }, { "version": "0.2.11", "tag": "@rushstack/hashed-folder-copy-plugin_v0.2.11", diff --git a/webpack/hashed-folder-copy-plugin/CHANGELOG.md b/webpack/hashed-folder-copy-plugin/CHANGELOG.md index cb93018b23a..e874f397d30 100644 --- a/webpack/hashed-folder-copy-plugin/CHANGELOG.md +++ b/webpack/hashed-folder-copy-plugin/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/hashed-folder-copy-plugin -This log was last generated on Thu, 27 Apr 2023 17:18:42 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.2.16 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.2.15 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.2.14 +Thu, 04 May 2023 00:20:28 GMT + +_Version update only_ + +## 0.2.13 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 0.2.12 +Sat, 29 Apr 2023 00:23:02 GMT + +_Version update only_ ## 0.2.11 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/webpack/hashed-folder-copy-plugin/package.json b/webpack/hashed-folder-copy-plugin/package.json index 968fac06421..c8b9a18b251 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": "0.2.11", + "version": "0.2.16", "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 2e0d22adb0b..66c0b0df83f 100644 --- a/webpack/loader-load-themed-styles/CHANGELOG.json +++ b/webpack/loader-load-themed-styles/CHANGELOG.json @@ -1,6 +1,129 @@ { "name": "@microsoft/loader-load-themed-styles", "entries": [ + { + "version": "2.0.40", + "tag": "@microsoft/loader-load-themed-styles_v2.0.40", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.42`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.41` to `^2.0.42`" + } + ] + } + }, + { + "version": "2.0.39", + "tag": "@microsoft/loader-load-themed-styles_v2.0.39", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.41`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.40` to `^2.0.41`" + } + ] + } + }, + { + "version": "2.0.38", + "tag": "@microsoft/loader-load-themed-styles_v2.0.38", + "date": "Thu, 11 May 2023 00:17:21 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.40`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.39` to `^2.0.40`" + } + ] + } + }, + { + "version": "2.0.37", + "tag": "@microsoft/loader-load-themed-styles_v2.0.37", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.39`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.38` to `^2.0.39`" + } + ] + } + }, + { + "version": "2.0.36", + "tag": "@microsoft/loader-load-themed-styles_v2.0.36", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.38`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.37` to `^2.0.38`" + } + ] + } + }, + { + "version": "2.0.35", + "tag": "@microsoft/loader-load-themed-styles_v2.0.35", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.37`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.36` to `^2.0.37`" + } + ] + } + }, { "version": "2.0.34", "tag": "@microsoft/loader-load-themed-styles_v2.0.34", diff --git a/webpack/loader-load-themed-styles/CHANGELOG.md b/webpack/loader-load-themed-styles/CHANGELOG.md index 586739b410f..9c8645957ae 100644 --- a/webpack/loader-load-themed-styles/CHANGELOG.md +++ b/webpack/loader-load-themed-styles/CHANGELOG.md @@ -1,6 +1,36 @@ # Change Log - @microsoft/loader-load-themed-styles -This log was last generated on Thu, 27 Apr 2023 17:18:42 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 2.0.40 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 2.0.39 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 2.0.38 +Thu, 11 May 2023 00:17:21 GMT + +_Version update only_ + +## 2.0.37 +Thu, 04 May 2023 00:20:28 GMT + +_Version update only_ + +## 2.0.36 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 2.0.35 +Sat, 29 Apr 2023 00:23:02 GMT + +_Version update only_ ## 2.0.34 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/webpack/loader-load-themed-styles/package.json b/webpack/loader-load-themed-styles/package.json index 527bc7e5e78..e36ad73ac9e 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.0.34", + "version": "2.0.40", "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.36" + "@microsoft/load-themed-styles": "^2.0.42" }, "dependencies": { "loader-utils": "1.4.2" diff --git a/webpack/loader-raw-script/CHANGELOG.json b/webpack/loader-raw-script/CHANGELOG.json index bb1b4776479..eb7d048fcce 100644 --- a/webpack/loader-raw-script/CHANGELOG.json +++ b/webpack/loader-raw-script/CHANGELOG.json @@ -1,6 +1,84 @@ { "name": "@rushstack/loader-raw-script", "entries": [ + { + "version": "1.3.289", + "tag": "@rushstack/loader-raw-script_v1.3.289", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "1.3.288", + "tag": "@rushstack/loader-raw-script_v1.3.288", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "1.3.287", + "tag": "@rushstack/loader-raw-script_v1.3.287", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "1.3.286", + "tag": "@rushstack/loader-raw-script_v1.3.286", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "1.3.285", + "tag": "@rushstack/loader-raw-script_v1.3.285", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "1.3.284", "tag": "@rushstack/loader-raw-script_v1.3.284", diff --git a/webpack/loader-raw-script/CHANGELOG.md b/webpack/loader-raw-script/CHANGELOG.md index 57a69987ac0..f32fec67943 100644 --- a/webpack/loader-raw-script/CHANGELOG.md +++ b/webpack/loader-raw-script/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/loader-raw-script -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 1.3.289 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 1.3.288 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 1.3.287 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 1.3.286 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 1.3.285 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 1.3.284 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/webpack/loader-raw-script/package.json b/webpack/loader-raw-script/package.json index 54807ba8cc9..b82dca8291b 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.3.284", + "version": "1.3.289", "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 a631446dfc2..46030cce3c4 100644 --- a/webpack/preserve-dynamic-require-plugin/CHANGELOG.json +++ b/webpack/preserve-dynamic-require-plugin/CHANGELOG.json @@ -1,6 +1,84 @@ { "name": "@rushstack/webpack-preserve-dynamic-require-plugin", "entries": [ + { + "version": "0.10.13", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.10.13", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.10.12", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.10.12", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.10.11", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.10.11", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.10.10", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.10.10", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.10.9", + "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.10.9", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.10.8", "tag": "@rushstack/webpack-preserve-dynamic-require-plugin_v0.10.8", diff --git a/webpack/preserve-dynamic-require-plugin/CHANGELOG.md b/webpack/preserve-dynamic-require-plugin/CHANGELOG.md index a48f6feec86..ea002789e50 100644 --- a/webpack/preserve-dynamic-require-plugin/CHANGELOG.md +++ b/webpack/preserve-dynamic-require-plugin/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/webpack-preserve-dynamic-require-plugin -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.10.13 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.10.12 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.10.11 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.10.10 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 0.10.9 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.10.8 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/webpack/preserve-dynamic-require-plugin/package.json b/webpack/preserve-dynamic-require-plugin/package.json index 8f7c7ff462a..1d06cad310b 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.10.8", + "version": "0.10.13", "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 563ea6a711e..6e5c4fa686d 100644 --- a/webpack/set-webpack-public-path-plugin/CHANGELOG.json +++ b/webpack/set-webpack-public-path-plugin/CHANGELOG.json @@ -1,6 +1,123 @@ { "name": "@rushstack/set-webpack-public-path-plugin", "entries": [ + { + "version": "3.3.105", + "tag": "@rushstack/set-webpack-public-path-plugin_v3.3.105", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.10`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.11`" + } + ] + } + }, + { + "version": "3.3.104", + "tag": "@rushstack/set-webpack-public-path-plugin_v3.3.104", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.10`" + } + ] + } + }, + { + "version": "3.3.103", + "tag": "@rushstack/set-webpack-public-path-plugin_v3.3.103", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.9`" + } + ] + } + }, + { + "version": "3.3.102", + "tag": "@rushstack/set-webpack-public-path-plugin_v3.3.102", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.8`" + } + ] + } + }, + { + "version": "3.3.101", + "tag": "@rushstack/set-webpack-public-path-plugin_v3.3.101", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-webpack5-plugin\" to `0.6.7`" + } + ] + } + }, { "version": "3.3.100", "tag": "@rushstack/set-webpack-public-path-plugin_v3.3.100", diff --git a/webpack/set-webpack-public-path-plugin/CHANGELOG.md b/webpack/set-webpack-public-path-plugin/CHANGELOG.md index 8550033b08a..7d90834b311 100644 --- a/webpack/set-webpack-public-path-plugin/CHANGELOG.md +++ b/webpack/set-webpack-public-path-plugin/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/set-webpack-public-path-plugin -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 3.3.105 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 3.3.104 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 3.3.103 +Thu, 04 May 2023 00:20:28 GMT + +_Version update only_ + +## 3.3.102 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 3.3.101 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 3.3.100 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/webpack/set-webpack-public-path-plugin/package.json b/webpack/set-webpack-public-path-plugin/package.json index aab6ebdf102..e6aae16e4a5 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": "3.3.100", + "version": "3.3.105", "description": "This plugin sets the webpack public path at runtime.", "main": "lib/index.js", "typings": "dist/set-webpack-public-path-plugin.d.ts", @@ -27,6 +27,7 @@ } }, "dependencies": { + "@rushstack/node-core-library": "workspace:*", "@rushstack/webpack-plugin-utilities": "workspace:*" }, "devDependencies": { diff --git a/webpack/set-webpack-public-path-plugin/src/SetPublicPathPlugin.ts b/webpack/set-webpack-public-path-plugin/src/SetPublicPathPlugin.ts index 392b17e8f1d..2bc2dd6bd24 100644 --- a/webpack/set-webpack-public-path-plugin/src/SetPublicPathPlugin.ts +++ b/webpack/set-webpack-public-path-plugin/src/SetPublicPathPlugin.ts @@ -3,6 +3,7 @@ import { EOL } from 'os'; import { VersionDetection } from '@rushstack/webpack-plugin-utilities'; +import { Text } from '@rushstack/node-core-library'; import type * as Webpack from 'webpack'; import type * as Tapable from 'tapable'; @@ -128,10 +129,6 @@ const ASSET_NAME_TOKEN: string = '-ASSET-NAME-c0ef4f86-b570-44d3-b210-4428c5b782 const ASSET_NAME_TOKEN_REGEX: RegExp = new RegExp(ASSET_NAME_TOKEN); -function escapeRegExp(str: string): string { - return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); -} - /** * This simple plugin sets the __webpack_public_path__ variable to a value specified in the arguments, * optionally appended to the SystemJs baseURL property. @@ -220,13 +217,13 @@ export class SetPublicPathPlugin implements Webpack.Plugin { 0, assetFilename.length - 4 /* '.map'.length */ ); - escapedAssetFilename = escapeRegExp(escapedAssetFilename); + escapedAssetFilename = Text.escapeRegExp(escapedAssetFilename); // source in sourcemaps is JSON-encoded escapedAssetFilename = JSON.stringify(escapedAssetFilename); // Trim the quotes from the JSON encoding escapedAssetFilename = escapedAssetFilename.substring(1, escapedAssetFilename.length - 1); } else { - escapedAssetFilename = escapeRegExp(assetFilename); + escapedAssetFilename = Text.escapeRegExp(assetFilename); } const asset: IAsset = compilation.assets[assetFilename]; @@ -277,7 +274,7 @@ export class SetPublicPathPlugin implements Webpack.Plugin { moduleOptions.regexName = this.options.scriptName.name; if (this.options.scriptName.isTokenized) { moduleOptions.regexName = moduleOptions.regexName - .replace(/\[name\]/g, escapeRegExp(options.chunk.name)) + .replace(/\[name\]/g, Text.escapeRegExp(options.chunk.name)) .replace(/\[hash\]/g, options.chunk.renderedHash || ''); } } else if (this.options.scriptName.useAssetName) { diff --git a/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.json b/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.json index ae825aa19d8..ecf298f30d4 100644 --- a/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.json +++ b/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.json @@ -1,6 +1,111 @@ { "name": "@rushstack/webpack-embedded-dependencies-plugin", "entries": [ + { + "version": "0.1.10", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.1.10", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.10`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.1.9", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.1.9", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.1.8", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.1.8", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.1.7", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.1.7", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.1.6", + "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.1.6", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/webpack-plugin-utilities\" to `0.2.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.1.5", "tag": "@rushstack/webpack-embedded-dependencies-plugin_v0.1.5", diff --git a/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.md b/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.md index b66df3aa1b6..043881c809f 100644 --- a/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.md +++ b/webpack/webpack-embedded-dependencies-plugin/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/webpack-embedded-dependencies-plugin -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.1.10 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.1.9 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.1.8 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.1.7 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 0.1.6 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.1.5 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/webpack/webpack-embedded-dependencies-plugin/package.json b/webpack/webpack-embedded-dependencies-plugin/package.json index ff2124b945e..1698e191eb8 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.1.5", + "version": "0.1.10", "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 920fe2e0e9b..53406b73ac7 100644 --- a/webpack/webpack-plugin-utilities/CHANGELOG.json +++ b/webpack/webpack-plugin-utilities/CHANGELOG.json @@ -1,6 +1,84 @@ { "name": "@rushstack/webpack-plugin-utilities", "entries": [ + { + "version": "0.2.10", + "tag": "@rushstack/webpack-plugin-utilities_v0.2.10", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.2.9", + "tag": "@rushstack/webpack-plugin-utilities_v0.2.9", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.2.8", + "tag": "@rushstack/webpack-plugin-utilities_v0.2.8", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.2.7", + "tag": "@rushstack/webpack-plugin-utilities_v0.2.7", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.2.6", + "tag": "@rushstack/webpack-plugin-utilities_v0.2.6", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.2.5", "tag": "@rushstack/webpack-plugin-utilities_v0.2.5", diff --git a/webpack/webpack-plugin-utilities/CHANGELOG.md b/webpack/webpack-plugin-utilities/CHANGELOG.md index 8fca74e80c0..0f25957aa22 100644 --- a/webpack/webpack-plugin-utilities/CHANGELOG.md +++ b/webpack/webpack-plugin-utilities/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/webpack-plugin-utilities -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.2.10 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.2.9 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.2.8 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.2.7 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 0.2.6 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.2.5 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/webpack/webpack-plugin-utilities/package.json b/webpack/webpack-plugin-utilities/package.json index 22be0292ce5..bc5735096d0 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.2.5", + "version": "0.2.10", "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/webpack4-localization-plugin/CHANGELOG.json b/webpack/webpack4-localization-plugin/CHANGELOG.json index 6ff24f9033d..b7550c12c15 100644 --- a/webpack/webpack4-localization-plugin/CHANGELOG.json +++ b/webpack/webpack4-localization-plugin/CHANGELOG.json @@ -1,6 +1,141 @@ { "name": "@rushstack/webpack4-localization-plugin", "entries": [ + { + "version": "0.17.16", + "tag": "@rushstack/webpack4-localization-plugin_v0.17.16", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.54`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" to `3.3.105`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" from `^3.3.104` to `^3.3.105`" + } + ] + } + }, + { + "version": "0.17.15", + "tag": "@rushstack/webpack4-localization-plugin_v0.17.15", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.53`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" to `3.3.104`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" from `^3.3.103` to `^3.3.104`" + } + ] + } + }, + { + "version": "0.17.14", + "tag": "@rushstack/webpack4-localization-plugin_v0.17.14", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.52`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" to `3.3.103`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" from `^3.3.102` to `^3.3.103`" + } + ] + } + }, + { + "version": "0.17.13", + "tag": "@rushstack/webpack4-localization-plugin_v0.17.13", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.51`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" to `3.3.102`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" from `^3.3.101` to `^3.3.102`" + } + ] + } + }, + { + "version": "0.17.12", + "tag": "@rushstack/webpack4-localization-plugin_v0.17.12", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.50`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" to `3.3.101`" + }, + { + "comment": "Updating dependency \"@rushstack/set-webpack-public-path-plugin\" from `^3.3.100` to `^3.3.101`" + } + ] + } + }, { "version": "0.17.11", "tag": "@rushstack/webpack4-localization-plugin_v0.17.11", diff --git a/webpack/webpack4-localization-plugin/CHANGELOG.md b/webpack/webpack4-localization-plugin/CHANGELOG.md index 66d0b26bd7d..510ec6d53c0 100644 --- a/webpack/webpack4-localization-plugin/CHANGELOG.md +++ b/webpack/webpack4-localization-plugin/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/webpack4-localization-plugin -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.17.16 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.17.15 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.17.14 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.17.13 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 0.17.12 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.17.11 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/webpack/webpack4-localization-plugin/package.json b/webpack/webpack4-localization-plugin/package.json index b7fd8075016..f7c8600d8f0 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.17.11", + "version": "0.17.16", "description": "This plugin facilitates localization with Webpack.", "main": "lib/index.js", "typings": "dist/webpack4-localization-plugin.d.ts", @@ -15,7 +15,7 @@ "_phase:build": "heft run --only build -- --clean" }, "peerDependencies": { - "@rushstack/set-webpack-public-path-plugin": "^3.3.100", + "@rushstack/set-webpack-public-path-plugin": "^3.3.105", "@types/webpack": "^4.39.0", "webpack": "^4.31.0", "@types/node": "*" @@ -36,7 +36,6 @@ "@rushstack/node-core-library": "workspace:*", "@types/tapable": "1.0.6", "loader-utils": "1.4.2", - "lodash": "~4.17.15", "minimatch": "~3.0.3" }, "devDependencies": { @@ -45,7 +44,6 @@ "@rushstack/heft-node-rig": "workspace:*", "@rushstack/set-webpack-public-path-plugin": "workspace:*", "@types/loader-utils": "1.1.3", - "@types/lodash": "4.14.116", "@types/minimatch": "3.0.5", "@types/node": "14.18.36", "@types/webpack": "4.41.32", diff --git a/webpack/webpack4-localization-plugin/src/AssetProcessor.ts b/webpack/webpack4-localization-plugin/src/AssetProcessor.ts index a6a62885d60..91fa291485c 100644 --- a/webpack/webpack4-localization-plugin/src/AssetProcessor.ts +++ b/webpack/webpack4-localization-plugin/src/AssetProcessor.ts @@ -2,7 +2,6 @@ // See LICENSE in the project root for license information. import * as Webpack from 'webpack'; -import * as lodash from 'lodash'; import { Constants } from './utilities/Constants'; import { ILocaleElementMap } from './interfaces'; @@ -123,7 +122,7 @@ export class AssetProcessor { const result: Map = new Map(); for (const [locale, { source, size }] of reconstructedAsset.result) { - const newAsset: IAsset = lodash.clone(options.asset); + const newAsset: IAsset = { ...options.asset }; newAsset.source = () => source; newAsset.size = () => size; @@ -189,7 +188,7 @@ export class AssetProcessor { ); } - const newAsset: IAsset = lodash.clone(options.asset); + const newAsset: IAsset = { ...options.asset }; newAsset.source = () => reconstructedAsset.result.source; newAsset.size = () => reconstructedAsset.result.size; return { diff --git a/webpack/webpack4-localization-plugin/src/WebpackConfigurationUpdater.ts b/webpack/webpack4-localization-plugin/src/WebpackConfigurationUpdater.ts index 730eddb7017..f5499988629 100644 --- a/webpack/webpack4-localization-plugin/src/WebpackConfigurationUpdater.ts +++ b/webpack/webpack4-localization-plugin/src/WebpackConfigurationUpdater.ts @@ -5,8 +5,7 @@ import minimatch from 'minimatch'; import * as path from 'path'; import * as Webpack from 'webpack'; import * as SetPublicPathPluginPackageType from '@rushstack/set-webpack-public-path-plugin'; -import { NewlineKind } from '@rushstack/node-core-library'; -import * as lodash from 'lodash'; +import { NewlineKind, Text } from '@rushstack/node-core-library'; import { IgnoreStringFunction } from '@rushstack/localization-utilities'; import { Constants } from './utilities/Constants'; @@ -24,7 +23,7 @@ export interface IWebpackConfigurationUpdaterOptions { ignoreString: IgnoreStringFunction | undefined; } -const FILE_TOKEN_REGEX: RegExp = new RegExp(lodash.escapeRegExp('[file]')); +const FILE_TOKEN_REGEX: RegExp = new RegExp(Text.escapeRegExp('[file]')); export class WebpackConfigurationUpdater { public static amendWebpackConfigurationForMultiLocale(options: IWebpackConfigurationUpdaterOptions): void { diff --git a/webpack/webpack4-localization-plugin/src/utilities/Constants.ts b/webpack/webpack4-localization-plugin/src/utilities/Constants.ts index f93e77f5d63..d9d66a2ef7b 100644 --- a/webpack/webpack4-localization-plugin/src/utilities/Constants.ts +++ b/webpack/webpack4-localization-plugin/src/utilities/Constants.ts @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. -import * as lodash from 'lodash'; +import { Text } from '@rushstack/node-core-library'; export class Constants { public static LOCALE_FILENAME_TOKEN: string = '[locale]'; public static LOCALE_FILENAME_TOKEN_REGEX: RegExp = new RegExp( - lodash.escapeRegExp(Constants.LOCALE_FILENAME_TOKEN), + Text.escapeRegExp(Constants.LOCALE_FILENAME_TOKEN), 'gi' ); public static NO_LOCALE_SOURCE_MAP_FILENAME_TOKEN: string = '[no-locale-file]'; public static NO_LOCALE_SOURCE_MAP_FILENAME_TOKEN_REGEX: RegExp = new RegExp( - lodash.escapeRegExp(Constants.NO_LOCALE_SOURCE_MAP_FILENAME_TOKEN), + Text.escapeRegExp(Constants.NO_LOCALE_SOURCE_MAP_FILENAME_TOKEN), 'gi' ); public static STRING_PLACEHOLDER_PREFIX: string = '_LOCALIZED_STRING_f12dy0i7_n4bo_dqwj_39gf_sasqehjmihz9'; diff --git a/webpack/webpack4-module-minifier-plugin/CHANGELOG.json b/webpack/webpack4-module-minifier-plugin/CHANGELOG.json index b42a23616ae..e66e1005493 100644 --- a/webpack/webpack4-module-minifier-plugin/CHANGELOG.json +++ b/webpack/webpack4-module-minifier-plugin/CHANGELOG.json @@ -1,6 +1,131 @@ { "name": "@rushstack/webpack4-module-minifier-plugin", "entries": [ + { + "version": "0.12.7", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.12.7", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.11`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.10`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.12.6", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.12.6", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.10`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.12.5", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.12.5", + "date": "Thu, 04 May 2023 15:17:38 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.9`" + } + ] + } + }, + { + "version": "0.12.4", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.12.4", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "patch": [ + { + "comment": "Fix async import compressor erroring when encountering unresolved dependencies." + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.8`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.12.3", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.12.3", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.7`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.12.2", + "tag": "@rushstack/webpack4-module-minifier-plugin_v0.12.2", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.6`" + }, + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.12.1", "tag": "@rushstack/webpack4-module-minifier-plugin_v0.12.1", diff --git a/webpack/webpack4-module-minifier-plugin/CHANGELOG.md b/webpack/webpack4-module-minifier-plugin/CHANGELOG.md index ca891219ec2..714ff90705b 100644 --- a/webpack/webpack4-module-minifier-plugin/CHANGELOG.md +++ b/webpack/webpack4-module-minifier-plugin/CHANGELOG.md @@ -1,6 +1,38 @@ # Change Log - @rushstack/webpack4-module-minifier-plugin -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.12.7 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.12.6 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.12.5 +Thu, 04 May 2023 15:17:38 GMT + +_Version update only_ + +## 0.12.4 +Thu, 04 May 2023 00:20:28 GMT + +### Patches + +- Fix async import compressor erroring when encountering unresolved dependencies. + +## 0.12.3 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 0.12.2 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.12.1 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/webpack/webpack4-module-minifier-plugin/package.json b/webpack/webpack4-module-minifier-plugin/package.json index ea046f96094..87b7a7e36bf 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.12.1", + "version": "0.12.7", "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/AsyncImportCompressionPlugin.ts b/webpack/webpack4-module-minifier-plugin/src/AsyncImportCompressionPlugin.ts index 1d26024999c..824fc2a3b17 100644 --- a/webpack/webpack4-module-minifier-plugin/src/AsyncImportCompressionPlugin.ts +++ b/webpack/webpack4-module-minifier-plugin/src/AsyncImportCompressionPlugin.ts @@ -32,6 +32,14 @@ declare class WebpackImportDependency extends webpack.compilation.Dependency { }; } +interface IImportDependencyTemplate { + apply( + dependency: WebpackImportDependency, + source: ReplaceSource, + runtime: webpack.compilation.RuntimeTemplate + ): void; +} + interface IAsyncImportMetadata { chunkCount: number; chunkIds: number[]; @@ -182,39 +190,41 @@ export class AsyncImportCompressionPlugin implements Plugin { if (dep instanceof ImportDependency) { const { module: targetModule } = dep; - let localAsyncImports: Map | undefined = - asyncImportMap.get(module); - if (!localAsyncImports) { - asyncImportMap.set(module, (localAsyncImports = new Map())); - } - - const chunkGroup: webpack.compilation.ChunkGroup = dep.block.chunkGroup; - const chunkIds: number[] = chunkGroup - ? chunkGroup.chunks.map((chunk) => chunk.id!).sort() - : []; - const idString: string = chunkIds.join(';'); - - let meta: IAsyncImportMetadata | undefined = asyncImportGroups.get(idString); - if (!meta) { - asyncImportGroups.set( - idString, - (meta = { - chunkCount: chunkIds.length, - chunkIds: chunkIds, - count: 0, - index: -1 - }) - ); + if (targetModule) { + let localAsyncImports: Map | undefined = + asyncImportMap.get(module); + if (!localAsyncImports) { + asyncImportMap.set(module, (localAsyncImports = new Map())); + } + + const chunkGroup: webpack.compilation.ChunkGroup = dep.block.chunkGroup; + const chunkIds: number[] = chunkGroup + ? chunkGroup.chunks.map((chunk) => chunk.id!).sort() + : []; + const idString: string = chunkIds.join(';'); + + let meta: IAsyncImportMetadata | undefined = asyncImportGroups.get(idString); + if (!meta) { + asyncImportGroups.set( + idString, + (meta = { + chunkCount: chunkIds.length, + chunkIds: chunkIds, + count: 0, + index: -1 + }) + ); + } + meta.count++; + + const stringKey: string = `${targetModule.id}`.replace(/[^A-Za-z0-9_$]/g, '_'); + + const key: string = `${ASYNC_IMPORT_PREFIX}${stringKey}`; + localAsyncImports.set(key, { + meta, + module: targetModule + }); } - meta.count++; - - const stringKey: string = `${targetModule.id}`.replace(/[^A-Za-z0-9_$]/g, '_'); - - const key: string = `${ASYNC_IMPORT_PREFIX}${stringKey}`; - localAsyncImports.set(key, { - meta, - module: targetModule - }); } }); } @@ -242,16 +252,35 @@ export class AsyncImportCompressionPlugin implements Plugin { rankedImportGroups = rankedImports.map((x) => x[1]); - // Have to do this after the official plugin in order to override - compilation.dependencyTemplates.set(ImportDependency, { - apply(dep: WebpackImportDependency, source: ReplaceSource): void { - const stringKey: string = `${dep.module.id}`.replace(/[^A-Za-z0-9_$]/g, '_'); - const key: string = `${ASYNC_IMPORT_PREFIX}${stringKey}`; - const content: string = `__webpack_require__.ee(${key})`; - source.replace(dep.block.range[0], dep.block.range[1] - 1, content); + const { dependencyTemplates } = compilation; + + const defaultImplementation: IImportDependencyTemplate | undefined = dependencyTemplates.get( + ImportDependency + ) as unknown as IImportDependencyTemplate; + if (!defaultImplementation) { + compilation.errors.push(new Error(`Could not find ImportDependencyTemplate`)); + } + + const customTemplate: IImportDependencyTemplate = { + apply( + dep: WebpackImportDependency, + source: ReplaceSource, + runtime: webpack.compilation.RuntimeTemplate + ): void { + if (dep.module) { + const stringKey: string = `${dep.module.id}`.replace(/[^A-Za-z0-9_$]/g, '_'); + const key: string = `${ASYNC_IMPORT_PREFIX}${stringKey}`; + const content: string = `__webpack_require__.ee(${key})`; + source.replace(dep.block.range[0], dep.block.range[1] - 1, content); + } else { + defaultImplementation?.apply(dep, source, runtime); + } } - // Typings in webpack are incorrect. This is a DependencyTemplate object - } as unknown as Tapable); + }; + + // Have to do this after the official plugin in order to override + // Typings in webpack are incorrect. This is a DependencyTemplate object + dependencyTemplates.set(ImportDependency, customTemplate as unknown as Tapable); }); compilation.mainTemplate.hooks.requireExtensions.tap( diff --git a/webpack/webpack5-load-themed-styles-loader/CHANGELOG.json b/webpack/webpack5-load-themed-styles-loader/CHANGELOG.json index 53fcaaa57b7..f2d1986561c 100644 --- a/webpack/webpack5-load-themed-styles-loader/CHANGELOG.json +++ b/webpack/webpack5-load-themed-styles-loader/CHANGELOG.json @@ -1,6 +1,141 @@ { "name": "@microsoft/webpack5-load-themed-styles-loader", "entries": [ + { + "version": "0.1.24", + "tag": "@microsoft/webpack5-load-themed-styles-loader_v0.1.24", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.42`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.41` to `^2.0.42`" + } + ] + } + }, + { + "version": "0.1.23", + "tag": "@microsoft/webpack5-load-themed-styles-loader_v0.1.23", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.41`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.40` to `^2.0.41`" + } + ] + } + }, + { + "version": "0.1.22", + "tag": "@microsoft/webpack5-load-themed-styles-loader_v0.1.22", + "date": "Thu, 11 May 2023 00:17:21 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.40`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.39` to `^2.0.40`" + } + ] + } + }, + { + "version": "0.1.21", + "tag": "@microsoft/webpack5-load-themed-styles-loader_v0.1.21", + "date": "Thu, 04 May 2023 00:20:28 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.39`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.38` to `^2.0.39`" + } + ] + } + }, + { + "version": "0.1.20", + "tag": "@microsoft/webpack5-load-themed-styles-loader_v0.1.20", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.38`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.37` to `^2.0.38`" + } + ] + } + }, + { + "version": "0.1.19", + "tag": "@microsoft/webpack5-load-themed-styles-loader_v0.1.19", + "date": "Sat, 29 Apr 2023 00:23:02 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" to `2.0.37`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@microsoft/load-themed-styles\" from `^2.0.36` to `^2.0.37`" + } + ] + } + }, { "version": "0.1.18", "tag": "@microsoft/webpack5-load-themed-styles-loader_v0.1.18", diff --git a/webpack/webpack5-load-themed-styles-loader/CHANGELOG.md b/webpack/webpack5-load-themed-styles-loader/CHANGELOG.md index b0b6ef71c6e..1869d126b95 100644 --- a/webpack/webpack5-load-themed-styles-loader/CHANGELOG.md +++ b/webpack/webpack5-load-themed-styles-loader/CHANGELOG.md @@ -1,6 +1,36 @@ # Change Log - @microsoft/webpack5-load-themed-styles-loader -This log was last generated on Thu, 27 Apr 2023 17:18:42 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.1.24 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.1.23 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.1.22 +Thu, 11 May 2023 00:17:21 GMT + +_Version update only_ + +## 0.1.21 +Thu, 04 May 2023 00:20:28 GMT + +_Version update only_ + +## 0.1.20 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 0.1.19 +Sat, 29 Apr 2023 00:23:02 GMT + +_Version update only_ ## 0.1.18 Thu, 27 Apr 2023 17:18:42 GMT diff --git a/webpack/webpack5-load-themed-styles-loader/package.json b/webpack/webpack5-load-themed-styles-loader/package.json index a8624cd7fdd..88082e89d1c 100644 --- a/webpack/webpack5-load-themed-styles-loader/package.json +++ b/webpack/webpack5-load-themed-styles-loader/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/webpack5-load-themed-styles-loader", - "version": "0.1.18", + "version": "0.1.24", "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", @@ -16,7 +16,7 @@ "_phase:test": "heft run --only test -- --clean" }, "peerDependencies": { - "@microsoft/load-themed-styles": "^2.0.36", + "@microsoft/load-themed-styles": "^2.0.42", "webpack": "^5" }, "peerDependenciesMeta": { diff --git a/webpack/webpack5-localization-plugin/CHANGELOG.json b/webpack/webpack5-localization-plugin/CHANGELOG.json index 0e8df9e83d9..2aa95ca2b6d 100644 --- a/webpack/webpack5-localization-plugin/CHANGELOG.json +++ b/webpack/webpack5-localization-plugin/CHANGELOG.json @@ -1,6 +1,111 @@ { "name": "@rushstack/webpack5-localization-plugin", "entries": [ + { + "version": "0.4.12", + "tag": "@rushstack/webpack5-localization-plugin_v0.4.12", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.54`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.1`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + } + ] + } + }, + { + "version": "0.4.11", + "tag": "@rushstack/webpack5-localization-plugin_v0.4.11", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.53`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.59.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + } + ] + } + }, + { + "version": "0.4.10", + "tag": "@rushstack/webpack5-localization-plugin_v0.4.10", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.52`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + } + ] + } + }, + { + "version": "0.4.9", + "tag": "@rushstack/webpack5-localization-plugin_v0.4.9", + "date": "Mon, 01 May 2023 15:23:19 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.51`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.58.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + } + ] + } + }, + { + "version": "0.4.8", + "tag": "@rushstack/webpack5-localization-plugin_v0.4.8", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/localization-utilities\" to `0.8.50`" + }, + { + "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.57.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + } + ] + } + }, { "version": "0.4.7", "tag": "@rushstack/webpack5-localization-plugin_v0.4.7", diff --git a/webpack/webpack5-localization-plugin/CHANGELOG.md b/webpack/webpack5-localization-plugin/CHANGELOG.md index c9517640108..f35ee833c26 100644 --- a/webpack/webpack5-localization-plugin/CHANGELOG.md +++ b/webpack/webpack5-localization-plugin/CHANGELOG.md @@ -1,6 +1,31 @@ # Change Log - @rushstack/webpack5-localization-plugin -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 0.4.12 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 0.4.11 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 0.4.10 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 0.4.9 +Mon, 01 May 2023 15:23:19 GMT + +_Version update only_ + +## 0.4.8 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 0.4.7 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/webpack/webpack5-localization-plugin/package.json b/webpack/webpack5-localization-plugin/package.json index fd7fe402472..de4f155fd67 100644 --- a/webpack/webpack5-localization-plugin/package.json +++ b/webpack/webpack5-localization-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack5-localization-plugin", - "version": "0.4.7", + "version": "0.4.12", "description": "This plugin facilitates localization with Webpack.", "main": "lib/index.js", "typings": "dist/webpack5-localization-plugin.d.ts", diff --git a/webpack/webpack5-module-minifier-plugin/CHANGELOG.json b/webpack/webpack5-module-minifier-plugin/CHANGELOG.json index fc9ad6a6d8b..1fd77c6cae4 100644 --- a/webpack/webpack5-module-minifier-plugin/CHANGELOG.json +++ b/webpack/webpack5-module-minifier-plugin/CHANGELOG.json @@ -1,6 +1,144 @@ { "name": "@rushstack/webpack5-module-minifier-plugin", "entries": [ + { + "version": "5.4.7", + "tag": "@rushstack/webpack5-module-minifier-plugin_v5.4.7", + "date": "Mon, 22 May 2023 06:34:33 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.10`" + }, + { + "comment": "Updating dependency \"@rushstack/eslint-config\" to `3.3.0`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.13.0`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.11`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" from `*` to `*`" + } + ] + } + }, + { + "version": "5.4.6", + "tag": "@rushstack/webpack5-module-minifier-plugin_v5.4.6", + "date": "Fri, 12 May 2023 00:23:05 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.9`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.5`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.11`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.10`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" from `*` to `*`" + } + ] + } + }, + { + "version": "5.4.5", + "tag": "@rushstack/webpack5-module-minifier-plugin_v5.4.5", + "date": "Thu, 04 May 2023 15:17:38 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.9`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" from `*` to `*`" + } + ] + } + }, + { + "version": "5.4.4", + "tag": "@rushstack/webpack5-module-minifier-plugin_v5.4.4", + "date": "Thu, 04 May 2023 00:20:29 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.8`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.4`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.10`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.8`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" from `*` to `*`" + } + ] + } + }, + { + "version": "5.4.3", + "tag": "@rushstack/webpack5-module-minifier-plugin_v5.4.3", + "date": "Mon, 01 May 2023 15:23:20 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.7`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.3`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.9`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.7`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" from `*` to `*`" + } + ] + } + }, + { + "version": "5.4.2", + "tag": "@rushstack/webpack5-module-minifier-plugin_v5.4.2", + "date": "Sat, 29 Apr 2023 00:23:03 GMT", + "comments": { + "dependency": [ + { + "comment": "Updating dependency \"@rushstack/worker-pool\" to `0.3.6`" + }, + { + "comment": "Updating dependency \"@rushstack/heft\" to `0.50.2`" + }, + { + "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.12.8`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" to `0.3.6`" + }, + { + "comment": "Updating dependency \"@rushstack/module-minifier\" from `*` to `*`" + } + ] + } + }, { "version": "5.4.1", "tag": "@rushstack/webpack5-module-minifier-plugin_v5.4.1", diff --git a/webpack/webpack5-module-minifier-plugin/CHANGELOG.md b/webpack/webpack5-module-minifier-plugin/CHANGELOG.md index dc7b3c0b5c3..8890801ad71 100644 --- a/webpack/webpack5-module-minifier-plugin/CHANGELOG.md +++ b/webpack/webpack5-module-minifier-plugin/CHANGELOG.md @@ -1,6 +1,36 @@ # Change Log - @rushstack/webpack5-module-minifier-plugin -This log was last generated on Thu, 27 Apr 2023 17:18:43 GMT and should not be manually modified. +This log was last generated on Mon, 22 May 2023 06:34:33 GMT and should not be manually modified. + +## 5.4.7 +Mon, 22 May 2023 06:34:33 GMT + +_Version update only_ + +## 5.4.6 +Fri, 12 May 2023 00:23:05 GMT + +_Version update only_ + +## 5.4.5 +Thu, 04 May 2023 15:17:38 GMT + +_Version update only_ + +## 5.4.4 +Thu, 04 May 2023 00:20:29 GMT + +_Version update only_ + +## 5.4.3 +Mon, 01 May 2023 15:23:20 GMT + +_Version update only_ + +## 5.4.2 +Sat, 29 Apr 2023 00:23:03 GMT + +_Version update only_ ## 5.4.1 Thu, 27 Apr 2023 17:18:43 GMT diff --git a/webpack/webpack5-module-minifier-plugin/package.json b/webpack/webpack5-module-minifier-plugin/package.json index 335573bb92c..608da6d9c5d 100644 --- a/webpack/webpack5-module-minifier-plugin/package.json +++ b/webpack/webpack5-module-minifier-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@rushstack/webpack5-module-minifier-plugin", - "version": "5.4.1", + "version": "5.4.7", "description": "This plugin splits minification of webpack compilations into smaller units.", "main": "lib/index.js", "typings": "dist/webpack5-module-minifier-plugin.d.ts",