Bump @microsoft/rush from 5.97.1 to 5.129.6 (#2371)
Bump @nevware21/ts-utils from 0.11.1 to 0.11.3 Bump @nevware21/ts-async from 0.5.1 to 0.5.2
This commit is contained in:
Родитель
806051aca0
Коммит
513d8e6288
|
@ -71,8 +71,8 @@
|
|||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-dependencies-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-properties-js": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@microsoft/applicationinsights-channel-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/dynamicproto-js": "^2.0.3",
|
||||
"@microsoft/1ds-core-js": "4.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/ai-test-framework": "0.0.1",
|
||||
|
|
|
@ -55,8 +55,8 @@
|
|||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"tslib": "*"
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@microsoft/dynamicproto-js": "^2.0.3",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
}
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -8,6 +8,9 @@
|
|||
// node common/scripts/install-run-rush.js install
|
||||
//
|
||||
// For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||
// See the @microsoft/rush package's LICENSE file for details.
|
||||
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
|
@ -113,7 +116,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 657147);
|
||||
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||
// See the @microsoft/rush package's LICENSE file for license information.
|
||||
// See LICENSE in the project root for license information.
|
||||
/* eslint-disable no-console */
|
||||
|
||||
|
||||
const { installAndRun, findRushJsonFolder, RUSH_JSON_FILENAME, runWithErrorAndStatusCode } = require('./install-run');
|
||||
|
@ -136,8 +140,8 @@ function _getRushVersion(logger) {
|
|||
return rushJsonMatches[1];
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error(`Unable to determine the required version of Rush from rush.json (${rushJsonFolder}). ` +
|
||||
"The 'rushVersion' field is either not assigned in rush.json or was specified " +
|
||||
throw new Error(`Unable to determine the required version of Rush from ${RUSH_JSON_FILENAME} (${rushJsonFolder}). ` +
|
||||
`The 'rushVersion' field is either not assigned in ${RUSH_JSON_FILENAME} or was specified ` +
|
||||
'using an unexpected syntax.');
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +200,7 @@ function _run() {
|
|||
}
|
||||
runWithErrorAndStatusCode(logger, () => {
|
||||
const version = _getRushVersion(logger);
|
||||
logger.info(`The rush.json configuration requests Rush version ${version}`);
|
||||
logger.info(`The ${RUSH_JSON_FILENAME} configuration requests Rush version ${version}`);
|
||||
const lockFilePath = process.env[INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE];
|
||||
if (lockFilePath) {
|
||||
logger.info(`Found ${INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE}="${lockFilePath}", installing with lockfile.`);
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
// node common/scripts/install-run-rushx.js custom-command
|
||||
//
|
||||
// For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||
// See the @microsoft/rush package's LICENSE file for details.
|
||||
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
|
@ -19,7 +22,7 @@ var __webpack_exports__ = {};
|
|||
\*************************************************/
|
||||
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||
// See the @microsoft/rush package's LICENSE file for license information.
|
||||
// See LICENSE in the project root for license information.
|
||||
require('./install-run-rush');
|
||||
//# sourceMappingURL=install-run-rushx.js.map
|
||||
module.exports = __webpack_exports__;
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
// node common/scripts/install-run.js qrcode@1.2.2 qrcode https://rushjs.io
|
||||
//
|
||||
// For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||
// See the @microsoft/rush package's LICENSE file for details.
|
||||
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
|
@ -21,6 +24,7 @@
|
|||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "isVariableSetInNpmrcFile": () => (/* binding */ isVariableSetInNpmrcFile),
|
||||
/* harmony export */ "syncNpmrc": () => (/* binding */ syncNpmrc)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs */ 657147);
|
||||
|
@ -33,23 +37,30 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
/**
|
||||
* As a workaround, copyAndTrimNpmrcFile() copies the .npmrc file to the target folder, and also trims
|
||||
* This function reads the content for given .npmrc file path, and also trims
|
||||
* unusable lines from the .npmrc file.
|
||||
*
|
||||
* Why are we trimming the .npmrc lines? NPM allows environment variables to be specified in
|
||||
* the .npmrc file to provide different authentication tokens for different registry.
|
||||
* However, if the environment variable is undefined, it expands to an empty string, which
|
||||
* produces a valid-looking mapping with an invalid URL that causes an error. Instead,
|
||||
* we'd prefer to skip that line and continue looking in other places such as the user's
|
||||
* home directory.
|
||||
*
|
||||
* @returns
|
||||
* The text of the the .npmrc.
|
||||
*/
|
||||
function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) {
|
||||
logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose
|
||||
logger.info(` --> "${targetNpmrcPath}"`);
|
||||
let npmrcFileLines = fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(sourceNpmrcPath).toString().split('\n');
|
||||
// create a global _combinedNpmrc for cache purpose
|
||||
const _combinedNpmrcMap = new Map();
|
||||
function _trimNpmrcFile(options) {
|
||||
const { sourceNpmrcPath, linesToPrepend, linesToAppend } = options;
|
||||
const combinedNpmrcFromCache = _combinedNpmrcMap.get(sourceNpmrcPath);
|
||||
if (combinedNpmrcFromCache !== undefined) {
|
||||
return combinedNpmrcFromCache;
|
||||
}
|
||||
let npmrcFileLines = [];
|
||||
if (linesToPrepend) {
|
||||
npmrcFileLines.push(...linesToPrepend);
|
||||
}
|
||||
if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) {
|
||||
npmrcFileLines.push(...fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(sourceNpmrcPath).toString().split('\n'));
|
||||
}
|
||||
if (linesToAppend) {
|
||||
npmrcFileLines.push(...linesToAppend);
|
||||
}
|
||||
npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim());
|
||||
const resultLines = [];
|
||||
// This finds environment variable tokens that look like "${VAR_NAME}"
|
||||
|
@ -57,8 +68,13 @@ function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) {
|
|||
// Comment lines start with "#" or ";"
|
||||
const commentRegExp = /^\s*[#;]/;
|
||||
// Trim out lines that reference environment variables that aren't defined
|
||||
for (const line of npmrcFileLines) {
|
||||
for (let line of npmrcFileLines) {
|
||||
let lineShouldBeTrimmed = false;
|
||||
//remove spaces before or after key and value
|
||||
line = line
|
||||
.split('=')
|
||||
.map((lineToTrim) => lineToTrim.trim())
|
||||
.join('=');
|
||||
// Ignore comment lines
|
||||
if (!commentRegExp.test(line)) {
|
||||
const environmentVariables = line.match(expansionRegExp);
|
||||
|
@ -85,27 +101,44 @@ function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) {
|
|||
}
|
||||
}
|
||||
const combinedNpmrc = resultLines.join('\n');
|
||||
//save the cache
|
||||
_combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc);
|
||||
return combinedNpmrc;
|
||||
}
|
||||
function _copyAndTrimNpmrcFile(options) {
|
||||
const { logger, sourceNpmrcPath, targetNpmrcPath, linesToPrepend, linesToAppend } = options;
|
||||
logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose
|
||||
logger.info(` --> "${targetNpmrcPath}"`);
|
||||
const combinedNpmrc = _trimNpmrcFile({
|
||||
sourceNpmrcPath,
|
||||
linesToPrepend,
|
||||
linesToAppend
|
||||
});
|
||||
fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(targetNpmrcPath, combinedNpmrc);
|
||||
return combinedNpmrc;
|
||||
}
|
||||
/**
|
||||
* syncNpmrc() copies the .npmrc file to the target folder, and also trims unusable lines from the .npmrc file.
|
||||
* If the source .npmrc file not exist, then syncNpmrc() will delete an .npmrc that is found in the target folder.
|
||||
*
|
||||
* IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities._syncNpmrc()
|
||||
*
|
||||
* @returns
|
||||
* The text of the the synced .npmrc, if one exists. If one does not exist, then undefined is returned.
|
||||
*/
|
||||
function syncNpmrc(sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = {
|
||||
info: console.log,
|
||||
error: console.error
|
||||
}) {
|
||||
function syncNpmrc(options) {
|
||||
const { sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = {
|
||||
// eslint-disable-next-line no-console
|
||||
info: console.log,
|
||||
// eslint-disable-next-line no-console
|
||||
error: console.error
|
||||
}, createIfMissing = false, linesToAppend, linesToPrepend } = options;
|
||||
const sourceNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish');
|
||||
const targetNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetNpmrcFolder, '.npmrc');
|
||||
try {
|
||||
if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) {
|
||||
return _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath);
|
||||
if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath) || createIfMissing) {
|
||||
// Ensure the target folder exists
|
||||
if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcFolder)) {
|
||||
fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync(targetNpmrcFolder, { recursive: true });
|
||||
}
|
||||
return _copyAndTrimNpmrcFile({
|
||||
sourceNpmrcPath,
|
||||
targetNpmrcPath,
|
||||
logger,
|
||||
linesToAppend,
|
||||
linesToPrepend
|
||||
});
|
||||
}
|
||||
else if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcPath)) {
|
||||
// If the source .npmrc doesn't exist and there is one in the target, delete the one in the target
|
||||
|
@ -117,6 +150,16 @@ function syncNpmrc(sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger
|
|||
throw new Error(`Error syncing .npmrc file: ${e}`);
|
||||
}
|
||||
}
|
||||
function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey) {
|
||||
const sourceNpmrcPath = `${sourceNpmrcFolder}/.npmrc`;
|
||||
//if .npmrc file does not exist, return false directly
|
||||
if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) {
|
||||
return false;
|
||||
}
|
||||
const trimmedNpmrcFile = _trimNpmrcFile({ sourceNpmrcPath });
|
||||
const variableKeyRegExp = new RegExp(`^${variableKey}=`, 'm');
|
||||
return trimmedNpmrcFile.match(variableKeyRegExp) !== null;
|
||||
}
|
||||
//# sourceMappingURL=npmrcUtilities.js.map
|
||||
|
||||
/***/ }),
|
||||
|
@ -253,7 +296,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utilities/npmrcUtilities */ 679877);
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||
// See the @microsoft/rush package's LICENSE file for license information.
|
||||
// See LICENSE in the project root for license information.
|
||||
/* eslint-disable no-console */
|
||||
|
||||
|
||||
|
||||
|
@ -297,7 +341,7 @@ let _npmPath = undefined;
|
|||
function getNpmPath() {
|
||||
if (!_npmPath) {
|
||||
try {
|
||||
if (os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32') {
|
||||
if (_isWindows()) {
|
||||
// We're on Windows
|
||||
const whereOutput = child_process__WEBPACK_IMPORTED_MODULE_0__.execSync('where npm', { stdio: [] }).toString();
|
||||
const lines = whereOutput.split(os__WEBPACK_IMPORTED_MODULE_2__.EOL).filter((line) => !!line);
|
||||
|
@ -359,6 +403,23 @@ function _getRushTempFolder(rushCommonFolder) {
|
|||
return _ensureAndJoinPath(rushCommonFolder, 'temp');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Compare version strings according to semantic versioning.
|
||||
* Returns a positive integer if "a" is a later version than "b",
|
||||
* a negative integer if "b" is later than "a",
|
||||
* and 0 otherwise.
|
||||
*/
|
||||
function _compareVersionStrings(a, b) {
|
||||
const aParts = a.split(/[.-]/);
|
||||
const bParts = b.split(/[.-]/);
|
||||
const numberOfParts = Math.max(aParts.length, bParts.length);
|
||||
for (let i = 0; i < numberOfParts; i++) {
|
||||
if (aParts[i] !== bParts[i]) {
|
||||
return (Number(aParts[i]) || 0) - (Number(bParts[i]) || 0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/**
|
||||
* Resolve a package specifier to a static version
|
||||
*/
|
||||
|
@ -376,32 +437,55 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) {
|
|||
try {
|
||||
const rushTempFolder = _getRushTempFolder(rushCommonFolder);
|
||||
const sourceNpmrcFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushCommonFolder, 'config', 'rush');
|
||||
(0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)(sourceNpmrcFolder, rushTempFolder, undefined, logger);
|
||||
(0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({
|
||||
sourceNpmrcFolder,
|
||||
targetNpmrcFolder: rushTempFolder,
|
||||
logger
|
||||
});
|
||||
const npmPath = getNpmPath();
|
||||
// This returns something that looks like:
|
||||
// @microsoft/rush@3.0.0 '3.0.0'
|
||||
// @microsoft/rush@3.0.1 '3.0.1'
|
||||
// ...
|
||||
// @microsoft/rush@3.0.20 '3.0.20'
|
||||
// <blank line>
|
||||
const npmVersionSpawnResult = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(npmPath, ['view', `${name}@${version}`, 'version', '--no-update-notifier'], {
|
||||
// ```
|
||||
// [
|
||||
// "3.0.0",
|
||||
// "3.0.1",
|
||||
// ...
|
||||
// "3.0.20"
|
||||
// ]
|
||||
// ```
|
||||
//
|
||||
// if multiple versions match the selector, or
|
||||
//
|
||||
// ```
|
||||
// "3.0.0"
|
||||
// ```
|
||||
//
|
||||
// if only a single version matches.
|
||||
const spawnSyncOptions = {
|
||||
cwd: rushTempFolder,
|
||||
stdio: []
|
||||
});
|
||||
stdio: [],
|
||||
shell: _isWindows()
|
||||
};
|
||||
const platformNpmPath = _getPlatformPath(npmPath);
|
||||
const npmVersionSpawnResult = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(platformNpmPath, ['view', `${name}@${version}`, 'version', '--no-update-notifier', '--json'], spawnSyncOptions);
|
||||
if (npmVersionSpawnResult.status !== 0) {
|
||||
throw new Error(`"npm view" returned error code ${npmVersionSpawnResult.status}`);
|
||||
}
|
||||
const npmViewVersionOutput = npmVersionSpawnResult.stdout.toString();
|
||||
const versionLines = npmViewVersionOutput.split('\n').filter((line) => !!line);
|
||||
const latestVersion = versionLines[versionLines.length - 1];
|
||||
const parsedVersionOutput = JSON.parse(npmViewVersionOutput);
|
||||
const versions = Array.isArray(parsedVersionOutput)
|
||||
? parsedVersionOutput
|
||||
: [parsedVersionOutput];
|
||||
let latestVersion = versions[0];
|
||||
for (let i = 1; i < versions.length; i++) {
|
||||
const latestVersionCandidate = versions[i];
|
||||
if (_compareVersionStrings(latestVersionCandidate, latestVersion) > 0) {
|
||||
latestVersion = latestVersionCandidate;
|
||||
}
|
||||
}
|
||||
if (!latestVersion) {
|
||||
throw new Error('No versions found for the specified version range.');
|
||||
}
|
||||
const versionMatches = latestVersion.match(/^.+\s\'(.+)\'$/);
|
||||
if (!versionMatches) {
|
||||
throw new Error(`Invalid npm output ${latestVersion}`);
|
||||
}
|
||||
return versionMatches[1];
|
||||
return latestVersion;
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error(`Unable to resolve version ${version} of package ${name}: ${e}`);
|
||||
|
@ -427,7 +511,7 @@ function findRushJsonFolder() {
|
|||
}
|
||||
} while (basePath !== (tempPath = path__WEBPACK_IMPORTED_MODULE_3__.dirname(basePath))); // Exit the loop when we hit the disk root
|
||||
if (!_rushJsonFolder) {
|
||||
throw new Error('Unable to find rush.json.');
|
||||
throw new Error(`Unable to find ${RUSH_JSON_FILENAME}.`);
|
||||
}
|
||||
}
|
||||
return _rushJsonFolder;
|
||||
|
@ -515,10 +599,12 @@ function _installPackage(logger, packageInstallFolder, name, version, command) {
|
|||
try {
|
||||
logger.info(`Installing ${name}...`);
|
||||
const npmPath = getNpmPath();
|
||||
const result = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(npmPath, [command], {
|
||||
const platformNpmPath = _getPlatformPath(npmPath);
|
||||
const result = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(platformNpmPath, [command], {
|
||||
stdio: 'inherit',
|
||||
cwd: packageInstallFolder,
|
||||
env: process.env
|
||||
env: process.env,
|
||||
shell: _isWindows()
|
||||
});
|
||||
if (result.status !== 0) {
|
||||
throw new Error(`"npm ${command}" encountered an error`);
|
||||
|
@ -534,9 +620,18 @@ function _installPackage(logger, packageInstallFolder, name, version, command) {
|
|||
*/
|
||||
function _getBinPath(packageInstallFolder, binName) {
|
||||
const binFolderPath = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin');
|
||||
const resolvedBinName = os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32' ? `${binName}.cmd` : binName;
|
||||
const resolvedBinName = _isWindows() ? `${binName}.cmd` : binName;
|
||||
return path__WEBPACK_IMPORTED_MODULE_3__.resolve(binFolderPath, resolvedBinName);
|
||||
}
|
||||
/**
|
||||
* Returns a cross-platform path - windows must enclose any path containing spaces within double quotes.
|
||||
*/
|
||||
function _getPlatformPath(platformPath) {
|
||||
return _isWindows() && platformPath.includes(' ') ? `"${platformPath}"` : platformPath;
|
||||
}
|
||||
function _isWindows() {
|
||||
return os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32';
|
||||
}
|
||||
/**
|
||||
* Write a flag file to the package's install directory, signifying that the install was successful.
|
||||
*/
|
||||
|
@ -558,7 +653,11 @@ function installAndRun(logger, packageName, packageVersion, packageBinName, pack
|
|||
// The package isn't already installed
|
||||
_cleanInstallFolder(rushTempFolder, packageInstallFolder, lockFilePath);
|
||||
const sourceNpmrcFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushCommonFolder, 'config', 'rush');
|
||||
(0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)(sourceNpmrcFolder, packageInstallFolder, undefined, logger);
|
||||
(0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)({
|
||||
sourceNpmrcFolder,
|
||||
targetNpmrcFolder: packageInstallFolder,
|
||||
logger
|
||||
});
|
||||
_createPackageJson(packageInstallFolder, packageName, packageVersion);
|
||||
const command = lockFilePath ? 'ci' : 'install';
|
||||
_installPackage(logger, packageInstallFolder, packageName, packageVersion, command);
|
||||
|
@ -574,15 +673,14 @@ function installAndRun(logger, packageName, packageVersion, packageBinName, pack
|
|||
const originalEnvPath = process.env.PATH || '';
|
||||
let result;
|
||||
try {
|
||||
// Node.js on Windows can not spawn a file when the path has a space on it
|
||||
// unless the path gets wrapped in a cmd friendly way and shell mode is used
|
||||
const shouldUseShell = binPath.includes(' ') && os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32';
|
||||
const platformBinPath = shouldUseShell ? `"${binPath}"` : binPath;
|
||||
// `npm` bin stubs on Windows are `.cmd` files
|
||||
// Node.js will not directly invoke a `.cmd` file unless `shell` is set to `true`
|
||||
const platformBinPath = _getPlatformPath(binPath);
|
||||
process.env.PATH = [binFolderPath, originalEnvPath].join(path__WEBPACK_IMPORTED_MODULE_3__.delimiter);
|
||||
result = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(platformBinPath, packageBinArgs, {
|
||||
stdio: 'inherit',
|
||||
windowsVerbatimArguments: false,
|
||||
shell: shouldUseShell,
|
||||
shell: _isWindows(),
|
||||
cwd: process.cwd(),
|
||||
env: process.env
|
||||
});
|
||||
|
|
|
@ -53,6 +53,6 @@
|
|||
"@microsoft/dynamicproto-js": "^2.0.3",
|
||||
"@microsoft/applicationinsights-web": "3.2.2",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,6 +66,6 @@
|
|||
"@microsoft/dynamicproto-js": "^2.0.3",
|
||||
"@microsoft/applicationinsights-web": "3.2.2",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,6 @@
|
|||
"@microsoft/applicationinsights-web": "3.2.2",
|
||||
"@microsoft/applicationinsights-dependencies-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,6 +66,6 @@
|
|||
"@microsoft/applicationinsights-web": "3.2.2",
|
||||
"@microsoft/applicationinsights-web-snippet": "1.2.0",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@microsoft/applicationinsights-properties-js": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@microsoft/dynamicproto-js": "^2.0.3",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/ai-test-framework": "0.0.1",
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
"@microsoft/dynamicproto-js": "^2.0.3",
|
||||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
||||
"devDependencies": {
|
||||
"@microsoft/rush": "5.97.1",
|
||||
"@microsoft/rush": "5.129.6",
|
||||
"@nevware21/grunt-eslint-ts": "^0.2.2",
|
||||
"@nevware21/grunt-ts-plugin": "^0.4.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
|
||||
"npmVersion": "8.19.4",
|
||||
"rushVersion": "5.97.1",
|
||||
"rushVersion": "5.129.6",
|
||||
"projectFolderMaxDepth": 4,
|
||||
"projects": [
|
||||
{
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/dynamicproto-js": "^2.0.3",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/qunit": "^2.19.3",
|
||||
|
@ -49,7 +49,7 @@
|
|||
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
|
||||
"@microsoft/applicationinsights-rollup-es5": "1.0.2",
|
||||
"@microsoft/api-extractor": "^7.40.0",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x",
|
||||
"grunt": "^1.5.3",
|
||||
"grunt-cli": "^1.4.3",
|
||||
"grunt-contrib-qunit": "^6.2.1",
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/applicationinsights-core-js": "3.2.2",
|
||||
"@microsoft/dynamicproto-js": "^2.0.3",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
"dependencies": {
|
||||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/dynamicproto-js": "^2.0.3",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"@nevware21/ts-async": ">= 0.5.2 < 2.x"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
"@microsoft/applicationinsights-common": "3.2.2",
|
||||
"@microsoft/applicationinsights-shims": "3.0.1",
|
||||
"@microsoft/dynamicproto-js": "^2.0.3",
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x",
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x",
|
||||
"file-saver": "^2.0.0",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
|
|
@ -54,6 +54,6 @@
|
|||
"typescript": "^4.9.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nevware21/ts-utils": ">= 0.11.1 < 2.x"
|
||||
"@nevware21/ts-utils": ">= 0.11.3 < 2.x"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче