Skip to content

Commit 5a69877

Browse files
committed
bump deps and switch to deno bdd
1 parent 9b0e8a5 commit 5a69877

7 files changed

+98
-14
lines changed

.vscode/settings.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
"https://x.nest.land/": true,
88
"https://esm.sh": false
99
},
10-
"prettier.enable": false
10+
"[typescript]": {
11+
"editor.defaultFormatter": "denoland.vscode-deno"
12+
},
13+
"editor.formatOnSave": true
1114
}

bindings.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44

55
import { isNil } from './common.ts'
6-
import { Alloc, License, Reset, SolJson, Version } from './deps.ts'
6+
import type { Alloc, License, Reset, SolJson, Version } from './deps.ts'
77
import type { Callbacks, CoreBindings } from './types.ts'
88

99
function bindSolcMethod(
@@ -219,8 +219,8 @@ function runWithCallbacks(
219219
}
220220

221221
function bindCompileStandard(solJson: SolJson, coreBindings: CoreBindings) {
222-
let boundFunctionStandard: any = null
223-
let boundFunctionSolidity: any = null
222+
let boundFunctionStandard: ((input: number, readCallback: Callbacks) => void) | null = null
223+
let boundFunctionSolidity: ((...args: unknown[]) => void) | null = null
224224

225225
// input (jsontext), callback (ptr) -> output (jsontext)
226226
const compileInternal = bindSolcMethod(
@@ -248,7 +248,7 @@ function bindCompileStandard(solJson: SolJson, coreBindings: CoreBindings) {
248248

249249
if (!isNil(boundFunctionSolidity)) {
250250
boundFunctionStandard = function (input: number, callbacks: Callbacks) {
251-
return runWithCallbacks(coreBindings, callbacks, boundFunctionSolidity, [input])
251+
return runWithCallbacks(coreBindings, callbacks, boundFunctionSolidity as ((...args: unknown[]) => void), [input])
252252
}
253253
}
254254

common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export const formatFatalError = (message: string) =>
1111
],
1212
})
1313

14-
export const isNil = (value: unknown) => value == null
14+
export const isNil = (value: unknown): value is null => value == null

deno.lock

+84-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deps.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { copy, readerFromStreamReader } from 'https://deno.land/std@0.187.0/streams/mod.ts'
1+
export { copy, readerFromStreamReader } from 'https://deno.land/std@0.210.0/streams/mod.ts'
22
export type {
33
Alloc,
44
Callbacks,

download_test.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { describe, expect, it, run } from 'https://deno.land/x/[email protected]/mod.ts'
1+
import { describe, it } from 'https://deno.land/[email protected]/testing/bdd.ts'
2+
import { expect } from 'https://deno.land/[email protected]/expect/mod.ts'
23
import { download } from 'solc/download'
34
import { exists } from './helpers_test.ts'
45

@@ -25,5 +26,3 @@ describe('solc/download.ts', () => {
2526
}
2627
})
2728
})
28-
29-
run()

mod_test.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { beforeAll, describe, expect, it, run } from 'https://deno.land/x/[email protected]/mod.ts'
1+
import { beforeAll, describe, it } from 'https://deno.land/[email protected]/testing/bdd.ts'
2+
import { expect } from 'https://deno.land/[email protected]/expect/mod.ts'
23
import { wrapper } from 'solc'
34
import { createRequire } from './helpers_test.ts'
45
import { download } from 'solc/download'
@@ -53,5 +54,3 @@ describe('solc/wrapper.ts', () => {
5354
])
5455
})
5556
})
56-
57-
run()

0 commit comments

Comments
 (0)