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
+4 -4
View File
@@ -7,17 +7,17 @@ import type { StorageKey, Vec } from '@polkadot/types';
import type { Hash } from '@polkadot/types/interfaces';
import type { AnyJson, AnyNumber, Codec, DefinitionRpc, DefinitionRpcExt, DefinitionRpcSub, Registry } from '@polkadot/types/types';
import type { Memoized } from '@polkadot/util/types';
import type { RpcInterfaceMethod } from './types';
import type { RpcInterfaceMethod } from './types/index.js';
import { Observable, publishReplay, refCount } from 'rxjs';
import { rpcDefinitions } from '@polkadot/types';
import { hexToU8a, isFunction, isNull, isUndefined, lazyMethod, logger, memoize, objectSpread, u8aConcat, u8aToU8a } from '@polkadot/util';
import { drr, refCountDelay } from './util';
import { drr, refCountDelay } from './util/index.js';
export { packageInfo } from './packageInfo';
export * from './util';
export { packageInfo } from './packageInfo.js';
export * from './util/index.js';
interface StorageChangeSetJSON {
block: string;
+2 -2
View File
@@ -3,13 +3,13 @@
/// <reference types="@polkadot/dev/node/test/node" />
import type { RpcInterface } from './types';
import type { RpcInterface } from './types/index.js';
import { createTestPairs } from '@polkadot/keyring/testingPairs';
import { MockProvider } from '@polkadot/rpc-provider/mock';
import { TypeRegistry } from '@polkadot/types/create';
import { RpcCore } from '.';
import { RpcCore } from './index.js';
describe('Cached Observables', (): void => {
const registry = new TypeRegistry();
+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);
+1 -1
View File
@@ -9,7 +9,7 @@ import { MockProvider } from '@polkadot/rpc-provider/mock';
import { TypeRegistry } from '@polkadot/types/create';
import { isFunction } from '@polkadot/util';
import { RpcCore } from '.';
import { RpcCore } from './index.js';
describe('Api', (): void => {
const registry = new TypeRegistry();
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
import './detectPackage.js';
export * from './bundle';
export * from './bundle.js';
+1 -1
View File
@@ -8,7 +8,7 @@ import type { DefinitionRpc } from '@polkadot/types/types';
import { TypeRegistry } from '@polkadot/types/create';
import { RpcCore } from '.';
import { RpcCore } from './index.js';
describe('methodSend', (): void => {
const registry = new TypeRegistry();
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './index';
export * from './index.js';
+2 -2
View File
@@ -3,12 +3,12 @@
/// <reference types="@polkadot/dev/node/test/node" />
import type { RpcInterface } from './types';
import type { RpcInterface } from './types/index.js';
import { MockProvider } from '@polkadot/rpc-provider/mock';
import { TypeRegistry } from '@polkadot/types/create';
import { RpcCore } from '.';
import { RpcCore } from './index.js';
describe('replay', (): void => {
const registry = new TypeRegistry();
+1 -1
View File
@@ -5,4 +5,4 @@
export * from '@polkadot/rpc-core/types/jsonrpc';
// normal exports
export * from './base';
export * from './base.js';
+1 -1
View File
@@ -5,7 +5,7 @@
import { of, timer } from 'rxjs';
import { drr } from '.';
import { drr } from './index.js';
describe('drr', (): void => {
it('should not fire twice the same value', async (): Promise<void> => {
+1 -1
View File
@@ -7,7 +7,7 @@ import { catchError, distinctUntilChanged, publishReplay, refCount, tap } from '
import { stringify } from '@polkadot/util';
import { refCountDelay } from './refCountDelay';
import { refCountDelay } from './refCountDelay.js';
export type DrrResult = <T> (source$: Observable<T>) => Observable<T>;
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './drr';
export * from './memo';
export * from './refCountDelay';
export * from './drr.js';
export * from './memo.js';
export * from './refCountDelay.js';
+1 -1
View File
@@ -8,7 +8,7 @@ import { Observable } from 'rxjs';
import { memoize } from '@polkadot/util';
import { drr } from './drr';
import { drr } from './drr.js';
type ObsFn <T> = (...params: unknown[]) => Observable<T>;