Skip to content

Commit

Permalink
Merge pull request #3136 from ONEARMY/fix/scripts-address-deprecated-…
Browse files Browse the repository at this point in the history
…usage-of-rimraf

fix(scripts): update usage of rimraf in install scripts
  • Loading branch information
thisislawatts authored Jan 2, 2024
2 parents 6b3e60b + 658cd07 commit 157684f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 47 deletions.
12 changes: 2 additions & 10 deletions scripts/installClean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { spawnSync } from 'child_process'
import globby from 'globby'
import path from 'path'
import fs from 'fs'
import rimraf from 'rimraf'
import { rimrafSync } from 'rimraf'

const REPO_SRC = path.resolve(__dirname, '../')

Expand Down Expand Up @@ -35,13 +35,5 @@ async function installClean() {
installClean()

async function deleteFolder(folderPath: string) {
return new Promise<void>((resolve, reject) => {
rimraf(folderPath, { disableGlob: true }, (err) => {
if (err) {
reject(err)
} else {
resolve()
}
})
})
return await rimrafSync(folderPath, { glob: false })
}
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"globby": "^11.0.2",
"mustache": "^4.2.0",
"oa-shared": "workspace:*",
"rimraf": "^4.0.0",
"rimraf": "^5.0.5",
"ts-node": "^10.2.1"
},
"devDependencies": {
Expand Down
72 changes: 36 additions & 36 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20890,6 +20890,21 @@ __metadata:
languageName: node
linkType: hard

"glob@npm:^10.3.7":
version: 10.3.10
resolution: "glob@npm:10.3.10"
dependencies:
foreground-child: ^3.1.0
jackspeak: ^2.3.5
minimatch: ^9.0.1
minipass: ^5.0.0 || ^6.0.2 || ^7.0.0
path-scurry: ^1.10.1
bin:
glob: dist/esm/bin.mjs
checksum: 4f2fe2511e157b5a3f525a54092169a5f92405f24d2aed3142f4411df328baca13059f4182f1db1bf933e2c69c0bd89e57ae87edd8950cba8c7ccbe84f721cf3
languageName: node
linkType: hard

"glob@npm:^8.0.0, glob@npm:^8.0.1, glob@npm:^8.1.0":
version: 8.1.0
resolution: "glob@npm:8.1.0"
Expand All @@ -20903,18 +20918,6 @@ __metadata:
languageName: node
linkType: hard

"glob@npm:^9.2.0":
version: 9.3.5
resolution: "glob@npm:9.3.5"
dependencies:
fs.realpath: ^1.0.0
minimatch: ^8.0.2
minipass: ^4.2.4
path-scurry: ^1.6.1
checksum: 94b093adbc591bc36b582f77927d1fb0dbf3ccc231828512b017601408be98d1fe798fc8c0b19c6f2d1a7660339c3502ce698de475e9d938ccbb69b47b647c84
languageName: node
linkType: hard

"global-dirs@npm:^0.1.1":
version: 0.1.1
resolution: "global-dirs@npm:0.1.1"
Expand Down Expand Up @@ -23319,6 +23322,19 @@ __metadata:
languageName: node
linkType: hard

"jackspeak@npm:^2.3.5":
version: 2.3.6
resolution: "jackspeak@npm:2.3.6"
dependencies:
"@isaacs/cliui": ^8.0.2
"@pkgjs/parseargs": ^0.11.0
dependenciesMeta:
"@pkgjs/parseargs":
optional: true
checksum: 57d43ad11eadc98cdfe7496612f6bbb5255ea69fe51ea431162db302c2a11011642f50cfad57288bd0aea78384a0612b16e131944ad8ecd09d619041c8531b54
languageName: node
linkType: hard

"jake@npm:^10.8.5":
version: 10.8.5
resolution: "jake@npm:10.8.5"
Expand Down Expand Up @@ -26758,15 +26774,6 @@ __metadata:
languageName: node
linkType: hard

"minimatch@npm:^8.0.2":
version: 8.0.4
resolution: "minimatch@npm:8.0.4"
dependencies:
brace-expansion: ^2.0.1
checksum: 2e46cffb86bacbc524ad45a6426f338920c529dd13f3a732cc2cf7618988ee1aae88df4ca28983285aca9e0f45222019ac2d14ebd17c1edadd2ee12221ab801a
languageName: node
linkType: hard

"minimatch@npm:^9.0.1":
version: 9.0.3
resolution: "minimatch@npm:9.0.3"
Expand Down Expand Up @@ -26868,13 +26875,6 @@ __metadata:
languageName: node
linkType: hard

"minipass@npm:^4.2.4":
version: 4.2.8
resolution: "minipass@npm:4.2.8"
checksum: 7f4914d5295a9a30807cae5227a37a926e6d910c03f315930fde52332cf0575dfbc20295318f91f0baf0e6bb11a6f668e30cde8027dea7a11b9d159867a3c830
languageName: node
linkType: hard

"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0":
version: 7.0.3
resolution: "minipass@npm:7.0.3"
Expand Down Expand Up @@ -27596,7 +27596,7 @@ __metadata:
globby: ^11.0.2
mustache: ^4.2.0
oa-shared: "workspace:*"
rimraf: ^4.0.0
rimraf: ^5.0.5
ts-node: ^10.2.1
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -28472,7 +28472,7 @@ __metadata:
languageName: node
linkType: hard

"path-scurry@npm:^1.10.1, path-scurry@npm:^1.6.1":
"path-scurry@npm:^1.10.1":
version: 1.10.1
resolution: "path-scurry@npm:1.10.1"
dependencies:
Expand Down Expand Up @@ -31928,14 +31928,14 @@ __metadata:
languageName: node
linkType: hard

"rimraf@npm:^4.0.0":
version: 4.4.1
resolution: "rimraf@npm:4.4.1"
"rimraf@npm:^5.0.5":
version: 5.0.5
resolution: "rimraf@npm:5.0.5"
dependencies:
glob: ^9.2.0
glob: ^10.3.7
bin:
rimraf: dist/cjs/src/bin.js
checksum: b786adc02651e2e24bbedb04bbdea80652fc9612632931ff2d9f898c5e4708fe30956186597373c568bd5230a4dc2fadfc816ccacba8a1daded3a006a6b74f1a
rimraf: dist/esm/bin.mjs
checksum: d66eef829b2e23b16445f34e73d75c7b7cf4cbc8834b04720def1c8f298eb0753c3d76df77325fad79d0a2c60470525d95f89c2475283ad985fd7441c32732d1
languageName: node
linkType: hard

Expand Down

0 comments on commit 157684f

Please sign in to comment.