Use .js imports in src (#492)

* Use .js imports in src

* Bump dev
This commit is contained in:
Jaco
2023-03-09 10:39:39 +02:00
committed by GitHub
parent 0a7af910e1
commit 783476fd8d
39 changed files with 119 additions and 119 deletions
+2 -2
View File
@@ -7,11 +7,11 @@
// then ensures that the internal wasm instance here is available
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import type { BridgeBase, InitFn, InitPromise, WasmBaseInstance, WasmImports } from './types';
import type { BridgeBase, InitFn, InitPromise, WasmBaseInstance, WasmImports } from './types.js';
import { stringToU8a, u8aToString } from '@polkadot/util';
import { Wbg } from './wbg';
import { Wbg } from './wbg.js';
/**
* @name Bridge
+2 -2
View File
@@ -1,5 +1,5 @@
// Copyright 2019-2023 @polkadot/wasm-bridge authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './bridge';
export * from './init';
export * from './bridge.js';
export * from './init.js';
+2 -2
View File
@@ -5,7 +5,7 @@
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
import others from './detectOther.js';
import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, others);
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2019-2023 @polkadot/wasm-bridge authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
import './detectPackage.js';
export * from './bundle';
export * from './bundle.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2019-2023 @polkadot/wasm-bundle authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { InitFn, InitPromise, InitResult, WasmBaseInstance, WasmImports } from './types';
import type { InitFn, InitPromise, InitResult, WasmBaseInstance, WasmImports } from './types.js';
/**
* @name createWasmFn
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019-2023 @polkadot/wasm-bridge authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './index';
export * from './index.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2019-2023 @polkadot/wasm-bridge authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { BridgeBase, WasmBaseInstance } from './types';
import type { BridgeBase, WasmBaseInstance } from './types.js';
import { getRandomValues } from '@polkadot/x-randomvalues';
+1 -1
View File
@@ -2,4 +2,4 @@
// SPDX-License-Identifier: Apache-2.0
export { asmJsInit } from './cjs/data.js';
export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
@@ -1,6 +1,6 @@
// Copyright 2019-2023 @polkadot/wasm-crypto-wasm authors & contributors
// SPDX-License-Identifier: Apache-2.0
const data = require('../data');
const data = require('../data.js');
module.exports = data;
@@ -5,7 +5,7 @@
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
import others from './detectOther.js';
import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, others);
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2019-2023 @polkadot/wasm-crypto-asmjs authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
import './detectPackage.js';
export * from './bundle';
export * from './bundle.js';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019-2023 @polkadot/wasm-crypto-asmjs authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './index';
export * from './index.js';
+2 -2
View File
@@ -2,12 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
import type { InitFn } from '@polkadot/wasm-bridge/types';
import type { WasmCryptoInstance } from './types';
import type { WasmCryptoInstance } from './types.js';
import { createWasmFn } from '@polkadot/wasm-bridge';
import { asmJsInit } from '@polkadot/wasm-crypto-asmjs';
export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
/**
* @name createWasm
+2 -2
View File
@@ -2,13 +2,13 @@
// SPDX-License-Identifier: Apache-2.0
import type { InitFn } from '@polkadot/wasm-bridge/types';
import type { WasmCryptoInstance } from './types';
import type { WasmCryptoInstance } from './types.js';
import { createWasmFn } from '@polkadot/wasm-bridge';
import { asmJsInit } from '@polkadot/wasm-crypto-asmjs';
import { wasmBytes } from '@polkadot/wasm-crypto-wasm';
export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
/**
* @name createWasm
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019-2023 @polkadot/wasm-crypto-init authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './wasm';
export * from './wasm.js';
@@ -5,7 +5,7 @@
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
import others from './detectOther.js';
import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, others);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019-2023 @polkadot/wasm-crypto-init authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './wasm';
export * from './wasm.js';
+2 -2
View File
@@ -2,11 +2,11 @@
// SPDX-License-Identifier: Apache-2.0
import type { InitFn } from '@polkadot/wasm-bridge/types';
import type { WasmCryptoInstance } from './types';
import type { WasmCryptoInstance } from './types.js';
import { createWasmFn } from '@polkadot/wasm-bridge';
export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
/**
* @name createWasm
+2 -2
View File
@@ -2,12 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
import type { InitFn } from '@polkadot/wasm-bridge/types';
import type { WasmCryptoInstance } from './types';
import type { WasmCryptoInstance } from './types.js';
import { createWasmFn } from '@polkadot/wasm-bridge';
import { wasmBytes } from '@polkadot/wasm-crypto-wasm';
export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
/**
* @name createWasm
+1 -1
View File
@@ -5,7 +5,7 @@ import { base64Decode, unzlibSync } from '@polkadot/wasm-util';
import { bytes, lenIn, lenOut } from './cjs/bytes.js';
export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
/**
* @name wasmBytes
@@ -1,6 +1,6 @@
// Copyright 2019-2023 @polkadot/wasm-crypto-wasm authors & contributors
// SPDX-License-Identifier: Apache-2.0
const bytes = require('../bytes');
const bytes = require('../bytes.js');
module.exports = bytes;
@@ -5,7 +5,7 @@
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
import others from './detectOther.js';
import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, others);
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2019-2023 @polkadot/wasm-crypto-wasm authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
import './detectPackage.js';
export * from './bundle';
export * from './bundle.js';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019-2023 @polkadot/wasm-crypto-wasm authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './index';
export * from './index.js';
+2 -2
View File
@@ -3,9 +3,9 @@
import type { WasmCryptoInstance } from '@polkadot/wasm-crypto-init/types';
import { bridge, initBridge } from './init';
import { bridge, initBridge } from './init.js';
export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
export { bridge };
// Removes the first parameter (expected as WasmCryptoInstance) and leaves the
+2 -2
View File
@@ -5,7 +5,7 @@
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
import others from './detectOther.js';
import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, others);
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2019-2023 @polkadot/wasm-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
import './detectPackage.js';
export * from './bundle';
export * from './bundle.js';
+1 -1
View File
@@ -3,7 +3,7 @@
import { createWasm } from '@polkadot/wasm-crypto-init/none';
import { initBridge } from './init';
import { initBridge } from './init.js';
/**
* @name initWasm
+1 -1
View File
@@ -3,7 +3,7 @@
import { createWasm } from '@polkadot/wasm-crypto-init/asm';
import { initBridge } from './init';
import { initBridge } from './init.js';
/**
* @name initWasm
+1 -1
View File
@@ -3,7 +3,7 @@
import { createWasm } from '@polkadot/wasm-crypto-init/wasm';
import { initBridge } from './init';
import { initBridge } from './init.js';
/**
* @name initWasm
+1 -1
View File
@@ -3,7 +3,7 @@
import { createWasm } from '@polkadot/wasm-crypto-init/both';
import { initBridge } from './init';
import { initBridge } from './init.js';
/**
* @name initWasm
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019-2023 @polkadot/wasm-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './index';
export * from './index.js';
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2019-2023 @polkadot/wasm-util authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { base64Decode } from './base64';
export { unzlibSync } from './fflate';
export { packageInfo } from './packageInfo';
export { base64Decode } from './base64.js';
export { unzlibSync } from './fflate.js';
export { packageInfo } from './packageInfo.js';
+2 -2
View File
@@ -5,7 +5,7 @@
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
import others from './detectOther.js';
import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, others);
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2019-2023 @polkadot/wasm-util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
import './detectPackage.js';
export * from './bundle';
export * from './bundle.js';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019-2023 @polkadot/wasm-util authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './index';
export * from './index.js';