refactor: consume Commonlib as a package

This commit is contained in:
vorotamoroz
2026-07-17 11:13:16 +00:00
parent 6475d32769
commit a721d3b602
665 changed files with 3438 additions and 31592 deletions
+2 -3
View File
@@ -32,7 +32,6 @@ function toPosixPath(filePath: string): string {
const posixProjectRoot = toPosixPath(projectRoot);
const posixSrc = `${posixProjectRoot}/src`;
const posixLibSrc = `${posixProjectRoot}/src/lib`;
const TARGET_GLOBALS = new Set([
"setTimeout",
@@ -191,7 +190,7 @@ for (const sourceFile of project.getSourceFiles()) {
if (requiredImports.length > 0) {
const existingImport = sourceFile.getImportDeclarations().find((imp) => {
const spec = imp.getModuleSpecifierValue();
return spec === "@lib/common/coreEnvFunctions" || spec === "@lib/common/coreEnvFunctions.ts";
return spec === "@vrtmrz/livesync-commonlib/compat/common/coreEnvFunctions" || spec === "@vrtmrz/livesync-commonlib/compat/common/coreEnvFunctions";
});
if (existingImport) {
@@ -206,7 +205,7 @@ for (const sourceFile of project.getSourceFiles()) {
} else {
sourceFile.addImportDeclaration({
namedImports: requiredImports,
moduleSpecifier: "@lib/common/coreEnvFunctions.ts",
moduleSpecifier: "@vrtmrz/livesync-commonlib/compat/common/coreEnvFunctions",
});
}
}