Use .js imports in src (#5526)

* Use .js imports in src

* Adjust

* Fix imports

* Bump dev

* Adjust with .js imports for typegen

* Adjust

* Adjust

* Remove target override
This commit is contained in:
Jaco
2023-03-09 12:19:12 +02:00
committed by GitHub
parent f233671c27
commit 9fe2798b70
754 changed files with 1873 additions and 1871 deletions
@@ -3,9 +3,9 @@
/// <reference types="@polkadot/dev/node/test/node" />
import type { JsonRpcResponse } from '../types';
import type { JsonRpcResponse } from '../types.js';
import { RpcCoder } from '.';
import { RpcCoder } from './index.js';
describe('decodeResponse', (): void => {
let coder: RpcCoder;
@@ -3,7 +3,7 @@
/// <reference types="@polkadot/dev/node/test/node" />
import { RpcCoder } from '.';
import { RpcCoder } from './index.js';
describe('encodeJson', (): void => {
let coder: RpcCoder;
@@ -3,7 +3,7 @@
/// <reference types="@polkadot/dev/node/test/node" />
import { RpcCoder } from '.';
import { RpcCoder } from './index.js';
describe('encodeObject', (): void => {
let coder: RpcCoder;
@@ -5,7 +5,7 @@
import { isError } from '@polkadot/util/is/error';
import RpcError from './error';
import RpcError from './error.js';
describe('RpcError', (): void => {
describe('constructor', (): void => {
+1 -1
View File
@@ -3,7 +3,7 @@
import { isFunction } from '@polkadot/util/is/function';
import { RpcErrorInterface } from '../types';
import { RpcErrorInterface } from '../types.js';
const UNKNOWN = -99999;
+2 -2
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { JsonRpcRequest, JsonRpcResponse, JsonRpcResponseBaseError } from '../types';
import type { JsonRpcRequest, JsonRpcResponse, JsonRpcResponseBaseError } from '../types.js';
import { isNumber, isString, isUndefined, stringify } from '@polkadot/util';
import RpcError from './error';
import RpcError from './error.js';
function formatErrorData (data?: string | number): string {
if (isUndefined(data)) {