diff --git a/packages/global-registrator/package.json b/packages/global-registrator/package.json index 263c4494d..27112893d 100644 --- a/packages/global-registrator/package.json +++ b/packages/global-registrator/package.json @@ -67,12 +67,12 @@ "scripts": { "compile": "npm run compile:esm && npm run compile:cjs", "compile:esm": "tsc", - "compile:cjs": "rm -rf cjs && tsc --moduleResolution Node --module CommonJS --outDir cjs && npm run compile:change-cjs-file-extension", + "compile:cjs": "node -e \"fs.rmSync('./cjs', { recursive: true, force: true })\" && tsc --moduleResolution Node --module CommonJS --outDir cjs && npm run compile:change-cjs-file-extension", "compile:change-cjs-file-extension": "node ../happy-dom/bin/change-file-extension.cjs --dir=./cjs --fromExt=.js --toExt=.cjs", "watch": "npm run compile && tsc -w --preserveWatchOutput", "test": "npm run test:react && npm run test:bun", "test:debug": "tsc --project ./test/react && node ../happy-dom/bin/change-file-extension.cjs --dir=./tmp --fromExt=.js --toExt=.cjs && node --inspect-brk ./tmp/react/React.test.cjs", - "test:react": "rm -rf tmp && tsc --project ./test/react && node ../happy-dom/bin/change-file-extension.cjs --dir=./tmp --fromExt=.js --toExt=.cjs && node ./tmp/react/React.test.cjs", + "test:react": "node -e \"fs.rmSync('./tmp', { recursive: true, force: true })\" && tsc --project ./test/react && node ../happy-dom/bin/change-file-extension.cjs --dir=./tmp --fromExt=.js --toExt=.cjs && node ./tmp/react/React.test.cjs", "test:bun": "bun test ./test/bun/Bun.test.js" }, "dependencies": { diff --git a/packages/happy-dom/package.json b/packages/happy-dom/package.json index 2768ad654..7cc1a131d 100644 --- a/packages/happy-dom/package.json +++ b/packages/happy-dom/package.json @@ -67,7 +67,7 @@ "scripts": { "compile": "npm run compile:esm && npm run compile:cjs npm run build-version-file", "compile:esm": "tsc", - "compile:cjs": "rm -rf ./cjs && tsc --moduleResolution Node --module CommonJS --outDir cjs && npm run compile:change-cjs-file-extension", + "compile:cjs": "node -e \"fs.rmSync('./cjs', { recursive: true, force: true })\" && tsc --moduleResolution Node --module CommonJS --outDir cjs && npm run compile:change-cjs-file-extension", "compile:change-cjs-file-extension": "node ./bin/change-file-extension.cjs --dir=./cjs --fromExt=.js --toExt=.cjs", "build-version-file": "node ./bin/build-version-file.cjs", "watch": "tsc -w --preserveWatchOutput",