Skip to content

Commit 5e02bc8

Browse files
committed
Switch from fs-promise to fs-extra v3
1 parent 6fe02b3 commit 5e02bc8

File tree

11 files changed

+22
-17
lines changed

11 files changed

+22
-17
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const fs = require('fs-promise')
3+
const fs = require('fs-extra')
44
const path = require('path')
55

66
const ora = require('ora')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"chalk": "^1.1.3",
2020
"chokidar": "^1.6.1",
2121
"dependency-graph": "^0.5.0",
22-
"fs-promise": "^2.0.2",
22+
"fs-extra": "^3.0.1",
2323
"get-stdin": "^5.0.1",
2424
"globby": "^6.1.0",
2525
"ora": "^1.1.0",

test/ext.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava'
22

3-
import fs from 'fs'
3+
import fs from 'fs-extra'
44
import path from 'path'
55

66
import cli from './helpers/cli.js'
@@ -19,5 +19,5 @@ test('--ext works', async function (t) {
1919
)
2020
t.ifError(error, stderr)
2121

22-
t.truthy(fs.existsSync(path.join(dir, 'a.css')))
22+
t.truthy(await fs.pathExists(path.join(dir, 'a.css')))
2323
})

test/helpers/clean.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
'use strict'
22

3-
const fs = require('fs-promise')
3+
const fs = require('fs-extra')
44

5-
fs.emptyDir('./test/fixtures/.tmp/')
6-
7-
fs.remove('./coverage')
8-
fs.remove('./.nyc_output')
5+
Promise.all([
6+
fs.emptyDir('./test/fixtures/.tmp/'),
7+
fs.remove('./coverage'),
8+
fs.remove('./.nyc_output')
9+
])
10+
.catch(err => {
11+
console.error(err)
12+
process.exit(1)
13+
})

test/helpers/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
import fs from 'fs-promise'
3+
import fs from 'fs-extra'
44
import path from 'path'
55
import globby from 'globby'
66

test/helpers/read.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
import { readFile } from 'fs-promise'
3+
import { readFile } from 'fs-extra'
44

55
export default function (path) {
66
return readFile(path, 'utf8')

test/map.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import test from 'ava'
2-
import fs from 'fs-promise'
2+
import fs from 'fs-extra'
33

44
import cli from './helpers/cli.js'
55
import tmp from './helpers/tmp.js'
@@ -26,7 +26,7 @@ test('--map generates external sourcemaps', async function (t) {
2626

2727
t.ifError(error, stderr)
2828

29-
t.truthy(await fs.exists(output.replace('.css', '.css.map')))
29+
t.truthy(await fs.pathExists(output.replace('.css', '.css.map')))
3030
})
3131

3232
test('--no-map disables internal sourcemaps', async function (t) {

test/replace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava'
22

3-
import fs from 'fs-promise'
3+
import fs from 'fs-extra'
44
import path from 'path'
55

66
import cli from './helpers/cli.js'

test/stdin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava'
22

3-
import fs from 'fs-promise'
3+
import fs from 'fs-extra'
44
import path from 'path'
55
import { execFile } from 'child_process'
66

test/stdout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'ava'
22

3-
import fs from 'fs'
3+
import fs from 'fs-extra'
44
import path from 'path'
55
import { execFile } from 'child_process'
66

0 commit comments

Comments
 (0)