feat: compose stable product surfaces
Module Package Release / publish-packages (push) Successful in 13s
Module Package Release / publish-packages (push) Successful in 13s
This commit is contained in:
@@ -15,12 +15,14 @@ const sourceRoots = fs.readdirSync(workspaceRoot, { withFileTypes: true })
|
||||
.map((entry) => path.join(workspaceRoot, entry.name, "webui", "src"))
|
||||
.filter((sourceRoot) => fs.existsSync(sourceRoot));
|
||||
|
||||
const generatedCatalogs = sourceRoots
|
||||
.map((sourceRoot) => path.join(sourceRoot, "i18n", "generatedTranslations.ts"))
|
||||
.filter((file) => fs.existsSync(file));
|
||||
const generatedCatalogs = sourceRoots.flatMap((sourceRoot) =>
|
||||
fs.existsSync(path.join(sourceRoot, "i18n"))
|
||||
? rgFiles(path.join(sourceRoot, "i18n")).filter((file) => /Translations\.ts$/.test(file))
|
||||
: []
|
||||
);
|
||||
|
||||
function scanStructuralSourcePositions(roots) {
|
||||
const files = roots.flatMap((root) => rgFiles(root).filter((file) => /\.(tsx?|jsx?)$/.test(file) && !file.endsWith("/i18n/generatedTranslations.ts")));
|
||||
const files = roots.flatMap((root) => rgFiles(root).filter((file) => /\.(tsx?|jsx?)$/.test(file) && !/\/i18n\/[^/]*Translations\.ts$/.test(file)));
|
||||
const findings = [];
|
||||
for (const file of files) {
|
||||
const source = ts.createSourceFile(file, fs.readFileSync(file, "utf8"), ts.ScriptTarget.Latest, true, file.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS);
|
||||
|
||||
Reference in New Issue
Block a user