chore(deps): update dependency typescript to v5.4.3 (#16181)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: fisker <lionkay@gmail.com> Co-authored-by: Sosuke Suzuki <sosuke.suzuki@dr-ubie.com>
This commit is contained in:
5 files changed
+30
-16
No files matched your search
@@ -49,6 +49,8 @@ if (SKIP_TESTS_WITH_NEW_SYNTAX) {
|
||||
"<rootDir>/tests/integration/__tests__/normalize-doc.js",
|
||||
"<rootDir>/tests/integration/__tests__/doc-utils-clean-doc.js",
|
||||
"<rootDir>/tests/integration/__tests__/config-invalid.js",
|
||||
// Fails on Node.js v14
|
||||
"<rootDir>/tests/dts/unit/run.js",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@
|
||||
"sdbm": "2.0.0",
|
||||
"strip-ansi": "7.1.0",
|
||||
"to-fast-properties": "4.0.0",
|
||||
"typescript": "5.3.3",
|
||||
"typescript": "5.4.4",
|
||||
"unicode-regex": "4.0.0",
|
||||
"unified": "9.2.2",
|
||||
"url-or-path": "2.3.0",
|
||||
|
||||
@@ -56,11 +56,13 @@ class TypeScriptModuleSource {
|
||||
|
||||
replaceModule(module, replacement) {
|
||||
if (typeof module === "string") {
|
||||
module = this.modules.find((searching) => searching.path === module);
|
||||
const found = this.modules.find((searching) => searching.path === module);
|
||||
|
||||
if (!found) {
|
||||
throw new Error(`Module '${module}' not found`);
|
||||
}
|
||||
|
||||
if (!module) {
|
||||
throw Object.assign(new Error("Module not found"), { module });
|
||||
module = found;
|
||||
}
|
||||
|
||||
const { esmModuleInitFunctionName } = module;
|
||||
@@ -77,11 +79,11 @@ class TypeScriptModuleSource {
|
||||
}
|
||||
|
||||
removeModule(module) {
|
||||
if (typeof module === "string") {
|
||||
module = this.modules.find((searching) => searching.path === module);
|
||||
return this.replaceModule(module, "");
|
||||
}
|
||||
|
||||
return this.replaceModule(module, "");
|
||||
hasModule(module) {
|
||||
return this.modules.some((searching) => searching.path === module);
|
||||
}
|
||||
|
||||
replaceAlignedCode({ start, end, replacement = "" }) {
|
||||
@@ -278,7 +280,9 @@ function modifyTypescriptModule(text) {
|
||||
);
|
||||
|
||||
// `pnp`
|
||||
if (source.hasModule("src/compiler/pnp.ts")) {
|
||||
source.removeModule("src/compiler/pnp.ts");
|
||||
}
|
||||
|
||||
/* spell-checker: disable */
|
||||
// `ts.createParenthesizerRules`
|
||||
|
||||
@@ -380,6 +380,7 @@ function printDocToString(doc, options) {
|
||||
case MODE_BREAK: {
|
||||
shouldRemeasure = false;
|
||||
|
||||
/** @type {Command} */
|
||||
const next = { ind, mode: MODE_FLAT, doc: doc.contents };
|
||||
const rem = width - pos;
|
||||
const hasLineSuffix = lineSuffix.length > 0;
|
||||
@@ -413,6 +414,7 @@ function printDocToString(doc, options) {
|
||||
break;
|
||||
} else {
|
||||
const state = doc.expandedStates[i];
|
||||
/** @type {Command} */
|
||||
const cmd = { ind, mode: MODE_FLAT, doc: state };
|
||||
|
||||
if (fits(cmd, cmds, rem, hasLineSuffix, groupModeMap)) {
|
||||
@@ -465,7 +467,9 @@ function printDocToString(doc, options) {
|
||||
}
|
||||
|
||||
const [content, whitespace] = parts;
|
||||
/** @type {Command} */
|
||||
const contentFlatCmd = { ind, mode: MODE_FLAT, doc: content };
|
||||
/** @type {Command} */
|
||||
const contentBreakCmd = { ind, mode: MODE_BREAK, doc: content };
|
||||
const contentFits = fits(
|
||||
contentFlatCmd,
|
||||
@@ -485,7 +489,9 @@ function printDocToString(doc, options) {
|
||||
break;
|
||||
}
|
||||
|
||||
/** @type {Command} */
|
||||
const whitespaceFlatCmd = { ind, mode: MODE_FLAT, doc: whitespace };
|
||||
/** @type {Command} */
|
||||
const whitespaceBreakCmd = { ind, mode: MODE_BREAK, doc: whitespace };
|
||||
|
||||
if (parts.length === 2) {
|
||||
@@ -503,10 +509,12 @@ function printDocToString(doc, options) {
|
||||
// elements to a new array would make this algorithm quadratic,
|
||||
// which is unusable for large arrays (e.g. large texts in JSX).
|
||||
parts.splice(0, 2);
|
||||
/** @type {Command} */
|
||||
const remainingCmd = { ind, mode, doc: fill(parts) };
|
||||
|
||||
const secondContent = parts[0];
|
||||
|
||||
/** @type {Command} */
|
||||
const firstAndSecondContentFlatCmd = {
|
||||
ind,
|
||||
mode: MODE_FLAT,
|
||||
|
||||
@@ -7514,7 +7514,7 @@ __metadata:
|
||||
tempy: "npm:3.1.0"
|
||||
to-fast-properties: "npm:4.0.0"
|
||||
ts-expect: "npm:1.3.0"
|
||||
typescript: "npm:5.3.3"
|
||||
typescript: "npm:5.4.4"
|
||||
unicode-regex: "npm:4.0.0"
|
||||
unified: "npm:9.2.2"
|
||||
url-or-path: "npm:2.3.0"
|
||||
@@ -8831,23 +8831,23 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"typescript@npm:5.3.3":
|
||||
version: 5.3.3
|
||||
resolution: "typescript@npm:5.3.3"
|
||||
"typescript@npm:5.4.4":
|
||||
version: 5.4.4
|
||||
resolution: "typescript@npm:5.4.4"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
checksum: 10/6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18
|
||||
checksum: 10/bade322d88fd93c8179e262aca9ba7f7b4417c09117879819c87946578c782ab123e3acb4733046a6e38714c47ef927360045a1f9292a1bff3a05a6577d27ca2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>":
|
||||
version: 5.3.3
|
||||
resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin<compat/typescript>::version=5.3.3&hash=e012d7"
|
||||
"typescript@patch:typescript@npm%3A5.4.4#optional!builtin<compat/typescript>":
|
||||
version: 5.4.4
|
||||
resolution: "typescript@patch:typescript@npm%3A5.4.4#optional!builtin<compat/typescript>::version=5.4.4&hash=5adc0c"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
checksum: 10/c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d
|
||||
checksum: 10/88aff3244c31d4c6ede05b4fd28732fc8935a7fc638f2a3dcbbb767d1ac98e4b077f21ec74bc97f43c9307bc3f27e2359def1d793f9918c3429a744408fd75b4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in new issue
Block a user