Skip to content

Commit 20dda87

Browse files
committed
fix: check-translations ran out of memory listing origin files
listOrigin() used glob('**/*') which followed the broken pnpm symlinks under origin/adev/node_modules (pointing to origin/node_modules/.pnpm, which does not exist), causing the traversal to blow up until the process OOM'd. Skip symbolic links and ignore node_modules entirely, since it is not translatable content.
1 parent e2afc68 commit 20dda87

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tools/check-translations.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,12 @@ async function listOrigin(ref) {
271271
// pregunta que hay que poder responder es "¿esta ruta existe upstream?", y
272272
// limitarla a los objetivos de copia daría falsos positivos con cualquier
273273
// archivo de adev-es que viva fuera de ellos.
274-
const files = await glob('**/*', { cwd: dir, onlyFiles: true });
274+
const files = await glob('**/*', {
275+
cwd: dir,
276+
onlyFiles: true,
277+
followSymbolicLinks: false,
278+
ignore: ['**/node_modules/**'],
279+
});
275280
return files.length ? new Set(files) : null;
276281
}
277282

0 commit comments

Comments
 (0)