node \git\rushstack\apps\rush-lib\lib\start update
This commit is contained in:
Родитель
ef6eaa97d2
Коммит
a9caf17f5e
|
@ -8,11 +8,11 @@
|
|||
"my-bulk-command": "node_modules/.bin/my-bulk-command"
|
||||
},
|
||||
"dependencies": {
|
||||
"my-controls": "^1.0.0",
|
||||
"my-controls": "workspace:^1.0.0",
|
||||
"whatwg-fetch": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"my-toolchain": "^1.0.0",
|
||||
"my-toolchain": "workspace:^1.0.0",
|
||||
"typescript": "^3.0.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,143 +1,20 @@
|
|||
dependencies:
|
||||
'@rush-temp/my-app': 'file:projects/my-app.tgz'
|
||||
'@rush-temp/my-controls': 'file:projects/my-controls.tgz'
|
||||
'@rush-temp/my-toolchain': 'file:projects/my-toolchain.tgz'
|
||||
'@types/node': 10.17.26
|
||||
colors: 1.4.0
|
||||
rimraf: 2.7.1
|
||||
typescript: 3.9.5
|
||||
whatwg-fetch: 3.0.0
|
||||
importers:
|
||||
.:
|
||||
specifiers: {}
|
||||
../../apps/my-app:
|
||||
dependencies:
|
||||
my-controls: 'link:../../libraries/my-controls'
|
||||
devDependencies:
|
||||
my-toolchain: 'link:../../tools/my-toolchain'
|
||||
specifiers:
|
||||
my-controls: 'workspace:^1.0.0'
|
||||
my-toolchain: 'workspace:^1.0.0'
|
||||
../../libraries/my-controls:
|
||||
devDependencies:
|
||||
my-toolchain: 'link:../../tools/my-toolchain'
|
||||
specifiers:
|
||||
my-toolchain: 'workspace:^1.0.0'
|
||||
../../tools/my-toolchain:
|
||||
specifiers: {}
|
||||
lockfileVersion: 5.1
|
||||
packages:
|
||||
/@types/node/10.17.26:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-myMwkO2Cr82kirHY8uknNRHEVtn0wV3DTQfkrjx17jmkstDRZ24gNUdl8AHXVyVclTYI/bNjgTPTAWvWLqXqkw==
|
||||
/balanced-match/1.0.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
||||
/brace-expansion/1.1.11:
|
||||
dependencies:
|
||||
balanced-match: 1.0.0
|
||||
concat-map: 0.0.1
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
|
||||
/colors/1.4.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=0.1.90'
|
||||
resolution:
|
||||
integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==
|
||||
/concat-map/0.0.1:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
||||
/fs.realpath/1.0.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
|
||||
/glob/7.1.6:
|
||||
dependencies:
|
||||
fs.realpath: 1.0.0
|
||||
inflight: 1.0.6
|
||||
inherits: 2.0.4
|
||||
minimatch: 3.0.4
|
||||
once: 1.4.0
|
||||
path-is-absolute: 1.0.1
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
|
||||
/inflight/1.0.6:
|
||||
dependencies:
|
||||
once: 1.4.0
|
||||
wrappy: 1.0.2
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
|
||||
/inherits/2.0.4:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
/minimatch/3.0.4:
|
||||
dependencies:
|
||||
brace-expansion: 1.1.11
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
|
||||
/once/1.4.0:
|
||||
dependencies:
|
||||
wrappy: 1.0.2
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||
/path-is-absolute/1.0.1:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
|
||||
/rimraf/2.7.1:
|
||||
dependencies:
|
||||
glob: 7.1.6
|
||||
dev: false
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
|
||||
/typescript/3.9.5:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=4.2.0'
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==
|
||||
/whatwg-fetch/3.0.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==
|
||||
/wrappy/1.0.2:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||
'file:projects/my-app.tgz':
|
||||
dependencies:
|
||||
typescript: 3.9.5
|
||||
whatwg-fetch: 3.0.0
|
||||
dev: false
|
||||
name: '@rush-temp/my-app'
|
||||
resolution:
|
||||
integrity: sha512-5hQYNQ4OaheE4snzorkB/UcTAnQcq8uQ0uHMSpu7Q/3IPc6neV5wlvC9IM2aRs+YoC5MpjQlzP8AneCY+KngnQ==
|
||||
tarball: 'file:projects/my-app.tgz'
|
||||
version: 0.0.0
|
||||
'file:projects/my-controls.tgz':
|
||||
dependencies:
|
||||
typescript: 3.9.5
|
||||
dev: false
|
||||
name: '@rush-temp/my-controls'
|
||||
resolution:
|
||||
integrity: sha512-9uBe99mh6UAW5iNqa1g+k1lCvgfhKpYVaxCj/jx7GWx88UyRspqJoCs+fhQQ5M0tJx/QJojjM84xVeR7WckqYg==
|
||||
tarball: 'file:projects/my-controls.tgz'
|
||||
version: 0.0.0
|
||||
'file:projects/my-toolchain.tgz':
|
||||
dependencies:
|
||||
'@types/node': 10.17.26
|
||||
colors: 1.4.0
|
||||
rimraf: 2.7.1
|
||||
typescript: 3.9.5
|
||||
dev: false
|
||||
name: '@rush-temp/my-toolchain'
|
||||
resolution:
|
||||
integrity: sha512-Mrgh3K0R8vXqJ3y4QPfJS2i+aXJzNBKITsr6yPgHwDVpSNlHZgqcAVeWuYOTwLiiyuNGSjmykcV2kt9fsKWJZg==
|
||||
tarball: 'file:projects/my-toolchain.tgz'
|
||||
version: 0.0.0
|
||||
registry: ''
|
||||
specifiers:
|
||||
'@rush-temp/my-app': 'file:./projects/my-app.tgz'
|
||||
'@rush-temp/my-controls': 'file:./projects/my-controls.tgz'
|
||||
'@rush-temp/my-toolchain': 'file:./projects/my-toolchain.tgz'
|
||||
'@types/node': ^10.9.4
|
||||
colors: ^1.3.2
|
||||
rimraf: ^2.6.2
|
||||
typescript: ^3.0.3
|
||||
whatwg-fetch: ^3.0.0
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
|
||||
}
|
|
@ -57,26 +57,33 @@ function _parsePackageSpecifier(rawPackageSpecifier) {
|
|||
* we'd prefer to skip that line and continue looking in other places such as the user's
|
||||
* home directory.
|
||||
*
|
||||
* IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities._copyNpmrcFile()
|
||||
* IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities.copyAndTrimNpmrcFile()
|
||||
*/
|
||||
function _copyAndTrimNpmrcFile(sourceNpmrcPath, targetNpmrcPath) {
|
||||
console.log(`Copying ${sourceNpmrcPath} --> ${targetNpmrcPath}`); // Verbose
|
||||
let npmrcFileLines = fs.readFileSync(sourceNpmrcPath).toString().split('\n');
|
||||
npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim());
|
||||
const resultLines = [];
|
||||
// This finds environment variable tokens that look like "${VAR_NAME}"
|
||||
const expansionRegExp = /\$\{([^\}]+)\}/g;
|
||||
// Comment lines start with "#" or ";"
|
||||
const commentRegExp = /^\s*[#;]/;
|
||||
// Trim out lines that reference environment variables that aren't defined
|
||||
for (const line of npmrcFileLines) {
|
||||
// This finds environment variable tokens that look like "${VAR_NAME}"
|
||||
const regex = /\$\{([^\}]+)\}/g;
|
||||
const environmentVariables = line.match(regex);
|
||||
let lineShouldBeTrimmed = false;
|
||||
if (environmentVariables) {
|
||||
for (const token of environmentVariables) {
|
||||
// Remove the leading "${" and the trailing "}" from the token
|
||||
const environmentVariableName = token.substring(2, token.length - 1);
|
||||
if (!process.env[environmentVariableName]) {
|
||||
lineShouldBeTrimmed = true;
|
||||
break;
|
||||
// Ignore comment lines
|
||||
if (!commentRegExp.test(line)) {
|
||||
const environmentVariables = line.match(expansionRegExp);
|
||||
if (environmentVariables) {
|
||||
for (const token of environmentVariables) {
|
||||
// Remove the leading "${" and the trailing "}" from the token
|
||||
const environmentVariableName = token.substring(2, token.length - 1);
|
||||
// Is the environment variable defined?
|
||||
if (!process.env[environmentVariableName]) {
|
||||
// No, so trim this line
|
||||
lineShouldBeTrimmed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,9 +9,8 @@
|
|||
"build": "node_modules/.bin/my-build",
|
||||
"my-bulk-command": "node_modules/.bin/my-bulk-command"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"my-toolchain": "^1.0.0",
|
||||
"my-toolchain": "workspace:^1.0.0",
|
||||
"typescript": "^3.0.3"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче