Skip to content

Commit 25de322

Browse files
authored
Merge pull request microsoft#670 from Microsoft/pgonzal/rush-4.3.3
[rush] Publish Rush 4.3.3 removing "purge" command
2 parents 830a1e7 + c52095c commit 25de322

6 files changed

Lines changed: 44 additions & 39 deletions

File tree

‎apps/rush-lib/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/rush-lib",
3-
"version": "4.3.2",
3+
"version": "4.3.3",
44
"description": "A library for writing scripts that interact with the Rush tool",
55
"repository": {
66
"type": "git",

‎apps/rush/CHANGELOG.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
{
22
"name": "@microsoft/rush",
33
"entries": [
4+
{
5+
"version": "4.3.3",
6+
"tag": "@microsoft/rush_v4.3.3",
7+
"date": "Thu, 31 May 2018 21:57:13 GMT",
8+
"comments": {
9+
"none": [
10+
{
11+
"comment": "Remove the old undocumented \"rush purge\" command, since it conflicts with Rush 5"
12+
}
13+
]
14+
}
15+
},
416
{
517
"version": "4.3.2",
618
"tag": "@microsoft/rush_v4.3.2",

‎apps/rush/CHANGELOG.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Change Log - @microsoft/rush
22

3-
This log was last generated on Mon, 26 Mar 2018 19:12:42 GMT and should not be manually modified.
3+
This log was last generated on Thu, 31 May 2018 21:57:13 GMT and should not be manually modified.
4+
5+
## 4.3.3
6+
Thu, 31 May 2018 21:57:13 GMT
7+
8+
### Updates
9+
10+
- Remove the old undocumented "rush purge" command, since it conflicts with Rush 5
411

512
## 4.3.2
613
Mon, 26 Mar 2018 19:12:42 GMT

‎apps/rush/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@microsoft/rush",
3-
"version": "4.3.2",
3+
"version": "4.3.3",
44
"description": "The professional solution for consolidating all your JavaScript projects in one Git repo",
55
"keywords": [
66
"install",
@@ -31,7 +31,7 @@
3131
"license": "MIT",
3232
"dependencies": {
3333
"@microsoft/node-core-library": "1.0.0",
34-
"@microsoft/rush-lib": "4.3.2",
34+
"@microsoft/rush-lib": "4.3.3",
3535
"colors": "~1.2.1",
3636
"fs-extra": "~0.26.7",
3737
"semver": "~5.3.0"

‎apps/rush/src/start.ts‎

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -34,43 +34,29 @@ else if (!semver.satisfies(nodeVersion, '^6.9.0')
3434

3535
import * as path from 'path';
3636
import { JsonFile, IPackageJson } from '@microsoft/node-core-library';
37-
38-
import {
39-
RushConfiguration,
40-
Rush
41-
} from '@microsoft/rush-lib';
42-
import Utilities from '@microsoft/rush-lib/lib/utilities/Utilities';
37+
import { Rush } from '@microsoft/rush-lib';
4338

4439
import { MinimalRushConfiguration } from './MinimalRushConfiguration';
4540
import { RushVersionSelector } from './RushVersionSelector';
4641

47-
const RUSH_PURGE_OPTION_NAME: string = 'purge';
48-
49-
if (process.argv[2] === RUSH_PURGE_OPTION_NAME) {
50-
const rushDirectory: string = path.join(RushConfiguration.getHomeDirectory(), '.rush');
51-
console.log(`Deleting ${rushDirectory} directory...`);
52-
Utilities.dangerouslyDeletePath(rushDirectory);
53-
console.log('done');
42+
// Load the configuration
43+
const configuration: MinimalRushConfiguration | undefined = MinimalRushConfiguration.loadFromDefaultLocation();
44+
const currentPackageJson: IPackageJson = JsonFile.load(path.join(__dirname, '..', 'package.json'));
45+
46+
// If we're inside a repo folder, and it's requesting a different version, then use the RushVersionManager to
47+
// install it
48+
if (configuration && configuration.rushVersion !== currentPackageJson.version) {
49+
const versionSelector: RushVersionSelector = new RushVersionSelector(
50+
configuration.homeFolder,
51+
currentPackageJson.version
52+
);
53+
const rushWrapper: () => void = versionSelector.ensureRushVersionInstalled(configuration.rushVersion);
54+
rushWrapper();
5455
} else {
55-
// Load the configuration
56-
const configuration: MinimalRushConfiguration | undefined = MinimalRushConfiguration.loadFromDefaultLocation();
57-
const currentPackageJson: IPackageJson = JsonFile.load(path.join(__dirname, '..', 'package.json'));
58-
59-
// If we're inside a repo folder, and it's requesting a different version, then use the RushVersionManager to
60-
// install it
61-
if (configuration && configuration.rushVersion !== currentPackageJson.version) {
62-
const versionSelector: RushVersionSelector = new RushVersionSelector(
63-
configuration.homeFolder,
64-
currentPackageJson.version
65-
);
66-
const rushWrapper: () => void = versionSelector.ensureRushVersionInstalled(configuration.rushVersion);
67-
rushWrapper();
68-
} else {
69-
// Otherwise invoke the rush-lib that came with this rush package
70-
const isManaged: boolean = !!configuration && configuration.rushVersion === currentPackageJson.version;
71-
Rush.launch(
72-
currentPackageJson.version,
73-
isManaged // Rush is "managed" if its version and configuration are dictated by a repo's rush.json
74-
);
75-
}
56+
// Otherwise invoke the rush-lib that came with this rush package
57+
const isManaged: boolean = !!configuration && configuration.rushVersion === currentPackageJson.version;
58+
Rush.launch(
59+
currentPackageJson.version,
60+
isManaged // Rush is "managed" if its version and configuration are dictated by a repo's rush.json
61+
);
7662
}

‎common/config/rush/version-policies.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"policyName": "rush",
44
"definitionName": "lockStepVersion",
5-
"version": "4.3.2",
5+
"version": "4.3.3",
66
"nextBump": "patch",
77
"mainProject": "@microsoft/rush"
88
}

0 commit comments

Comments
 (0)