Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Commit

Permalink
chore(package): update aegir to version 18.0.2
Browse files Browse the repository at this point in the history
The new AEgir version has stricter linting, the code was adapted
accordingly.

Closes #35
  • Loading branch information
greenkeeper[bot] authored and vmx committed Dec 21, 2018
1 parent f3b5622 commit 6fe2685
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"traverse": "~0.6.6"
},
"devDependencies": {
"aegir": "^17.1.0",
"aegir": "^18.0.2",
"chai": "^4.1.2",
"deep-freeze": "0.0.1",
"dirty-chai": "^2.0.1",
Expand Down
10 changes: 6 additions & 4 deletions src/util/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ exports.serialize = (dagNode, callback) => {

exports.deserialize = (data, callback) => {
let lines = data.toString().split('\n')
let res = {gitType: 'commit', parents: []}
let res = { gitType: 'commit', parents: [] }

for (let line = 0; line < lines.length; line++) {
let m = lines[line].match(/^([^ ]+) (.+)$/)
Expand All @@ -58,7 +58,7 @@ exports.deserialize = (data, callback) => {
let value = m[2]
switch (key) {
case 'tree':
res.tree = {'/': gitUtil.shaToCid(Buffer.from(value, 'hex'))}
res.tree = { '/': gitUtil.shaToCid(Buffer.from(value, 'hex')) }
break
case 'committer':
res.committer = gitUtil.parsePersonLine(value)
Expand All @@ -67,7 +67,7 @@ exports.deserialize = (data, callback) => {
res.author = gitUtil.parsePersonLine(value)
break
case 'parent':
res.parents.push({'/': gitUtil.shaToCid(Buffer.from(value, 'hex'))})
res.parents.push({ '/': gitUtil.shaToCid(Buffer.from(value, 'hex')) })
break
case 'gpgsig': {
if (value !== '-----BEGIN PGP SIGNATURE-----') {
Expand All @@ -90,7 +90,9 @@ exports.deserialize = (data, callback) => {
setImmediate(() => callback(new Error('Invalid commit line ' + line)))
}

let tag = {object: {'/': gitUtil.shaToCid(Buffer.from(mt[1], 'hex'))}}
let tag = { object:
{ '/': gitUtil.shaToCid(Buffer.from(mt[1], 'hex')) }
}

let startLine = line
for (; line < lines.length - 1; line++) {
Expand Down
4 changes: 2 additions & 2 deletions src/util/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports.serialize = (dagNode, callback) => {

exports.deserialize = (data, callback) => {
let lines = data.toString().split('\n')
let res = {gitType: 'tag'}
let res = { gitType: 'tag' }

for (let line = 0; line < lines.length; line++) {
let m = lines[line].match(/^([^ ]+) (.+)$/)
Expand All @@ -45,7 +45,7 @@ exports.deserialize = (data, callback) => {
let value = m[2]
switch (key) {
case 'object':
res.object = {'/': gitUtil.shaToCid(Buffer.from(value, 'hex'))}
res.object = { '/': gitUtil.shaToCid(Buffer.from(value, 'hex')) }
break
case 'tagger':
res.tagger = gitUtil.parsePersonLine(value)
Expand Down
2 changes: 1 addition & 1 deletion src/util/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exports.deserialize = (data, callback) => {

res[modNameMatched[2]] = {
mode: modNameMatched[1],
hash: {'/': gitUtil.shaToCid(hash)}
hash: { '/': gitUtil.shaToCid(hash) }
}
}

Expand Down
10 changes: 5 additions & 5 deletions test/resolver.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ describe('IPLD format resolver (local)', () => {
before((done) => {
const commitNode = {
gitType: 'commit',
tree: {'/': new CID('z8mWaJ1dZ9fH5EetPuRsj8jj26pXsgpsr').buffer},
tree: { '/': new CID('z8mWaJ1dZ9fH5EetPuRsj8jj26pXsgpsr').buffer },
parents: [
{'/': new CID('z8mWaFY1zpiZSXTBrz8i6A3o9vNvAs2CH').buffer}
{ '/': new CID('z8mWaFY1zpiZSXTBrz8i6A3o9vNvAs2CH').buffer }
],
author: {
name: 'John Doe',
Expand All @@ -43,7 +43,7 @@ describe('IPLD format resolver (local)', () => {

const tagNode = {
gitType: 'tag',
object: {'/': new CID('z8mWaHQaEAKd5KMRNU3npB3saSZmhFh3e').buffer},
object: { '/': new CID('z8mWaHQaEAKd5KMRNU3npB3saSZmhFh3e').buffer },
type: 'commit',
tag: 'v0.0.0',
tagger: {
Expand All @@ -56,11 +56,11 @@ describe('IPLD format resolver (local)', () => {

const treeNode = {
somefile: {
hash: {'/': new CID('z8mWaJNVTadD7oum3m7f1dmarHvYhFV5b').buffer},
hash: { '/': new CID('z8mWaJNVTadD7oum3m7f1dmarHvYhFV5b').buffer },
mode: '100644'
},
somedir: {
hash: {'/': new CID('z8mWaFY1zpiZSXTBrz8i6A3o9vNvAs2CH').buffer},
hash: { '/': new CID('z8mWaFY1zpiZSXTBrz8i6A3o9vNvAs2CH').buffer },
mode: '40000'
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/util.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const CID = require('cids')
describe('IPLD format util', () => {
const tagNode = {
gitType: 'tag',
object: {'/': new CID('z8mWaHQaEAKd5KMRNU3npB3saSZmhFh3e').buffer},
object: { '/': new CID('z8mWaHQaEAKd5KMRNU3npB3saSZmhFh3e').buffer },
type: 'commit',
tag: 'v0.0.0',
tagger: {
Expand Down

0 comments on commit 6fe2685

Please sign in to comment.