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
+33
-19
No files matched your search
@@ -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 (!module) {
|
||||
throw Object.assign(new Error("Module not found"), { module });
|
||||
if (!found) {
|
||||
throw new Error(`Module '${module}' not found`);
|
||||
}
|
||||
|
||||
module = found;
|
||||
}
|
||||
|
||||
const { esmModuleInitFunctionName } = module;
|
||||
@@ -77,13 +79,13 @@ class TypeScriptModuleSource {
|
||||
}
|
||||
|
||||
removeModule(module) {
|
||||
if (typeof module === "string") {
|
||||
module = this.modules.find((searching) => searching.path === module);
|
||||
}
|
||||
|
||||
return this.replaceModule(module, "");
|
||||
}
|
||||
|
||||
hasModule(module) {
|
||||
return this.modules.some((searching) => searching.path === module);
|
||||
}
|
||||
|
||||
replaceAlignedCode({ start, end, replacement = "" }) {
|
||||
const regexp = new RegExp(
|
||||
[
|
||||
@@ -278,7 +280,9 @@ function modifyTypescriptModule(text) {
|
||||
);
|
||||
|
||||
// `pnp`
|
||||
source.removeModule("src/compiler/pnp.ts");
|
||||
if (source.hasModule("src/compiler/pnp.ts")) {
|
||||
source.removeModule("src/compiler/pnp.ts");
|
||||
}
|
||||
|
||||
/* spell-checker: disable */
|
||||
// `ts.createParenthesizerRules`
|
||||
|
||||
Reference in new issue
Block a user