mirror of
https://github.com/github/codeql-action.git
synced 2026-01-06 22:50:17 +08:00
Bump the npm group with 4 updates (#2230)
* Bump the npm group with 4 updates Bumps the npm group with 4 updates: [@octokit/types](https://github.com/octokit/types.ts), [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) and [typescript](https://github.com/Microsoft/TypeScript). Updates `@octokit/types` from 12.6.0 to 13.1.0 - [Release notes](https://github.com/octokit/types.ts/releases) - [Commits](https://github.com/octokit/types.ts/compare/v12.6.0...v13.1.0) Updates `@typescript-eslint/eslint-plugin` from 7.4.0 to 7.5.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.5.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.4.0 to 7.5.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.5.0/packages/parser) Updates `typescript` from 5.4.3 to 5.4.4 - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.4.4) --- updated-dependencies: - dependency-name: "@octokit/types" dependency-type: direct:production update-type: version-update:semver-major dependency-group: npm - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm ... Signed-off-by: dependabot[bot] <support@github.com> * Update checked-in dependencies --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Angela P Wen <angelapwen@github.com>
This commit is contained in:
64
node_modules/typescript/lib/tsc.js
generated
vendored
64
node_modules/typescript/lib/tsc.js
generated
vendored
@@ -18,7 +18,7 @@ and limitations under the License.
|
||||
|
||||
// src/compiler/corePublic.ts
|
||||
var versionMajorMinor = "5.4";
|
||||
var version = "5.4.3";
|
||||
var version = "5.4.4";
|
||||
|
||||
// src/compiler/core.ts
|
||||
var emptyArray = [];
|
||||
@@ -4145,14 +4145,17 @@ function createDynamicPriorityPollingWatchFile(host) {
|
||||
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
|
||||
}
|
||||
}
|
||||
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
|
||||
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp) {
|
||||
const fileWatcherCallbacks = createMultiMap();
|
||||
const fileTimestamps = fsWatchWithTimestamp ? /* @__PURE__ */ new Map() : void 0;
|
||||
const dirWatchers = /* @__PURE__ */ new Map();
|
||||
const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
||||
return nonPollingWatchFile;
|
||||
function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
|
||||
const filePath = toCanonicalName(fileName);
|
||||
fileWatcherCallbacks.add(filePath, callback);
|
||||
if (fileWatcherCallbacks.add(filePath, callback).length === 1 && fileTimestamps) {
|
||||
fileTimestamps.set(filePath, getModifiedTime3(fileName) || missingFileModifiedTime);
|
||||
}
|
||||
const dirPath = getDirectoryPath(filePath) || ".";
|
||||
const watcher = dirWatchers.get(dirPath) || createDirectoryWatcher(getDirectoryPath(fileName) || ".", dirPath, fallbackOptions);
|
||||
watcher.referenceCount++;
|
||||
@@ -4172,14 +4175,31 @@ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFi
|
||||
const watcher = fsWatch(
|
||||
dirName,
|
||||
1 /* Directory */,
|
||||
(_eventName, relativeFileName, modifiedTime) => {
|
||||
(eventName, relativeFileName) => {
|
||||
if (!isString(relativeFileName))
|
||||
return;
|
||||
const fileName = getNormalizedAbsolutePath(relativeFileName, dirName);
|
||||
const callbacks = fileName && fileWatcherCallbacks.get(toCanonicalName(fileName));
|
||||
const filePath = toCanonicalName(fileName);
|
||||
const callbacks = fileName && fileWatcherCallbacks.get(filePath);
|
||||
if (callbacks) {
|
||||
let currentModifiedTime;
|
||||
let eventKind = 1 /* Changed */;
|
||||
if (fileTimestamps) {
|
||||
const existingTime = fileTimestamps.get(filePath);
|
||||
if (eventName === "change") {
|
||||
currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime;
|
||||
if (currentModifiedTime.getTime() === existingTime.getTime())
|
||||
return;
|
||||
}
|
||||
currentModifiedTime || (currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime);
|
||||
fileTimestamps.set(filePath, currentModifiedTime);
|
||||
if (existingTime === missingFileModifiedTime)
|
||||
eventKind = 0 /* Created */;
|
||||
else if (currentModifiedTime === missingFileModifiedTime)
|
||||
eventKind = 2 /* Deleted */;
|
||||
}
|
||||
for (const fileCallback of callbacks) {
|
||||
fileCallback(fileName, 1 /* Changed */, modifiedTime);
|
||||
fileCallback(fileName, eventKind, currentModifiedTime);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4573,7 +4593,7 @@ function createSystemWatchFunctions({
|
||||
);
|
||||
case 5 /* UseFsEventsOnParentDirectory */:
|
||||
if (!nonPollingWatchFile) {
|
||||
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
|
||||
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp);
|
||||
}
|
||||
return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
|
||||
default:
|
||||
@@ -4748,7 +4768,7 @@ function createSystemWatchFunctions({
|
||||
return watchPresentFileSystemEntryWithFsWatchFile();
|
||||
}
|
||||
try {
|
||||
const presentWatcher = (!fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
|
||||
const presentWatcher = (entryKind === 1 /* Directory */ || !fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
|
||||
fileOrDirectory,
|
||||
recursive,
|
||||
inodeWatching ? callbackChangingToMissingFileSystemEntry : callback
|
||||
@@ -42862,13 +42882,21 @@ function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, im
|
||||
}
|
||||
const nearestTargetPackageJson = getNearestAncestorDirectoryWithPackageJson(host, getDirectoryPath(modulePath));
|
||||
const nearestSourcePackageJson = getNearestAncestorDirectoryWithPackageJson(host, sourceDirectory);
|
||||
if (nearestSourcePackageJson !== nearestTargetPackageJson) {
|
||||
const ignoreCase = !hostUsesCaseSensitiveFileNames(host);
|
||||
if (!packageJsonPathsAreEqual(nearestTargetPackageJson, nearestSourcePackageJson, ignoreCase)) {
|
||||
return maybeNonRelative;
|
||||
}
|
||||
return relativePath;
|
||||
}
|
||||
return isPathRelativeToParent(maybeNonRelative) || countPathComponents(relativePath) < countPathComponents(maybeNonRelative) ? relativePath : maybeNonRelative;
|
||||
}
|
||||
function packageJsonPathsAreEqual(a, b, ignoreCase) {
|
||||
if (a === b)
|
||||
return true;
|
||||
if (a === void 0 || b === void 0)
|
||||
return false;
|
||||
return comparePaths(a, b, ignoreCase) === 0 /* EqualTo */;
|
||||
}
|
||||
function countPathComponents(path) {
|
||||
let count = 0;
|
||||
for (let i = startsWith(path, "./") ? 2 : 0; i < path.length; i++) {
|
||||
@@ -47996,15 +48024,19 @@ function createTypeChecker(host) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
||||
function getMeaningOfEntityNameReference(entityName) {
|
||||
let meaning;
|
||||
if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) {
|
||||
meaning = 111551 /* Value */ | 1048576 /* ExportValue */;
|
||||
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) {
|
||||
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */ || entityName.parent.kind === 166 /* QualifiedName */ && entityName.parent.left === entityName || entityName.parent.kind === 211 /* PropertyAccessExpression */ && entityName.parent.expression === entityName || entityName.parent.kind === 212 /* ElementAccessExpression */ && entityName.parent.expression === entityName) {
|
||||
meaning = 1920 /* Namespace */;
|
||||
} else {
|
||||
meaning = 788968 /* Type */;
|
||||
}
|
||||
return meaning;
|
||||
}
|
||||
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
||||
const meaning = getMeaningOfEntityNameReference(entityName);
|
||||
const firstIdentifier = getFirstIdentifier(entityName);
|
||||
const symbol = resolveName(
|
||||
enclosingDeclaration,
|
||||
@@ -50065,9 +50097,10 @@ function createTypeChecker(host) {
|
||||
introducesError = true;
|
||||
return { introducesError, node };
|
||||
}
|
||||
const meaning = getMeaningOfEntityNameReference(node);
|
||||
const sym = resolveEntityName(
|
||||
leftmost,
|
||||
-1 /* All */,
|
||||
meaning,
|
||||
/*ignoreErrors*/
|
||||
true,
|
||||
/*dontResolveAlias*/
|
||||
@@ -50077,13 +50110,13 @@ function createTypeChecker(host) {
|
||||
if (isSymbolAccessible(
|
||||
sym,
|
||||
context.enclosingDeclaration,
|
||||
-1 /* All */,
|
||||
meaning,
|
||||
/*shouldComputeAliasesToMakeVisible*/
|
||||
false
|
||||
).accessibility !== 0 /* Accessible */) {
|
||||
introducesError = true;
|
||||
} else {
|
||||
context.tracker.trackSymbol(sym, context.enclosingDeclaration, -1 /* All */);
|
||||
context.tracker.trackSymbol(sym, context.enclosingDeclaration, meaning);
|
||||
includePrivateSymbol == null ? void 0 : includePrivateSymbol(sym);
|
||||
}
|
||||
if (isIdentifier(node)) {
|
||||
@@ -57990,6 +58023,9 @@ function createTypeChecker(host) {
|
||||
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) {
|
||||
removeFromEach(typeSet, 65536 /* Null */);
|
||||
result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
||||
} else if (typeSet.length >= 4) {
|
||||
const middle = Math.floor(typeSet.length / 2);
|
||||
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle)), getIntersectionType(typeSet.slice(middle))], aliasSymbol, aliasTypeArguments);
|
||||
} else {
|
||||
if (!checkCrossProductUnion(typeSet)) {
|
||||
return errorType;
|
||||
|
||||
190
node_modules/typescript/lib/tsserver.js
generated
vendored
190
node_modules/typescript/lib/tsserver.js
generated
vendored
@@ -2340,7 +2340,7 @@ module.exports = __toCommonJS(server_exports);
|
||||
|
||||
// src/compiler/corePublic.ts
|
||||
var versionMajorMinor = "5.4";
|
||||
var version = "5.4.3";
|
||||
var version = "5.4.4";
|
||||
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
||||
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
||||
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
||||
@@ -7688,14 +7688,17 @@ function createDynamicPriorityPollingWatchFile(host) {
|
||||
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
|
||||
}
|
||||
}
|
||||
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
|
||||
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp) {
|
||||
const fileWatcherCallbacks = createMultiMap();
|
||||
const fileTimestamps = fsWatchWithTimestamp ? /* @__PURE__ */ new Map() : void 0;
|
||||
const dirWatchers = /* @__PURE__ */ new Map();
|
||||
const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
||||
return nonPollingWatchFile;
|
||||
function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
|
||||
const filePath = toCanonicalName(fileName);
|
||||
fileWatcherCallbacks.add(filePath, callback);
|
||||
if (fileWatcherCallbacks.add(filePath, callback).length === 1 && fileTimestamps) {
|
||||
fileTimestamps.set(filePath, getModifiedTime3(fileName) || missingFileModifiedTime);
|
||||
}
|
||||
const dirPath = getDirectoryPath(filePath) || ".";
|
||||
const watcher = dirWatchers.get(dirPath) || createDirectoryWatcher(getDirectoryPath(fileName) || ".", dirPath, fallbackOptions);
|
||||
watcher.referenceCount++;
|
||||
@@ -7715,14 +7718,31 @@ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFi
|
||||
const watcher = fsWatch(
|
||||
dirName,
|
||||
1 /* Directory */,
|
||||
(_eventName, relativeFileName, modifiedTime) => {
|
||||
(eventName, relativeFileName) => {
|
||||
if (!isString(relativeFileName))
|
||||
return;
|
||||
const fileName = getNormalizedAbsolutePath(relativeFileName, dirName);
|
||||
const callbacks = fileName && fileWatcherCallbacks.get(toCanonicalName(fileName));
|
||||
const filePath = toCanonicalName(fileName);
|
||||
const callbacks = fileName && fileWatcherCallbacks.get(filePath);
|
||||
if (callbacks) {
|
||||
let currentModifiedTime;
|
||||
let eventKind = 1 /* Changed */;
|
||||
if (fileTimestamps) {
|
||||
const existingTime = fileTimestamps.get(filePath);
|
||||
if (eventName === "change") {
|
||||
currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime;
|
||||
if (currentModifiedTime.getTime() === existingTime.getTime())
|
||||
return;
|
||||
}
|
||||
currentModifiedTime || (currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime);
|
||||
fileTimestamps.set(filePath, currentModifiedTime);
|
||||
if (existingTime === missingFileModifiedTime)
|
||||
eventKind = 0 /* Created */;
|
||||
else if (currentModifiedTime === missingFileModifiedTime)
|
||||
eventKind = 2 /* Deleted */;
|
||||
}
|
||||
for (const fileCallback of callbacks) {
|
||||
fileCallback(fileName, 1 /* Changed */, modifiedTime);
|
||||
fileCallback(fileName, eventKind, currentModifiedTime);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -8121,7 +8141,7 @@ function createSystemWatchFunctions({
|
||||
);
|
||||
case 5 /* UseFsEventsOnParentDirectory */:
|
||||
if (!nonPollingWatchFile) {
|
||||
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
|
||||
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp);
|
||||
}
|
||||
return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
|
||||
default:
|
||||
@@ -8296,7 +8316,7 @@ function createSystemWatchFunctions({
|
||||
return watchPresentFileSystemEntryWithFsWatchFile();
|
||||
}
|
||||
try {
|
||||
const presentWatcher = (!fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
|
||||
const presentWatcher = (entryKind === 1 /* Directory */ || !fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
|
||||
fileOrDirectory,
|
||||
recursive,
|
||||
inodeWatching ? callbackChangingToMissingFileSystemEntry : callback
|
||||
@@ -47606,13 +47626,21 @@ function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, im
|
||||
}
|
||||
const nearestTargetPackageJson = getNearestAncestorDirectoryWithPackageJson(host, getDirectoryPath(modulePath));
|
||||
const nearestSourcePackageJson = getNearestAncestorDirectoryWithPackageJson(host, sourceDirectory);
|
||||
if (nearestSourcePackageJson !== nearestTargetPackageJson) {
|
||||
const ignoreCase = !hostUsesCaseSensitiveFileNames(host);
|
||||
if (!packageJsonPathsAreEqual(nearestTargetPackageJson, nearestSourcePackageJson, ignoreCase)) {
|
||||
return maybeNonRelative;
|
||||
}
|
||||
return relativePath;
|
||||
}
|
||||
return isPathRelativeToParent(maybeNonRelative) || countPathComponents(relativePath) < countPathComponents(maybeNonRelative) ? relativePath : maybeNonRelative;
|
||||
}
|
||||
function packageJsonPathsAreEqual(a, b, ignoreCase) {
|
||||
if (a === b)
|
||||
return true;
|
||||
if (a === void 0 || b === void 0)
|
||||
return false;
|
||||
return comparePaths(a, b, ignoreCase) === 0 /* EqualTo */;
|
||||
}
|
||||
function countPathComponents(path) {
|
||||
let count = 0;
|
||||
for (let i = startsWith(path, "./") ? 2 : 0; i < path.length; i++) {
|
||||
@@ -52740,15 +52768,19 @@ function createTypeChecker(host) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
||||
function getMeaningOfEntityNameReference(entityName) {
|
||||
let meaning;
|
||||
if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) {
|
||||
meaning = 111551 /* Value */ | 1048576 /* ExportValue */;
|
||||
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) {
|
||||
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */ || entityName.parent.kind === 166 /* QualifiedName */ && entityName.parent.left === entityName || entityName.parent.kind === 211 /* PropertyAccessExpression */ && entityName.parent.expression === entityName || entityName.parent.kind === 212 /* ElementAccessExpression */ && entityName.parent.expression === entityName) {
|
||||
meaning = 1920 /* Namespace */;
|
||||
} else {
|
||||
meaning = 788968 /* Type */;
|
||||
}
|
||||
return meaning;
|
||||
}
|
||||
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
||||
const meaning = getMeaningOfEntityNameReference(entityName);
|
||||
const firstIdentifier = getFirstIdentifier(entityName);
|
||||
const symbol = resolveName(
|
||||
enclosingDeclaration,
|
||||
@@ -54809,9 +54841,10 @@ function createTypeChecker(host) {
|
||||
introducesError = true;
|
||||
return { introducesError, node };
|
||||
}
|
||||
const meaning = getMeaningOfEntityNameReference(node);
|
||||
const sym = resolveEntityName(
|
||||
leftmost,
|
||||
-1 /* All */,
|
||||
meaning,
|
||||
/*ignoreErrors*/
|
||||
true,
|
||||
/*dontResolveAlias*/
|
||||
@@ -54821,13 +54854,13 @@ function createTypeChecker(host) {
|
||||
if (isSymbolAccessible(
|
||||
sym,
|
||||
context.enclosingDeclaration,
|
||||
-1 /* All */,
|
||||
meaning,
|
||||
/*shouldComputeAliasesToMakeVisible*/
|
||||
false
|
||||
).accessibility !== 0 /* Accessible */) {
|
||||
introducesError = true;
|
||||
} else {
|
||||
context.tracker.trackSymbol(sym, context.enclosingDeclaration, -1 /* All */);
|
||||
context.tracker.trackSymbol(sym, context.enclosingDeclaration, meaning);
|
||||
includePrivateSymbol == null ? void 0 : includePrivateSymbol(sym);
|
||||
}
|
||||
if (isIdentifier(node)) {
|
||||
@@ -62734,6 +62767,9 @@ function createTypeChecker(host) {
|
||||
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) {
|
||||
removeFromEach(typeSet, 65536 /* Null */);
|
||||
result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
||||
} else if (typeSet.length >= 4) {
|
||||
const middle = Math.floor(typeSet.length / 2);
|
||||
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle)), getIntersectionType(typeSet.slice(middle))], aliasSymbol, aliasTypeArguments);
|
||||
} else {
|
||||
if (!checkCrossProductUnion(typeSet)) {
|
||||
return errorType;
|
||||
@@ -160728,10 +160764,7 @@ function getContextualType(previousToken, position, sourceFile, checker) {
|
||||
return isJsxExpression(parent2) && !isJsxElement(parent2.parent) && !isJsxFragment(parent2.parent) ? checker.getContextualTypeForJsxAttribute(parent2.parent) : void 0;
|
||||
default:
|
||||
const argInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(previousToken, position, sourceFile, checker);
|
||||
return argInfo ? (
|
||||
// At `,`, treat this as the next argument after the comma.
|
||||
checker.getContextualTypeForArgumentAtIndex(argInfo.invocation, argInfo.argumentIndex + (previousToken.kind === 28 /* CommaToken */ ? 1 : 0))
|
||||
) : isEqualityOperatorKind(previousToken.kind) && isBinaryExpression(parent2) && isEqualityOperatorKind(parent2.operatorToken.kind) ? (
|
||||
return argInfo ? checker.getContextualTypeForArgumentAtIndex(argInfo.invocation, argInfo.argumentIndex) : isEqualityOperatorKind(previousToken.kind) && isBinaryExpression(parent2) && isEqualityOperatorKind(parent2.operatorToken.kind) ? (
|
||||
// completion at `x ===/**/` should be for the right side
|
||||
checker.getTypeAtLocation(parent2.left)
|
||||
) : checker.getContextualType(previousToken, 4 /* Completions */) || checker.getContextualType(previousToken);
|
||||
@@ -169099,12 +169132,7 @@ function getArgumentOrParameterListInfo(node, position, sourceFile, checker) {
|
||||
if (!info)
|
||||
return void 0;
|
||||
const { list, argumentIndex } = info;
|
||||
const argumentCount = getArgumentCount(
|
||||
list,
|
||||
/*ignoreTrailingComma*/
|
||||
isInString(sourceFile, position, node),
|
||||
checker
|
||||
);
|
||||
const argumentCount = getArgumentCount(checker, list);
|
||||
if (argumentIndex !== 0) {
|
||||
Debug.assertLessThan(argumentIndex, argumentCount);
|
||||
}
|
||||
@@ -169116,7 +169144,7 @@ function getArgumentOrParameterListAndIndex(node, sourceFile, checker) {
|
||||
return { list: getChildListThatStartsWithOpenerToken(node.parent, node, sourceFile), argumentIndex: 0 };
|
||||
} else {
|
||||
const list = findContainingList(node);
|
||||
return list && { list, argumentIndex: getArgumentIndex(list, node, checker) };
|
||||
return list && { list, argumentIndex: getArgumentIndex(checker, list, node) };
|
||||
}
|
||||
}
|
||||
function getImmediatelyContainingArgumentInfo(node, position, sourceFile, checker) {
|
||||
@@ -169246,24 +169274,6 @@ function chooseBetterSymbol(s) {
|
||||
return isFunctionTypeNode(d) ? (_a = tryCast(d.parent, canHaveSymbol)) == null ? void 0 : _a.symbol : void 0;
|
||||
}) || s : s;
|
||||
}
|
||||
function getArgumentIndex(argumentsList, node, checker) {
|
||||
const args = argumentsList.getChildren();
|
||||
let argumentIndex = 0;
|
||||
for (let pos = 0; pos < length(args); pos++) {
|
||||
const child = args[pos];
|
||||
if (child === node) {
|
||||
break;
|
||||
}
|
||||
if (isSpreadElement(child)) {
|
||||
argumentIndex = argumentIndex + getSpreadElementCount(child, checker) + (pos > 0 ? pos : 0);
|
||||
} else {
|
||||
if (child.kind !== 28 /* CommaToken */) {
|
||||
argumentIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return argumentIndex;
|
||||
}
|
||||
function getSpreadElementCount(node, checker) {
|
||||
const spreadType = checker.getTypeAtLocation(node.expression);
|
||||
if (checker.isTupleType(spreadType)) {
|
||||
@@ -169276,19 +169286,48 @@ function getSpreadElementCount(node, checker) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
function getArgumentCount(argumentsList, ignoreTrailingComma, checker) {
|
||||
const listChildren = argumentsList.getChildren();
|
||||
let argumentCount = 0;
|
||||
for (const child of listChildren) {
|
||||
if (isSpreadElement(child)) {
|
||||
argumentCount = argumentCount + getSpreadElementCount(child, checker);
|
||||
function getArgumentIndex(checker, argumentsList, node) {
|
||||
return getArgumentIndexOrCount(checker, argumentsList, node);
|
||||
}
|
||||
function getArgumentCount(checker, argumentsList) {
|
||||
return getArgumentIndexOrCount(
|
||||
checker,
|
||||
argumentsList,
|
||||
/*node*/
|
||||
void 0
|
||||
);
|
||||
}
|
||||
function getArgumentIndexOrCount(checker, argumentsList, node) {
|
||||
const args = argumentsList.getChildren();
|
||||
let argumentIndex = 0;
|
||||
let skipComma = false;
|
||||
for (const child of args) {
|
||||
if (node && child === node) {
|
||||
if (!skipComma && child.kind === 28 /* CommaToken */) {
|
||||
argumentIndex++;
|
||||
}
|
||||
return argumentIndex;
|
||||
}
|
||||
if (isSpreadElement(child)) {
|
||||
argumentIndex += getSpreadElementCount(child, checker);
|
||||
skipComma = true;
|
||||
continue;
|
||||
}
|
||||
if (child.kind !== 28 /* CommaToken */) {
|
||||
argumentIndex++;
|
||||
skipComma = true;
|
||||
continue;
|
||||
}
|
||||
if (skipComma) {
|
||||
skipComma = false;
|
||||
continue;
|
||||
}
|
||||
argumentIndex++;
|
||||
}
|
||||
argumentCount = argumentCount + countWhere(listChildren, (arg) => arg.kind !== 28 /* CommaToken */);
|
||||
if (!ignoreTrailingComma && listChildren.length > 0 && last(listChildren).kind === 28 /* CommaToken */) {
|
||||
argumentCount++;
|
||||
if (node) {
|
||||
return argumentIndex;
|
||||
}
|
||||
return argumentCount;
|
||||
return args.length && last(args).kind === 28 /* CommaToken */ ? argumentIndex + 1 : argumentIndex;
|
||||
}
|
||||
function getArgumentIndexForTemplatePiece(spanIndex, node, position, sourceFile) {
|
||||
Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node.");
|
||||
@@ -181088,7 +181127,16 @@ function createWatchFactoryHostUsingWatchEvents(service, canUseWatchEvents) {
|
||||
recursive ? watchedDirectoriesRecursive : watchedDirectories,
|
||||
path,
|
||||
callback,
|
||||
(id) => ({ eventName: CreateDirectoryWatcherEvent, data: { id, path, recursive: !!recursive } })
|
||||
(id) => ({
|
||||
eventName: CreateDirectoryWatcherEvent,
|
||||
data: {
|
||||
id,
|
||||
path,
|
||||
recursive: !!recursive,
|
||||
// Special case node_modules as we watch it for changes to closed script infos as well
|
||||
ignoreUpdate: !path.endsWith("/node_modules") ? true : void 0
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path, callback, event) {
|
||||
@@ -181115,24 +181163,28 @@ function createWatchFactoryHostUsingWatchEvents(service, canUseWatchEvents) {
|
||||
}
|
||||
};
|
||||
}
|
||||
function onWatchChange({ id, path, eventType }) {
|
||||
onFileWatcherCallback(id, path, eventType);
|
||||
onDirectoryWatcherCallback(watchedDirectories, id, path, eventType);
|
||||
onDirectoryWatcherCallback(watchedDirectoriesRecursive, id, path, eventType);
|
||||
function onWatchChange(args) {
|
||||
if (isArray(args))
|
||||
args.forEach(onWatchChangeRequestArgs);
|
||||
else
|
||||
onWatchChangeRequestArgs(args);
|
||||
}
|
||||
function onFileWatcherCallback(id, eventPath, eventType) {
|
||||
var _a;
|
||||
(_a = watchedFiles.idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => {
|
||||
const eventKind = eventType === "create" ? 0 /* Created */ : eventType === "delete" ? 2 /* Deleted */ : 1 /* Changed */;
|
||||
callback(eventPath, eventKind);
|
||||
});
|
||||
function onWatchChangeRequestArgs({ id, created, deleted, updated }) {
|
||||
onWatchEventType(id, created, 0 /* Created */);
|
||||
onWatchEventType(id, deleted, 2 /* Deleted */);
|
||||
onWatchEventType(id, updated, 1 /* Changed */);
|
||||
}
|
||||
function onDirectoryWatcherCallback({ idToCallbacks }, id, eventPath, eventType) {
|
||||
var _a;
|
||||
if (eventType === "update")
|
||||
function onWatchEventType(id, paths, eventKind) {
|
||||
if (!(paths == null ? void 0 : paths.length))
|
||||
return;
|
||||
(_a = idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => {
|
||||
callback(eventPath);
|
||||
forEachCallback(watchedFiles, id, paths, (callback, eventPath) => callback(eventPath, eventKind));
|
||||
forEachCallback(watchedDirectories, id, paths, (callback, eventPath) => callback(eventPath));
|
||||
forEachCallback(watchedDirectoriesRecursive, id, paths, (callback, eventPath) => callback(eventPath));
|
||||
}
|
||||
function forEachCallback(hostWatcherMap, id, eventPaths, cb) {
|
||||
var _a;
|
||||
(_a = hostWatcherMap.idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => {
|
||||
eventPaths.forEach((eventPath) => cb(callback, normalizeSlashes(eventPath)));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
8
node_modules/typescript/lib/typescript.d.ts
generated
vendored
8
node_modules/typescript/lib/typescript.d.ts
generated
vendored
@@ -1510,12 +1510,13 @@ declare namespace ts {
|
||||
}
|
||||
interface WatchChangeRequest extends Request {
|
||||
command: CommandTypes.WatchChange;
|
||||
arguments: WatchChangeRequestArgs;
|
||||
arguments: WatchChangeRequestArgs | readonly WatchChangeRequestArgs[];
|
||||
}
|
||||
interface WatchChangeRequestArgs {
|
||||
id: number;
|
||||
path: string;
|
||||
eventType: "create" | "delete" | "update";
|
||||
created?: string[];
|
||||
deleted?: string[];
|
||||
updated?: string[];
|
||||
}
|
||||
/**
|
||||
* Request to obtain the list of files that should be regenerated if target file is recompiled.
|
||||
@@ -2452,6 +2453,7 @@ declare namespace ts {
|
||||
readonly id: number;
|
||||
readonly path: string;
|
||||
readonly recursive: boolean;
|
||||
readonly ignoreUpdate?: boolean;
|
||||
}
|
||||
type CloseFileWatcherEventName = "closeFileWatcher";
|
||||
interface CloseFileWatcherEvent extends Event {
|
||||
|
||||
190
node_modules/typescript/lib/typescript.js
generated
vendored
190
node_modules/typescript/lib/typescript.js
generated
vendored
@@ -35,7 +35,7 @@ var ts = (() => {
|
||||
"src/compiler/corePublic.ts"() {
|
||||
"use strict";
|
||||
versionMajorMinor = "5.4";
|
||||
version = "5.4.3";
|
||||
version = "5.4.4";
|
||||
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
||||
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
||||
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
||||
@@ -5423,14 +5423,17 @@ ${lanes.join("\n")}
|
||||
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
|
||||
}
|
||||
}
|
||||
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
|
||||
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp) {
|
||||
const fileWatcherCallbacks = createMultiMap();
|
||||
const fileTimestamps = fsWatchWithTimestamp ? /* @__PURE__ */ new Map() : void 0;
|
||||
const dirWatchers = /* @__PURE__ */ new Map();
|
||||
const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
||||
return nonPollingWatchFile;
|
||||
function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
|
||||
const filePath = toCanonicalName(fileName);
|
||||
fileWatcherCallbacks.add(filePath, callback);
|
||||
if (fileWatcherCallbacks.add(filePath, callback).length === 1 && fileTimestamps) {
|
||||
fileTimestamps.set(filePath, getModifiedTime3(fileName) || missingFileModifiedTime);
|
||||
}
|
||||
const dirPath = getDirectoryPath(filePath) || ".";
|
||||
const watcher = dirWatchers.get(dirPath) || createDirectoryWatcher(getDirectoryPath(fileName) || ".", dirPath, fallbackOptions);
|
||||
watcher.referenceCount++;
|
||||
@@ -5450,14 +5453,31 @@ ${lanes.join("\n")}
|
||||
const watcher = fsWatch(
|
||||
dirName,
|
||||
1 /* Directory */,
|
||||
(_eventName, relativeFileName, modifiedTime) => {
|
||||
(eventName, relativeFileName) => {
|
||||
if (!isString(relativeFileName))
|
||||
return;
|
||||
const fileName = getNormalizedAbsolutePath(relativeFileName, dirName);
|
||||
const callbacks = fileName && fileWatcherCallbacks.get(toCanonicalName(fileName));
|
||||
const filePath = toCanonicalName(fileName);
|
||||
const callbacks = fileName && fileWatcherCallbacks.get(filePath);
|
||||
if (callbacks) {
|
||||
let currentModifiedTime;
|
||||
let eventKind = 1 /* Changed */;
|
||||
if (fileTimestamps) {
|
||||
const existingTime = fileTimestamps.get(filePath);
|
||||
if (eventName === "change") {
|
||||
currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime;
|
||||
if (currentModifiedTime.getTime() === existingTime.getTime())
|
||||
return;
|
||||
}
|
||||
currentModifiedTime || (currentModifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime);
|
||||
fileTimestamps.set(filePath, currentModifiedTime);
|
||||
if (existingTime === missingFileModifiedTime)
|
||||
eventKind = 0 /* Created */;
|
||||
else if (currentModifiedTime === missingFileModifiedTime)
|
||||
eventKind = 2 /* Deleted */;
|
||||
}
|
||||
for (const fileCallback of callbacks) {
|
||||
fileCallback(fileName, 1 /* Changed */, modifiedTime);
|
||||
fileCallback(fileName, eventKind, currentModifiedTime);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -5849,7 +5869,7 @@ ${lanes.join("\n")}
|
||||
);
|
||||
case 5 /* UseFsEventsOnParentDirectory */:
|
||||
if (!nonPollingWatchFile) {
|
||||
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
|
||||
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp);
|
||||
}
|
||||
return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
|
||||
default:
|
||||
@@ -6024,7 +6044,7 @@ ${lanes.join("\n")}
|
||||
return watchPresentFileSystemEntryWithFsWatchFile();
|
||||
}
|
||||
try {
|
||||
const presentWatcher = (!fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
|
||||
const presentWatcher = (entryKind === 1 /* Directory */ || !fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
|
||||
fileOrDirectory,
|
||||
recursive,
|
||||
inodeWatching ? callbackChangingToMissingFileSystemEntry : callback
|
||||
@@ -45450,13 +45470,21 @@ ${lanes.join("\n")}
|
||||
}
|
||||
const nearestTargetPackageJson = getNearestAncestorDirectoryWithPackageJson(host, getDirectoryPath(modulePath));
|
||||
const nearestSourcePackageJson = getNearestAncestorDirectoryWithPackageJson(host, sourceDirectory);
|
||||
if (nearestSourcePackageJson !== nearestTargetPackageJson) {
|
||||
const ignoreCase = !hostUsesCaseSensitiveFileNames(host);
|
||||
if (!packageJsonPathsAreEqual(nearestTargetPackageJson, nearestSourcePackageJson, ignoreCase)) {
|
||||
return maybeNonRelative;
|
||||
}
|
||||
return relativePath;
|
||||
}
|
||||
return isPathRelativeToParent(maybeNonRelative) || countPathComponents(relativePath) < countPathComponents(maybeNonRelative) ? relativePath : maybeNonRelative;
|
||||
}
|
||||
function packageJsonPathsAreEqual(a, b, ignoreCase) {
|
||||
if (a === b)
|
||||
return true;
|
||||
if (a === void 0 || b === void 0)
|
||||
return false;
|
||||
return comparePaths(a, b, ignoreCase) === 0 /* EqualTo */;
|
||||
}
|
||||
function countPathComponents(path) {
|
||||
let count = 0;
|
||||
for (let i = startsWith(path, "./") ? 2 : 0; i < path.length; i++) {
|
||||
@@ -50495,15 +50523,19 @@ ${lanes.join("\n")}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
||||
function getMeaningOfEntityNameReference(entityName) {
|
||||
let meaning;
|
||||
if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) {
|
||||
meaning = 111551 /* Value */ | 1048576 /* ExportValue */;
|
||||
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) {
|
||||
} else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */ || entityName.parent.kind === 166 /* QualifiedName */ && entityName.parent.left === entityName || entityName.parent.kind === 211 /* PropertyAccessExpression */ && entityName.parent.expression === entityName || entityName.parent.kind === 212 /* ElementAccessExpression */ && entityName.parent.expression === entityName) {
|
||||
meaning = 1920 /* Namespace */;
|
||||
} else {
|
||||
meaning = 788968 /* Type */;
|
||||
}
|
||||
return meaning;
|
||||
}
|
||||
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
||||
const meaning = getMeaningOfEntityNameReference(entityName);
|
||||
const firstIdentifier = getFirstIdentifier(entityName);
|
||||
const symbol = resolveName(
|
||||
enclosingDeclaration,
|
||||
@@ -52564,9 +52596,10 @@ ${lanes.join("\n")}
|
||||
introducesError = true;
|
||||
return { introducesError, node };
|
||||
}
|
||||
const meaning = getMeaningOfEntityNameReference(node);
|
||||
const sym = resolveEntityName(
|
||||
leftmost,
|
||||
-1 /* All */,
|
||||
meaning,
|
||||
/*ignoreErrors*/
|
||||
true,
|
||||
/*dontResolveAlias*/
|
||||
@@ -52576,13 +52609,13 @@ ${lanes.join("\n")}
|
||||
if (isSymbolAccessible(
|
||||
sym,
|
||||
context.enclosingDeclaration,
|
||||
-1 /* All */,
|
||||
meaning,
|
||||
/*shouldComputeAliasesToMakeVisible*/
|
||||
false
|
||||
).accessibility !== 0 /* Accessible */) {
|
||||
introducesError = true;
|
||||
} else {
|
||||
context.tracker.trackSymbol(sym, context.enclosingDeclaration, -1 /* All */);
|
||||
context.tracker.trackSymbol(sym, context.enclosingDeclaration, meaning);
|
||||
includePrivateSymbol == null ? void 0 : includePrivateSymbol(sym);
|
||||
}
|
||||
if (isIdentifier(node)) {
|
||||
@@ -60489,6 +60522,9 @@ ${lanes.join("\n")}
|
||||
} else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) {
|
||||
removeFromEach(typeSet, 65536 /* Null */);
|
||||
result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments);
|
||||
} else if (typeSet.length >= 4) {
|
||||
const middle = Math.floor(typeSet.length / 2);
|
||||
result = getIntersectionType([getIntersectionType(typeSet.slice(0, middle)), getIntersectionType(typeSet.slice(middle))], aliasSymbol, aliasTypeArguments);
|
||||
} else {
|
||||
if (!checkCrossProductUnion(typeSet)) {
|
||||
return errorType;
|
||||
@@ -159942,10 +159978,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
||||
return isJsxExpression(parent2) && !isJsxElement(parent2.parent) && !isJsxFragment(parent2.parent) ? checker.getContextualTypeForJsxAttribute(parent2.parent) : void 0;
|
||||
default:
|
||||
const argInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(previousToken, position, sourceFile, checker);
|
||||
return argInfo ? (
|
||||
// At `,`, treat this as the next argument after the comma.
|
||||
checker.getContextualTypeForArgumentAtIndex(argInfo.invocation, argInfo.argumentIndex + (previousToken.kind === 28 /* CommaToken */ ? 1 : 0))
|
||||
) : isEqualityOperatorKind(previousToken.kind) && isBinaryExpression(parent2) && isEqualityOperatorKind(parent2.operatorToken.kind) ? (
|
||||
return argInfo ? checker.getContextualTypeForArgumentAtIndex(argInfo.invocation, argInfo.argumentIndex) : isEqualityOperatorKind(previousToken.kind) && isBinaryExpression(parent2) && isEqualityOperatorKind(parent2.operatorToken.kind) ? (
|
||||
// completion at `x ===/**/` should be for the right side
|
||||
checker.getTypeAtLocation(parent2.left)
|
||||
) : checker.getContextualType(previousToken, 4 /* Completions */) || checker.getContextualType(previousToken);
|
||||
@@ -168509,12 +168542,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
||||
if (!info)
|
||||
return void 0;
|
||||
const { list, argumentIndex } = info;
|
||||
const argumentCount = getArgumentCount(
|
||||
list,
|
||||
/*ignoreTrailingComma*/
|
||||
isInString(sourceFile, position, node),
|
||||
checker
|
||||
);
|
||||
const argumentCount = getArgumentCount(checker, list);
|
||||
if (argumentIndex !== 0) {
|
||||
Debug.assertLessThan(argumentIndex, argumentCount);
|
||||
}
|
||||
@@ -168526,7 +168554,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
||||
return { list: getChildListThatStartsWithOpenerToken(node.parent, node, sourceFile), argumentIndex: 0 };
|
||||
} else {
|
||||
const list = findContainingList(node);
|
||||
return list && { list, argumentIndex: getArgumentIndex(list, node, checker) };
|
||||
return list && { list, argumentIndex: getArgumentIndex(checker, list, node) };
|
||||
}
|
||||
}
|
||||
function getImmediatelyContainingArgumentInfo(node, position, sourceFile, checker) {
|
||||
@@ -168656,24 +168684,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
||||
return isFunctionTypeNode(d) ? (_a = tryCast(d.parent, canHaveSymbol)) == null ? void 0 : _a.symbol : void 0;
|
||||
}) || s : s;
|
||||
}
|
||||
function getArgumentIndex(argumentsList, node, checker) {
|
||||
const args = argumentsList.getChildren();
|
||||
let argumentIndex = 0;
|
||||
for (let pos = 0; pos < length(args); pos++) {
|
||||
const child = args[pos];
|
||||
if (child === node) {
|
||||
break;
|
||||
}
|
||||
if (isSpreadElement(child)) {
|
||||
argumentIndex = argumentIndex + getSpreadElementCount(child, checker) + (pos > 0 ? pos : 0);
|
||||
} else {
|
||||
if (child.kind !== 28 /* CommaToken */) {
|
||||
argumentIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return argumentIndex;
|
||||
}
|
||||
function getSpreadElementCount(node, checker) {
|
||||
const spreadType = checker.getTypeAtLocation(node.expression);
|
||||
if (checker.isTupleType(spreadType)) {
|
||||
@@ -168686,19 +168696,48 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
function getArgumentCount(argumentsList, ignoreTrailingComma, checker) {
|
||||
const listChildren = argumentsList.getChildren();
|
||||
let argumentCount = 0;
|
||||
for (const child of listChildren) {
|
||||
if (isSpreadElement(child)) {
|
||||
argumentCount = argumentCount + getSpreadElementCount(child, checker);
|
||||
function getArgumentIndex(checker, argumentsList, node) {
|
||||
return getArgumentIndexOrCount(checker, argumentsList, node);
|
||||
}
|
||||
function getArgumentCount(checker, argumentsList) {
|
||||
return getArgumentIndexOrCount(
|
||||
checker,
|
||||
argumentsList,
|
||||
/*node*/
|
||||
void 0
|
||||
);
|
||||
}
|
||||
function getArgumentIndexOrCount(checker, argumentsList, node) {
|
||||
const args = argumentsList.getChildren();
|
||||
let argumentIndex = 0;
|
||||
let skipComma = false;
|
||||
for (const child of args) {
|
||||
if (node && child === node) {
|
||||
if (!skipComma && child.kind === 28 /* CommaToken */) {
|
||||
argumentIndex++;
|
||||
}
|
||||
return argumentIndex;
|
||||
}
|
||||
if (isSpreadElement(child)) {
|
||||
argumentIndex += getSpreadElementCount(child, checker);
|
||||
skipComma = true;
|
||||
continue;
|
||||
}
|
||||
if (child.kind !== 28 /* CommaToken */) {
|
||||
argumentIndex++;
|
||||
skipComma = true;
|
||||
continue;
|
||||
}
|
||||
if (skipComma) {
|
||||
skipComma = false;
|
||||
continue;
|
||||
}
|
||||
argumentIndex++;
|
||||
}
|
||||
argumentCount = argumentCount + countWhere(listChildren, (arg) => arg.kind !== 28 /* CommaToken */);
|
||||
if (!ignoreTrailingComma && listChildren.length > 0 && last(listChildren).kind === 28 /* CommaToken */) {
|
||||
argumentCount++;
|
||||
if (node) {
|
||||
return argumentIndex;
|
||||
}
|
||||
return argumentCount;
|
||||
return args.length && last(args).kind === 28 /* CommaToken */ ? argumentIndex + 1 : argumentIndex;
|
||||
}
|
||||
function getArgumentIndexForTemplatePiece(spanIndex, node, position, sourceFile) {
|
||||
Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node.");
|
||||
@@ -178286,7 +178325,16 @@ ${options.prefix}` : "\n" : options.prefix
|
||||
recursive ? watchedDirectoriesRecursive : watchedDirectories,
|
||||
path,
|
||||
callback,
|
||||
(id) => ({ eventName: CreateDirectoryWatcherEvent, data: { id, path, recursive: !!recursive } })
|
||||
(id) => ({
|
||||
eventName: CreateDirectoryWatcherEvent,
|
||||
data: {
|
||||
id,
|
||||
path,
|
||||
recursive: !!recursive,
|
||||
// Special case node_modules as we watch it for changes to closed script infos as well
|
||||
ignoreUpdate: !path.endsWith("/node_modules") ? true : void 0
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path, callback, event) {
|
||||
@@ -178313,24 +178361,28 @@ ${options.prefix}` : "\n" : options.prefix
|
||||
}
|
||||
};
|
||||
}
|
||||
function onWatchChange({ id, path, eventType }) {
|
||||
onFileWatcherCallback(id, path, eventType);
|
||||
onDirectoryWatcherCallback(watchedDirectories, id, path, eventType);
|
||||
onDirectoryWatcherCallback(watchedDirectoriesRecursive, id, path, eventType);
|
||||
function onWatchChange(args) {
|
||||
if (isArray(args))
|
||||
args.forEach(onWatchChangeRequestArgs);
|
||||
else
|
||||
onWatchChangeRequestArgs(args);
|
||||
}
|
||||
function onFileWatcherCallback(id, eventPath, eventType) {
|
||||
var _a;
|
||||
(_a = watchedFiles.idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => {
|
||||
const eventKind = eventType === "create" ? 0 /* Created */ : eventType === "delete" ? 2 /* Deleted */ : 1 /* Changed */;
|
||||
callback(eventPath, eventKind);
|
||||
});
|
||||
function onWatchChangeRequestArgs({ id, created, deleted, updated }) {
|
||||
onWatchEventType(id, created, 0 /* Created */);
|
||||
onWatchEventType(id, deleted, 2 /* Deleted */);
|
||||
onWatchEventType(id, updated, 1 /* Changed */);
|
||||
}
|
||||
function onDirectoryWatcherCallback({ idToCallbacks }, id, eventPath, eventType) {
|
||||
var _a;
|
||||
if (eventType === "update")
|
||||
function onWatchEventType(id, paths, eventKind) {
|
||||
if (!(paths == null ? void 0 : paths.length))
|
||||
return;
|
||||
(_a = idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => {
|
||||
callback(eventPath);
|
||||
forEachCallback(watchedFiles, id, paths, (callback, eventPath) => callback(eventPath, eventKind));
|
||||
forEachCallback(watchedDirectories, id, paths, (callback, eventPath) => callback(eventPath));
|
||||
forEachCallback(watchedDirectoriesRecursive, id, paths, (callback, eventPath) => callback(eventPath));
|
||||
}
|
||||
function forEachCallback(hostWatcherMap, id, eventPaths, cb) {
|
||||
var _a;
|
||||
(_a = hostWatcherMap.idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => {
|
||||
eventPaths.forEach((eventPath) => cb(callback, normalizeSlashes(eventPath)));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
36
node_modules/typescript/lib/typingsInstaller.js
generated
vendored
36
node_modules/typescript/lib/typingsInstaller.js
generated
vendored
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
||||
|
||||
// src/compiler/corePublic.ts
|
||||
var versionMajorMinor = "5.4";
|
||||
var version = "5.4.3";
|
||||
var version = "5.4.4";
|
||||
|
||||
// src/compiler/core.ts
|
||||
var emptyArray = [];
|
||||
@@ -3560,14 +3560,17 @@ function createDynamicPriorityPollingWatchFile(host) {
|
||||
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
|
||||
}
|
||||
}
|
||||
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) {
|
||||
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime2, fsWatchWithTimestamp) {
|
||||
const fileWatcherCallbacks = createMultiMap();
|
||||
const fileTimestamps = fsWatchWithTimestamp ? /* @__PURE__ */ new Map() : void 0;
|
||||
const dirWatchers = /* @__PURE__ */ new Map();
|
||||
const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
||||
return nonPollingWatchFile;
|
||||
function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) {
|
||||
const filePath = toCanonicalName(fileName);
|
||||
fileWatcherCallbacks.add(filePath, callback);
|
||||
if (fileWatcherCallbacks.add(filePath, callback).length === 1 && fileTimestamps) {
|
||||
fileTimestamps.set(filePath, getModifiedTime2(fileName) || missingFileModifiedTime);
|
||||
}
|
||||
const dirPath = getDirectoryPath(filePath) || ".";
|
||||
const watcher = dirWatchers.get(dirPath) || createDirectoryWatcher(getDirectoryPath(fileName) || ".", dirPath, fallbackOptions);
|
||||
watcher.referenceCount++;
|
||||
@@ -3587,14 +3590,31 @@ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFi
|
||||
const watcher = fsWatch(
|
||||
dirName,
|
||||
1 /* Directory */,
|
||||
(_eventName, relativeFileName, modifiedTime) => {
|
||||
(eventName, relativeFileName) => {
|
||||
if (!isString(relativeFileName))
|
||||
return;
|
||||
const fileName = getNormalizedAbsolutePath(relativeFileName, dirName);
|
||||
const callbacks = fileName && fileWatcherCallbacks.get(toCanonicalName(fileName));
|
||||
const filePath = toCanonicalName(fileName);
|
||||
const callbacks = fileName && fileWatcherCallbacks.get(filePath);
|
||||
if (callbacks) {
|
||||
let currentModifiedTime;
|
||||
let eventKind = 1 /* Changed */;
|
||||
if (fileTimestamps) {
|
||||
const existingTime = fileTimestamps.get(filePath);
|
||||
if (eventName === "change") {
|
||||
currentModifiedTime = getModifiedTime2(fileName) || missingFileModifiedTime;
|
||||
if (currentModifiedTime.getTime() === existingTime.getTime())
|
||||
return;
|
||||
}
|
||||
currentModifiedTime || (currentModifiedTime = getModifiedTime2(fileName) || missingFileModifiedTime);
|
||||
fileTimestamps.set(filePath, currentModifiedTime);
|
||||
if (existingTime === missingFileModifiedTime)
|
||||
eventKind = 0 /* Created */;
|
||||
else if (currentModifiedTime === missingFileModifiedTime)
|
||||
eventKind = 2 /* Deleted */;
|
||||
}
|
||||
for (const fileCallback of callbacks) {
|
||||
fileCallback(fileName, 1 /* Changed */, modifiedTime);
|
||||
fileCallback(fileName, eventKind, currentModifiedTime);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3985,7 +4005,7 @@ function createSystemWatchFunctions({
|
||||
);
|
||||
case 5 /* UseFsEventsOnParentDirectory */:
|
||||
if (!nonPollingWatchFile) {
|
||||
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2);
|
||||
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2, getModifiedTime2, fsWatchWithTimestamp);
|
||||
}
|
||||
return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options));
|
||||
default:
|
||||
@@ -4160,7 +4180,7 @@ function createSystemWatchFunctions({
|
||||
return watchPresentFileSystemEntryWithFsWatchFile();
|
||||
}
|
||||
try {
|
||||
const presentWatcher = (!fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
|
||||
const presentWatcher = (entryKind === 1 /* Directory */ || !fsWatchWithTimestamp ? fsWatchWorker : fsWatchWorkerHandlingTimestamp)(
|
||||
fileOrDirectory,
|
||||
recursive,
|
||||
inodeWatching ? callbackChangingToMissingFileSystemEntry : callback
|
||||
|
||||
2
node_modules/typescript/package.json
generated
vendored
2
node_modules/typescript/package.json
generated
vendored
@@ -2,7 +2,7 @@
|
||||
"name": "typescript",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "https://www.typescriptlang.org/",
|
||||
"version": "5.4.3",
|
||||
"version": "5.4.4",
|
||||
"license": "Apache-2.0",
|
||||
"description": "TypeScript is a language for application scale JavaScript development",
|
||||
"keywords": [
|
||||
|
||||
Reference in New Issue
Block a user