Skip to content

Commit bce8739

Browse files
authored
Merge branch 'master' into ianc/node-specific-rush-install
2 parents 88bb11f + ed2fd45 commit bce8739

18 files changed

Lines changed: 72 additions & 16 deletions

File tree

‎.travis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
node_js:
33
- '8.9.4'
4-
- '10.12.0'
4+
- '10.13.0'
55
script:
66
- set -e
77

‎apps/rush-lib/src/cli/RushCommandLineParser.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { CommandLineParser, CommandLineFlagParameter, CommandLineAction } from '
1010
import { RushConfiguration } from '../api/RushConfiguration';
1111
import { RushConstants } from '../logic/RushConstants';
1212
import { CommandLineConfiguration } from '../api/CommandLineConfiguration';
13-
import { CommandJson } from '../api/CommandLineJson';
1413
import { Utilities } from '../utilities/Utilities';
1514
import { BaseScriptAction } from '../cli/scriptActions/BaseScriptAction';
1615

‎apps/rush-lib/src/cli/scriptActions/BaseScriptAction.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import { CommandLineParameter } from '@microsoft/ts-command-line';
55
import { BaseRushAction, IBaseRushActionOptions } from '../actions/BaseRushAction';
66
import { CommandLineConfiguration } from '../../api/CommandLineConfiguration';
7-
import { ParameterJson } from '../../api/CommandLineJson';
87
import { RushConstants } from '../../logic/RushConstants';
98

109
/**

‎apps/rush-lib/src/scripts/install-run-rush.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,15 @@ function getRushVersion(): string {
4444

4545
function run(): void {
4646
const [
47-
nodePath, /* Ex: /bin/node */ // tslint:disable-line:no-unused-variable
48-
scriptPath, /* /repo/common/scripts/install-run-rush.js */ // tslint:disable-line:no-unused-variable
47+
nodePath, /* Ex: /bin/node */
48+
scriptPath, /* /repo/common/scripts/install-run-rush.js */
4949
...packageBinArgs /* [build, --to, myproject] */
5050
]: string[] = process.argv;
5151

52+
if (!nodePath || !scriptPath) {
53+
throw new Error('Unexpected exception: could not detect node path or script path');
54+
}
55+
5256
if (process.argv.length < 3) {
5357
console.log('Usage: install-run-rush.js <command> [args...]');
5458
console.log('Example: install-run-rush.js build --to myproject');

‎apps/rush-lib/src/scripts/install-run.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,13 +429,17 @@ export function runWithErrorAndStatusCode(fn: () => number): void {
429429

430430
function run(): void {
431431
const [
432-
nodePath, /* Ex: /bin/node */ // tslint:disable-line:no-unused-variable
432+
nodePath, /* Ex: /bin/node */
433433
scriptPath, /* /repo/common/scripts/install-run-rush.js */
434434
rawPackageSpecifier, /* qrcode@^1.2.0 */
435435
packageBinName, /* qrcode */
436436
...packageBinArgs /* [-f, myproject/lib] */
437437
]: string[] = process.argv;
438438

439+
if (!nodePath) {
440+
throw new Error('Unexpected exception: could not detect node path');
441+
}
442+
439443
if (path.basename(scriptPath).toLowerCase() !== 'install-run.js') {
440444
// If install-run.js wasn't directly invoked, don't execute the rest of this function. Return control
441445
// to the script that (presumably) imported this file

‎apps/rush/src/MinimalRushConfiguration.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ interface IMinimalRushConfigurationJson {
1717
* decide which version of Rush should be installed/used.
1818
*/
1919
export class MinimalRushConfiguration {
20-
private _rushJsonFilename: string;
2120
private _rushVersion: string;
2221
private _commonRushConfigFolder: string;
2322

@@ -41,7 +40,6 @@ export class MinimalRushConfiguration {
4140

4241
private constructor(minimalRushConfigurationJson: IMinimalRushConfigurationJson, rushJsonFilename: string) {
4342
this._rushVersion = minimalRushConfigurationJson.rushVersion || minimalRushConfigurationJson.rushMinimumVersion;
44-
this._rushJsonFilename = rushJsonFilename;
4543
this._commonRushConfigFolder = path.join(path.dirname(rushJsonFilename),
4644
RushConstants.commonFolderName, 'config', 'rush');
4745
}

‎apps/rush/src/start.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ else if (semver.satisfies(nodeVersion, '>=11.0.0')) {
2929
// tslint:disable-next-line
3030
else if (!semver.satisfies(nodeVersion, '^6.9.0')
3131
&& !semver.satisfies(nodeVersion, '^8.9.0')
32-
&& !semver.satisfies(nodeVersion, '^10.12.0')) { // <-- fix this when LTS is published
32+
&& !semver.satisfies(nodeVersion, '^10.13.0')) {
3333
console.warn(colors.yellow(`Your version of Node.js (${nodeVersion}) is not a Long-Term Support (LTS) release.`
3434
+ ` These versions frequently contain bugs, and the Rush team will not accept issue reports for them.`
3535
+ ` Please consider installing a stable release.`));
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "",
5+
"packageName": "@microsoft/gulp-core-build",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/gulp-core-build",
10+
"email": "nickpape-msft@users.noreply.github.com"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush-stack-compiler",
5+
"comment": "Disable deprecated lint rules in favor of compiler check.",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@microsoft/rush-stack-compiler",
10+
"email": "nickpape@microsoft.com"
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "For NodeJS 10, require at least LTS (10.13.0)",
5+
"packageName": "@microsoft/rush",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush",
10+
"email": "iclanton@users.noreply.github.com"
11+
}

0 commit comments

Comments
 (0)