Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 82e1b30

Browse files
author
Alan Shaw
committed
refactor: move to root
In response to #423 License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent 45da688 commit 82e1b30

File tree

181 files changed

+59
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+59
-59
lines changed

.aegir.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
module.exports = {
44
lint: {
55
files: [
6-
'js/src/**/*.js',
7-
'js/test/**/*.js'
6+
'src/**/*.js',
7+
'test/**/*.js'
88
]
99
}
1010
}

README.md

+1-1

SPEC/BLOCK.md

+1-1

SPEC/CONFIG.md

+1-1

SPEC/DAG.md

+1-1

SPEC/DHT.md

+1-1

SPEC/FILES.md

+1-1

SPEC/MISCELLANEOUS.md

+9-9

SPEC/OBJECT.md

+1-1

SPEC/PIN.md

+1-1

SPEC/PUBSUB.md

+1-1

SPEC/SWARM.md

+1-1

js/src/files-regular/utils.js

-29
This file was deleted.

js/test/.gitkeep

Whitespace-only changes.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.96.1",
44
"description": "A test suite and interface you can use to implement a IPFS core interface.",
55
"leadMaintainer": "Alan Shaw <[email protected]>",
6-
"main": "js/src/index.js",
6+
"main": "src/index.js",
77
"browser": {
88
"fs": false
99
},
@@ -20,8 +20,8 @@
2020
"coverage-publish": "exit 0"
2121
},
2222
"files": [
23-
"js/src/",
24-
"js/test/"
23+
"src/",
24+
"test/"
2525
],
2626
"repository": {
2727
"type": "git",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

js/src/files-regular/add-from-stream.js renamed to src/files-regular/add-from-stream.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = (createCommon, options) => {
3333
after((done) => common.teardown(done))
3434

3535
it('should add from a stream', (done) => {
36-
const testData = loadFixture('js/test/fixtures/15mb.random', 'interface-ipfs-core')
36+
const testData = loadFixture('test/fixtures/15mb.random', 'interface-ipfs-core')
3737

3838
ipfs.addFromStream(into(testData), (err, result) => {
3939
expect(err).to.not.exist()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/files-regular/utils.js

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use strict'
2+
3+
const loadFixture = require('aegir/fixtures')
4+
5+
exports.fixtures = Object.freeze({
6+
directory: Object.freeze({
7+
cid: 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP',
8+
files: Object.freeze({
9+
'pp.txt': loadFixture('test/fixtures/test-folder/pp.txt', 'interface-ipfs-core'),
10+
'holmes.txt': loadFixture('test/fixtures/test-folder/holmes.txt', 'interface-ipfs-core'),
11+
'jungle.txt': loadFixture('test/fixtures/test-folder/jungle.txt', 'interface-ipfs-core'),
12+
'alice.txt': loadFixture('test/fixtures/test-folder/alice.txt', 'interface-ipfs-core'),
13+
'files/hello.txt': loadFixture('test/fixtures/test-folder/files/hello.txt', 'interface-ipfs-core'),
14+
'files/ipfs.txt': loadFixture('test/fixtures/test-folder/files/ipfs.txt', 'interface-ipfs-core')
15+
})
16+
}),
17+
smallFile: Object.freeze({
18+
cid: 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP',
19+
data: loadFixture('test/fixtures/testfile.txt', 'interface-ipfs-core')
20+
}),
21+
bigFile: Object.freeze({
22+
cid: 'Qme79tX2bViL26vNjPsF3DP1R9rMKMvnPYJiKTTKPrXJjq',
23+
data: loadFixture('test/fixtures/15mb.random', 'interface-ipfs-core')
24+
}),
25+
sslOpts: Object.freeze({
26+
key: loadFixture('test/fixtures/ssl/privkey.pem', 'interface-ipfs-core'),
27+
cert: loadFixture('test/fixtures/ssl/cert.pem', 'interface-ipfs-core')
28+
})
29+
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

js/src/miscellaneous/resolve.js renamed to src/miscellaneous/resolve.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = (createCommon, options) => {
4040
})
4141

4242
it('should resolve an IPFS hash', (done) => {
43-
const content = loadFixture('js/test/fixtures/testfile.txt', 'interface-ipfs-core')
43+
const content = loadFixture('test/fixtures/testfile.txt', 'interface-ipfs-core')
4444

4545
ipfs.add(content, (err, res) => {
4646
expect(err).to.not.exist()
@@ -72,7 +72,7 @@ module.exports = (createCommon, options) => {
7272
// Test resolve turns /ipfs/QmRootHash/path/to/file into /ipfs/QmFileHash
7373
it('should resolve an IPFS path link', (done) => {
7474
const path = '/path/to/testfile.txt'
75-
const content = loadFixture('js/test/fixtures/testfile.txt', 'interface-ipfs-core')
75+
const content = loadFixture('test/fixtures/testfile.txt', 'interface-ipfs-core')
7676

7777
ipfs.add([{ path, content }], { wrapWithDirectory: true }, (err, res) => {
7878
expect(err).to.not.exist()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

js/src/name/utils.js renamed to src/name/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
const loadFixture = require('aegir/fixtures')
44

55
exports.fixture = Object.freeze({
6-
data: loadFixture('js/test/fixtures/testfile.txt', 'interface-ipfs-core'),
6+
data: loadFixture('test/fixtures/testfile.txt', 'interface-ipfs-core'),
77
cid: 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'
88
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

js/src/pin/utils.js renamed to src/pin/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ const loadFixture = require('aegir/fixtures')
44

55
exports.fixtures = Object.freeze({
66
files: Object.freeze([Object.freeze({
7-
data: loadFixture('js/test/fixtures/testfile.txt', 'interface-ipfs-core'),
7+
data: loadFixture('test/fixtures/testfile.txt', 'interface-ipfs-core'),
88
cid: 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'
99
}), Object.freeze({
10-
data: loadFixture('js/test/fixtures/test-folder/files/hello.txt', 'interface-ipfs-core'),
10+
data: loadFixture('test/fixtures/test-folder/files/hello.txt', 'interface-ipfs-core'),
1111
cid: 'QmY9cxiHqTFoWamkQVkpmmqzBrY3hCBEL2XNu3NtX74Fuu'
1212
})])
1313
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)