Skip to content

Commit

Permalink
Merge latest
Browse files Browse the repository at this point in the history
  • Loading branch information
elliot-nelson committed Feb 26, 2023
2 parents 76346c4 + c7374c5 commit 146404a
Show file tree
Hide file tree
Showing 26 changed files with 362 additions and 57 deletions.
24 changes: 24 additions & 0 deletions apps/rush/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
{
"name": "@microsoft/rush",
"entries": [
{
"version": "5.93.1",
"tag": "@microsoft/rush_v5.93.1",
"date": "Fri, 17 Feb 2023 14:46:59 GMT",
"comments": {
"none": [
{
"comment": "Fix a regression where \"rush-sdk\" failed to load older versions of \"rush-lib\" (GitHub #3979)"
}
]
}
},
{
"version": "5.93.0",
"tag": "@microsoft/rush_v5.93.0",
"date": "Fri, 17 Feb 2023 02:14:43 GMT",
"comments": {
"none": [
{
"comment": "Add code path to @rushstack/rush-sdk for inheriting @microsoft/rush-lib location from a parent process via the RUSH_LIB_PATH environment variable."
}
]
}
},
{
"version": "5.92.0",
"tag": "@microsoft/rush_v5.92.0",
Expand Down
16 changes: 15 additions & 1 deletion apps/rush/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Change Log - @microsoft/rush

This log was last generated on Sun, 12 Feb 2023 02:50:42 GMT and should not be manually modified.
This log was last generated on Fri, 17 Feb 2023 14:46:59 GMT and should not be manually modified.

## 5.93.1
Fri, 17 Feb 2023 14:46:59 GMT

### Updates

- Fix a regression where "rush-sdk" failed to load older versions of "rush-lib" (GitHub #3979)

## 5.93.0
Fri, 17 Feb 2023 02:14:43 GMT

### Updates

- Add code path to @rushstack/rush-sdk for inheriting @microsoft/rush-lib location from a parent process via the RUSH_LIB_PATH environment variable.

## 5.92.0
Sun, 12 Feb 2023 02:50:42 GMT
Expand Down
2 changes: 1 addition & 1 deletion apps/rush/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/rush",
"version": "5.92.0",
"version": "5.93.1",
"description": "A professional solution for consolidating all your JavaScript projects in one Git repo",
"keywords": [
"install",
Expand Down
33 changes: 15 additions & 18 deletions build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
{
"policyName": "rush",
"definitionName": "lockStepVersion",
"version": "5.92.0",
"nextBump": "minor",
"version": "5.93.1",
"nextBump": "patch",
"mainProject": "@microsoft/rush"
}
]
1 change: 1 addition & 0 deletions common/reviews/api/rush-lib.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export enum EnvironmentVariableNames {
RUSH_GIT_BINARY_PATH = "RUSH_GIT_BINARY_PATH",
RUSH_GLOBAL_FOLDER = "RUSH_GLOBAL_FOLDER",
RUSH_INVOKED_FOLDER = "RUSH_INVOKED_FOLDER",
RUSH_LIB_PATH = "_RUSH_LIB_PATH",
RUSH_PARALLELISM = "RUSH_PARALLELISM",
RUSH_PNPM_STORE_PATH = "RUSH_PNPM_STORE_PATH",
RUSH_PNPM_VERIFY_STORE_INTEGRITY = "RUSH_PNPM_VERIFY_STORE_INTEGRITY",
Expand Down
12 changes: 12 additions & 0 deletions heft-plugins/heft-storybook-plugin/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@rushstack/heft-storybook-plugin",
"entries": [
{
"version": "0.2.3",
"tag": "@rushstack/heft-storybook-plugin_v0.2.3",
"date": "Wed, 22 Feb 2023 16:26:55 GMT",
"comments": {
"patch": [
{
"comment": "Fix an issue where static build output ends up in the wrong folder."
}
]
}
},
{
"version": "0.2.2",
"tag": "@rushstack/heft-storybook-plugin_v0.2.2",
Expand Down
9 changes: 8 additions & 1 deletion heft-plugins/heft-storybook-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @rushstack/heft-storybook-plugin

This log was last generated on Fri, 10 Feb 2023 01:18:51 GMT and should not be manually modified.
This log was last generated on Wed, 22 Feb 2023 16:26:55 GMT and should not be manually modified.

## 0.2.3
Wed, 22 Feb 2023 16:26:55 GMT

### Patches

- Fix an issue where static build output ends up in the wrong folder.

## 0.2.2
Fri, 10 Feb 2023 01:18:51 GMT
Expand Down
2 changes: 1 addition & 1 deletion heft-plugins/heft-storybook-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rushstack/heft-storybook-plugin",
"version": "0.2.2",
"version": "0.2.3",
"description": "Heft plugin for supporting UI development using Storybook",
"repository": {
"type": "git",
Expand Down
4 changes: 3 additions & 1 deletion heft-plugins/heft-storybook-plugin/src/StorybookPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ export class StorybookPlugin implements IHeftPlugin<IStorybookPluginOptions> {
return;
}

this._staticBuildOutputFolder = build.properties.serveMode ? undefined : options.staticBuildModulePath;
this._staticBuildOutputFolder = build.properties.serveMode
? undefined
: options.staticBuildOutputFolder;
const modulePath: string | undefined = build.properties.serveMode
? options.startupModulePath
: options.staticBuildModulePath;
Expand Down
12 changes: 12 additions & 0 deletions libraries/package-deps-hash/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@rushstack/package-deps-hash",
"entries": [
{
"version": "4.0.9",
"tag": "@rushstack/package-deps-hash_v4.0.9",
"date": "Fri, 24 Feb 2023 01:24:17 GMT",
"comments": {
"patch": [
{
"comment": "Prevent network calls or maintenance tasks during local Git operations."
}
]
}
},
{
"version": "4.0.8",
"tag": "@rushstack/package-deps-hash_v4.0.8",
Expand Down
9 changes: 8 additions & 1 deletion libraries/package-deps-hash/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @rushstack/package-deps-hash

This log was last generated on Fri, 10 Feb 2023 01:18:51 GMT and should not be manually modified.
This log was last generated on Fri, 24 Feb 2023 01:24:17 GMT and should not be manually modified.

## 4.0.9
Fri, 24 Feb 2023 01:24:17 GMT

### Patches

- Prevent network calls or maintenance tasks during local Git operations.

## 4.0.8
Fri, 10 Feb 2023 01:18:51 GMT
Expand Down
2 changes: 1 addition & 1 deletion libraries/package-deps-hash/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rushstack/package-deps-hash",
"version": "4.0.8",
"version": "4.0.9",
"description": "",
"main": "lib/index.js",
"typings": "dist/package-deps-hash.d.ts",
Expand Down
48 changes: 41 additions & 7 deletions libraries/package-deps-hash/src/getRepoState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ const MINIMUM_GIT_VERSION: IGitVersion = {
patch: 0
};

const STANDARD_GIT_OPTIONS: readonly string[] = [
// Don't request any optional file locks
'--no-optional-locks',
// Ensure that commands don't run automatic maintenance, since performance of the command itself is paramount
'-c',
'maintenance.auto=false'
];

interface IGitTreeState {
files: Map<string, string>; // type "blob"
submodules: Map<string, string>; // type "commit"
Expand Down Expand Up @@ -300,12 +308,36 @@ export async function getRepoStateAsync(
): Promise<Map<string, string>> {
const statePromise: Promise<IGitTreeState> = spawnGitAsync(
gitPath,
['--no-optional-locks', 'ls-tree', '-r', '-z', '--full-name', 'HEAD', '--'],
STANDARD_GIT_OPTIONS.concat([
'ls-tree',
// Recursively expand trees
'-r',
// Use NUL as the separator
'-z',
// Specify the full path to files relative to the root
'--full-name',
// As of last commit
'HEAD',
'--'
]),
rootDirectory
).then(parseGitLsTree);
const locallyModifiedPromise: Promise<Map<string, boolean>> = spawnGitAsync(
gitPath,
['--no-optional-locks', 'status', '-z', '-u', '--no-renames', '--ignore-submodules', '--'],
STANDARD_GIT_OPTIONS.concat([
'status',
// Use NUL as the separator
'-z',
// Include untracked files
'-u',
// Disable rename detection so that renames show up as add + delete
'--no-renames',
// Don't process submodules with this command; they'll be handled individually
'--ignore-submodules',
// Don't compare against the remote
'--no-ahead-behind',
'--'
]),
rootDirectory
).then(parseGitStatus);

Expand All @@ -332,7 +364,7 @@ export async function getRepoStateAsync(

const hashObjectPromise: Promise<string> = spawnGitAsync(
gitPath,
['--no-optional-locks', 'hash-object', '--stdin-paths'],
STANDARD_GIT_OPTIONS.concat(['hash-object', '--stdin-paths']),
rootDirectory,
Readable.from(getFilesToHash(), {
encoding: 'utf-8',
Expand Down Expand Up @@ -391,8 +423,7 @@ export function getRepoChanges(

const result: child_process.SpawnSyncReturns<string> = Executable.spawnSync(
gitPath || 'git',
[
'--no-optional-locks',
STANDARD_GIT_OPTIONS.concat([
'diff-index',
'--color=never',
'--no-renames',
Expand All @@ -401,7 +432,7 @@ export function getRepoChanges(
'-z',
revision,
'--'
],
]),
{
currentWorkingDirectory: rootDirectory
}
Expand Down Expand Up @@ -441,7 +472,10 @@ export function ensureGitMinimumVersion(gitPath?: string): void {
}

function getGitVersion(gitPath?: string): IGitVersion {
const result: child_process.SpawnSyncReturns<string> = Executable.spawnSync(gitPath || 'git', ['version']);
const result: child_process.SpawnSyncReturns<string> = Executable.spawnSync(
gitPath || 'git',
STANDARD_GIT_OPTIONS.concat(['version'])
);

if (result.status !== 0) {
throw new Error(
Expand Down
10 changes: 8 additions & 2 deletions libraries/rush-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/rush-lib",
"version": "5.92.0",
"version": "5.93.1",
"description": "A library for writing scripts that interact with the Rush tool",
"repository": {
"type": "git",
Expand Down Expand Up @@ -90,5 +90,11 @@
"@rushstack/rush-amazon-s3-build-cache-plugin": "workspace:*",
"@rushstack/rush-azure-storage-build-cache-plugin": "workspace:*",
"@rushstack/rush-http-build-cache-plugin": "workspace:*"
}
},
"sideEffects": [
"lib-esnext/start-pnpm.js",
"lib-esnext/start.js",
"lib-esnext/startx.js",
"lib-esnext/utilities/SetRushLibPath.js"
]
}
7 changes: 7 additions & 0 deletions libraries/rush-lib/src/api/EnvironmentConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ export enum EnvironmentVariableNames {
*/
RUSH_TAR_BINARY_PATH = 'RUSH_TAR_BINARY_PATH',

/**
* Internal variable that explicitly specifies the path for the version of `@microsoft/rush-lib` being executed.
* Will be set upon loading Rush.
*/
RUSH_LIB_PATH = '_RUSH_LIB_PATH',

/**
* When Rush executes shell scripts, it sometimes changes the working directory to be a project folder or
* the repository root folder. The original working directory (where the Rush command was invoked) is assigned
Expand Down Expand Up @@ -441,6 +447,7 @@ export class EnvironmentConfiguration {
break;

case EnvironmentVariableNames.RUSH_INVOKED_FOLDER:
case EnvironmentVariableNames.RUSH_LIB_PATH:
// Assigned by Rush itself
break;

Expand Down
Loading

0 comments on commit 146404a

Please sign in to comment.