Skip to content

Commit

Permalink
Completely remove rimraf
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle committed May 9, 2023
1 parent 0ffcd5f commit 1c76201
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 51 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@
"react": "18.2.0",
"react-17": "npm:react@17.0.2",
"react-builtin": "npm:react@18.3.0-canary-16d053d59-20230506",
"react-experimental-builtin": "npm:react@0.0.0-experimental-16d053d59-20230506",
"react-dom": "18.2.0",
"react-dom-17": "npm:react-dom@17.0.2",
"react-dom-builtin": "npm:react-dom@18.3.0-canary-16d053d59-20230506",
"react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-16d053d59-20230506",
"react-experimental-builtin": "npm:react@0.0.0-experimental-16d053d59-20230506",
"react-server-dom-webpack": "18.3.0-canary-16d053d59-20230506",
"react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-16d053d59-20230506",
"react-ssr-prepass": "1.0.8",
Expand All @@ -212,7 +212,6 @@
"release": "6.3.1",
"request-promise-core": "1.1.2",
"resolve-from": "5.0.0",
"rimraf": "3.0.2",
"sass": "1.54.0",
"satori": "0.4.4",
"scheduler-builtin": "npm:scheduler@0.24.0-canary-16d053d59-20230506",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-next-app/helpers/git.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import { execSync } from 'child_process'
import path from 'path'
import rimraf from 'rimraf'
import fs from 'fs'

function isInGitRepository(): boolean {
try {
Expand Down Expand Up @@ -40,7 +40,7 @@ export function tryGitInit(root: string): boolean {
} catch (e) {
if (didInit) {
try {
rimraf.sync(path.join(root, '.git'))
fs.rmSync(path.join(root, '.git'), { recursive: true, force: true })
} catch (_) {}
}
return false
Expand Down
2 changes: 1 addition & 1 deletion packages/create-next-app/helpers/make-dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import fs from 'fs'
export function makeDir(
root: string,
options = { recursive: true }
): Promise<void> {
): Promise<string | undefined> {
return fs.promises.mkdir(root, options)
}
5 changes: 2 additions & 3 deletions packages/create-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"scripts": {
"dev": "ncc build ./index.ts -w -o dist/",
"prerelease": "rimraf ./dist/",
"prerelease": "node ../../scripts/rm.mjs dist",
"release": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
"prepublishOnly": "cd ../../ && turbo run build",
"build": "pnpm release",
Expand All @@ -33,9 +33,8 @@
"@types/ci-info": "2.0.0",
"@types/cross-spawn": "6.0.0",
"@types/glob": "7.1.1",
"@types/node": "^12.6.8",
"@types/node": "^16.8.0",
"@types/prompts": "2.0.1",
"@types/rimraf": "3.0.0",
"@types/tar": "4.0.3",
"@types/validate-npm-package-name": "3.0.0",
"@vercel/ncc": "0.34.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"license": "MIT",
"scripts": {
"build": "rimraf dist && pnpm ncc-fontkit && tsc -d -p tsconfig.json",
"build": "node ../../scripts/rm.mjs dist && pnpm ncc-fontkit && tsc -d -p tsconfig.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "pnpm ncc-fontkit && tsc -d -w -p tsconfig.json",
"typescript": "tsec --noEmit -p tsconfig.json",
Expand Down
5 changes: 2 additions & 3 deletions packages/next-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"scripts": {
"dev": "ncc build ./index.ts -w -o dist/",
"prerelease": "rimraf ./dist/",
"prerelease": "node ../../scripts/rm.mjs dist",
"types": "tsc index.ts --declaration --emitDeclarationOnly --declarationDir dist --esModuleInterop",
"release": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
"build": "pnpm release && pnpm types",
Expand All @@ -31,7 +31,6 @@
"devDependencies": {
"@vercel/ncc": "0.34.0",
"dotenv": "10.0.0",
"dotenv-expand": "8.0.1",
"rimraf": "3.0.2"
"dotenv-expand": "8.0.1"
}
}
2 changes: 1 addition & 1 deletion packages/react-dev-overlay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "Joe Haddad <timer@vercel.com>",
"license": "MIT",
"scripts": {
"build": "rimraf dist && tsc -d -p tsconfig.json",
"build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "tsc -d -w -p tsconfig.json",
"typescript": "tsec --noEmit -p tsconfig.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-refresh-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "Joe Haddad <timer@vercel.com>",
"license": "MIT",
"scripts": {
"build": "rimraf dist && tsc -d -p tsconfig.json",
"build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "tsc -d -w -p tsconfig.json"
},
Expand Down
58 changes: 21 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1c76201

Please sign in to comment.