@microsoft/rush-lib
Advanced tools
Comparing version 1.4.1 to 1.5.0
@@ -5,2 +5,29 @@ { | ||
{ | ||
"version": "1.5.0", | ||
"tag": "@microsoft/rush-lib_v1.5.0", | ||
"date": "Sun, 22 Jan 2017 02:04:57 GMT", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"author": "Nick Pape <nickpape@microsoft.com>", | ||
"commit": "23bad7e3014f7aa11a46f8993086c7d3fd2d704b", | ||
"comment": "Update to TypeScript 2.1" | ||
}, | ||
{ | ||
"author": "Pete Gonzalez del Solar <pgonzal@microsoft.com>", | ||
"commit": "1ac4c2f45ac15e0ff3779b372884382fbc8eb3d6", | ||
"comment": "Added new rush.json settings under \"gitPolicy\"" | ||
} | ||
], | ||
"dependency": [ | ||
{ | ||
"comment": "Updating dependency \"@microsoft/stream-collator\" from `~1.0.2` to `~1.0.3`" | ||
}, | ||
{ | ||
"comment": "Updating dependency \"@microsoft/sp-build-node\" from `~0.2.1` to `~0.3.0`" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "1.4.1", | ||
@@ -7,0 +34,0 @@ "tag": "@microsoft/rush-lib_v1.4.1", |
# Change Log - @microsoft/rush-lib | ||
This log was last generated on Tue, 03 Jan 2017 22:53:56 GMT and should not be manually modified. | ||
This log was last generated on Sun, 22 Jan 2017 02:04:57 GMT and should not be manually modified. | ||
## 1.5.0 | ||
Sun, 22 Jan 2017 02:04:57 GMT | ||
### Minor changes | ||
- Update to TypeScript 2.1 | ||
- Added new rush.json settings under "gitPolicy" | ||
## 1.4.1 | ||
@@ -6,0 +14,0 @@ Tue, 03 Jan 2017 20:44:26 GMT |
@@ -5,2 +5,3 @@ "use strict"; | ||
*/ | ||
var ChangeType; | ||
(function (ChangeType) { | ||
@@ -12,5 +13,4 @@ ChangeType[ChangeType["none"] = 0] = "none"; | ||
ChangeType[ChangeType["major"] = 4] = "major"; | ||
})(exports.ChangeType || (exports.ChangeType = {})); | ||
var ChangeType = exports.ChangeType; | ||
})(ChangeType = exports.ChangeType || (exports.ChangeType = {})); | ||
//# sourceMappingURL=ChangeManagement.js.map |
@@ -5,3 +5,4 @@ /** | ||
"use strict"; | ||
var path = require('path'); | ||
var path = require("path"); | ||
var PackageDependencyKind; | ||
(function (PackageDependencyKind) { | ||
@@ -17,4 +18,3 @@ PackageDependencyKind[PackageDependencyKind["Normal"] = 0] = "Normal"; | ||
PackageDependencyKind[PackageDependencyKind["LocalLink"] = 2] = "LocalLink"; | ||
})(exports.PackageDependencyKind || (exports.PackageDependencyKind = {})); | ||
var PackageDependencyKind = exports.PackageDependencyKind; | ||
})(PackageDependencyKind = exports.PackageDependencyKind || (exports.PackageDependencyKind = {})); | ||
var Package = (function () { | ||
@@ -45,3 +45,3 @@ function Package(name, version, dependencies, folderPath) { | ||
if (npmPackage.error) { | ||
throw Error(("Failed to parse package.json for " + path.basename(npmPackage.path) + ": ") | ||
throw Error("Failed to parse package.json for " + path.basename(npmPackage.path) + ": " | ||
+ npmPackage.error.message); | ||
@@ -48,0 +48,0 @@ } |
@@ -5,8 +5,8 @@ /** | ||
"use strict"; | ||
var fsx = require('fs-extra'); | ||
var path = require('path'); | ||
var os = require('os'); | ||
var Validator = require('z-schema'); | ||
var JsonFile_1 = require('../utilities/JsonFile'); | ||
var Utilities_1 = require('../utilities/Utilities'); | ||
var fsx = require("fs-extra"); | ||
var path = require("path"); | ||
var os = require("os"); | ||
var Validator = require("z-schema"); | ||
var JsonFile_1 = require("../utilities/JsonFile"); | ||
var Utilities_1 = require("../utilities/Utilities"); | ||
var PackageReviewItem = (function () { | ||
@@ -68,3 +68,3 @@ function PackageReviewItem() { | ||
var detail = error.details[0]; | ||
var errorMessage = ("Error parsing file '" + path.basename(jsonFilename) + "',") | ||
var errorMessage = "Error parsing file '" + path.basename(jsonFilename) + "'," | ||
+ ("section[" + detail.path + "]:" + os.EOL + "(" + detail.code + ") " + detail.message); | ||
@@ -160,3 +160,3 @@ console.log(os.EOL + 'ERROR: ' + errorMessage + os.EOL + os.EOL); | ||
if (this._itemsByName.has(itemJson.name)) { | ||
throw new Error(("Error loading package review file " + jsonFilename + ":") + os.EOL | ||
throw new Error("Error loading package review file " + jsonFilename + ":" + os.EOL | ||
+ (" the name \"" + itemJson.name + "\" appears more than once")); | ||
@@ -163,0 +163,0 @@ } |
/// <reference types="es6-collections" /> | ||
import RushConfigurationProject, { IRushConfigurationProjectJson } from './RushConfigurationProject'; | ||
/** | ||
* Part of IRushConfigurationJson. | ||
*/ | ||
export interface IRushGitPolicyJson { | ||
allowedEmailRegExps?: string[]; | ||
sampleEmail?: string; | ||
} | ||
/** | ||
* This represents the JSON data structure for the "rush.json" configuration file. | ||
@@ -18,2 +25,3 @@ * See rush-schema.json for documentation. | ||
useLocalNpmCache?: boolean; | ||
gitPolicy?: IRushGitPolicyJson; | ||
projects: IRushConfigurationProjectJson[]; | ||
@@ -48,2 +56,4 @@ } | ||
private _reviewCategories; | ||
private _gitAllowedEmailRegExps; | ||
private _gitSampleEmail; | ||
private _projects; | ||
@@ -156,2 +166,15 @@ private _projectsByName; | ||
readonly reviewCategories: Set<string>; | ||
/** | ||
* A list of regular expressions describing allowable e-mail patterns for Git commits. | ||
* They are case-insensitive anchored JavaScript RegExps. | ||
* Example: ".*@example\.com" | ||
* This array will never be undefined. | ||
*/ | ||
readonly gitAllowedEmailRegExps: string[]; | ||
/** | ||
* An example valid e-mail address that conforms to one of the allowedEmailRegExps. | ||
* Example: "foxtrot@example\.com" | ||
* This will never be undefined, and will always be nonempty if gitAllowedEmailRegExps is used. | ||
*/ | ||
readonly gitSampleEmail: string; | ||
readonly projects: RushConfigurationProject[]; | ||
@@ -158,0 +181,0 @@ readonly projectsByName: Map<string, RushConfigurationProject>; |
@@ -5,11 +5,11 @@ /** | ||
"use strict"; | ||
var path = require('path'); | ||
var fsx = require('fs-extra'); | ||
var os = require('os'); | ||
var semver = require('semver'); | ||
var rushVersion_1 = require('../rushVersion'); | ||
var Validator = require('z-schema'); | ||
var JsonFile_1 = require('../utilities/JsonFile'); | ||
var RushConfigurationProject_1 = require('./RushConfigurationProject'); | ||
var Utilities_1 = require('../utilities/Utilities'); | ||
var path = require("path"); | ||
var fsx = require("fs-extra"); | ||
var os = require("os"); | ||
var semver = require("semver"); | ||
var rushVersion_1 = require("../rushVersion"); | ||
var Validator = require("z-schema"); | ||
var JsonFile_1 = require("../utilities/JsonFile"); | ||
var RushConfigurationProject_1 = require("./RushConfigurationProject"); | ||
var Utilities_1 = require("../utilities/Utilities"); | ||
/** | ||
@@ -32,3 +32,3 @@ * This represents the Rush configuration for a repository, based on the Rush.json | ||
if (!semver.satisfies(process.version, rushConfigurationJson.nodeSupportedVersionRange)) { | ||
throw new Error(("Your dev environment is running Node.js version " + process.version + " which does") | ||
throw new Error("Your dev environment is running Node.js version " + process.version + " which does" | ||
+ " not meet the requirements for building this repository. (The rush.json configuration" | ||
@@ -75,2 +75,16 @@ + (" requires nodeSupportedVersionRange=\"" + rushConfigurationJson.nodeSupportedVersionRange + "\")")); | ||
this._reviewCategories = new Set(rushConfigurationJson.reviewCategories); | ||
this._gitAllowedEmailRegExps = []; | ||
this._gitSampleEmail = ''; | ||
if (rushConfigurationJson.gitPolicy) { | ||
if (rushConfigurationJson.gitPolicy.sampleEmail) { | ||
this._gitSampleEmail = rushConfigurationJson.gitPolicy.sampleEmail; | ||
} | ||
if (rushConfigurationJson.gitPolicy.allowedEmailRegExps) { | ||
this._gitAllowedEmailRegExps = rushConfigurationJson.gitPolicy.allowedEmailRegExps; | ||
if (this._gitSampleEmail.trim().length < 1) { | ||
throw new Error('The rush.json file is missing the "sampleEmail" option, ' + | ||
'which is required when using "allowedEmailRegExps"'); | ||
} | ||
} | ||
} | ||
this._projects = []; | ||
@@ -89,3 +103,3 @@ this._projectsByName = new Map(); | ||
if (this._projectsByName.get(project.packageName)) { | ||
throw new Error(("The project name \"" + project.packageName + "\" was specified more than once") | ||
throw new Error("The project name \"" + project.packageName + "\" was specified more than once" | ||
+ " in the rush.json configuration file."); | ||
@@ -95,6 +109,6 @@ } | ||
} | ||
var _loop_1 = function(project) { | ||
var _loop_1 = function (project) { | ||
project.cyclicDependencyProjects.forEach(function (cyclicDependencyProject) { | ||
if (!_this.getProjectByName(cyclicDependencyProject)) { | ||
throw new Error(("In rush.json, the \"" + cyclicDependencyProject + "\" project does not exist,") | ||
throw new Error("In rush.json, the \"" + cyclicDependencyProject + "\" project does not exist," | ||
+ (" but was referenced by the cyclicDependencyProjects for " + project.packageName)); | ||
@@ -125,3 +139,3 @@ } | ||
if (semver.lt(rushVersion_1.default, rushMinimumVersion)) { | ||
throw new Error(("Your rush tool is version " + rushVersion_1.default + ", but rush.json") | ||
throw new Error("Your rush tool is version " + rushVersion_1.default + ", but rush.json" | ||
+ (" requires version " + rushConfigurationJson.rushMinimumVersion + " or newer. To upgrade,") | ||
@@ -144,3 +158,3 @@ + " run \"npm install @microsoft/rush -g\"."); | ||
var detail = error.details[0]; | ||
var errorMessage = ("Error parsing file '" + path.basename(rushJsonFilename) + "',") | ||
var errorMessage = "Error parsing file '" + path.basename(rushJsonFilename) + "'," | ||
+ ("section[" + detail.path + "]:" + os.EOL + "(" + detail.code + ") " + detail.message); | ||
@@ -370,2 +384,27 @@ console.log(os.EOL + 'ERROR: ' + errorMessage + os.EOL + os.EOL); | ||
}); | ||
Object.defineProperty(RushConfiguration.prototype, "gitAllowedEmailRegExps", { | ||
/** | ||
* A list of regular expressions describing allowable e-mail patterns for Git commits. | ||
* They are case-insensitive anchored JavaScript RegExps. | ||
* Example: ".*@example\.com" | ||
* This array will never be undefined. | ||
*/ | ||
get: function () { | ||
return this._gitAllowedEmailRegExps; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(RushConfiguration.prototype, "gitSampleEmail", { | ||
/** | ||
* An example valid e-mail address that conforms to one of the allowedEmailRegExps. | ||
* Example: "foxtrot@example\.com" | ||
* This will never be undefined, and will always be nonempty if gitAllowedEmailRegExps is used. | ||
*/ | ||
get: function () { | ||
return this._gitSampleEmail; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(RushConfiguration.prototype, "projects", { | ||
@@ -372,0 +411,0 @@ get: function () { |
@@ -5,5 +5,5 @@ /** | ||
"use strict"; | ||
var path = require('path'); | ||
var fsx = require('fs-extra'); | ||
var JsonFile_1 = require('../utilities/JsonFile'); | ||
var path = require("path"); | ||
var fsx = require("fs-extra"); | ||
var JsonFile_1 = require("../utilities/JsonFile"); | ||
/** | ||
@@ -46,3 +46,3 @@ * This represents the configuration of a project that is built by Rush, based on | ||
if (!rushConfiguration.reviewCategories.has(projectJson.reviewCategory)) { | ||
throw new Error(("The project \"" + projectJson.packageName + "\" specifies its reviewCategory as") | ||
throw new Error("The project \"" + projectJson.packageName + "\" specifies its reviewCategory as" | ||
+ ("\"" + projectJson.reviewCategory + "\" which is not one of the defined reviewCategories.")); | ||
@@ -55,3 +55,3 @@ } | ||
if (this._packageJson.name !== this._packageName) { | ||
throw new Error(("The package name \"" + this._packageName + "\" specified in rush.json does not") | ||
throw new Error("The package name \"" + this._packageName + "\" specified in rush.json does not" | ||
+ (" match the name \"" + this._packageJson.name + "\" from package.json")); | ||
@@ -58,0 +58,0 @@ } |
@@ -9,2 +9,3 @@ /** | ||
"use strict"; | ||
var ErrorDetectionMode; | ||
(function (ErrorDetectionMode) { | ||
@@ -14,4 +15,3 @@ ErrorDetectionMode[ErrorDetectionMode["LocalBuild"] = 1] = "LocalBuild"; | ||
ErrorDetectionMode[ErrorDetectionMode["VisualStudioOnline"] = 3] = "VisualStudioOnline"; | ||
})(exports.ErrorDetectionMode || (exports.ErrorDetectionMode = {})); | ||
var ErrorDetectionMode = exports.ErrorDetectionMode; | ||
})(ErrorDetectionMode = exports.ErrorDetectionMode || (exports.ErrorDetectionMode = {})); | ||
/** | ||
@@ -18,0 +18,0 @@ * Creates an Error Detection Rule based on a regex and a function which converts a regex match to a TaskError |
"use strict"; | ||
var TestErrorDetector_1 = require('./TestErrorDetector'); | ||
var TestErrorDetector_1 = require("./TestErrorDetector"); | ||
exports.TestErrorDetector = TestErrorDetector_1.default; | ||
var TsErrorDetector_1 = require('./TsErrorDetector'); | ||
var TsErrorDetector_1 = require("./TsErrorDetector"); | ||
exports.TsErrorDetector = TsErrorDetector_1.default; | ||
var TsLintErrorDetector_1 = require('./TsLintErrorDetector'); | ||
var TsLintErrorDetector_1 = require("./TsLintErrorDetector"); | ||
exports.TsLintErrorDetector = TsLintErrorDetector_1.default; | ||
//# sourceMappingURL=index.js.map |
@@ -9,4 +9,4 @@ /** | ||
// tslint:disable:export-name | ||
var ErrorDetector_1 = require('../ErrorDetector'); | ||
var TaskError_1 = require('../TaskError'); | ||
var ErrorDetector_1 = require("../ErrorDetector"); | ||
var TaskError_1 = require("../TaskError"); | ||
// Example: " × This Test Failed" | ||
@@ -13,0 +13,0 @@ // 0: This Test Failed |
@@ -9,4 +9,4 @@ /** | ||
// tslint:disable:export-name | ||
var ErrorDetector_1 = require('../ErrorDetector'); | ||
var TaskError_1 = require('../TaskError'); | ||
var ErrorDetector_1 = require("../ErrorDetector"); | ||
var TaskError_1 = require("../TaskError"); | ||
// Example: "[20:22:07] Error - typescript - src\Cache.ts(5,8): error TS2322: 'A' is not 'B'" | ||
@@ -13,0 +13,0 @@ // 0: input |
@@ -9,4 +9,4 @@ /** | ||
// tslint:disable:export-name | ||
var ErrorDetector_1 = require('../ErrorDetector'); | ||
var TaskError_1 = require('../TaskError'); | ||
var ErrorDetector_1 = require("../ErrorDetector"); | ||
var TaskError_1 = require("../TaskError"); | ||
// Example: "[20:22:07] Error - tslint - src\Cache.ts(5,8): error no-any: 'any' is not allowed" | ||
@@ -13,0 +13,0 @@ // 0: input |
@@ -13,3 +13,3 @@ /** | ||
}; | ||
var ErrorDetector_1 = require('./ErrorDetector'); | ||
var ErrorDetector_1 = require("./ErrorDetector"); | ||
var TaskError = (function () { | ||
@@ -40,6 +40,7 @@ function TaskError(type, message) { | ||
function BuildTaskError(type, message, file, line, offset) { | ||
_super.call(this, type, message); | ||
this._file = file; | ||
this._line = line; | ||
this._offset = offset; | ||
var _this = _super.call(this, type, message) || this; | ||
_this._file = file; | ||
_this._line = line; | ||
_this._offset = offset; | ||
return _this; | ||
} | ||
@@ -46,0 +47,0 @@ BuildTaskError.prototype.toString = function (mode) { |
"use strict"; | ||
var child_process = require('child_process'); | ||
var os = require('os'); | ||
var stream_collator_1 = require('@microsoft/stream-collator'); | ||
var ErrorDetector_1 = require('./errorDetection/ErrorDetector'); | ||
var ErrorDetectionRules = require('./errorDetection/rules/index'); | ||
var child_process = require("child_process"); | ||
var os = require("os"); | ||
var stream_collator_1 = require("@microsoft/stream-collator"); | ||
var ErrorDetector_1 = require("./errorDetection/ErrorDetector"); | ||
var ErrorDetectionRules = require("./errorDetection/rules/index"); | ||
console.log('gulp2vs: Running in "' + process.cwd() + '"'); | ||
@@ -8,0 +8,0 @@ var errorDetector = new ErrorDetector_1.default([ |
"use strict"; | ||
var RushConfiguration_1 = require('./data/RushConfiguration'); | ||
var RushConfiguration_1 = require("./data/RushConfiguration"); | ||
exports.RushConfiguration = RushConfiguration_1.default; | ||
var RushConfigurationProject_1 = require('./data/RushConfigurationProject'); | ||
var RushConfigurationProject_1 = require("./data/RushConfigurationProject"); | ||
exports.RushConfigurationProject = RushConfigurationProject_1.default; | ||
var PackageReviewConfiguration_1 = require('./data/PackageReviewConfiguration'); | ||
var PackageReviewConfiguration_1 = require("./data/PackageReviewConfiguration"); | ||
exports.PackageReviewItem = PackageReviewConfiguration_1.PackageReviewItem; | ||
exports.PackageReviewConfiguration = PackageReviewConfiguration_1.default; | ||
var Package_1 = require('./data/Package'); | ||
var Package_1 = require("./data/Package"); | ||
exports.PackageDependencyKind = Package_1.PackageDependencyKind; | ||
exports.Package = Package_1.default; | ||
var ChangeManagement_1 = require('./data/ChangeManagement'); | ||
var ChangeManagement_1 = require("./data/ChangeManagement"); | ||
exports.ChangeType = ChangeManagement_1.ChangeType; | ||
var ErrorDetector_1 = require('./errorDetection/ErrorDetector'); | ||
var ErrorDetector_1 = require("./errorDetection/ErrorDetector"); | ||
exports.ErrorDetectionMode = ErrorDetector_1.ErrorDetectionMode; | ||
exports.RegexErrorDetector = ErrorDetector_1.RegexErrorDetector; | ||
exports.ErrorDetector = ErrorDetector_1.default; | ||
var TaskError_1 = require('./errorDetection/TaskError'); | ||
var TaskError_1 = require("./errorDetection/TaskError"); | ||
exports.TaskError = TaskError_1.default; | ||
exports.BuildTaskError = TaskError_1.BuildTaskError; | ||
var JsonFile_1 = require('./utilities/JsonFile'); | ||
var JsonFile_1 = require("./utilities/JsonFile"); | ||
exports.JsonFile = JsonFile_1.default; | ||
var VersionControl_1 = require('./utilities/VersionControl'); | ||
var VersionControl_1 = require("./utilities/VersionControl"); | ||
exports.VersionControl = VersionControl_1.default; | ||
var Utilities_1 = require('./utilities/Utilities'); | ||
var Utilities_1 = require("./utilities/Utilities"); | ||
exports.Utilities = Utilities_1.default; | ||
var Stopwatch_1 = require('./utilities/Stopwatch'); | ||
var Stopwatch_1 = require("./utilities/Stopwatch"); | ||
exports.Stopwatch = Stopwatch_1.Stopwatch; | ||
exports.StopwatchState = Stopwatch_1.StopwatchState; | ||
var rushVersion_1 = require('./rushVersion'); | ||
var rushVersion_1 = require("./rushVersion"); | ||
exports.rushVersion = rushVersion_1.default; | ||
var TestErrorDetector_1 = require('./errorDetection/rules/TestErrorDetector'); | ||
var TestErrorDetector_1 = require("./errorDetection/rules/TestErrorDetector"); | ||
exports.TestErrorDetector = TestErrorDetector_1.default; | ||
var TsErrorDetector_1 = require('./errorDetection/rules/TsErrorDetector'); | ||
var TsErrorDetector_1 = require("./errorDetection/rules/TsErrorDetector"); | ||
exports.TsErrorDetector = TsErrorDetector_1.default; | ||
var TsLintErrorDetector_1 = require('./errorDetection/rules/TsLintErrorDetector'); | ||
var TsLintErrorDetector_1 = require("./errorDetection/rules/TsLintErrorDetector"); | ||
exports.TsLintErrorDetector = TsLintErrorDetector_1.default; | ||
var AsyncRecycle_1 = require('./utilities/AsyncRecycle'); | ||
var AsyncRecycle_1 = require("./utilities/AsyncRecycle"); | ||
exports.AsyncRecycle = AsyncRecycle_1.default; | ||
//# sourceMappingURL=index.js.map |
@@ -52,2 +52,20 @@ { | ||
}, | ||
"gitPolicy": { | ||
"description": "If the project is stored in a Git repository, additional settings related to Git", | ||
"type": "object", | ||
"properties": { | ||
"allowedEmailRegExps": { | ||
"description": "A list of regular expressions describing allowable e-mail patterns for Git commits. They are case-insensitive anchored JavaScript RegExps. Example: \".*@example\\.com\"", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"sampleEmail": { | ||
"description": "An example valid e-mail address for \"Mr. Example\" that conforms to one of the allowedEmailRegExps. Example: \"mr-example@contoso\\.com\"", | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"projects": { | ||
@@ -54,0 +72,0 @@ "description": "A list of projects managed by this tool.", |
@@ -6,3 +6,3 @@ /** | ||
/// <reference path="../typings/tsd.d.ts" /> | ||
var path = require('path'); | ||
var path = require("path"); | ||
var myPackageJsonFilename = path.resolve(path.join(module.filename, '..', '..', 'package.json')); | ||
@@ -9,0 +9,0 @@ var myPackageJson = require(myPackageJsonFilename); |
"use strict"; | ||
var child_process = require('child_process'); | ||
var os = require('os'); | ||
var path = require('path'); | ||
var fsx = require('fs-extra'); | ||
var Utilities_1 = require('./Utilities'); | ||
var child_process = require("child_process"); | ||
var os = require("os"); | ||
var path = require("path"); | ||
var fsx = require("fs-extra"); | ||
var Utilities_1 = require("./Utilities"); | ||
var AsyncRecycle = (function () { | ||
@@ -27,3 +27,3 @@ function AsyncRecycle() { | ||
} | ||
Utilities_1.default.retryUntilTimeout(function () { return fsx.renameSync(directoryPath, newDirectoryPath); }, maxWaitTimeMs, function (e) { return new Error(("Error: " + e + os.EOL + "Often this is caused by a file lock ") + | ||
Utilities_1.default.retryUntilTimeout(function () { return fsx.renameSync(directoryPath, newDirectoryPath); }, maxWaitTimeMs, function (e) { return new Error("Error: " + e + os.EOL + "Often this is caused by a file lock " + | ||
'from a process like the virus scanner.'); }, 'recycleDirectory'); | ||
@@ -39,4 +39,4 @@ // Asynchronously delete the folder contents. | ||
var args = os.platform() === 'win32' | ||
? ['/c', ("FOR /F %f IN ('dir /B \\\\?\\" + recyclerDirectoryContents + "') DO rd /S /Q \\\\?\\" + windowsTrimmedRecyclerDirectory + "\\%f")] // tslint:disable-line:max-line-length | ||
: ['-rf', ("\"" + recyclerDirectoryContents + "\"")]; | ||
? ['/c', "FOR /F %f IN ('dir /B \\\\?\\" + recyclerDirectoryContents + "') DO rd /S /Q \\\\?\\" + windowsTrimmedRecyclerDirectory + "\\%f"] // tslint:disable-line:max-line-length | ||
: ['-rf', "\"" + recyclerDirectoryContents + "\""]; | ||
var options = { | ||
@@ -43,0 +43,0 @@ detached: true, |
"use strict"; | ||
var fsx = require('fs-extra'); | ||
var os = require('os'); | ||
var jju = require('jju'); | ||
var Utilities_1 = require('./Utilities'); | ||
var fsx = require("fs-extra"); | ||
var os = require("os"); | ||
var jju = require("jju"); | ||
var Utilities_1 = require("./Utilities"); | ||
/** | ||
@@ -22,3 +22,3 @@ * Utilities for reading/writing JSON files. | ||
catch (error) { | ||
throw new Error(("Error reading \"" + jsonFilename + "\":") + os.EOL + (" " + error.message)); | ||
throw new Error("Error reading \"" + jsonFilename + "\":" + os.EOL + (" " + error.message)); | ||
} | ||
@@ -25,0 +25,0 @@ }; |
"use strict"; | ||
var Utilities_1 = require('./Utilities'); | ||
var Utilities_1 = require("./Utilities"); | ||
var StopwatchState; | ||
(function (StopwatchState) { | ||
StopwatchState[StopwatchState["Stopped"] = 1] = "Stopped"; | ||
StopwatchState[StopwatchState["Started"] = 2] = "Started"; | ||
})(exports.StopwatchState || (exports.StopwatchState = {})); | ||
var StopwatchState = exports.StopwatchState; | ||
})(StopwatchState = exports.StopwatchState || (exports.StopwatchState = {})); | ||
/** | ||
@@ -76,3 +76,3 @@ * Represents a typical timer/stopwatch which keeps track | ||
var seconds = totalSeconds % 60.0; | ||
return (minutes.toFixed(0) + " minute" + (minutes === 1 ? '' : 's')) + | ||
return minutes.toFixed(0) + " minute" + (minutes === 1 ? '' : 's') + | ||
(" " + seconds.toFixed(1) + " seconds"); | ||
@@ -79,0 +79,0 @@ } |
/// <reference types='mocha' /> | ||
"use strict"; | ||
var chai_1 = require('chai'); | ||
var Stopwatch_1 = require('../Stopwatch'); | ||
var chai_1 = require("chai"); | ||
var Stopwatch_1 = require("../Stopwatch"); | ||
function pseudoTimeMilliseconds(times) { | ||
@@ -6,0 +6,0 @@ return function () { return times.shift(); }; |
@@ -5,6 +5,6 @@ /** | ||
"use strict"; | ||
var child_process = require('child_process'); | ||
var fsx = require('fs-extra'); | ||
var os = require('os'); | ||
var rimraf = require('rimraf'); | ||
var child_process = require("child_process"); | ||
var fsx = require("fs-extra"); | ||
var os = require("os"); | ||
var rimraf = require("rimraf"); | ||
var Utilities = (function () { | ||
@@ -87,3 +87,3 @@ function Utilities() { | ||
var maxWaitTimeMs = 7 * 1000; | ||
return Utilities.retryUntilTimeout(function () { return fsx.mkdirSync(folderName); }, maxWaitTimeMs, function (e) { return new Error(("Error: " + e + os.EOL + "Often this is caused by a file lock ") + | ||
return Utilities.retryUntilTimeout(function () { return fsx.mkdirSync(folderName); }, maxWaitTimeMs, function (e) { return new Error("Error: " + e + os.EOL + "Often this is caused by a file lock " + | ||
'from a process such as your text editor, command prompt, ' + | ||
@@ -205,11 +205,11 @@ 'or "gulp serve"'); }, 'createFolderWithRetry'); | ||
console.log(os.EOL + 'The command failed:'); | ||
console.log((" " + command + " ") + args.join(' ')); | ||
console.log(" " + command + " " + args.join(' ')); | ||
console.log("ERROR: " + error.toString()); | ||
if (attemptNumber < maxAttempts) { | ||
++attemptNumber; | ||
console.log(("Trying again (attempt #" + attemptNumber + ")...") + os.EOL); | ||
console.log("Trying again (attempt #" + attemptNumber + ")..." + os.EOL); | ||
continue; | ||
} | ||
else { | ||
console.error(("Giving up after " + attemptNumber + " attempts") + os.EOL); | ||
console.error("Giving up after " + attemptNumber + " attempts" + os.EOL); | ||
throw error; | ||
@@ -216,0 +216,0 @@ } |
"use strict"; | ||
var child_process = require('child_process'); | ||
var child_process = require("child_process"); | ||
var VersionControl = (function () { | ||
@@ -4,0 +4,0 @@ function VersionControl() { |
{ | ||
"name": "@microsoft/rush-lib", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "Library support for the Rush tool", | ||
@@ -14,7 +14,10 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@microsoft/stream-collator": "~1.0.2", | ||
"@types/chai": "~3.4.34", | ||
"@types/es6-collections": "^0.5.29", | ||
"@types/fs-extra": "^0.0.34", | ||
"@types/mocha": "~2.2.32", | ||
"@types/node": ">=6.0.51 <7.0.0", | ||
"@microsoft/stream-collator": "~1.0.2", | ||
"@types/z-schema": "~3.16.31", | ||
"fs-extra": "~0.26.0", | ||
"@types/fs-extra": "~0.0.34", | ||
"jju": "~1.3.0", | ||
@@ -28,7 +31,5 @@ "rimraf": "~2.5.2", | ||
"chai": "~3.5.0", | ||
"@types/chai": "^3.4.34", | ||
"gulp": "~3.9.1", | ||
"mocha": "~2.5.3", | ||
"@types/mocha": "^2.2.32" | ||
"mocha": "~2.5.3" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
295637
4
2836
12
+ Added@types/chai@~3.4.34
+ Added@types/mocha@~2.2.32
+ Added@types/z-schema@~3.16.31
+ Added@types/chai@3.4.35(transitive)
+ Added@types/fs-extra@0.0.34(transitive)
+ Added@types/mocha@2.2.48(transitive)
+ Added@types/z-schema@3.16.32(transitive)
- Removed@types/fs-extra@0.0.37(transitive)
Updated@types/fs-extra@^0.0.34