Skip to content

Commit

Permalink
feat(data): concat, random
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Aug 13, 2024
1 parent 95c5c36 commit 16c3792
Show file tree
Hide file tree
Showing 17 changed files with 346 additions and 4 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"clean": "rimraf src/_esm src/_cjs ./tsconfig.build.tsbuildinfo src/tsconfig.build.tsbuildinfo",
"deps": "pnpx taze -r",
"dev": "pnpm preconstruct && pnpm playground",
"lint": "biome check . --write",
"lint": "biome check . --fix --unsafe",
"lint:repo": "sherif",
"lint:unused": "pnpm clean && knip --production",
"postinstall": "pnpm build",
Expand All @@ -31,9 +31,11 @@
"@biomejs/biome": "^1.8.3",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.7",
"@ethereumjs/util": "^9.0.3",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.14.15",
"@vitest/coverage-v8": "^1.6.0",
"ethers": "^6.13.2",
"fs-extra": "^11.2.0",
"rimraf": "^5.0.10",
"simple-git-hooks": "^2.11.1",
Expand Down
131 changes: 131 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/Data.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { expect, test } from 'vitest'
import * as exports from './Data.js'

test('exports', () => {
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"concat",
"randomBytes",
]
`)
})
10 changes: 10 additions & 0 deletions src/Data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export {
type ConcatErrorType,
type ConcatReturnType,
concat,
} from './internal/data/concat.js'

export {
type RandomBytesErrorType,
randomBytes,
} from './internal/data/random.js'
6 changes: 6 additions & 0 deletions src/Errors.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { expect, test } from 'vitest'
import * as exports from './Errors.js'

test('exports', () => {
expect(Object.keys(exports)).toMatchInlineSnapshot('[]')
})
1 change: 1 addition & 0 deletions src/Errors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type { ErrorType } from './internal/errors/Error.js'
1 change: 1 addition & 0 deletions src/Types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type { Bytes, Hex } from './internal/types/data.js'
12 changes: 12 additions & 0 deletions src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { expect, test } from 'vitest'
import * as exports from './index.js'

test('exports', () => {
expect(Object.keys(exports)).toMatchInlineSnapshot(`
[
"Data",
"Errors",
"Types",
]
`)
})
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function foo() {
return 'bar'
}
export * as Data from './Data.js'
export * as Errors from './Errors.js'
export * as Types from './Types.js'
Loading

0 comments on commit 16c3792

Please sign in to comment.