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

Commit f2d524b

Browse files
richardschneiderdaviddias
authored andcommittedNov 6, 2017
fix: Windows interop (#104)
* chore: upgrade packages Removed running tests on a pre-commit as it prevents checking in incremental changes to a branch * fix: os-specific path * fix(ci): run on appveyor * chore: rename .appveyor.yml to appveyor.yml * fix: oops * chore: restore pre-commit-test * chore(ci): need more time for tests #105 * chore(ci): try latest aegir without timeout * chore: update deps * chore: bring back TODO * chore: upgrade packages * test: local timeout for test
1 parent 8bfec1d commit f2d524b

File tree

4 files changed

+39
-10
lines changed

4 files changed

+39
-10
lines changed
 

‎appveyor.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
environment:
2+
matrix:
3+
- nodejs_version: "6"
4+
- nodejs_version: "8"
5+
6+
# cache:
7+
# - node_modules
8+
9+
platform:
10+
- x64
11+
12+
install:
13+
- ps: Install-Product node $env:nodejs_version $env:platform
14+
- npm install
15+
16+
test_script:
17+
- node --version
18+
- npm --version
19+
- npm test
20+
21+
build: off
22+
23+
version: "{build}"

‎package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
"homepage": "https://github.com/ipld/js-ipld-resolver#readme",
3333
"license": "MIT",
3434
"devDependencies": {
35-
"aegir": "^12.0.8",
35+
"aegir": "^12.1.3",
3636
"chai": "^4.1.2",
3737
"dirty-chai": "^2.0.1",
38-
"eth-hash-to-cid": "^0.1.0",
38+
"eth-hash-to-cid": "~0.1.0",
3939
"ethereumjs-block": "^1.7.0",
4040
"lodash": "^4.17.4",
4141
"ncp": "^2.0.0",
@@ -46,20 +46,20 @@
4646
"dependencies": {
4747
"async": "^2.5.0",
4848
"cids": "~0.5.2",
49-
"interface-datastore": "^0.3.1",
50-
"ipfs-block": "~0.6.0",
51-
"ipfs-block-service": "~0.12.0",
52-
"ipfs-repo": "~0.17.0",
49+
"interface-datastore": "~0.4.1",
50+
"ipfs-block": "~0.6.1",
51+
"ipfs-block-service": "~0.13.0",
52+
"ipfs-repo": "~0.18.2",
5353
"ipld-dag-cbor": "~0.11.1",
5454
"ipld-dag-pb": "~0.11.2",
5555
"ipld-ethereum": "^1.4.3",
56-
"ipld-git": "^0.1.0",
56+
"ipld-git": "~0.1.0",
5757
"ipld-raw": "^1.0.6",
5858
"is-ipfs": "~0.3.2",
5959
"lodash.flatten": "^4.4.0",
6060
"lodash.includes": "^4.3.0",
6161
"memdown": "^1.4.1",
62-
"multihashes": "~0.4.9",
62+
"multihashes": "~0.4.12",
6363
"pull-sort": "^1.0.1",
6464
"pull-stream": "^3.6.1",
6565
"pull-traverse": "^1.0.3"

‎src/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const doUntil = require('async/doUntil')
77
const IPFSRepo = require('ipfs-repo')
88
const BlockService = require('ipfs-block-service')
99
const joinPath = require('path').join
10+
const osPathSep = require('path').sep
1011
const pullDeferSource = require('pull-defer').source
1112
const pullTraverse = require('pull-traverse')
1213
const map = require('async/map')
@@ -116,8 +117,12 @@ class IPLDResolver {
116117

117118
// this removes occurrences of ./, //, ../
118119
// makes sure that path never starts with ./ or /
120+
// path.join is OS specific. Need to convert back to POSIX format.
119121
if (typeof path === 'string') {
120-
path = joinPath('/', path).substr(1)
122+
path = joinPath('/', path)
123+
.substr(1)
124+
.split(osPathSep)
125+
.join('/')
121126
}
122127

123128
if (path === '' || !path) {

‎test/ipld-eth.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ module.exports = (repo) => {
2121

2222
let ethObjs
2323

24-
before((done) => {
24+
before(function (done) {
25+
this.timeout(10 * 1000)
2526
const bs = new BlockService(repo)
2627
resolver = new IPLDResolver(bs)
2728

0 commit comments

Comments
 (0)
This repository has been archived.