From a3c93b0d2edc3ccf5f345cd9a8f3592eeaa35f6f Mon Sep 17 00:00:00 2001 From: Francesco Trotta Date: Fri, 27 Dec 2024 11:08:28 +0100 Subject: [PATCH] replace with Node.js --- packages/plugin-kit/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-kit/package.json b/packages/plugin-kit/package.json index bca9cfe..83b6cc2 100644 --- a/packages/plugin-kit/package.json +++ b/packages/plugin-kit/package.json @@ -32,7 +32,7 @@ "homepage": "https://github.com/eslint/rewrite#readme", "scripts": { "build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js", - "build:cts": "sed 's|import(\"./types.ts\")|import(\"./types.ts\", { with: { \"resolution-mode\": \"import\" } })|' dist/esm/index.d.ts > dist/cjs/index.d.cts", + "build:cts": "node -e \"fs.writeFileSync('dist/cjs/index.d.cts', fs.readFileSync('dist/esm/index.d.ts', 'utf-8').replaceAll('import(\\\"./types.ts\\\")', 'import(\\\"./types.ts\\\", { with: { \\\"resolution-mode\\\": \\\"import\\\" } })'))\"", "build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts", "pretest": "npm run build", "test": "mocha tests/",