Socket
Socket
Sign inDemoInstall

init-package-json

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

init-package-json - npm Package Compare versions

Comparing version 1.9.3 to 1.9.4

16

init-package-json.js

@@ -43,3 +43,3 @@

var package = path.resolve(dir, 'package.json')
var packageFile = path.resolve(dir, 'package.json')
input = path.resolve(input)

@@ -53,3 +53,3 @@ var pkg

})
readJson(package, function (er, d) {
readJson(packageFile, function (er, d) {
readJson.extraSet = es

@@ -60,4 +60,4 @@

ctx.filename = package
ctx.dirname = path.dirname(package)
ctx.filename = packageFile
ctx.dirname = path.dirname(packageFile)
ctx.basename = path.basename(ctx.dirname)

@@ -86,3 +86,3 @@ if (!pkg.version || !semver.valid(pkg.version))

})
readJson.extras(package, pkg, function (er, pkg) {
readJson.extras(packageFile, pkg, function (er, pkg) {
readJson.extraSet = es

@@ -112,5 +112,5 @@ if (er) return cb(er, pkg)

function write (yes) {
fs.writeFile(package, d, 'utf8', function (er) {
fs.writeFile(packageFile, d, 'utf8', function (er) {
if (!er && yes && !config.get('silent')) {
console.log('Wrote to %s:\n\n%s\n', package, d)
console.log('Wrote to %s:\n\n%s\n', packageFile, d)
}

@@ -123,3 +123,3 @@ return cb(er, pkg)

}
console.log('About to write to %s:\n\n%s\n', package, d)
console.log('About to write to %s:\n\n%s\n', packageFile, d)
read({prompt:'Is this ok? ', default: 'yes'}, function (er, ok) {

@@ -126,0 +126,0 @@ if (!ok || ok.toLowerCase().charAt(0) !== 'y') {

{
"name": "init-package-json",
"version": "1.9.3",
"version": "1.9.4",
"main": "init-package-json.js",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc