Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
fix: remove @npmcli/fs
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Oct 30, 2022
1 parent 534c37d commit 4b3a7f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { join } = require('path')
const fs = require('@npmcli/fs')
const fs = require('fs/promises')

const validate = (defaults, options) => {
if (!defaults || typeof defaults !== 'object') {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"author": "GitHub Inc.",
"license": "ISC",
"dependencies": {
"@npmcli/fs": "^1.0.0",
"read": "^1.0.7"
},
"devDependencies": {
Expand Down
7 changes: 4 additions & 3 deletions test/build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { join } = require('path')
const fs = require('@npmcli/fs')
const { existsSync } = require('fs')
const fs = require('fs/promises')
const t = require('tap')

const build = require('../lib/build.js')
Expand All @@ -13,7 +14,7 @@ t.test('can return an object', async (t) => {
t.match(result, defaults, 'got an object')

const target = join(path, 'package.json')
const fileExists = await fs.exists(target)
const fileExists = existsSync(target)
t.not(fileExists, 'file was not written')
})

Expand All @@ -26,7 +27,7 @@ t.test('can save the package.json', async (t) => {
t.match(result, defaults, 'got an object')

const target = join(path, 'package.json')
const fileExists = await fs.exists(target)
const fileExists = existsSync(target)
t.ok(fileExists, 'file was written')

const contents = await fs.readFile(target)
Expand Down

0 comments on commit 4b3a7f7

Please # to comment.