Skip to content

Commit

Permalink
fix: imports (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaUnknown committed Jan 31, 2023
1 parent 4851145 commit abe29c3
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion benchmark/bencode.js
Expand Up @@ -2,7 +2,7 @@ import fs from 'fs'
import path from 'path'
import bench from 'nanobench'

import bencode from '../'
import bencode from '../index.js'

const buffer = fs.readFileSync(path.join(__dirname, 'test.torrent'))
const object = bencode.decode(buffer)
Expand Down
2 changes: 1 addition & 1 deletion benchmark/buffer-vs-string.js
@@ -1,6 +1,6 @@
import fs from 'fs'
import path from 'path'
import bencode from '../'
import bencode from '../index.js'
import bench from 'nanobench'

const buffer = fs.readFileSync(path.join(__dirname, 'test.torrent'))
Expand Down
2 changes: 1 addition & 1 deletion benchmark/compare-decode.js
Expand Up @@ -2,7 +2,7 @@ import fs from 'fs'
import path from 'path'
import bench from 'nanobench'

import bencode from '../'
import bencode from '../index.js'
import bencoding from 'bencoding'
import bncode from 'bncode'
import btparse from 'btparse'
Expand Down
2 changes: 1 addition & 1 deletion benchmark/compare-encode.js
Expand Up @@ -2,7 +2,7 @@ import fs from 'fs'
import path from 'path'
import bench from 'nanobench'

import bencode from '../'
import bencode from '../index.js'
import bencoding from 'bencoding'
import bncode from 'bncode'
import dht from 'dht.js/lib/dht/bencode'
Expand Down
2 changes: 1 addition & 1 deletion benchmark/encoding-length.js
@@ -1,6 +1,6 @@
import fs from 'fs'
import path from 'path'
import bencode from '..'
import bencode from '../index.js'
import bench from 'nanobench'

const buffer = fs.readFileSync(path.join(__dirname, 'test.torrent'))
Expand Down
6 changes: 3 additions & 3 deletions lib/index.js → index.js
@@ -1,6 +1,6 @@
import encode from './encode.js'
import decode from './decode.js'
import byteLength from './encoding-length.js'
import encode from './lib/encode.js'
import decode from './lib/decode.js'
import byteLength from './lib/encoding-length.js'
/**
* Determines the amount of bytes
* needed to encode the given value
Expand Down
2 changes: 1 addition & 1 deletion test/BEP-0023.test.js
@@ -1,7 +1,7 @@
import path, { dirname } from 'path'
import fs from 'fs'
import test from 'tape'
import bencode from '../lib/index.js'
import bencode from '../index.js'
import { fileURLToPath } from 'url'

const __filename = fileURLToPath(import.meta.url)
Expand Down
2 changes: 1 addition & 1 deletion test/abstract-encoding.test.js
@@ -1,5 +1,5 @@
import test from 'tape'
import bencode from '../lib/index.js'
import bencode from '../index.js'

test('abstract encoding', function (t) {
t.test('encodingLength( value )', function (t) {
Expand Down
2 changes: 1 addition & 1 deletion test/decode.buffer.test.js
@@ -1,6 +1,6 @@
import test from 'tape'
import data from './data.js'
import bencode from '../lib/index.js'
import bencode from '../index.js'

test('bencode#decode(x)', function (t) {
t.test('should be able to decode an integer', function (t) {
Expand Down
2 changes: 1 addition & 1 deletion test/decode.utf8.test.js
@@ -1,6 +1,6 @@
import test from 'tape'
import data from './data.js'
import bencode from '../lib/index.js'
import bencode from '../index.js'

test("bencode#decode(x, 'uft8')", function (t) {
t.test('should be able to decode an integer', function (t) {
Expand Down
2 changes: 1 addition & 1 deletion test/encode.test.js
@@ -1,6 +1,6 @@
import test from 'tape'
import data from './data.js'
import bencode from '../lib/index.js'
import bencode from '../index.js'

test('bencode#encode()', function (t) {
// prevent the warning showing up in the test
Expand Down
2 changes: 1 addition & 1 deletion test/encoding-length.test.js
@@ -1,7 +1,7 @@
import fs from 'fs'
import path, { dirname } from 'path'
import test from 'tape'
import bencode from '../lib/index.js'
import bencode from '../index.js'
import { fileURLToPath } from 'url'

const __filename = fileURLToPath(import.meta.url)
Expand Down
2 changes: 1 addition & 1 deletion test/null-values.test.js
@@ -1,5 +1,5 @@
import test from 'tape'
import bencode from '../lib/index.js'
import bencode from '../index.js'

test('Data with null values', function (t) {
t.test('should return an empty value when encoding either null or undefined', function (t) {
Expand Down

0 comments on commit abe29c3

Please sign in to comment.