always use .js extension to make node module loader happy

This commit is contained in:
Florian Dold 2021-05-12 16:06:40 +02:00
parent b1500241f7
commit 4da4380480
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
10 changed files with 18 additions and 20 deletions

View File

@ -7,6 +7,7 @@
},
"module": "./lib/index.js",
"main": "./lib/index.js",
"type": "module",
"types": "./lib/index.d.ts",
"typesVersions": {
"*": {

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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 {

View File

@ -14,8 +14,8 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
import { canonicalizeBaseUrl } from "./helpers";
import { URLSearchParams } from "./url";
import { canonicalizeBaseUrl } from "./helpers.js";
import { URLSearchParams } from "./url.js";
export interface PayUriResult {
merchantBaseUrl: string;

View File

@ -21,7 +21,7 @@
/**
* Imports.
*/
import { Codec, renderContext, Context } from "./codec";
import { Codec, renderContext, Context } from "./codec.js";
export class Timestamp {
/**

View File

@ -15,7 +15,7 @@
*/
import test from "ava";
import { codecForContractTerms } from "./talerTypes";
import { codecForContractTerms } from "./talerTypes.js";
test("contract terms validation", (t) => {
const c = {

View File

@ -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";
/**