File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 18
18
"dev" : " run-p lib:watch lib:test:watch" ,
19
19
"serve" : " serve dist -p 8080" ,
20
20
"test" : " run-s build test:lib test:quickstart" ,
21
- "test:lib" : " node ./test/test-runner.js " ,
21
+ "test:lib" : " node ./test/test-runner.mjs " ,
22
22
"test:quickstart" : " (cd examples/quickstart && npm install && npm run test)" ,
23
23
"lint" : " prettier --write **/*.js **/*.ts **/*.json !build/**/* !dist/**/*" ,
24
24
"lint:ci" : " prettier --check **/*.js **/*.ts **/*.json !build/**/* !dist/**/*" ,
Original file line number Diff line number Diff line change 1
- const { promisify } = require ( "util" ) ;
2
- const fs = require ( "fs/promises" ) ;
3
- const { dirname, join } = require ( "path" ) ;
4
-
5
- const Express = require ( "express" ) ;
6
- const Mocha = require ( "mocha" ) ;
7
- const glob = promisify ( require ( "glob" ) ) ;
8
- const pptr = require ( "puppeteer" ) ;
9
-
10
- const asc = require ( "assemblyscript/cli/asc" ) ;
11
-
12
- globalThis . AsBind = require ( "../dist/as-bind.cjs.js" ) ;
1
+ import { promisify } from "util" ;
2
+ import fs from "fs/promises" ;
3
+ import { dirname , join } from "path" ;
4
+ import { createRequire } from "module" ;
5
+
6
+ import Express from "express" ;
7
+ import Mocha from "mocha" ;
8
+ import globOrig from "glob" ;
9
+ import pptr from "puppeteer" ;
10
+ import asc from "assemblyscript/cli/asc" ;
11
+ import AsBind from "../dist/as-bind.cjs.js" ;
12
+
13
+ const require = createRequire ( import . meta. url ) ;
14
+ const glob = promisify ( globOrig ) ;
15
+ globalThis . AsBind = AsBind ;
13
16
14
17
async function main ( ) {
15
- process . chdir ( __dirname ) ;
18
+ process . chdir ( "./test" ) ;
16
19
await asc . ready ;
17
20
18
21
await compileAllAsc ( ) ;
You can’t perform that action at this time.
0 commit comments