File tree 6 files changed +23
-12
lines changed
6 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 2
2
depth : 1
3
3
language : node_js
4
4
node_js :
5
- - ' 10 '
5
+ - ' 13 '
6
6
7
7
before_install :
8
8
- npm install
Original file line number Diff line number Diff line change 1
- const fs = require ( 'fs' ) ;
2
- const terser = require ( 'terser' ) ;
1
+ import fs from 'fs' ;
2
+ import terser from 'terser' ;
3
3
4
4
const MINIFY = true ;
5
5
Original file line number Diff line number Diff line change 5
5
"main" : " dist/lexer.cjs" ,
6
6
"module" : " dist/lexer.js" ,
7
7
"scripts" : {
8
- "test" : " mocha -r esm - b -u tdd test/*.js " ,
8
+ "test" : " mocha -b -u tdd test/*.cjs " ,
9
9
"build" : " node build.js && babel dist/lexer.js | terser -o dist/lexer.cjs" ,
10
10
"build-wasm" : " make lib/lexer.wasm && node build.js" ,
11
11
"bench" : " node --experimental-modules --expose-gc bench/index.js" ,
18
18
"@babel/cli" : " ^7.5.5" ,
19
19
"@babel/core" : " ^7.5.5" ,
20
20
"@babel/plugin-transform-modules-commonjs" : " ^7.5.0" ,
21
- "esm" : " ^3.0.84" ,
22
21
"kleur" : " ^2.0.2" ,
23
22
"mocha" : " ^5.2.0" ,
24
23
"terser" : " ^4.1.4"
Original file line number Diff line number Diff line change @@ -228,8 +228,8 @@ void tryParseExportStatement () {
228
228
ch = commentWhitespace ();
229
229
const char16_t * startPos = pos ;
230
230
ch = readToWsOrPunctuator (ch );
231
- // stops on [ { destructurings
232
- if (ch == '{' || ch == '[' ) {
231
+ // stops on [ { destructurings or =
232
+ if (ch == '{' || ch == '[' || ch == '=' ) {
233
233
pos -- ;
234
234
return ;
235
235
}
Original file line number Diff line number Diff line change 1
- import assert from 'assert' ;
2
- import { parse , init } from '../dist/lexer.js' ;
1
+ const assert = require ( 'assert' ) ;
2
+
3
+ let parse ;
4
+ const init = ( async ( ) => {
5
+ let init ;
6
+ ( { parse, init } = await import ( '../dist/lexer.js' ) ) ;
7
+ await init ;
8
+ } ) ( ) ;
3
9
4
10
suite ( 'Invalid syntax' , ( ) => {
5
11
beforeEach ( async ( ) => await init ) ;
Original file line number Diff line number Diff line change 1
- import assert from 'assert' ;
2
- import fs from 'fs' ;
3
- import { parse , init } from '../dist/lexer.js' ;
1
+ const fs = require ( 'fs' ) ;
2
+ const assert = require ( 'assert' ) ;
3
+
4
+ let parse ;
5
+ const init = ( async ( ) => {
6
+ let init ;
7
+ ( { parse, init } = await import ( '../dist/lexer.js' ) ) ;
8
+ await init ;
9
+ } ) ( ) ;
4
10
5
11
const files = fs . readdirSync ( 'test/samples' )
6
12
. map ( f => `test/samples/${ f } ` )
You can’t perform that action at this time.
0 commit comments