editor
editor copied to clipboard
Use tmpdir instead of __textlint_compier_temp
https://github.com/textlint/editor/blob/630fd1ee938a2b39e8ae74afdbde157497125557/packages/%40textlint/script-compiler/src/compiler.ts#L178
Instead of it, use actual tmp.dir()
Fmm, if we use const tempDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "__textlint_compier_temp"));, script-compiler throw following error.
[
{
moduleIdentifier: '/private/var/folders/h1/vcv_f7n53sx_tfs4qmlrqft80000gp/T/__textlint_compier_temp5QRLTX/input.js',
moduleName: '../../../../../../../../private/var/folders/h1/vcv_f7n53sx_tfs4qmlrqft80000gp/T/__textlint_compier_temp5QRLTX/input.js',
loc: '2:0-50',
message: "Module not found: Error: Can't resolve '@textlint/kernel' in '/private/var/folders/h1/vcv_f7n53sx_tfs4qmlrqft80000gp/T/__textlint_compier_temp5QRLTX'",
moduleId: 64,