Skip to content

Commit 6c7da75

Browse files
committed
fix: transpile process to fix module import error
1 parent 040036f commit 6c7da75

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build": "npm run clean && npm run make-dist && npm run transpile",
1010
"make-dist": "mkdirp dist",
1111
"clean-proto": "rimraf src/generated && mkdirp src/generated",
12-
"proto": "pbjs --target static-module --path substrait-spec/proto -o src/generated/definitions.js substrait/plan.proto",
12+
"proto": "pbjs --target static-module -w es6 --path substrait-spec/proto -o src/generated/definitions.js substrait/plan.proto",
1313
"transpile": "tsc",
1414
"transpileProto": "pbts -o src/generated/definitions.d.ts src/generated/definitions.js",
1515
"prepare": "npm run clean-proto && npm run proto && npm run transpileProto",

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from "./parser";
22
export * as proto from "./generated/definitions";
33
export * from "./cli"
4+
export * from "./graph"

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
1212

1313
/* Language and Environment */
14-
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
14+
"target": "ES6", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
1515
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
1616
// "jsx": "preserve", /* Specify what JSX code is generated. */
1717
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
@@ -25,7 +25,7 @@
2525
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
2626

2727
/* Modules */
28-
"module": "ESNext", /* Specify what module code is generated. */
28+
"module": "ES6", /* Specify what module code is generated. */
2929
"rootDir": "./src", /* Specify the root folder within your source files. */
3030
"moduleResolution": "Node", /* Specify how TypeScript looks up a file from a given module specifier. */
3131
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */

0 commit comments

Comments
 (0)