Support ESM with yarn node

This commit is contained in:
willclarktech
2021-05-26 12:59:41 +02:00
parent 139fe5bfed
commit 49e0329943
39 changed files with 95 additions and 37 deletions
-2
View File
@@ -1,5 +1,3 @@
#!/usr/bin/env -S yarn node
/* eslint-disable @typescript-eslint/naming-convention */
require("source-map-support").install();
const defaultSpecReporterConfig = require("../../jasmine-spec-reporter.config.json");
+2 -1
View File
@@ -23,7 +23,7 @@
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
"start": "yarn build-or-skip && ./bin/cosmwasm-cli",
"selftest": "yarn build-or-skip && ./bin/cosmwasm-cli --selftest",
"test-node": "node jasmine-testrunner.js",
"test-node": "node --require esm jasmine-testrunner.js",
"test": "yarn build-or-skip && yarn test-node",
"coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet"
},
@@ -75,6 +75,7 @@
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"esm": "^3.2.25",
"jasmine": "^3.5",
"jasmine-spec-reporter": "^6",
"nyc": "^15.1.0",