Skip to content

Commit

Permalink
deps: init-package-json@5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Feb 7, 2023
1 parent 3c6615f commit f4c8c62
Show file tree
Hide file tree
Showing 41 changed files with 562 additions and 2,114 deletions.
32 changes: 14 additions & 18 deletions lib/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,24 +165,20 @@ class Init extends BaseCommand {
].join('\n'))
}

// XXX promisify init-package-json
await new Promise((res, rej) => {
initJson(path, initFile, this.npm.config, (er, data) => {
log.resume()
log.enableProgress()
log.silly('package data', data)
if (er && er.message === 'canceled') {
log.warn('init', 'canceled')
return res()
}
if (er) {
rej(er)
} else {
log.info('init', 'written successfully')
res(data)
}
})
})
try {
const data = await initJson(path, initFile, this.npm.config)
log.silly('package data', data)
return data
} catch (er) {
if (er.message === 'canceled') {
log.warn('init', 'canceled')
} else {
throw er
}
} finally {
log.resume()
log.enableProgress()
}
}

async setWorkspace (pkg, workspacePath) {
Expand Down
8 changes: 0 additions & 8 deletions node_modules/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@
!/inherits
!/ini
!/init-package-json
!/init-package-json/node_modules/
/init-package-json/node_modules/*
!/init-package-json/node_modules/mute-stream
!/init-package-json/node_modules/read
!/ip-regex
!/ip
!/is-cidr
Expand Down Expand Up @@ -223,10 +219,6 @@
!/promise-inflight
!/promise-retry
!/promzard
!/promzard/node_modules/
/promzard/node_modules/*
!/promzard/node_modules/mute-stream
!/promzard/node_modules/read
!/qrcode-terminal
!/read-cmd-shim
!/read-package-json-fast
Expand Down
Loading

0 comments on commit f4c8c62

Please sign in to comment.