From 4da4380480ec7026a1ef8f10589d60669a462497 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 12 May 2021 16:06:40 +0200 Subject: always use .js extension to make node module loader happy --- packages/taler-util/package.json | 1 + packages/taler-util/src/ReserveStatus.ts | 4 ++-- packages/taler-util/src/amounts.ts | 4 ++-- packages/taler-util/src/helpers.ts | 6 +++--- packages/taler-util/src/talerTypes.ts | 8 +++----- packages/taler-util/src/talerconfig.ts | 4 ++-- packages/taler-util/src/taleruri.ts | 4 ++-- packages/taler-util/src/time.ts | 2 +- packages/taler-util/src/types-test.ts | 2 +- packages/taler-util/src/walletTypes.ts | 3 +-- 10 files changed, 18 insertions(+), 20 deletions(-) (limited to 'packages') diff --git a/packages/taler-util/package.json b/packages/taler-util/package.json index 89ab47979..a1c769e8f 100644 --- a/packages/taler-util/package.json +++ b/packages/taler-util/package.json @@ -7,6 +7,7 @@ }, "module": "./lib/index.js", "main": "./lib/index.js", + "type": "module", "types": "./lib/index.d.ts", "typesVersions": { "*": { diff --git a/packages/taler-util/src/ReserveStatus.ts b/packages/taler-util/src/ReserveStatus.ts index cd204f55e..b17207f24 100644 --- a/packages/taler-util/src/ReserveStatus.ts +++ b/packages/taler-util/src/ReserveStatus.ts @@ -27,11 +27,11 @@ import { codecForList, Codec, } from "./codec.js"; -import { AmountString } from "./talerTypes"; +import { AmountString } from "./talerTypes.js"; import { ReserveTransaction, codecForReserveTransaction, -} from "./ReserveTransaction"; +} from "./ReserveTransaction.js"; /** * Status of a reserve. diff --git a/packages/taler-util/src/amounts.ts b/packages/taler-util/src/amounts.ts index e27bb79a8..e472de503 100644 --- a/packages/taler-util/src/amounts.ts +++ b/packages/taler-util/src/amounts.ts @@ -26,8 +26,8 @@ import { codecForString, codecForNumber, Codec, -} from "./codec"; -import { AmountString } from "./talerTypes"; +} from "./codec.js"; +import { AmountString } from "./talerTypes.js"; /** * Number of fractional units that one value unit represents. diff --git a/packages/taler-util/src/helpers.ts b/packages/taler-util/src/helpers.ts index e269bd46b..fb0cd8a2b 100644 --- a/packages/taler-util/src/helpers.ts +++ b/packages/taler-util/src/helpers.ts @@ -21,9 +21,9 @@ /** * Imports. */ -import { AmountJson } from "./amounts"; -import * as Amounts from "./amounts"; -import { URL } from "./url"; +import { AmountJson } from "./amounts.js"; +import * as Amounts from "./amounts.js"; +import { URL } from "./url.js"; /** * Show an amount in a form suitable for the user. diff --git a/packages/taler-util/src/talerTypes.ts b/packages/taler-util/src/talerTypes.ts index bc04fc2f6..db20234cf 100644 --- a/packages/taler-util/src/talerTypes.ts +++ b/packages/taler-util/src/talerTypes.ts @@ -17,8 +17,6 @@ /** * Type and schema definitions and helpers for the core GNU Taler protocol. * - * All types here should be "@Checkable". - * * Even though the rest of the wallet uses camelCase for fields, use snake_case * here, since that's the convention for the Taler JSON+HTTP API. */ @@ -40,14 +38,14 @@ import { codecForConstNumber, buildCodecForUnion, codecForConstString, -} from "./codec"; +} from "./codec.js"; import { Timestamp, codecForTimestamp, Duration, codecForDuration, -} from "./time"; -import { codecForAmountString } from "./amounts"; +} from "./time.js"; +import { codecForAmountString } from "./amounts.js"; /** * Denomination as found in the /keys response from the exchange. diff --git a/packages/taler-util/src/talerconfig.ts b/packages/taler-util/src/talerconfig.ts index 2a388f8d3..e060afb71 100644 --- a/packages/taler-util/src/talerconfig.ts +++ b/packages/taler-util/src/talerconfig.ts @@ -23,8 +23,8 @@ /** * Imports */ -import { AmountJson } from "./amounts"; -import { Amounts } from "./amounts"; +import { AmountJson } from "./amounts.js"; +import { Amounts } from "./amounts.js"; import fs from "fs"; export class ConfigError extends Error { diff --git a/packages/taler-util/src/taleruri.ts b/packages/taler-util/src/taleruri.ts index d8366fd0f..6c0dc7b86 100644 --- a/packages/taler-util/src/taleruri.ts +++ b/packages/taler-util/src/taleruri.ts @@ -14,8 +14,8 @@ GNU Taler; see the file COPYING. If not, see */ -import { canonicalizeBaseUrl } from "./helpers"; -import { URLSearchParams } from "./url"; +import { canonicalizeBaseUrl } from "./helpers.js"; +import { URLSearchParams } from "./url.js"; export interface PayUriResult { merchantBaseUrl: string; diff --git a/packages/taler-util/src/time.ts b/packages/taler-util/src/time.ts index 1a23037a0..980f42db4 100644 --- a/packages/taler-util/src/time.ts +++ b/packages/taler-util/src/time.ts @@ -21,7 +21,7 @@ /** * Imports. */ -import { Codec, renderContext, Context } from "./codec"; +import { Codec, renderContext, Context } from "./codec.js"; export class Timestamp { /** diff --git a/packages/taler-util/src/types-test.ts b/packages/taler-util/src/types-test.ts index 19c9b5aa6..6998bb5fb 100644 --- a/packages/taler-util/src/types-test.ts +++ b/packages/taler-util/src/types-test.ts @@ -15,7 +15,7 @@ */ import test from "ava"; -import { codecForContractTerms } from "./talerTypes"; +import { codecForContractTerms } from "./talerTypes.js"; test("contract terms validation", (t) => { const c = { diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts index d25108df7..d1453658b 100644 --- a/packages/taler-util/src/walletTypes.ts +++ b/packages/taler-util/src/walletTypes.ts @@ -32,7 +32,6 @@ import { codecForAmountJson, codecForAmountString, } from "./amounts.js"; -import * as LibtoolVersion from "./libtool-version.js"; import { Timestamp, codecForTimestamp } from "./time.js"; import { buildCodecForObject, @@ -50,7 +49,7 @@ import { codecForContractTerms, ContractTerms, } from "./talerTypes.js"; -import { OrderShortInfo, codecForOrderShortInfo } from "./transactionsTypes"; +import { OrderShortInfo, codecForOrderShortInfo } from "./transactionsTypes.js"; import { BackupRecovery } from "./backupTypes.js"; /** -- cgit v1.2.3