Open sibelius opened 3 months ago
Experiencing a similar error in a monorepo
here is a version that works well for now
import fs from 'fs/promises';
import { globSync } from 'glob';
import { transform as Transform } from 'i18next-parser';
import config from '../../i18next-parser.config';
const transform = new Transform({
...config,
});
const pattern = config.input.find((s) => !s.startsWith('!'));
const ignore = config.input
.filter((s) => s.startsWith('!'))
.map((s) => s.replace('!', ''));
(async () => {
const files = globSync(pattern, { ignore });
transform.on('data', (file) => {
// eslint-disable-next-line
console.log(file.path);
fs.writeFile(file.path, file.contents);
});
await Promise.all(
files.map((path) =>
transform._transform({ path, isBuffer: () => false }, 'utf8', () => {}),
),
);
transform._flush(() => {});
})();
🐛 Bug Report
When running parser inside a monorepo, it is throwing an error
To Reproduce
try to run this inside a pnpm monorepo
Expected behavior
A clear and concise description of what you expected to happen.
it should work
Your Environment