@typescript-deploys/pr-build 5.1.0-pr-52062-4 → 5.1.0-pr-53292-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +23 -22
- package/lib/tsserver.js +23 -22
- package/lib/tsserverlibrary.js +23 -22
- package/lib/typescript.js +23 -22
- package/lib/typingsInstaller.js +13 -10
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -55721,7 +55721,7 @@ function createTypeChecker(host) {
|
|
|
55721
55721
|
const type = elementTypes[i];
|
|
55722
55722
|
const flags = target.elementFlags[i];
|
|
55723
55723
|
if (flags & 8 /* Variadic */) {
|
|
55724
|
-
if (type.flags & 58982400 /* InstantiableNonPrimitive */ ||
|
|
55724
|
+
if (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type)) {
|
|
55725
55725
|
addElement(type, 8 /* Variadic */, (_a2 = target.labeledElementDeclarations) == null ? void 0 : _a2[i]);
|
|
55726
55726
|
} else if (isTupleType(type)) {
|
|
55727
55727
|
const elements = getTypeArguments(type);
|
|
@@ -58635,8 +58635,20 @@ function createTypeChecker(host) {
|
|
|
58635
58635
|
return result;
|
|
58636
58636
|
}
|
|
58637
58637
|
const moreThanOneRealChildren = length(validChildren) > 1;
|
|
58638
|
-
|
|
58639
|
-
|
|
58638
|
+
let arrayLikeTargetParts;
|
|
58639
|
+
let nonArrayLikeTargetParts;
|
|
58640
|
+
const iterableType = getGlobalIterableType(
|
|
58641
|
+
/*reportErrors*/
|
|
58642
|
+
false
|
|
58643
|
+
);
|
|
58644
|
+
if (iterableType !== emptyGenericType) {
|
|
58645
|
+
const anyIterable = createIterableType(anyType);
|
|
58646
|
+
arrayLikeTargetParts = filterType(childrenTargetType, (t) => isTypeAssignableTo(t, anyIterable));
|
|
58647
|
+
nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isTypeAssignableTo(t, anyIterable));
|
|
58648
|
+
} else {
|
|
58649
|
+
arrayLikeTargetParts = filterType(childrenTargetType, isArrayOrTupleLikeType);
|
|
58650
|
+
nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isArrayOrTupleLikeType(t));
|
|
58651
|
+
}
|
|
58640
58652
|
if (moreThanOneRealChildren) {
|
|
58641
58653
|
if (arrayLikeTargetParts !== neverType) {
|
|
58642
58654
|
const realSource = createTupleType(checkJsxChildren(containingElement, 0 /* Normal */));
|
|
@@ -61916,13 +61928,6 @@ function createTypeChecker(host) {
|
|
|
61916
61928
|
function isArrayOrTupleLikeType(type) {
|
|
61917
61929
|
return isArrayLikeType(type) || isTupleLikeType(type);
|
|
61918
61930
|
}
|
|
61919
|
-
function isAssignableToAvailableAnyIterable(type) {
|
|
61920
|
-
const anyIterable = getGlobalIterableType(
|
|
61921
|
-
/*reportErrors*/
|
|
61922
|
-
false
|
|
61923
|
-
) !== emptyGenericType && createIterableType(anyType);
|
|
61924
|
-
return anyIterable ? isTypeAssignableTo(type, anyIterable) : isArrayOrTupleLikeType(type);
|
|
61925
|
-
}
|
|
61926
61931
|
function getTupleElementType(type, index) {
|
|
61927
61932
|
const propType = getTypeOfPropertyOfType(type, "" + index);
|
|
61928
61933
|
if (propType) {
|
|
@@ -66596,17 +66601,13 @@ function createTypeChecker(host) {
|
|
|
66596
66601
|
type,
|
|
66597
66602
|
(t) => {
|
|
66598
66603
|
var _a2;
|
|
66599
|
-
if (
|
|
66600
|
-
const
|
|
66601
|
-
|
|
66602
|
-
|
|
66603
|
-
|
|
66604
|
-
|
|
66605
|
-
|
|
66606
|
-
return substituteIndexedMappedType(mappedType, propertyNameType);
|
|
66607
|
-
}
|
|
66608
|
-
});
|
|
66609
|
-
return newTypes.length ? getIntersectionType(newTypes) : void 0;
|
|
66604
|
+
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
66605
|
+
const constraint = getConstraintTypeFromMappedType(t);
|
|
66606
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
66607
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
66608
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
66609
|
+
return substituteIndexedMappedType(t, propertyNameType);
|
|
66610
|
+
}
|
|
66610
66611
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
66611
66612
|
const prop = getPropertyOfType(t, name);
|
|
66612
66613
|
if (prop) {
|
|
@@ -66680,7 +66681,7 @@ function createTypeChecker(host) {
|
|
|
66680
66681
|
return void 0;
|
|
66681
66682
|
}
|
|
66682
66683
|
function getContextualTypeForElementExpression(arrayContextualType, index) {
|
|
66683
|
-
return arrayContextualType && (index >= 0 && getTypeOfPropertyOfContextualType(
|
|
66684
|
+
return arrayContextualType && (index >= 0 && getTypeOfPropertyOfContextualType(arrayContextualType, "" + index) || mapType(
|
|
66684
66685
|
arrayContextualType,
|
|
66685
66686
|
(t) => isTupleType(t) ? getElementTypeOfSliceOfTupleType(
|
|
66686
66687
|
t,
|
package/lib/tsserver.js
CHANGED
|
@@ -60318,7 +60318,7 @@ function createTypeChecker(host) {
|
|
|
60318
60318
|
const type = elementTypes[i];
|
|
60319
60319
|
const flags = target.elementFlags[i];
|
|
60320
60320
|
if (flags & 8 /* Variadic */) {
|
|
60321
|
-
if (type.flags & 58982400 /* InstantiableNonPrimitive */ ||
|
|
60321
|
+
if (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type)) {
|
|
60322
60322
|
addElement(type, 8 /* Variadic */, (_a2 = target.labeledElementDeclarations) == null ? void 0 : _a2[i]);
|
|
60323
60323
|
} else if (isTupleType(type)) {
|
|
60324
60324
|
const elements = getTypeArguments(type);
|
|
@@ -63232,8 +63232,20 @@ function createTypeChecker(host) {
|
|
|
63232
63232
|
return result;
|
|
63233
63233
|
}
|
|
63234
63234
|
const moreThanOneRealChildren = length(validChildren) > 1;
|
|
63235
|
-
|
|
63236
|
-
|
|
63235
|
+
let arrayLikeTargetParts;
|
|
63236
|
+
let nonArrayLikeTargetParts;
|
|
63237
|
+
const iterableType = getGlobalIterableType(
|
|
63238
|
+
/*reportErrors*/
|
|
63239
|
+
false
|
|
63240
|
+
);
|
|
63241
|
+
if (iterableType !== emptyGenericType) {
|
|
63242
|
+
const anyIterable = createIterableType(anyType);
|
|
63243
|
+
arrayLikeTargetParts = filterType(childrenTargetType, (t) => isTypeAssignableTo(t, anyIterable));
|
|
63244
|
+
nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isTypeAssignableTo(t, anyIterable));
|
|
63245
|
+
} else {
|
|
63246
|
+
arrayLikeTargetParts = filterType(childrenTargetType, isArrayOrTupleLikeType);
|
|
63247
|
+
nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isArrayOrTupleLikeType(t));
|
|
63248
|
+
}
|
|
63237
63249
|
if (moreThanOneRealChildren) {
|
|
63238
63250
|
if (arrayLikeTargetParts !== neverType) {
|
|
63239
63251
|
const realSource = createTupleType(checkJsxChildren(containingElement, 0 /* Normal */));
|
|
@@ -66513,13 +66525,6 @@ function createTypeChecker(host) {
|
|
|
66513
66525
|
function isArrayOrTupleLikeType(type) {
|
|
66514
66526
|
return isArrayLikeType(type) || isTupleLikeType(type);
|
|
66515
66527
|
}
|
|
66516
|
-
function isAssignableToAvailableAnyIterable(type) {
|
|
66517
|
-
const anyIterable = getGlobalIterableType(
|
|
66518
|
-
/*reportErrors*/
|
|
66519
|
-
false
|
|
66520
|
-
) !== emptyGenericType && createIterableType(anyType);
|
|
66521
|
-
return anyIterable ? isTypeAssignableTo(type, anyIterable) : isArrayOrTupleLikeType(type);
|
|
66522
|
-
}
|
|
66523
66528
|
function getTupleElementType(type, index) {
|
|
66524
66529
|
const propType = getTypeOfPropertyOfType(type, "" + index);
|
|
66525
66530
|
if (propType) {
|
|
@@ -71193,17 +71198,13 @@ function createTypeChecker(host) {
|
|
|
71193
71198
|
type,
|
|
71194
71199
|
(t) => {
|
|
71195
71200
|
var _a2;
|
|
71196
|
-
if (
|
|
71197
|
-
const
|
|
71198
|
-
|
|
71199
|
-
|
|
71200
|
-
|
|
71201
|
-
|
|
71202
|
-
|
|
71203
|
-
return substituteIndexedMappedType(mappedType, propertyNameType);
|
|
71204
|
-
}
|
|
71205
|
-
});
|
|
71206
|
-
return newTypes.length ? getIntersectionType(newTypes) : void 0;
|
|
71201
|
+
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
71202
|
+
const constraint = getConstraintTypeFromMappedType(t);
|
|
71203
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
71204
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
71205
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
71206
|
+
return substituteIndexedMappedType(t, propertyNameType);
|
|
71207
|
+
}
|
|
71207
71208
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
71208
71209
|
const prop = getPropertyOfType(t, name);
|
|
71209
71210
|
if (prop) {
|
|
@@ -71277,7 +71278,7 @@ function createTypeChecker(host) {
|
|
|
71277
71278
|
return void 0;
|
|
71278
71279
|
}
|
|
71279
71280
|
function getContextualTypeForElementExpression(arrayContextualType, index) {
|
|
71280
|
-
return arrayContextualType && (index >= 0 && getTypeOfPropertyOfContextualType(
|
|
71281
|
+
return arrayContextualType && (index >= 0 && getTypeOfPropertyOfContextualType(arrayContextualType, "" + index) || mapType(
|
|
71281
71282
|
arrayContextualType,
|
|
71282
71283
|
(t) => isTupleType(t) ? getElementTypeOfSliceOfTupleType(
|
|
71283
71284
|
t,
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -58128,7 +58128,7 @@ ${lanes.join("\n")}
|
|
|
58128
58128
|
const type = elementTypes[i];
|
|
58129
58129
|
const flags = target.elementFlags[i];
|
|
58130
58130
|
if (flags & 8 /* Variadic */) {
|
|
58131
|
-
if (type.flags & 58982400 /* InstantiableNonPrimitive */ ||
|
|
58131
|
+
if (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type)) {
|
|
58132
58132
|
addElement(type, 8 /* Variadic */, (_a2 = target.labeledElementDeclarations) == null ? void 0 : _a2[i]);
|
|
58133
58133
|
} else if (isTupleType(type)) {
|
|
58134
58134
|
const elements = getTypeArguments(type);
|
|
@@ -61042,8 +61042,20 @@ ${lanes.join("\n")}
|
|
|
61042
61042
|
return result;
|
|
61043
61043
|
}
|
|
61044
61044
|
const moreThanOneRealChildren = length(validChildren) > 1;
|
|
61045
|
-
|
|
61046
|
-
|
|
61045
|
+
let arrayLikeTargetParts;
|
|
61046
|
+
let nonArrayLikeTargetParts;
|
|
61047
|
+
const iterableType = getGlobalIterableType(
|
|
61048
|
+
/*reportErrors*/
|
|
61049
|
+
false
|
|
61050
|
+
);
|
|
61051
|
+
if (iterableType !== emptyGenericType) {
|
|
61052
|
+
const anyIterable = createIterableType(anyType);
|
|
61053
|
+
arrayLikeTargetParts = filterType(childrenTargetType, (t) => isTypeAssignableTo(t, anyIterable));
|
|
61054
|
+
nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isTypeAssignableTo(t, anyIterable));
|
|
61055
|
+
} else {
|
|
61056
|
+
arrayLikeTargetParts = filterType(childrenTargetType, isArrayOrTupleLikeType);
|
|
61057
|
+
nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isArrayOrTupleLikeType(t));
|
|
61058
|
+
}
|
|
61047
61059
|
if (moreThanOneRealChildren) {
|
|
61048
61060
|
if (arrayLikeTargetParts !== neverType) {
|
|
61049
61061
|
const realSource = createTupleType(checkJsxChildren(containingElement, 0 /* Normal */));
|
|
@@ -64323,13 +64335,6 @@ ${lanes.join("\n")}
|
|
|
64323
64335
|
function isArrayOrTupleLikeType(type) {
|
|
64324
64336
|
return isArrayLikeType(type) || isTupleLikeType(type);
|
|
64325
64337
|
}
|
|
64326
|
-
function isAssignableToAvailableAnyIterable(type) {
|
|
64327
|
-
const anyIterable = getGlobalIterableType(
|
|
64328
|
-
/*reportErrors*/
|
|
64329
|
-
false
|
|
64330
|
-
) !== emptyGenericType && createIterableType(anyType);
|
|
64331
|
-
return anyIterable ? isTypeAssignableTo(type, anyIterable) : isArrayOrTupleLikeType(type);
|
|
64332
|
-
}
|
|
64333
64338
|
function getTupleElementType(type, index) {
|
|
64334
64339
|
const propType = getTypeOfPropertyOfType(type, "" + index);
|
|
64335
64340
|
if (propType) {
|
|
@@ -69003,17 +69008,13 @@ ${lanes.join("\n")}
|
|
|
69003
69008
|
type,
|
|
69004
69009
|
(t) => {
|
|
69005
69010
|
var _a2;
|
|
69006
|
-
if (
|
|
69007
|
-
const
|
|
69008
|
-
|
|
69009
|
-
|
|
69010
|
-
|
|
69011
|
-
|
|
69012
|
-
|
|
69013
|
-
return substituteIndexedMappedType(mappedType, propertyNameType);
|
|
69014
|
-
}
|
|
69015
|
-
});
|
|
69016
|
-
return newTypes.length ? getIntersectionType(newTypes) : void 0;
|
|
69011
|
+
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
69012
|
+
const constraint = getConstraintTypeFromMappedType(t);
|
|
69013
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
69014
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
69015
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
69016
|
+
return substituteIndexedMappedType(t, propertyNameType);
|
|
69017
|
+
}
|
|
69017
69018
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
69018
69019
|
const prop = getPropertyOfType(t, name);
|
|
69019
69020
|
if (prop) {
|
|
@@ -69087,7 +69088,7 @@ ${lanes.join("\n")}
|
|
|
69087
69088
|
return void 0;
|
|
69088
69089
|
}
|
|
69089
69090
|
function getContextualTypeForElementExpression(arrayContextualType, index) {
|
|
69090
|
-
return arrayContextualType && (index >= 0 && getTypeOfPropertyOfContextualType(
|
|
69091
|
+
return arrayContextualType && (index >= 0 && getTypeOfPropertyOfContextualType(arrayContextualType, "" + index) || mapType(
|
|
69091
69092
|
arrayContextualType,
|
|
69092
69093
|
(t) => isTupleType(t) ? getElementTypeOfSliceOfTupleType(
|
|
69093
69094
|
t,
|
package/lib/typescript.js
CHANGED
|
@@ -58128,7 +58128,7 @@ ${lanes.join("\n")}
|
|
|
58128
58128
|
const type = elementTypes[i];
|
|
58129
58129
|
const flags = target.elementFlags[i];
|
|
58130
58130
|
if (flags & 8 /* Variadic */) {
|
|
58131
|
-
if (type.flags & 58982400 /* InstantiableNonPrimitive */ ||
|
|
58131
|
+
if (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type)) {
|
|
58132
58132
|
addElement(type, 8 /* Variadic */, (_a2 = target.labeledElementDeclarations) == null ? void 0 : _a2[i]);
|
|
58133
58133
|
} else if (isTupleType(type)) {
|
|
58134
58134
|
const elements = getTypeArguments(type);
|
|
@@ -61042,8 +61042,20 @@ ${lanes.join("\n")}
|
|
|
61042
61042
|
return result;
|
|
61043
61043
|
}
|
|
61044
61044
|
const moreThanOneRealChildren = length(validChildren) > 1;
|
|
61045
|
-
|
|
61046
|
-
|
|
61045
|
+
let arrayLikeTargetParts;
|
|
61046
|
+
let nonArrayLikeTargetParts;
|
|
61047
|
+
const iterableType = getGlobalIterableType(
|
|
61048
|
+
/*reportErrors*/
|
|
61049
|
+
false
|
|
61050
|
+
);
|
|
61051
|
+
if (iterableType !== emptyGenericType) {
|
|
61052
|
+
const anyIterable = createIterableType(anyType);
|
|
61053
|
+
arrayLikeTargetParts = filterType(childrenTargetType, (t) => isTypeAssignableTo(t, anyIterable));
|
|
61054
|
+
nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isTypeAssignableTo(t, anyIterable));
|
|
61055
|
+
} else {
|
|
61056
|
+
arrayLikeTargetParts = filterType(childrenTargetType, isArrayOrTupleLikeType);
|
|
61057
|
+
nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isArrayOrTupleLikeType(t));
|
|
61058
|
+
}
|
|
61047
61059
|
if (moreThanOneRealChildren) {
|
|
61048
61060
|
if (arrayLikeTargetParts !== neverType) {
|
|
61049
61061
|
const realSource = createTupleType(checkJsxChildren(containingElement, 0 /* Normal */));
|
|
@@ -64323,13 +64335,6 @@ ${lanes.join("\n")}
|
|
|
64323
64335
|
function isArrayOrTupleLikeType(type) {
|
|
64324
64336
|
return isArrayLikeType(type) || isTupleLikeType(type);
|
|
64325
64337
|
}
|
|
64326
|
-
function isAssignableToAvailableAnyIterable(type) {
|
|
64327
|
-
const anyIterable = getGlobalIterableType(
|
|
64328
|
-
/*reportErrors*/
|
|
64329
|
-
false
|
|
64330
|
-
) !== emptyGenericType && createIterableType(anyType);
|
|
64331
|
-
return anyIterable ? isTypeAssignableTo(type, anyIterable) : isArrayOrTupleLikeType(type);
|
|
64332
|
-
}
|
|
64333
64338
|
function getTupleElementType(type, index) {
|
|
64334
64339
|
const propType = getTypeOfPropertyOfType(type, "" + index);
|
|
64335
64340
|
if (propType) {
|
|
@@ -69003,17 +69008,13 @@ ${lanes.join("\n")}
|
|
|
69003
69008
|
type,
|
|
69004
69009
|
(t) => {
|
|
69005
69010
|
var _a2;
|
|
69006
|
-
if (
|
|
69007
|
-
const
|
|
69008
|
-
|
|
69009
|
-
|
|
69010
|
-
|
|
69011
|
-
|
|
69012
|
-
|
|
69013
|
-
return substituteIndexedMappedType(mappedType, propertyNameType);
|
|
69014
|
-
}
|
|
69015
|
-
});
|
|
69016
|
-
return newTypes.length ? getIntersectionType(newTypes) : void 0;
|
|
69011
|
+
if (isGenericMappedType(t) && !t.declaration.nameType) {
|
|
69012
|
+
const constraint = getConstraintTypeFromMappedType(t);
|
|
69013
|
+
const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
69014
|
+
const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
|
|
69015
|
+
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
69016
|
+
return substituteIndexedMappedType(t, propertyNameType);
|
|
69017
|
+
}
|
|
69017
69018
|
} else if (t.flags & 3670016 /* StructuredType */) {
|
|
69018
69019
|
const prop = getPropertyOfType(t, name);
|
|
69019
69020
|
if (prop) {
|
|
@@ -69087,7 +69088,7 @@ ${lanes.join("\n")}
|
|
|
69087
69088
|
return void 0;
|
|
69088
69089
|
}
|
|
69089
69090
|
function getContextualTypeForElementExpression(arrayContextualType, index) {
|
|
69090
|
-
return arrayContextualType && (index >= 0 && getTypeOfPropertyOfContextualType(
|
|
69091
|
+
return arrayContextualType && (index >= 0 && getTypeOfPropertyOfContextualType(arrayContextualType, "" + index) || mapType(
|
|
69091
69092
|
arrayContextualType,
|
|
69092
69093
|
(t) => isTupleType(t) ? getElementTypeOfSliceOfTupleType(
|
|
69093
69094
|
t,
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -31585,21 +31585,24 @@ function installNpmPackages(npmPath, tsVersion, packageNames, install) {
|
|
|
31585
31585
|
for (let remaining = packageNames.length; remaining > 0; ) {
|
|
31586
31586
|
const result = getNpmCommandForInstallation(npmPath, tsVersion, packageNames, remaining);
|
|
31587
31587
|
remaining = result.remaining;
|
|
31588
|
-
hasError = install(result.command) || hasError;
|
|
31588
|
+
hasError = install(result.command, result.args) || hasError;
|
|
31589
31589
|
}
|
|
31590
31590
|
return hasError;
|
|
31591
31591
|
}
|
|
31592
31592
|
function getNpmCommandForInstallation(npmPath, tsVersion, packageNames, remaining) {
|
|
31593
31593
|
const sliceStart = packageNames.length - remaining;
|
|
31594
|
-
let
|
|
31594
|
+
let toSlice = remaining;
|
|
31595
|
+
let args;
|
|
31595
31596
|
while (true) {
|
|
31596
|
-
|
|
31597
|
-
|
|
31597
|
+
const slice = toSlice === packageNames.length ? packageNames : packageNames.slice(sliceStart, sliceStart + toSlice);
|
|
31598
|
+
const length2 = reduceLeft(slice, (total, pkg) => total + pkg.length, 0);
|
|
31599
|
+
if (length2 < 8e3) {
|
|
31600
|
+
args = ["install", "--ignore-scripts", ...slice, "--save-dev", `--user-agent=typesInstaller/${tsVersion}`];
|
|
31598
31601
|
break;
|
|
31599
31602
|
}
|
|
31600
31603
|
toSlice = toSlice - Math.floor(toSlice / 2);
|
|
31601
31604
|
}
|
|
31602
|
-
return { command, remaining: remaining - toSlice };
|
|
31605
|
+
return { command: npmPath, args, remaining: remaining - toSlice };
|
|
31603
31606
|
}
|
|
31604
31607
|
function endsWith2(str, suffix, caseSensitive) {
|
|
31605
31608
|
const expectedPos = str.length - suffix.length;
|
|
@@ -32059,13 +32062,13 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32059
32062
|
this.log.writeLine(`NPM location: ${this.npmPath} (explicit '${Arguments.NpmLocation}' ${npmLocation2 === void 0 ? "not " : ""} provided)`);
|
|
32060
32063
|
this.log.writeLine(`validateDefaultNpmLocation: ${validateDefaultNpmLocation2}`);
|
|
32061
32064
|
}
|
|
32062
|
-
({ execSync: this.
|
|
32065
|
+
({ execSync: this.nodeExecFileSync } = require("child_process"));
|
|
32063
32066
|
this.ensurePackageDirectoryExists(globalTypingsCacheLocation2);
|
|
32064
32067
|
try {
|
|
32065
32068
|
if (this.log.isEnabled()) {
|
|
32066
32069
|
this.log.writeLine(`Updating ${typesRegistryPackageName} npm package...`);
|
|
32067
32070
|
}
|
|
32068
|
-
this.
|
|
32071
|
+
this.execFileSyncAndLog(this.npmPath, ["install", "--ignore-scripts", `${typesRegistryPackageName}@${this.latestDistTag}`], { cwd: globalTypingsCacheLocation2 });
|
|
32069
32072
|
if (this.log.isEnabled()) {
|
|
32070
32073
|
this.log.writeLine(`Updated ${typesRegistryPackageName} npm package`);
|
|
32071
32074
|
}
|
|
@@ -32136,19 +32139,19 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
32136
32139
|
this.log.writeLine(`#${requestId} with arguments'${JSON.stringify(packageNames)}'.`);
|
|
32137
32140
|
}
|
|
32138
32141
|
const start = Date.now();
|
|
32139
|
-
const hasError = installNpmPackages(this.npmPath, version, packageNames, (command) => this.
|
|
32142
|
+
const hasError = installNpmPackages(this.npmPath, version, packageNames, (command, args) => this.execFileSyncAndLog(command, args, { cwd }));
|
|
32140
32143
|
if (this.log.isEnabled()) {
|
|
32141
32144
|
this.log.writeLine(`npm install #${requestId} took: ${Date.now() - start} ms`);
|
|
32142
32145
|
}
|
|
32143
32146
|
onRequestCompleted(!hasError);
|
|
32144
32147
|
}
|
|
32145
32148
|
/** Returns 'true' in case of error. */
|
|
32146
|
-
|
|
32149
|
+
execFileSyncAndLog(command, args, options) {
|
|
32147
32150
|
if (this.log.isEnabled()) {
|
|
32148
32151
|
this.log.writeLine(`Exec: ${command}`);
|
|
32149
32152
|
}
|
|
32150
32153
|
try {
|
|
32151
|
-
const stdout = this.
|
|
32154
|
+
const stdout = this.nodeExecFileSync(command, args, { ...options, encoding: "utf-8", timeout: 1e4 });
|
|
32152
32155
|
if (this.log.isEnabled()) {
|
|
32153
32156
|
this.log.writeLine(` Succeeded. stdout:${indent(sys.newLine, stdout)}`);
|
|
32154
32157
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.1.0-pr-
|
|
5
|
+
"version": "5.1.0-pr-53292-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "14.21.1",
|
|
115
115
|
"npm": "8.19.3"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "d914d6c336c9c603779e8e9001e3be829e54b878"
|
|
118
118
|
}
|