New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

go-ipfs

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

go-ipfs - npm Package Compare versions

Comparing version 0.4.0-hacky2 to 0.4.1-hacky2

4

package.json
{
"name": "go-ipfs",
"version": "0.4.0-hacky2",
"version": "0.4.1-hacky2",
"description": "Install the latest go-ipfs binary",

@@ -18,3 +18,3 @@ "main": "index.js",

"dependencies": {
"go-ipfs-dep": "0.4.0-1",
"go-ipfs-dep": "0.4.1",
"go-platform": "^1.0.0",

@@ -21,0 +21,0 @@ "gunzip-maybe": "^1.3.1",

@@ -35,7 +35,7 @@ # npm-go-ipfs

> ipfs version
ipfs version 0.4.0
ipfs version 0.4.1
> npm install go-ipfs
> node_modules/.bin/ipfs
ipfs version 0.4.0
ipfs version 0.4.1
```

@@ -75,2 +75,23 @@

### Publish a new version of this module with exact same go-ipfs version
If some problem happens, and you need to publish a new version of this module targetting _the same_ go-ipfs version, then please follow this convention:
1. **Clean up bad stuff:** unpublish all modules with this exact same `<go-ipfs-version>`
2. **Add a "hacky" version suffix:** use version: `<go-ipfs-version>-hacky<num>`
3. **Publish version:** publish the module. Since it's the only one with the go-ipfs version, then it should be installed.
> Why do this?
Well, if you previously published npm module `go-ipfs@0.4.0` and there was a problem, we now must publish a different version, but we want to keep the version number the same. so the strategy is to publish as `go-ipfs@0.4.0-hacky1`, and unpublish `go-ipfs@0.4.0`.
> Why `-hacky<num>`?
Because it is unlikely to be a legitimate go-ipfs version, and we want to support go-ipfs versions like `floodsub-1` etc.
> Do i have to say `-hacky<num>` or can i just use `-<num>`?
`-<num>` won't work, as [link-ipfs.js](./link-ipfs.js) expects `-hacky<num>`. If you want to
change the convention, go for it, and update this readme accordingly.
## Contribute

@@ -77,0 +98,0 @@

@@ -14,15 +14,22 @@ #!/usr/bin/env node

// replace the version in README.md
var rFind = /ipfs version [0-9\.]+/g
var rRep = "ipfs version " + version
fsReplace("README.md", rFind, rRep)
console.log("updated README.md")
// replace the version in package.json
var pFind = /^ "version": "[^"]+",$/m
var pRep = ' "version": "'+ version +'",'
fsReplace("package.json", pFind, pRep, function(err) {
dieOnErr(err)
console.log("updated package.json")
})
fsReplace("package.json", pFind, pRep)
console.log("updated package.json version")
var rFind = /ipfs version [0-9\.]+/g
var rRep = "ipfs version " + version
fsReplace("README.md", rFind, rRep, function(err) {
dieOnErr(err)
console.log("updated README.md")
})
// replace the go-ipfs-dep dependency in package.json
var pDepFind = /^ "go-ipfs-dep": "[^"]+",$/m
var pDepRep = ' "go-ipfs-dep": "'+ version +'",'
fsReplace("package.json", pDepFind, pDepRep)
console.log("updated package.json go-ipfs-dep")
console.log("WARNING: please make sure go-ipfs-dep version is correct.")
console.log(" use: npm view go-ipfs-dep versions")
console.log(" and verify the version is published")

@@ -38,21 +45,12 @@ function die(err) {

function fsReplace(path, find, replace, cb) {
fs.readFile(path, function(err, contents) {
if (err) {
err = new Error("failed to read " + path + ": " + err)
return cb(err)
}
function fsReplace(path, find, replace) {
var contents = fs.readFileSync(path)
contents = contents.toString()
var nc = contents.replace(find, replace)
var err = fs.writeFileSync(path, nc)
contents = contents.toString()
var nc = contents.replace(find, replace)
fs.writeFile(path, nc, function(err) {
if (err) {
err = new Error("failed to write " + path + ": " + err)
return cb(err)
}
cb(null) // success.
})
})
if (err) {
err = new Error("failed to write " + path + ": " + err)
dieOnErr(err)
}
}
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