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", "module": "./lib/index.js",
"main": "./lib/index.js", "main": "./lib/index.js",
"type": "module",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",
"typesVersions": { "typesVersions": {
"*": { "*": {

View File

@ -27,11 +27,11 @@ import {
codecForList, codecForList,
Codec, Codec,
} from "./codec.js"; } from "./codec.js";
import { AmountString } from "./talerTypes"; import { AmountString } from "./talerTypes.js";
import { import {
ReserveTransaction, ReserveTransaction,
codecForReserveTransaction, codecForReserveTransaction,
} from "./ReserveTransaction"; } from "./ReserveTransaction.js";
/** /**
* Status of a reserve. * Status of a reserve.

View File

@ -26,8 +26,8 @@ import {
codecForString, codecForString,
codecForNumber, codecForNumber,
Codec, Codec,
} from "./codec"; } from "./codec.js";
import { AmountString } from "./talerTypes"; import { AmountString } from "./talerTypes.js";
/** /**
* Number of fractional units that one value unit represents. * Number of fractional units that one value unit represents.

View File

@ -21,9 +21,9 @@
/** /**
* Imports. * Imports.
*/ */
import { AmountJson } from "./amounts"; import { AmountJson } from "./amounts.js";
import * as Amounts from "./amounts"; import * as Amounts from "./amounts.js";
import { URL } from "./url"; import { URL } from "./url.js";
/** /**
* Show an amount in a form suitable for the user. * 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. * 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 * 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. * here, since that's the convention for the Taler JSON+HTTP API.
*/ */
@ -40,14 +38,14 @@ import {
codecForConstNumber, codecForConstNumber,
buildCodecForUnion, buildCodecForUnion,
codecForConstString, codecForConstString,
} from "./codec"; } from "./codec.js";
import { import {
Timestamp, Timestamp,
codecForTimestamp, codecForTimestamp,
Duration, Duration,
codecForDuration, codecForDuration,
} from "./time"; } from "./time.js";
import { codecForAmountString } from "./amounts"; import { codecForAmountString } from "./amounts.js";
/** /**
* Denomination as found in the /keys response from the exchange. * Denomination as found in the /keys response from the exchange.

View File

@ -23,8 +23,8 @@
/** /**
* Imports * Imports
*/ */
import { AmountJson } from "./amounts"; import { AmountJson } from "./amounts.js";
import { Amounts } from "./amounts"; import { Amounts } from "./amounts.js";
import fs from "fs"; import fs from "fs";
export class ConfigError extends Error { 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/> GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/ */
import { canonicalizeBaseUrl } from "./helpers"; import { canonicalizeBaseUrl } from "./helpers.js";
import { URLSearchParams } from "./url"; import { URLSearchParams } from "./url.js";
export interface PayUriResult { export interface PayUriResult {
merchantBaseUrl: string; merchantBaseUrl: string;

View File

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

View File

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

View File

@ -32,7 +32,6 @@ import {
codecForAmountJson, codecForAmountJson,
codecForAmountString, codecForAmountString,
} from "./amounts.js"; } from "./amounts.js";
import * as LibtoolVersion from "./libtool-version.js";
import { Timestamp, codecForTimestamp } from "./time.js"; import { Timestamp, codecForTimestamp } from "./time.js";
import { import {
buildCodecForObject, buildCodecForObject,
@ -50,7 +49,7 @@ import {
codecForContractTerms, codecForContractTerms,
ContractTerms, ContractTerms,
} from "./talerTypes.js"; } from "./talerTypes.js";
import { OrderShortInfo, codecForOrderShortInfo } from "./transactionsTypes"; import { OrderShortInfo, codecForOrderShortInfo } from "./transactionsTypes.js";
import { BackupRecovery } from "./backupTypes.js"; import { BackupRecovery } from "./backupTypes.js";
/** /**