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,14 +3,14 @@
import type { Observable } from 'rxjs';
import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces';
import type { DeriveApi } from '../types';
import type { DeriveApi } from '../types.js';
import { map, of } from 'rxjs';
import { assertReturn, isU8a } from '@polkadot/util';
import { decodeAddress } from '@polkadot/util-crypto';
import { memo } from '../util';
import { memo } from '../util/index.js';
/**
* @name accountId
+2 -2
View File
@@ -6,13 +6,13 @@ import type { AccountId, Address, Balance } from '@polkadot/types/interfaces';
import type{ PalletElectionsPhragmenSeatHolder } from '@polkadot/types/lookup';
import type { Codec } from '@polkadot/types/types';
import type { Option } from '@polkadot/types-codec';
import type { DeriveAccountFlags, DeriveApi } from '../types';
import type { DeriveAccountFlags, DeriveApi } from '../types.js';
import { map, of } from 'rxjs';
import { isFunction } from '@polkadot/util';
import { memo } from '../util';
import { memo } from '../util/index.js';
type FlagsIntermediate = [
PalletElectionsPhragmenSeatHolder[] | [AccountId, Balance][] | undefined,
@@ -3,14 +3,14 @@
import type { Observable } from 'rxjs';
import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces';
import type { AccountIdAndIndex, DeriveApi } from '../types';
import type { AccountIdAndIndex, DeriveApi } from '../types.js';
import { map, of } from 'rxjs';
import { isU8a } from '@polkadot/util';
import { decodeAddress } from '@polkadot/util-crypto';
import { memo } from '../util';
import { memo } from '../util/index.js';
/**
* @name idAndIndex
@@ -3,11 +3,11 @@
import type { Observable } from 'rxjs';
import type { AccountId, AccountIndex } from '@polkadot/types/interfaces';
import type { AccountIndexes, DeriveApi } from '../types';
import type { AccountIndexes, DeriveApi } from '../types.js';
import { map } from 'rxjs';
import { memo } from '../util';
import { memo } from '../util/index.js';
/**
* @name idToIndex
+2 -2
View File
@@ -7,13 +7,13 @@ import type { AccountId } from '@polkadot/types/interfaces';
import type { PalletIdentityIdentityInfo, PalletIdentityRegistration } from '@polkadot/types/lookup';
import type { Option } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { DeriveAccountRegistration, DeriveApi, DeriveHasIdentity } from '../types';
import type { DeriveAccountRegistration, DeriveApi, DeriveHasIdentity } from '../types.js';
import { combineLatest, map, of, switchMap } from 'rxjs';
import { isHex, u8aToString } from '@polkadot/util';
import { firstMemo, memo } from '../util';
import { firstMemo, memo } from '../util/index.js';
type IdentityInfoAdditional = PalletIdentityIdentityInfo['additional'][0];
+8 -8
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './accountId';
export * from './flags';
export * from './idAndIndex';
export * from './idToIndex';
export * from './identity';
export * from './indexToId';
export * from './indexes';
export * from './info';
export * from './accountId.js';
export * from './flags.js';
export * from './idAndIndex.js';
export * from './idToIndex.js';
export * from './identity.js';
export * from './indexToId.js';
export * from './indexes.js';
export * from './info.js';
@@ -3,11 +3,11 @@
import type { Observable } from 'rxjs';
import type { AccountId, AccountIndex } from '@polkadot/types/interfaces';
import type { DeriveApi } from '../types';
import type { DeriveApi } from '../types.js';
import { map, of } from 'rxjs';
import { memo } from '../util';
import { memo } from '../util/index.js';
/**
* @name indexToId
+2 -2
View File
@@ -2,11 +2,11 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { AccountIndexes, DeriveApi } from '../types';
import type { AccountIndexes, DeriveApi } from '../types.js';
import { map, of, startWith } from 'rxjs';
import { memo } from '../util';
import { memo } from '../util/index.js';
let indicesCache: AccountIndexes | null = null;
+2 -2
View File
@@ -5,13 +5,13 @@ import type { Observable } from 'rxjs';
import type { Bytes, Option, u32 } from '@polkadot/types';
import type { AccountId, AccountIndex, Address, Balance } from '@polkadot/types/interfaces';
import type { ITuple } from '@polkadot/types/types';
import type { DeriveAccountInfo, DeriveAccountRegistration, DeriveApi } from '../types';
import type { DeriveAccountInfo, DeriveAccountRegistration, DeriveApi } from '../types.js';
import { combineLatest, map, of, switchMap } from 'rxjs';
import { u8aToString } from '@polkadot/util';
import { memo } from '../util';
import { memo } from '../util/index.js';
function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string | undefined> {
return ((