Skip to content

Commit

Permalink
chore: update aegir and linter
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Dec 12, 2024
1 parent 15d6a39 commit df652f2
Show file tree
Hide file tree
Showing 8 changed files with 14,307 additions and 13,115 deletions.
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "ipfs/js",
"rules": {
"import/no-named-as-default": 0,
"import/no-named-default": 0
Expand Down
8 changes: 4 additions & 4 deletions bin/generate.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env node
/* eslint no-console: "off", no-unreachable: "off" */
import Gauge from 'gauge'
import gen from '../src/generate/index.js'
import { create } from 'kubo-rpc-client'
import { CarWriter } from '@ipld/car'
import fs from 'fs'
import { Readable } from 'stream'
import { promisify } from 'util'
import { CarWriter } from '@ipld/car'
import Gauge from 'gauge'
import { create } from 'kubo-rpc-client'
import { CID } from 'multiformats/cid'
import gen from '../src/generate/index.js'

const fsopen = promisify(fs.open)
const fsclose = promisify(fs.close)
Expand Down
27,366 changes: 14,281 additions & 13,085 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"@ipld/car": "^5.3.3",
"@ipld/dag-cbor": "^9.2.2",
"aegir": "^37.5.4",
"aegir": "^45.0.8",
"bluebird": "^3.7.2",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
Expand Down
32 changes: 15 additions & 17 deletions src/generate/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@

import { default as Promise } from 'bluebird'
import { EventEmitter } from 'events'
import { cpus } from 'os'
import * as dagCbor from '@ipld/dag-cbor'
import { CID } from 'multiformats/cid'
import { sha256 } from 'multiformats/hashes/sha2'
import { default as Promise } from 'bluebird'
import ip from 'ip'
import { chunk, reduce } from 'lodash-es'
import { EventEmitter } from 'events'
import concat from 'it-concat'
import { cpus } from 'os'

import { chunk, reduce } from 'lodash-es'
import { CID } from 'multiformats/cid'
import { sha256 } from 'multiformats/hashes/sha2'
import normalizeName from './overrides.js'

// Btree size
Expand All @@ -28,8 +26,8 @@ const progress = new EventEmitter()

function emit (type, status, attrs) {
progress.emit('progress', Object.assign({}, {
type: type,
status: status
type,
status
}, attrs))
}

Expand Down Expand Up @@ -192,11 +190,11 @@ async function main (ipfs, car) {
}

export default {
parseCountries: parseCountries,
parseLocations: parseLocations,
parseBlocks: parseBlocks,
putBlock: putBlock,
toNode: toNode,
main: main,
progress: progress
parseCountries,
parseLocations,
parseBlocks,
putBlock,
toNode,
main,
progress
}
8 changes: 4 additions & 4 deletions src/lookup.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { default as memoize } from 'p-memoize'
import ip from 'ip'
import { decode as dagCborDecode } from '@ipld/dag-cbor'
import { CID } from 'multiformats/cid'
import fetch from 'cross-fetch'
import { formatData } from './format.js'
import ip from 'ip'
import { CID } from 'multiformats/cid'
import { default as memoize } from 'p-memoize'
import { MAX_LOOKUP_RETRIES } from './constants.js'
import { formatData } from './format.js'

export const GEOIP_ROOT = CID.parse('bafyreif3tfdpr5n4jdrbielmcapwvbpcthepfkwq2vwonmlhirbjmotedi') // b-tree version of GeoLite2-City-CSV_20231117

Expand Down
3 changes: 1 addition & 2 deletions test/generate.browser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import * as chai from 'chai'
import { default as asPromised } from 'chai-as-promised'
import { fromString } from 'uint8arrays/from-string'
import { parse } from 'csv-parse/browser/esm/sync'

import { fromString } from 'uint8arrays/from-string'
import { default as gen } from '../src/generate/index.js'
chai.use(asPromised)
const expect = chai.expect
Expand Down
2 changes: 1 addition & 1 deletion test/lookupMultiple.node.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from 'chai'
import { MAX_LOOKUP_RETRIES } from '../src/constants.js'
import fetch from 'cross-fetch'
import esmock from 'esmock'
import { MAX_LOOKUP_RETRIES } from '../src/constants.js'

describe('[Runner Node]: lookup via HTTP Gateway supporting application/vnd.ipld.raw responses', function () {
const ipfsGW = process?.env?.IPFS_GATEWAY || 'https://ipfs.io'
Expand Down

0 comments on commit df652f2

Please sign in to comment.