remove source-map-support usage, as node supports it natively

We can just use NODE_OPTIONS=--enable-source-maps now.
This commit is contained in:
Florian Dold 2022-11-01 12:39:52 +01:00
parent b513665408
commit a121fbe5de
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
8 changed files with 2 additions and 37 deletions

View File

@ -1,13 +1,6 @@
#!/usr/bin/env node #!/usr/bin/env node
async function r() { async function r() {
try {
(await import("source-map-support")).install();
} catch (e) {
console.warn("can't load souremaps");
// Do nothing.
}
(await import("../dist/anastasis-cli.js")).reducerCliMain(); (await import("../dist/anastasis-cli.js")).reducerCliMain();
} }

View File

@ -19,7 +19,6 @@
"devDependencies": { "devDependencies": {
"ava": "^4.3.3", "ava": "^4.3.3",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"source-map-support": "^0.5.21",
"typescript": "^4.8.4" "typescript": "^4.8.4"
}, },
"dependencies": { "dependencies": {

View File

@ -1,14 +1,6 @@
import { reducerCliMain } from "./cli.js"; import { reducerCliMain } from "./cli.js";
async function r() { async function r() {
try {
// @ts-ignore
(await import("source-map-support")).install();
} catch (e) {
console.warn("can't load souremaps, please install source-map-support");
// Do nothing.
}
reducerCliMain(); reducerCliMain();
} }

View File

@ -16,16 +16,4 @@
*/ */
import { main } from '../dist/taler-wallet-cli.mjs'; import { main } from '../dist/taler-wallet-cli.mjs';
import { createRequire } from "module";
const require = createRequire(import.meta.url);
const doLog = process.env["TALER_DEBUG_SOURCEMAPS"] == "1";
try {
require("source-map-support");
doLog && console.error("source map support installed");
} catch (e) {
// Do nothing.
doLog && console.error("source map support not installed", e);
}
main(); main();

View File

@ -48,7 +48,6 @@
"@gnu-taler/taler-util": "workspace:*", "@gnu-taler/taler-util": "workspace:*",
"@gnu-taler/taler-wallet-core": "workspace:*", "@gnu-taler/taler-wallet-core": "workspace:*",
"axios": "^0.27.2", "axios": "^0.27.2",
"source-map-support": "^0.5.21",
"tslib": "^2.4.0" "tslib": "^2.4.0"
} }
} }

View File

@ -35,6 +35,7 @@ import {
ExchangesListResponse, ExchangesListResponse,
URL, URL,
TalerErrorCode, TalerErrorCode,
j2s,
} from "@gnu-taler/taler-util"; } from "@gnu-taler/taler-util";
import { import {
FaultInjectedExchangeService, FaultInjectedExchangeService,
@ -129,6 +130,7 @@ export async function runExchangeManagementTest(
WalletApiOperation.ListExchanges, WalletApiOperation.ListExchanges,
{}, {},
); );
console.log("exchanges list:", j2s(exchangesList));
t.assertTrue(exchangesList.exchanges.length === 0); t.assertTrue(exchangesList.exchanges.length === 0);
// Try before fault is injected // Try before fault is injected

View File

@ -450,12 +450,6 @@ if (runTestInstrStr && process.argv.includes("__TWCLI_TESTWORKER")) {
process.exit(3); process.exit(3);
}); });
try {
require("source-map-support").install();
} catch (e) {
// Do nothing.
}
const runTest = async () => { const runTest = async () => {
let testMain: TestMainFunction | undefined; let testMain: TestMainFunction | undefined;
for (const t of allTests) { for (const t of allTests) {

View File

@ -55,7 +55,6 @@
"po2json": "^0.4.5", "po2json": "^0.4.5",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"source-map-resolve": "^0.6.0",
"typedoc": "^0.23.16", "typedoc": "^0.23.16",
"typescript": "^4.8.4" "typescript": "^4.8.4"
}, },
@ -66,7 +65,6 @@
"axios": "^0.27.2", "axios": "^0.27.2",
"big-integer": "^1.6.51", "big-integer": "^1.6.51",
"fflate": "^0.7.4", "fflate": "^0.7.4",
"source-map-support": "^0.5.21",
"tslib": "^2.4.0" "tslib": "^2.4.0"
}, },
"ava": { "ava": {