typescript 5.0.0-dev.20230222 → 5.0.0-dev.20230223
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/lib.es2015.symbol.wellknown.d.ts +14 -10
- package/lib/tsc.js +115 -113
- package/lib/tsserver.js +118 -113
- package/lib/tsserverlibrary.js +117 -113
- package/lib/typescript.js +116 -113
- package/lib/typingsInstaller.js +71 -68
- package/package.json +1 -1
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.0";
|
|
57
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230223`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -10196,7 +10196,7 @@ function createSymbolTable(symbols) {
|
|
|
10196
10196
|
}
|
|
10197
10197
|
var stringWriter = createSingleLineStringWriter();
|
|
10198
10198
|
function createSingleLineStringWriter() {
|
|
10199
|
-
|
|
10199
|
+
var str = "";
|
|
10200
10200
|
const writeText = (text) => str += text;
|
|
10201
10201
|
return {
|
|
10202
10202
|
getText: () => str,
|
|
@@ -14964,24 +14964,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
14964
14964
|
return node;
|
|
14965
14965
|
}
|
|
14966
14966
|
function propagateAssignmentPatternFlags(node) {
|
|
14967
|
-
|
|
14968
|
-
return 65536 /* ContainsObjectRestOrSpread */;
|
|
14969
|
-
if (node.transformFlags & 128 /* ContainsES2018 */) {
|
|
14970
|
-
for (const element of getElementsOfBindingOrAssignmentPattern(node)) {
|
|
14971
|
-
const target = getTargetOfBindingOrAssignmentElement(element);
|
|
14972
|
-
if (target && isAssignmentPattern(target)) {
|
|
14973
|
-
if (target.transformFlags & 65536 /* ContainsObjectRestOrSpread */) {
|
|
14974
|
-
return 65536 /* ContainsObjectRestOrSpread */;
|
|
14975
|
-
}
|
|
14976
|
-
if (target.transformFlags & 128 /* ContainsES2018 */) {
|
|
14977
|
-
const flags2 = propagateAssignmentPatternFlags(target);
|
|
14978
|
-
if (flags2)
|
|
14979
|
-
return flags2;
|
|
14980
|
-
}
|
|
14981
|
-
}
|
|
14982
|
-
}
|
|
14983
|
-
}
|
|
14984
|
-
return 0 /* None */;
|
|
14967
|
+
return containsObjectRestOrSpread(node) ? 65536 /* ContainsObjectRestOrSpread */ : 0 /* None */;
|
|
14985
14968
|
}
|
|
14986
14969
|
function updateBinaryExpression(node, left, operator, right) {
|
|
14987
14970
|
return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node;
|
|
@@ -18254,6 +18237,25 @@ function formatGeneratedName(privateName, prefix, baseName, suffix, generateName
|
|
|
18254
18237
|
baseName = formatIdentifier(baseName, generateName);
|
|
18255
18238
|
return `${privateName ? "#" : ""}${prefix}${baseName}${suffix}`;
|
|
18256
18239
|
}
|
|
18240
|
+
function containsObjectRestOrSpread(node) {
|
|
18241
|
+
if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */)
|
|
18242
|
+
return true;
|
|
18243
|
+
if (node.transformFlags & 128 /* ContainsES2018 */) {
|
|
18244
|
+
for (const element of getElementsOfBindingOrAssignmentPattern(node)) {
|
|
18245
|
+
const target = getTargetOfBindingOrAssignmentElement(element);
|
|
18246
|
+
if (target && isAssignmentPattern(target)) {
|
|
18247
|
+
if (target.transformFlags & 65536 /* ContainsObjectRestOrSpread */) {
|
|
18248
|
+
return true;
|
|
18249
|
+
}
|
|
18250
|
+
if (target.transformFlags & 128 /* ContainsES2018 */) {
|
|
18251
|
+
if (containsObjectRestOrSpread(target))
|
|
18252
|
+
return true;
|
|
18253
|
+
}
|
|
18254
|
+
}
|
|
18255
|
+
}
|
|
18256
|
+
}
|
|
18257
|
+
return false;
|
|
18258
|
+
}
|
|
18257
18259
|
|
|
18258
18260
|
// src/compiler/factory/utilitiesPublic.ts
|
|
18259
18261
|
function setTextRange(range, location) {
|
|
@@ -22444,7 +22446,7 @@ var Parser;
|
|
|
22444
22446
|
return finishNode(factory2.createJsxJsxClosingFragment(), pos);
|
|
22445
22447
|
}
|
|
22446
22448
|
function parseTypeAssertion() {
|
|
22447
|
-
Debug.assert(
|
|
22449
|
+
Debug.assert(languageVariant !== 1 /* JSX */, "Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");
|
|
22448
22450
|
const pos = getNodePos();
|
|
22449
22451
|
parseExpected(29 /* LessThanToken */);
|
|
22450
22452
|
const type = parseType();
|
|
@@ -35704,47 +35706,45 @@ var NodeTypingsInstaller = class extends TypingsInstaller {
|
|
|
35704
35706
|
}
|
|
35705
35707
|
this.typesRegistry = loadTypesRegistryFile(getTypesRegistryFileLocation(globalTypingsCacheLocation2), this.installTypingHost, this.log);
|
|
35706
35708
|
}
|
|
35707
|
-
|
|
35708
|
-
|
|
35709
|
-
|
|
35710
|
-
|
|
35711
|
-
|
|
35709
|
+
handleRequest(req) {
|
|
35710
|
+
if (this.delayedInitializationError) {
|
|
35711
|
+
this.sendResponse(this.delayedInitializationError);
|
|
35712
|
+
this.delayedInitializationError = void 0;
|
|
35713
|
+
}
|
|
35714
|
+
switch (req.kind) {
|
|
35715
|
+
case "discover":
|
|
35716
|
+
this.install(req);
|
|
35717
|
+
break;
|
|
35718
|
+
case "closeProject":
|
|
35719
|
+
this.closeProject(req);
|
|
35720
|
+
break;
|
|
35721
|
+
case "typesRegistry": {
|
|
35722
|
+
const typesRegistry = {};
|
|
35723
|
+
this.typesRegistry.forEach((value, key) => {
|
|
35724
|
+
typesRegistry[key] = value;
|
|
35725
|
+
});
|
|
35726
|
+
const response = { kind: EventTypesRegistry, typesRegistry };
|
|
35727
|
+
this.sendResponse(response);
|
|
35728
|
+
break;
|
|
35712
35729
|
}
|
|
35713
|
-
|
|
35714
|
-
|
|
35715
|
-
|
|
35716
|
-
|
|
35717
|
-
|
|
35718
|
-
|
|
35719
|
-
|
|
35720
|
-
|
|
35721
|
-
const typesRegistry = {};
|
|
35722
|
-
this.typesRegistry.forEach((value, key) => {
|
|
35723
|
-
typesRegistry[key] = value;
|
|
35730
|
+
case "installPackage": {
|
|
35731
|
+
const { fileName, packageName, projectName, projectRootPath } = req;
|
|
35732
|
+
const cwd = getDirectoryOfPackageJson(fileName, this.installTypingHost) || projectRootPath;
|
|
35733
|
+
if (cwd) {
|
|
35734
|
+
this.installWorker(-1, [packageName], cwd, (success) => {
|
|
35735
|
+
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
35736
|
+
const response = { kind: ActionPackageInstalled, projectName, success, message };
|
|
35737
|
+
this.sendResponse(response);
|
|
35724
35738
|
});
|
|
35725
|
-
|
|
35739
|
+
} else {
|
|
35740
|
+
const response = { kind: ActionPackageInstalled, projectName, success: false, message: "Could not determine a project root path." };
|
|
35726
35741
|
this.sendResponse(response);
|
|
35727
|
-
break;
|
|
35728
35742
|
}
|
|
35729
|
-
|
|
35730
|
-
const { fileName, packageName, projectName, projectRootPath } = req;
|
|
35731
|
-
const cwd = getDirectoryOfPackageJson(fileName, this.installTypingHost) || projectRootPath;
|
|
35732
|
-
if (cwd) {
|
|
35733
|
-
this.installWorker(-1, [packageName], cwd, (success) => {
|
|
35734
|
-
const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
|
|
35735
|
-
const response = { kind: ActionPackageInstalled, projectName, success, message };
|
|
35736
|
-
this.sendResponse(response);
|
|
35737
|
-
});
|
|
35738
|
-
} else {
|
|
35739
|
-
const response = { kind: ActionPackageInstalled, projectName, success: false, message: "Could not determine a project root path." };
|
|
35740
|
-
this.sendResponse(response);
|
|
35741
|
-
}
|
|
35742
|
-
break;
|
|
35743
|
-
}
|
|
35744
|
-
default:
|
|
35745
|
-
Debug.assertNever(req);
|
|
35743
|
+
break;
|
|
35746
35744
|
}
|
|
35747
|
-
|
|
35745
|
+
default:
|
|
35746
|
+
Debug.assertNever(req);
|
|
35747
|
+
}
|
|
35748
35748
|
}
|
|
35749
35749
|
sendResponse(response) {
|
|
35750
35750
|
if (this.log.isEnabled()) {
|
|
@@ -35810,17 +35810,20 @@ process.on("disconnect", () => {
|
|
|
35810
35810
|
}
|
|
35811
35811
|
process.exit(0);
|
|
35812
35812
|
});
|
|
35813
|
-
var installer
|
|
35814
|
-
|
|
35815
|
-
|
|
35816
|
-
|
|
35817
|
-
|
|
35818
|
-
|
|
35819
|
-
|
|
35820
|
-
|
|
35821
|
-
|
|
35822
|
-
|
|
35823
|
-
|
|
35813
|
+
var installer;
|
|
35814
|
+
process.on("message", (req) => {
|
|
35815
|
+
installer != null ? installer : installer = new NodeTypingsInstaller(
|
|
35816
|
+
globalTypingsCacheLocation,
|
|
35817
|
+
typingSafeListLocation,
|
|
35818
|
+
typesMapLocation,
|
|
35819
|
+
npmLocation,
|
|
35820
|
+
validateDefaultNpmLocation,
|
|
35821
|
+
/*throttleLimit*/
|
|
35822
|
+
5,
|
|
35823
|
+
log
|
|
35824
|
+
);
|
|
35825
|
+
installer.handleRequest(req);
|
|
35826
|
+
});
|
|
35824
35827
|
function indent(newline, str) {
|
|
35825
35828
|
return str && str.length ? `${newline} ` + str.replace(/\r?\n/, `${newline} `) : "";
|
|
35826
35829
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.0.0-dev.
|
|
5
|
+
"version": "5.0.0-dev.20230223",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|