Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ipfs-repo-migrations

Package Overview
Dependencies
Maintainers
5
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-repo-migrations - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="5.0.2"></a>
## [5.0.2](https://github.com/ipfs/js-ipfs-repo-migrations/compare/v5.0.1...v5.0.2) (2020-08-15)
### Bug Fixes
* null-guard progress and enable migration 9 ([#34](https://github.com/ipfs/js-ipfs-repo-migrations/issues/34)) ([a42e671](https://github.com/ipfs/js-ipfs-repo-migrations/commit/a42e671))
<a name="5.0.1"></a>

@@ -2,0 +12,0 @@ ## [5.0.1](https://github.com/ipfs/js-ipfs-repo-migrations/compare/v5.0.0...v5.0.1) (2020-08-15)

@@ -8,2 +8,17 @@ /*!

/*! https://mths.be/punycode v1.4.1 by @mathias */
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/**
* [js-sha3]{@link https://github.com/emn178/js-sha3}
*
* @version 0.8.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2015-2018
* @license MIT
*/
//! stable.js 0.1.8, https://github.com/Two-Screen/stable
//! © 2018 Angry Bytes and contributors. MIT licensed.

6

migrations/index.js
'use strict'
// Do not modify this file manually as it will be overridden when running 'add' CLI command.
// Modify migration-templates.js file
const emptyMigration = {

@@ -21,3 +18,4 @@ description: 'Empty migration.',

Object.assign({version: 7}, emptyMigration),
require('./migration-8')
require('./migration-8'),
require('./migration-9')
]

@@ -6,3 +6,3 @@ 'use strict'

const mb = require('multibase')
const log = require('debug')('ipfs-repo-migrations:migration-8')
const log = require('debug')('ipfs:repo:migrator:migration-8')
const uint8ArrayToString = require('uint8arrays/to-string')

@@ -9,0 +9,0 @@ const { createStore } = require('../../src/utils')

@@ -18,6 +18,9 @@ 'use strict'

const pinRoot = dagpb.util.deserialize(pinRootBuf)
const pinCount = (await length(pinset.loadSet(blockstore, pinRoot, PinTypes.recursive))) + (await length(pinset.loadSet(blockstore, pinRoot, PinTypes.direct)))
let counter = 0
let pinCount
if (onProgress) {
pinCount = (await length(pinset.loadSet(blockstore, pinRoot, PinTypes.recursive))) + (await length(pinset.loadSet(blockstore, pinRoot, PinTypes.direct)))
}
for await (const cid of pinset.loadSet(blockstore, pinRoot, PinTypes.recursive)) {

@@ -39,3 +42,5 @@ counter++

onProgress((counter / pinCount) * 100, `Migrated recursive pin ${cid}`)
if (onProgress) {
onProgress((counter / pinCount) * 100, `Migrated recursive pin ${cid}`)
}
}

@@ -69,3 +74,3 @@

let directPins = []
let counter = 0
let pinCount

@@ -77,4 +82,2 @@

let counter = 0
for await (const { key, value } of pinstore.query({})) {

@@ -81,0 +84,0 @@ counter++

{
"name": "ipfs-repo-migrations",
"version": "5.0.1",
"version": "5.0.2",
"description": "Migration framework for versioning of JS IPFS Repo",

@@ -5,0 +5,0 @@ "keywords": [

@@ -8,3 +8,3 @@ 'use strict'

const log = require('debug')('repo-migrations:migrator')
const log = require('debug')('ipfs:repo:migrator')

@@ -11,0 +11,0 @@ exports.getCurrentRepoVersion = repoVersion.getVersion

'use strict'
const log = require('debug')('repo-migrations:repo:init')
const log = require('debug')('ipfs:repo:migrator:repo:init')
const { CONFIG_KEY, VERSION_KEY, createStore } = require('../utils')

@@ -5,0 +5,0 @@ const { MissingRepoOptionsError } = require('../errors')

'use strict'
const debug = require('debug')
const log = debug('repo-migrations:repo_mem_lock')
const log = debug('ipfs:repo:migrator:repo_mem_lock')
const lockFile = 'repo.lock'
const LOCKS = {}

@@ -10,0 +7,0 @@

@@ -6,3 +6,3 @@ 'use strict'

const log = debug('repo-migrations:repo_fs_lock')
const log = debug('ipfs:repo:migrator:repo_fs_lock')
const lockFile = 'repo.lock'

@@ -9,0 +9,0 @@

Sorry, the diff of this file is too big to display

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