From c801caa0edd15175ebd18ffc394d5352651ecb51 Mon Sep 17 00:00:00 2001 From: Alexander O'Mara Date: Sun, 15 Dec 2024 15:16:31 -0500 Subject: [PATCH] Import cleanup --- arr.test.ts | 7 +++---- arr.ts | 1 - bool/16.test.ts | 1 - bool/32.test.ts | 1 - bool/8.test.ts | 1 - endian.test.ts | 1 - float/16.test.ts | 1 - float/16.ts | 1 - float/32.test.ts | 1 - float/64.test.ts | 1 - int/16.test.ts | 1 - int/24.test.ts | 1 - int/24.ts | 1 - int/32.test.ts | 1 - int/64.test.ts | 1 - int/8.test.ts | 1 - member.test.ts | 1 - members.test.ts | 5 ++--- ptr.test.ts | 1 - ptr.ts | 1 - scripts/npm.ts | 1 - struct.test.ts | 5 ++--- util.test.ts | 1 - 23 files changed, 7 insertions(+), 30 deletions(-) diff --git a/arr.test.ts b/arr.test.ts index 19e8a38..943eeaa 100644 --- a/arr.test.ts +++ b/arr.test.ts @@ -4,13 +4,12 @@ import { assertStrictEquals, assertThrows, } from '@std/assert'; - -import { int8 } from './int/8.ts'; -import { Struct } from './struct.ts'; import { array } from './arr.ts'; +import { bigEndian, littleEndian } from './endian.ts'; +import { int8 } from './int/8.ts'; import { pointer } from './ptr.ts'; +import { Struct } from './struct.ts'; import { getByteLength, getByteOffset } from './util.ts'; -import { bigEndian, littleEndian } from './endian.ts'; Deno.test('pointer', () => { class Foo extends Struct { diff --git a/arr.ts b/arr.ts index 1a817ef..c1bf683 100644 --- a/arr.ts +++ b/arr.ts @@ -1,5 +1,4 @@ import { MeekValueMap } from '@hqtsm/meek/valuemap'; - import type { MemberInfos, Members } from './members.ts'; import type { ArrayBufferReal } from './native.ts'; import { diff --git a/bool/16.test.ts b/bool/16.test.ts index 0726d82..6c2e844 100644 --- a/bool/16.test.ts +++ b/bool/16.test.ts @@ -1,5 +1,4 @@ import { assertEquals } from '@std/assert'; - import { Struct } from '../struct.ts'; import { getByteLength, getByteOffset } from '../util.ts'; import { diff --git a/bool/32.test.ts b/bool/32.test.ts index b2ce6f5..eb64ddd 100644 --- a/bool/32.test.ts +++ b/bool/32.test.ts @@ -1,5 +1,4 @@ import { assertEquals } from '@std/assert'; - import { Struct } from '../struct.ts'; import { getByteLength, getByteOffset } from '../util.ts'; import { diff --git a/bool/8.test.ts b/bool/8.test.ts index c97c329..0caae6f 100644 --- a/bool/8.test.ts +++ b/bool/8.test.ts @@ -1,5 +1,4 @@ import { assertEquals } from '@std/assert'; - import { Struct } from '../struct.ts'; import { getByteLength, getByteOffset } from '../util.ts'; import { bool8, Bool8Ptr } from './8.ts'; diff --git a/endian.test.ts b/endian.test.ts index c9cd10d..f8162c3 100644 --- a/endian.test.ts +++ b/endian.test.ts @@ -1,5 +1,4 @@ import { assertEquals, assertNotEquals, assertStrictEquals } from '@std/assert'; - import { BIG_ENDIAN, bigEndian, diff --git a/float/16.test.ts b/float/16.test.ts index 7ca177c..c03b91f 100644 --- a/float/16.test.ts +++ b/float/16.test.ts @@ -1,6 +1,5 @@ import { getFloat16, setFloat16 } from '@hqtsm/dataview/float/16'; import { assertEquals } from '@std/assert'; - import type { ArrayBufferReal } from '../native.ts'; import { Struct } from '../struct.ts'; import { dataView, getByteLength, getByteOffset } from '../util.ts'; diff --git a/float/16.ts b/float/16.ts index c527df4..6837dab 100644 --- a/float/16.ts +++ b/float/16.ts @@ -1,5 +1,4 @@ import { getFloat16, setFloat16 } from '@hqtsm/dataview/float/16'; - import { defineMember } from '../member.ts'; import type { MemberableClass, MemberableClassKeys } from '../members.ts'; import { Ptr } from '../ptr.ts'; diff --git a/float/32.test.ts b/float/32.test.ts index 705d16d..49f54e2 100644 --- a/float/32.test.ts +++ b/float/32.test.ts @@ -1,5 +1,4 @@ import { assertEquals } from '@std/assert'; - import { Struct } from '../struct.ts'; import { getByteLength, getByteOffset } from '../util.ts'; import { diff --git a/float/64.test.ts b/float/64.test.ts index 6c513bf..6ffb256 100644 --- a/float/64.test.ts +++ b/float/64.test.ts @@ -1,5 +1,4 @@ import { assertEquals } from '@std/assert'; - import { Struct } from '../struct.ts'; import { getByteLength, getByteOffset } from '../util.ts'; import { diff --git a/int/16.test.ts b/int/16.test.ts index 552500b..ad4aaf0 100644 --- a/int/16.test.ts +++ b/int/16.test.ts @@ -1,5 +1,4 @@ import { assertEquals } from '@std/assert'; - import { Struct } from '../struct.ts'; import { getByteLength, getByteOffset } from '../util.ts'; import { diff --git a/int/24.test.ts b/int/24.test.ts index fbb060f..bfc8d23 100644 --- a/int/24.test.ts +++ b/int/24.test.ts @@ -5,7 +5,6 @@ import { setUint24, } from '@hqtsm/dataview/int/24'; import { assertEquals } from '@std/assert'; - import { Struct } from '../struct.ts'; import { getByteLength, getByteOffset } from '../util.ts'; import { diff --git a/int/24.ts b/int/24.ts index e736deb..4e06060 100644 --- a/int/24.ts +++ b/int/24.ts @@ -4,7 +4,6 @@ import { setInt24, setUint24, } from '@hqtsm/dataview/int/24'; - import { defineMember } from '../member.ts'; import type { MemberableClass, MemberableClassKeys } from '../members.ts'; import { Ptr } from '../ptr.ts'; diff --git a/int/32.test.ts b/int/32.test.ts index 2375ccd..7aab48c 100644 --- a/int/32.test.ts +++ b/int/32.test.ts @@ -1,5 +1,4 @@ import { assertEquals } from '@std/assert'; - import { Struct } from '../struct.ts'; import { getByteLength, getByteOffset } from '../util.ts'; import { diff --git a/int/64.test.ts b/int/64.test.ts index 78d02e5..19e0019 100644 --- a/int/64.test.ts +++ b/int/64.test.ts @@ -1,5 +1,4 @@ import { assertEquals } from '@std/assert'; - import { Struct } from '../struct.ts'; import { getByteLength, getByteOffset } from '../util.ts'; import { diff --git a/int/8.test.ts b/int/8.test.ts index b6dc1f5..4217144 100644 --- a/int/8.test.ts +++ b/int/8.test.ts @@ -1,5 +1,4 @@ import { assertEquals } from '@std/assert'; - import { Struct } from '../struct.ts'; import { getByteLength, getByteOffset } from '../util.ts'; import { int8, Int8Ptr, uint8, Uint8Ptr } from './8.ts'; diff --git a/member.test.ts b/member.test.ts index 3ba0f02..9c738c4 100644 --- a/member.test.ts +++ b/member.test.ts @@ -4,7 +4,6 @@ import { assertStrictEquals, assertThrows, } from '@std/assert'; - import { uint32 } from './int/32.ts'; import { member, memberBE, memberLE, pad } from './member.ts'; import { Struct } from './struct.ts'; diff --git a/members.test.ts b/members.test.ts index 027c974..f48599e 100644 --- a/members.test.ts +++ b/members.test.ts @@ -1,10 +1,9 @@ import { assertEquals } from '@std/assert/equals'; - +import { array } from './arr.ts'; +import { Uint8Ptr } from './int/8.ts'; import { uint32 } from './int/32.ts'; import { member } from './member.ts'; import { Struct } from './struct.ts'; -import { array } from './arr.ts'; -import { Uint8Ptr } from './int/8.ts'; Deno.test('ClassMemberable: additional member', () => { class Foo extends Struct { diff --git a/ptr.test.ts b/ptr.test.ts index b509d34..dcbc183 100644 --- a/ptr.test.ts +++ b/ptr.test.ts @@ -4,7 +4,6 @@ import { assertStrictEquals, assertThrows, } from '@std/assert'; - import { LITTLE_ENDIAN } from './endian.ts'; import { int8, Uint8Ptr } from './int/8.ts'; import { pointer, Ptr } from './ptr.ts'; diff --git a/ptr.ts b/ptr.ts index 3b887a5..5d165d2 100644 --- a/ptr.ts +++ b/ptr.ts @@ -1,5 +1,4 @@ import { MeekValueMap } from '@hqtsm/meek/valuemap'; - import { Endian } from './endian.ts'; import type { MemberInfo, MemberInfos, Members } from './members.ts'; import type { ArrayBufferReal } from './native.ts'; diff --git a/scripts/npm.ts b/scripts/npm.ts index 4aba060..0d7a3cc 100644 --- a/scripts/npm.ts +++ b/scripts/npm.ts @@ -1,7 +1,6 @@ // deno-lint-ignore-file no-top-level-await no-console import { build, type BuildOptions, emptyDir } from '@deno/dnt'; - import denoJson from '../deno.json' with { type: 'json' }; if (Deno.args.length !== 1 || !/^(dev|prod)$/.test(Deno.args[0])) { diff --git a/struct.test.ts b/struct.test.ts index 8be4434..a226a99 100644 --- a/struct.test.ts +++ b/struct.test.ts @@ -1,12 +1,11 @@ import { assertEquals, assertStrictEquals, assertThrows } from '@std/assert'; - +import { bool32 } from './bool/32.ts'; import { LITTLE_ENDIAN } from './endian.ts'; import { int8 } from './int/8.ts'; +import { uint32 } from './int/32.ts'; import { member, pad } from './member.ts'; import { Struct } from './struct.ts'; import { getByteOffset } from './util.ts'; -import { uint32 } from './int/32.ts'; -import { bool32 } from './bool/32.ts'; Deno.test('Struct: buffer', () => { const buffer = new ArrayBuffer(0); diff --git a/util.test.ts b/util.test.ts index 7508d9e..29a75e2 100644 --- a/util.test.ts +++ b/util.test.ts @@ -1,5 +1,4 @@ import { assertEquals, assertThrows } from '@std/assert'; - import { uint8 } from './int/8.ts'; import { Struct } from './struct.ts'; import { assignType, assignView } from './util.ts';