diff --git a/.eslintrc.js b/.eslintrc.js
index 2c25537ce8f..07afb4ea908 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -11,4 +11,9 @@ module.exports = {
sourceType: 'module',
},
extends: ['web3-base/ts'],
+ settings: {
+ 'import/resolver': {
+ typescript: {}, // this loads tsconfig.json to eslint
+ },
+ },
};
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index da9bbc4116f..a7afecd3219 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -31,8 +31,8 @@ jobs:
with:
name: web3-${{ matrix.node }}.js.tar.gz
path: /tmp/web3-${{ matrix.node }}.js.tar.gz
- build-esm-types:
- name: Build ESM & Types
+ build-esm:
+ name: Build ESM
needs: build
runs-on: ubuntu-latest
strategy:
@@ -48,6 +48,22 @@ jobs:
path: /tmp
- run: tar -xf /tmp/web3-${{ matrix.node }}.js.tar.gz -C ./
- run: yarn build:esm
+ build-types:
+ name: Build Types
+ needs: build
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node: [ 18, 16 ]
+ steps:
+ - uses: actions/setup-node@v3
+ with:
+ node-version: ${{ matrix.node }}
+ - uses: actions/download-artifact@v3
+ with:
+ name: web3-${{ matrix.node }}.js.tar.gz
+ path: /tmp
+ - run: tar -xf /tmp/web3-${{ matrix.node }}.js.tar.gz -C ./
- run: yarn build:types
lint:
name: Lint
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0318efca8ba..3801f372784 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1488,6 +1488,7 @@ should use 4.0.1-alpha.0 for testing.
#### web3-eth-accounts
- Fixed ESM import bugs reported in (#6032) and (#6034)
+- ESM projects will not need to run --experimental-specifier-resolution=node (#6127)
### Changed
diff --git a/package.json b/package.json
index 3706f9823ef..a0404cb62c7 100644
--- a/package.json
+++ b/package.json
@@ -106,6 +106,7 @@
"cypress-jest-adapter": "^0.1.1",
"declaration-bundler-webpack-plugin": "^1.0.3",
"eslint": "^8.20.0",
+ "eslint-import-resolver-typescript": "^3.5.5",
"http-browserify": "^1.7.0",
"https-browserify": "^1.0.0",
"husky": "^8.0.1",
diff --git a/packages/web3-core/src/index.ts b/packages/web3-core/src/index.ts
index 2695c3f40af..88eb6c63151 100644
--- a/packages/web3-core/src/index.ts
+++ b/packages/web3-core/src/index.ts
@@ -15,17 +15,17 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-export * from './web3_config';
-export * from './web3_request_manager';
-export * from './web3_subscription_manager';
-export * from './web3_subscriptions';
-export * from './web3_context';
-export * from './web3_batch_request';
-export * from './utils';
-export * from './types';
-export * from './formatters';
-export * from './web3_promi_event';
-export * from './web3_event_emitter';
+export * from './web3_config.js';
+export * from './web3_request_manager.js';
+export * from './web3_subscription_manager.js';
+export * from './web3_subscriptions.js';
+export * from './web3_context.js';
+export * from './web3_batch_request.js';
+export * from './utils.js';
+export * from './types.js';
+export * from './formatters.js';
+export * from './web3_promi_event.js';
+export * from './web3_event_emitter.js';
// For backward usability export as namespace
-export * as formatters from './formatters';
+export * as formatters from './formatters.js';
diff --git a/packages/web3-core/src/web3_batch_request.ts b/packages/web3-core/src/web3_batch_request.ts
index 5529895df05..c232a4edc9a 100644
--- a/packages/web3-core/src/web3_batch_request.ts
+++ b/packages/web3-core/src/web3_batch_request.ts
@@ -18,7 +18,7 @@ along with web3.js. If not, see .
import { JsonRpcBatchResponse, JsonRpcOptionalRequest, JsonRpcRequest } from 'web3-types';
import { jsonRpc, Web3DeferredPromise } from 'web3-utils';
import { OperationAbortError, OperationTimeoutError, ResponseError } from 'web3-errors';
-import { Web3RequestManager } from './web3_request_manager';
+import { Web3RequestManager } from './web3_request_manager.js';
export const DEFAULT_BATCH_REQUEST_TIMEOUT = 1000;
diff --git a/packages/web3-core/src/web3_config.ts b/packages/web3-core/src/web3_config.ts
index ce73361f34c..7219a351036 100644
--- a/packages/web3-core/src/web3_config.ts
+++ b/packages/web3-core/src/web3_config.ts
@@ -18,10 +18,10 @@ along with web3.js. If not, see .
import { Numbers, HexString, BlockNumberOrTag, Common } from 'web3-types';
import { ConfigHardforkMismatchError, ConfigChainMismatchError } from 'web3-errors';
import { isNullish, toHex } from 'web3-utils';
-import { TransactionTypeParser } from './types';
+import { TransactionTypeParser } from './types.js';
// eslint-disable-next-line import/no-cycle
-import { TransactionBuilder } from './web3_context';
-import { Web3EventEmitter } from './web3_event_emitter';
+import { TransactionBuilder } from './web3_context.js';
+import { Web3EventEmitter } from './web3_event_emitter.js';
// To avoid cycle dependency declare this
export interface Web3ConfigOptions {
diff --git a/packages/web3-core/src/web3_context.ts b/packages/web3-core/src/web3_context.ts
index 15bfb28c3ba..1b654822af4 100644
--- a/packages/web3-core/src/web3_context.ts
+++ b/packages/web3-core/src/web3_context.ts
@@ -29,13 +29,13 @@ import {
import { isNullish } from 'web3-utils';
import { ExistingPluginNamespaceError } from 'web3-errors';
-import { isSupportedProvider } from './utils';
+import { isSupportedProvider } from './utils.js';
// eslint-disable-next-line import/no-cycle
-import { Web3Config, Web3ConfigEvent, Web3ConfigOptions } from './web3_config';
-import { Web3RequestManager } from './web3_request_manager';
-import { Web3SubscriptionConstructor } from './web3_subscriptions';
-import { Web3SubscriptionManager } from './web3_subscription_manager';
-import { Web3BatchRequest } from './web3_batch_request';
+import { Web3Config, Web3ConfigEvent, Web3ConfigOptions } from './web3_config.js';
+import { Web3RequestManager } from './web3_request_manager.js';
+import { Web3SubscriptionConstructor } from './web3_subscriptions.js';
+import { Web3SubscriptionManager } from './web3_subscription_manager.js';
+import { Web3BatchRequest } from './web3_batch_request.js';
// To avoid circular dependencies, we need to export type from here.
export type Web3ContextObject<
diff --git a/packages/web3-core/src/web3_promi_event.ts b/packages/web3-core/src/web3_promi_event.ts
index 40364c13700..c907d1f1529 100644
--- a/packages/web3-core/src/web3_promi_event.ts
+++ b/packages/web3-core/src/web3_promi_event.ts
@@ -20,7 +20,7 @@ import {
Web3EventEmitter,
Web3EventKey,
Web3EventMap,
-} from './web3_event_emitter';
+} from './web3_event_emitter.js';
export type PromiseExecutor = (
resolve: (data: T) => void,
diff --git a/packages/web3-core/src/web3_request_manager.ts b/packages/web3-core/src/web3_request_manager.ts
index 3d8b1797b1a..1b268445903 100644
--- a/packages/web3-core/src/web3_request_manager.ts
+++ b/packages/web3-core/src/web3_request_manager.ts
@@ -50,8 +50,8 @@ import {
isLegacySendAsyncProvider,
isLegacySendProvider,
isWeb3Provider,
-} from './utils';
-import { Web3EventEmitter } from './web3_event_emitter';
+} from './utils.js';
+import { Web3EventEmitter } from './web3_event_emitter.js';
export enum Web3RequestManagerEvent {
PROVIDER_CHANGED = 'PROVIDER_CHANGED',
diff --git a/packages/web3-core/src/web3_subscription_manager.ts b/packages/web3-core/src/web3_subscription_manager.ts
index efc6059f45b..95012249d7c 100644
--- a/packages/web3-core/src/web3_subscription_manager.ts
+++ b/packages/web3-core/src/web3_subscription_manager.ts
@@ -18,9 +18,9 @@ along with web3.js. If not, see .
import { DataFormat, DEFAULT_RETURN_FORMAT, Web3APISpec } from 'web3-types';
import { ProviderError, SubscriptionError } from 'web3-errors';
import { isNullish } from 'web3-utils';
-import { isSupportSubscriptions } from './utils';
-import { Web3RequestManager, Web3RequestManagerEvent } from './web3_request_manager';
-import { Web3SubscriptionConstructor } from './web3_subscriptions';
+import { isSupportSubscriptions } from './utils.js';
+import { Web3RequestManager, Web3RequestManagerEvent } from './web3_request_manager.js';
+import { Web3SubscriptionConstructor } from './web3_subscriptions.js';
type ShouldUnsubscribeCondition = ({
id,
diff --git a/packages/web3-core/src/web3_subscriptions.ts b/packages/web3-core/src/web3_subscriptions.ts
index 082c3bf8173..5a7644a11a4 100644
--- a/packages/web3-core/src/web3_subscriptions.ts
+++ b/packages/web3-core/src/web3_subscriptions.ts
@@ -32,9 +32,9 @@ import {
EIP1193Provider,
} from 'web3-types';
import { jsonRpc } from 'web3-utils';
-import { Web3EventEmitter, Web3EventMap } from './web3_event_emitter';
+import { Web3EventEmitter, Web3EventMap } from './web3_event_emitter.js';
-import { Web3RequestManager } from './web3_request_manager';
+import { Web3RequestManager } from './web3_request_manager.js';
export abstract class Web3Subscription<
EventMap extends Web3EventMap,
diff --git a/packages/web3-core/test/config/jest.config.js b/packages/web3-core/test/config/jest.config.js
index eaa5e9049da..4a60f95b353 100644
--- a/packages/web3-core/test/config/jest.config.js
+++ b/packages/web3-core/test/config/jest.config.js
@@ -10,6 +10,9 @@ module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
verbose: false,
collectCoverage: false,
coverageReporters: ['json'],
diff --git a/packages/web3-errors/src/errors/account_errors.ts b/packages/web3-errors/src/errors/account_errors.ts
index f666e8c4ef6..9d0d0c7580a 100644
--- a/packages/web3-errors/src/errors/account_errors.ts
+++ b/packages/web3-errors/src/errors/account_errors.ts
@@ -27,8 +27,8 @@ import {
ERR_INVALID_PASSWORD,
ERR_IV_LENGTH,
ERR_PBKDF2_ITERATIONS,
-} from '../error_codes';
-import { BaseWeb3Error } from '../web3_error_base';
+} from '../error_codes.js';
+import { BaseWeb3Error } from '../web3_error_base.js';
export class PrivateKeyLengthError extends BaseWeb3Error {
public code = ERR_PRIVATE_KEY_LENGTH;
diff --git a/packages/web3-errors/src/errors/connection_errors.ts b/packages/web3-errors/src/errors/connection_errors.ts
index 20d41e5ae87..d9d820898b0 100644
--- a/packages/web3-errors/src/errors/connection_errors.ts
+++ b/packages/web3-errors/src/errors/connection_errors.ts
@@ -27,8 +27,8 @@ import {
ERR_CONN_MAX_ATTEMPTS,
ERR_CONN_PENDING_REQUESTS,
ERR_REQ_ALREADY_SENT,
-} from '../error_codes';
-import { BaseWeb3Error } from '../web3_error_base';
+} from '../error_codes.js';
+import { BaseWeb3Error } from '../web3_error_base.js';
export class ConnectionError extends BaseWeb3Error {
public code = ERR_CONN;
diff --git a/packages/web3-errors/src/errors/contract_errors.ts b/packages/web3-errors/src/errors/contract_errors.ts
index 0290d542eab..98a38245da6 100644
--- a/packages/web3-errors/src/errors/contract_errors.ts
+++ b/packages/web3-errors/src/errors/contract_errors.ts
@@ -31,8 +31,8 @@ import {
ERR_CONTRACT_RESERVED_EVENT,
ERR_CONTRACT_RESOLVER_MISSING,
ERR_CONTRACT_TX_DATA_AND_INPUT,
-} from '../error_codes';
-import { BaseWeb3Error, InvalidValueError } from '../web3_error_base';
+} from '../error_codes.js';
+import { BaseWeb3Error, InvalidValueError } from '../web3_error_base.js';
export class Web3ContractError extends BaseWeb3Error {
public code = ERR_CONTRACT;
diff --git a/packages/web3-errors/src/errors/core_errors.ts b/packages/web3-errors/src/errors/core_errors.ts
index f7f8eb6e10c..5adb6f732ec 100644
--- a/packages/web3-errors/src/errors/core_errors.ts
+++ b/packages/web3-errors/src/errors/core_errors.ts
@@ -17,8 +17,8 @@ along with web3.js. If not, see .
/* eslint-disable max-classes-per-file */
-import { BaseWeb3Error } from '../web3_error_base';
-import { ERR_CORE_HARDFORK_MISMATCH } from '../error_codes';
+import { BaseWeb3Error } from '../web3_error_base.js';
+import { ERR_CORE_HARDFORK_MISMATCH } from '../error_codes.js';
export class ConfigHardforkMismatchError extends BaseWeb3Error {
public code = ERR_CORE_HARDFORK_MISMATCH;
diff --git a/packages/web3-errors/src/errors/ens_errors.ts b/packages/web3-errors/src/errors/ens_errors.ts
index a0c36b31f22..20a5796c931 100644
--- a/packages/web3-errors/src/errors/ens_errors.ts
+++ b/packages/web3-errors/src/errors/ens_errors.ts
@@ -21,8 +21,8 @@ import {
ERR_ENS_CHECK_INTERFACE_SUPPORT,
ERR_ENS_NETWORK_NOT_SYNCED,
ERR_ENS_UNSUPPORTED_NETWORK,
-} from '../error_codes';
-import { BaseWeb3Error } from '../web3_error_base';
+} from '../error_codes.js';
+import { BaseWeb3Error } from '../web3_error_base.js';
export class ENSCheckInterfaceSupportError extends BaseWeb3Error {
public code = ERR_ENS_CHECK_INTERFACE_SUPPORT;
diff --git a/packages/web3-errors/src/errors/generic_errors.ts b/packages/web3-errors/src/errors/generic_errors.ts
index 8fe9aa900d0..98c62ddcf7d 100644
--- a/packages/web3-errors/src/errors/generic_errors.ts
+++ b/packages/web3-errors/src/errors/generic_errors.ts
@@ -26,8 +26,8 @@ import {
ERR_PARAM,
ERR_EXISTING_PLUGIN_NAMESPACE,
ERR_INVALID_METHOD_PARAMS,
-} from '../error_codes';
-import { BaseWeb3Error } from '../web3_error_base';
+} from '../error_codes.js';
+import { BaseWeb3Error } from '../web3_error_base.js';
export class InvalidNumberOfParamsError extends BaseWeb3Error {
public code = ERR_PARAM;
diff --git a/packages/web3-errors/src/errors/provider_errors.ts b/packages/web3-errors/src/errors/provider_errors.ts
index d566bca91a1..bbaadf96c28 100644
--- a/packages/web3-errors/src/errors/provider_errors.ts
+++ b/packages/web3-errors/src/errors/provider_errors.ts
@@ -23,8 +23,8 @@ import {
ERR_INVALID_CLIENT,
ERR_SUBSCRIPTION,
ERR_WS_PROVIDER,
-} from '../error_codes';
-import { BaseWeb3Error } from '../web3_error_base';
+} from '../error_codes.js';
+import { BaseWeb3Error } from '../web3_error_base.js';
export class ProviderError extends BaseWeb3Error {
public code = ERR_PROVIDER;
diff --git a/packages/web3-errors/src/errors/response_errors.ts b/packages/web3-errors/src/errors/response_errors.ts
index fdd6ad5fe49..b9ee1fd6c53 100644
--- a/packages/web3-errors/src/errors/response_errors.ts
+++ b/packages/web3-errors/src/errors/response_errors.ts
@@ -22,8 +22,8 @@ import {
JsonRpcResponse,
JsonRpcResponseWithError,
} from 'web3-types';
-import { BaseWeb3Error } from '../web3_error_base';
-import { ERR_INVALID_RESPONSE, ERR_RESPONSE } from '../error_codes';
+import { BaseWeb3Error } from '../web3_error_base.js';
+import { ERR_INVALID_RESPONSE, ERR_RESPONSE } from '../error_codes.js';
// To avoid circular package dependency, copied to code here. If you update this please update same function in `json_rpc.ts`
const isResponseWithError = (
diff --git a/packages/web3-errors/src/errors/rpc_errors.ts b/packages/web3-errors/src/errors/rpc_errors.ts
index b1116716c7d..718fb99be6b 100644
--- a/packages/web3-errors/src/errors/rpc_errors.ts
+++ b/packages/web3-errors/src/errors/rpc_errors.ts
@@ -18,7 +18,7 @@ along with web3.js. If not, see .
/* eslint-disable max-classes-per-file */
import { JsonRpcResponseWithError, JsonRpcId, JsonRpcError } from 'web3-types';
-import { BaseWeb3Error } from '../web3_error_base';
+import { BaseWeb3Error } from '../web3_error_base.js';
import {
ERR_RPC_INTERNAL_ERROR,
ERR_RPC_INVALID_INPUT,
@@ -32,7 +32,7 @@ import {
ERR_RPC_TRANSACTION_REJECTED,
ERR_RPC_UNAVAILABLE_RESOURCE,
ERR_RPC_UNSUPPORTED_METHOD,
-} from '../error_codes';
+} from '../error_codes.js';
export class RpcError extends BaseWeb3Error {
public code: number;
diff --git a/packages/web3-errors/src/errors/signature_errors.ts b/packages/web3-errors/src/errors/signature_errors.ts
index cf27d8f2a82..c5a07173e25 100644
--- a/packages/web3-errors/src/errors/signature_errors.ts
+++ b/packages/web3-errors/src/errors/signature_errors.ts
@@ -15,8 +15,8 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { ERR_SIGNATURE_FAILED } from '../error_codes';
-import { InvalidValueError } from '../web3_error_base';
+import { ERR_SIGNATURE_FAILED } from '../error_codes.js';
+import { InvalidValueError } from '../web3_error_base.js';
export class SignatureError extends InvalidValueError {
public code = ERR_SIGNATURE_FAILED;
diff --git a/packages/web3-errors/src/errors/transaction_errors.ts b/packages/web3-errors/src/errors/transaction_errors.ts
index f0fc5e74ee5..b19341111eb 100644
--- a/packages/web3-errors/src/errors/transaction_errors.ts
+++ b/packages/web3-errors/src/errors/transaction_errors.ts
@@ -65,8 +65,8 @@ import {
ERR_TX_UNSUPPORTED_TYPE,
ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR,
ERR_TX_INVALID_PROPERTIES_FOR_TYPE,
-} from '../error_codes';
-import { InvalidValueError, BaseWeb3Error } from '../web3_error_base';
+} from '../error_codes.js';
+import { InvalidValueError, BaseWeb3Error } from '../web3_error_base.js';
export class TransactionError extends BaseWeb3Error {
public code = ERR_TX;
diff --git a/packages/web3-errors/src/errors/utils_errors.ts b/packages/web3-errors/src/errors/utils_errors.ts
index 2f67f8c4fc7..b93ff964f38 100644
--- a/packages/web3-errors/src/errors/utils_errors.ts
+++ b/packages/web3-errors/src/errors/utils_errors.ts
@@ -32,8 +32,8 @@ import {
ERR_INVALID_TYPE_ABI,
ERR_INVALID_UNIT,
ERR_INVALID_UNSIGNED_INTEGER,
-} from '../error_codes';
-import { InvalidValueError } from '../web3_error_base';
+} from '../error_codes.js';
+import { InvalidValueError } from '../web3_error_base.js';
export class InvalidBytesError extends InvalidValueError {
public code = ERR_INVALID_BYTES;
diff --git a/packages/web3-errors/src/index.ts b/packages/web3-errors/src/index.ts
index 6d8b8fa13f5..6a19d428f33 100644
--- a/packages/web3-errors/src/index.ts
+++ b/packages/web3-errors/src/index.ts
@@ -15,17 +15,17 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-export * from './error_codes';
-export * from './web3_error_base';
-export * from './errors/account_errors';
-export * from './errors/connection_errors';
-export * from './errors/contract_errors';
-export * from './errors/ens_errors';
-export * from './errors/generic_errors';
-export * from './errors/provider_errors';
-export * from './errors/signature_errors';
-export * from './errors/transaction_errors';
-export * from './errors/utils_errors';
-export * from './errors/response_errors';
-export * from './errors/core_errors';
-export * from './errors/rpc_errors';
+export * from './error_codes.js';
+export * from './web3_error_base.js';
+export * from './errors/account_errors.js';
+export * from './errors/connection_errors.js';
+export * from './errors/contract_errors.js';
+export * from './errors/ens_errors.js';
+export * from './errors/generic_errors.js';
+export * from './errors/provider_errors.js';
+export * from './errors/signature_errors.js';
+export * from './errors/transaction_errors.js';
+export * from './errors/utils_errors.js';
+export * from './errors/response_errors.js';
+export * from './errors/core_errors.js';
+export * from './errors/rpc_errors.js';
diff --git a/packages/web3-eth-abi/src/api/errors_api.ts b/packages/web3-eth-abi/src/api/errors_api.ts
index c7c656fbf7a..7a6a2bc85ff 100644
--- a/packages/web3-eth-abi/src/api/errors_api.ts
+++ b/packages/web3-eth-abi/src/api/errors_api.ts
@@ -18,7 +18,7 @@ along with web3.js. If not, see .
import { sha3Raw } from 'web3-utils';
import { AbiError } from 'web3-errors';
import { AbiErrorFragment } from 'web3-types';
-import { jsonInterfaceMethodToString, isAbiErrorFragment } from '../utils';
+import { jsonInterfaceMethodToString, isAbiErrorFragment } from '../utils.js';
/**
* Encodes the error name to its ABI signature, which are the sha3 hash of the error name including input types.
diff --git a/packages/web3-eth-abi/src/api/events_api.ts b/packages/web3-eth-abi/src/api/events_api.ts
index 4287834c81c..92b38b4afb9 100644
--- a/packages/web3-eth-abi/src/api/events_api.ts
+++ b/packages/web3-eth-abi/src/api/events_api.ts
@@ -18,7 +18,7 @@ along with web3.js. If not, see .
import { sha3Raw } from 'web3-utils';
import { AbiError } from 'web3-errors';
import { AbiEventFragment } from 'web3-types';
-import { jsonInterfaceMethodToString, isAbiEventFragment } from '../utils';
+import { jsonInterfaceMethodToString, isAbiEventFragment } from '../utils.js';
/**
* Encodes the event name to its ABI signature, which are the sha3 hash of the event name including input types.
diff --git a/packages/web3-eth-abi/src/api/functions_api.ts b/packages/web3-eth-abi/src/api/functions_api.ts
index 30c4ac6dd45..0c78c4f5a1f 100644
--- a/packages/web3-eth-abi/src/api/functions_api.ts
+++ b/packages/web3-eth-abi/src/api/functions_api.ts
@@ -18,8 +18,8 @@ along with web3.js. If not, see .
import { AbiError } from 'web3-errors';
import { sha3Raw } from 'web3-utils';
import { AbiFunctionFragment } from 'web3-types';
-import { isAbiFunctionFragment, jsonInterfaceMethodToString } from '../utils';
-import { encodeParameters } from './parameters_api';
+import { isAbiFunctionFragment, jsonInterfaceMethodToString } from '../utils.js';
+import { encodeParameters } from './parameters_api.js';
// todo Add link to JSON interface documentation
/**
diff --git a/packages/web3-eth-abi/src/api/logs_api.ts b/packages/web3-eth-abi/src/api/logs_api.ts
index 00cecd3a654..e766f3f5532 100644
--- a/packages/web3-eth-abi/src/api/logs_api.ts
+++ b/packages/web3-eth-abi/src/api/logs_api.ts
@@ -16,7 +16,7 @@ along with web3.js. If not, see .
*/
import { HexString, AbiParameter, DecodedParams } from 'web3-types';
-import { decodeParameter, decodeParametersWith } from './parameters_api';
+import { decodeParameter, decodeParametersWith } from './parameters_api.js';
const STATIC_TYPES = ['bool', 'string', 'int', 'uint', 'address', 'fixed', 'ufixed'];
diff --git a/packages/web3-eth-abi/src/api/parameters_api.ts b/packages/web3-eth-abi/src/api/parameters_api.ts
index 2b34c925e9d..1ca1f09a2bf 100644
--- a/packages/web3-eth-abi/src/api/parameters_api.ts
+++ b/packages/web3-eth-abi/src/api/parameters_api.ts
@@ -18,8 +18,8 @@ along with web3.js. If not, see .
import { AbiError } from 'web3-errors';
import { ParamType, Result } from '@ethersproject/abi';
import { HexString, AbiInput, DecodedParams } from 'web3-types';
-import ethersAbiCoder from '../ethers_abi_coder';
-import { formatParam, isAbiFragment, mapTypes, modifyParams } from '../utils';
+import ethersAbiCoder from '../ethers_abi_coder.js';
+import { formatParam, isAbiFragment, mapTypes, modifyParams } from '../utils.js';
/**
* Encodes a parameter based on its type to its ABI representation.
diff --git a/packages/web3-eth-abi/src/decode_contract_error_data.ts b/packages/web3-eth-abi/src/decode_contract_error_data.ts
index fc5ac1c591a..98eb02d4fd8 100644
--- a/packages/web3-eth-abi/src/decode_contract_error_data.ts
+++ b/packages/web3-eth-abi/src/decode_contract_error_data.ts
@@ -18,9 +18,9 @@ along with web3.js. If not, see .
import { Eip838ExecutionError } from 'web3-errors';
import { AbiErrorFragment } from 'web3-types';
-import { encodeErrorSignature } from './api/errors_api';
-import { decodeParameters } from './api/parameters_api';
-import { jsonInterfaceMethodToString } from './utils';
+import { encodeErrorSignature } from './api/errors_api.js';
+import { decodeParameters } from './api/parameters_api.js';
+import { jsonInterfaceMethodToString } from './utils.js';
export const decodeContractErrorData = (
errorsAbi: AbiErrorFragment[],
diff --git a/packages/web3-eth-abi/src/index.ts b/packages/web3-eth-abi/src/index.ts
index 3d3c404d2cb..6a8754e486a 100644
--- a/packages/web3-eth-abi/src/index.ts
+++ b/packages/web3-eth-abi/src/index.ts
@@ -18,10 +18,10 @@ along with web3.js. If not, see .
/**
* The web3.eth.abi functions let you encode and decode parameters to ABI (Application Binary Interface) for function calls to the EVM (Ethereum Virtual Machine).
*/
-export * from './api/errors_api';
-export * from './api/events_api';
-export * from './api/functions_api';
-export * from './api/logs_api';
-export * from './api/parameters_api';
-export * from './utils';
-export * from './decode_contract_error_data';
+export * from './api/errors_api.js';
+export * from './api/events_api.js';
+export * from './api/functions_api.js';
+export * from './api/logs_api.js';
+export * from './api/parameters_api.js';
+export * from './utils.js';
+export * from './decode_contract_error_data.js';
diff --git a/packages/web3-eth-abi/src/utils.ts b/packages/web3-eth-abi/src/utils.ts
index 5b4d27101db..1b38a654130 100644
--- a/packages/web3-eth-abi/src/utils.ts
+++ b/packages/web3-eth-abi/src/utils.ts
@@ -28,7 +28,7 @@ import {
AbiFunctionFragment,
AbiConstructorFragment,
} from 'web3-types';
-import ethersAbiCoder from './ethers_abi_coder';
+import ethersAbiCoder from './ethers_abi_coder.js';
export const isAbiFragment = (item: unknown): item is AbiFragment =>
!isNullish(item) &&
diff --git a/packages/web3-eth-abi/test/config/jest.config.js b/packages/web3-eth-abi/test/config/jest.config.js
index eaa5e9049da..c8c21e06e6a 100644
--- a/packages/web3-eth-abi/test/config/jest.config.js
+++ b/packages/web3-eth-abi/test/config/jest.config.js
@@ -10,6 +10,9 @@ module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
verbose: false,
collectCoverage: false,
coverageReporters: ['json'],
diff --git a/packages/web3-eth-accounts/src/account.ts b/packages/web3-eth-accounts/src/account.ts
index 87dfed409f4..7925033b736 100644
--- a/packages/web3-eth-accounts/src/account.ts
+++ b/packages/web3-eth-accounts/src/account.ts
@@ -15,9 +15,12 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { decrypt as createDecipheriv, encrypt as createCipheriv } from 'ethereum-cryptography/aes';
-import { pbkdf2Sync } from 'ethereum-cryptography/pbkdf2';
-import { scryptSync } from 'ethereum-cryptography/scrypt';
+import {
+ decrypt as createDecipheriv,
+ encrypt as createCipheriv,
+} from 'ethereum-cryptography/aes.js';
+import { pbkdf2Sync } from 'ethereum-cryptography/pbkdf2.js';
+import { scryptSync } from 'ethereum-cryptography/scrypt.js';
import {
InvalidKdfError,
InvalidPasswordError,
@@ -56,16 +59,16 @@ import {
} from 'web3-utils';
import { isHexStrict, isNullish, isString, validator } from 'web3-validator';
-import { secp256k1 } from './tx/constants';
-import { keyStoreSchema } from './schemas';
-import { TransactionFactory } from './tx/transactionFactory';
+import { secp256k1 } from './tx/constants.js';
+import { keyStoreSchema } from './schemas.js';
+import { TransactionFactory } from './tx/transactionFactory.js';
import type {
SignatureObject,
SignTransactionResult,
TypedTransaction,
Web3Account,
SignResult,
-} from './types';
+} from './types.js';
/**
* Get the private key Uint8Array after the validation
diff --git a/packages/web3-eth-accounts/src/common/common.ts b/packages/web3-eth-accounts/src/common/common.ts
index 062d1f47df9..0c668c01579 100644
--- a/packages/web3-eth-accounts/src/common/common.ts
+++ b/packages/web3-eth-accounts/src/common/common.ts
@@ -18,15 +18,15 @@ import pkg from 'crc-32';
import { EventEmitter } from 'events';
import type { Numbers } from 'web3-types';
import { bytesToHex, hexToBytes, uint8ArrayConcat } from 'web3-utils';
-import { TypeOutput } from './types';
-import { intToUint8Array, toType, parseGethGenesis } from './utils';
-import goerli from './chains/goerli';
-import mainnet from './chains/mainnet';
-import sepolia from './chains/sepolia';
-import { EIPs } from './eips';
-import type { ConsensusAlgorithm, ConsensusType } from './enums';
-import { Chain, CustomChain, Hardfork } from './enums';
-import { hardforks as HARDFORK_SPECS } from './hardforks';
+import { TypeOutput } from './types.js';
+import { intToUint8Array, toType, parseGethGenesis } from './utils.js';
+import goerli from './chains/goerli.js';
+import mainnet from './chains/mainnet.js';
+import sepolia from './chains/sepolia.js';
+import { EIPs } from './eips/index.js';
+import type { ConsensusAlgorithm, ConsensusType } from './enums.js';
+import { Chain, CustomChain, Hardfork } from './enums.js';
+import { hardforks as HARDFORK_SPECS } from './hardforks/index.js';
import type {
BootstrapNodeConfig,
@@ -41,7 +41,7 @@ import type {
GenesisBlockConfig,
GethConfigOpts,
HardforkConfig,
-} from './types';
+} from './types.js';
const { buf: crc32Uint8Array } = pkg;
diff --git a/packages/web3-eth-accounts/src/common/eips/index.ts b/packages/web3-eth-accounts/src/common/eips/index.ts
index 53f08546a81..eeb5d952e27 100644
--- a/packages/web3-eth-accounts/src/common/eips/index.ts
+++ b/packages/web3-eth-accounts/src/common/eips/index.ts
@@ -14,28 +14,28 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import e1153 from './1153';
-import e1559 from './1559';
-import e2315 from './2315';
-import e2537 from './2537';
-import e2565 from './2565';
-import e2718 from './2718';
-import e2929 from './2929';
-import e2930 from './2930';
-import e3198 from './3198';
-import e3529 from './3529';
-import e3540 from './3540';
-import e3541 from './3541';
-import e3554 from './3554';
-import e3607 from './3607';
-import e3651 from './3651';
-import e3670 from './3670';
-import e3675 from './3675';
-import e3855 from './3855';
-import e3860 from './3860';
-import e4345 from './4345';
-import e4399 from './4399';
-import e5133 from './5133';
+import e1153 from './1153.js';
+import e1559 from './1559.js';
+import e2315 from './2315.js';
+import e2537 from './2537.js';
+import e2565 from './2565.js';
+import e2718 from './2718.js';
+import e2929 from './2929.js';
+import e2930 from './2930.js';
+import e3198 from './3198.js';
+import e3529 from './3529.js';
+import e3540 from './3540.js';
+import e3541 from './3541.js';
+import e3554 from './3554.js';
+import e3607 from './3607.js';
+import e3651 from './3651.js';
+import e3670 from './3670.js';
+import e3675 from './3675.js';
+import e3855 from './3855.js';
+import e3860 from './3860.js';
+import e4345 from './4345.js';
+import e4399 from './4399.js';
+import e5133 from './5133.js';
export const EIPs: { [key: number]: any } = {
1153: e1153,
diff --git a/packages/web3-eth-accounts/src/common/hardforks/index.ts b/packages/web3-eth-accounts/src/common/hardforks/index.ts
index ad448c595ed..6f646d19836 100644
--- a/packages/web3-eth-accounts/src/common/hardforks/index.ts
+++ b/packages/web3-eth-accounts/src/common/hardforks/index.ts
@@ -14,23 +14,23 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import chainstart from './chainstart';
-import dao from './dao';
-import homestead from './homestead';
-import tangerineWhistle from './tangerineWhistle';
-import spuriousDragon from './spuriousDragon';
-import byzantium from './byzantium';
-import constantinople from './constantinople';
-import petersburg from './petersburg';
-import istanbul from './istanbul';
-import muirGlacier from './muirGlacier';
-import berlin from './berlin';
-import london from './london';
-import shanghai from './shanghai';
-import arrowGlacier from './arrowGlacier';
-import grayGlacier from './grayGlacier';
-import mergeForkIdTransition from './mergeForkIdTransition';
-import merge from './merge';
+import chainstart from './chainstart.js';
+import dao from './dao.js';
+import homestead from './homestead.js';
+import tangerineWhistle from './tangerineWhistle.js';
+import spuriousDragon from './spuriousDragon.js';
+import byzantium from './byzantium.js';
+import constantinople from './constantinople.js';
+import petersburg from './petersburg.js';
+import istanbul from './istanbul.js';
+import muirGlacier from './muirGlacier.js';
+import berlin from './berlin.js';
+import london from './london.js';
+import shanghai from './shanghai.js';
+import arrowGlacier from './arrowGlacier.js';
+import grayGlacier from './grayGlacier.js';
+import mergeForkIdTransition from './mergeForkIdTransition.js';
+import merge from './merge.js';
export const hardforks: { [key: string]: any } = {
chainstart,
diff --git a/packages/web3-eth-accounts/src/common/index.ts b/packages/web3-eth-accounts/src/common/index.ts
index 577682d164a..3602a0f8f43 100644
--- a/packages/web3-eth-accounts/src/common/index.ts
+++ b/packages/web3-eth-accounts/src/common/index.ts
@@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
// @ethereumjs/common version 3.1.1
-export * from './common';
-export * from './enums';
-export * from './types';
-export * from './utils';
+export * from './common.js';
+export * from './enums.js';
+export * from './types.js';
+export * from './utils.js';
diff --git a/packages/web3-eth-accounts/src/common/types.ts b/packages/web3-eth-accounts/src/common/types.ts
index f7b4b161107..9d5c0bbe261 100644
--- a/packages/web3-eth-accounts/src/common/types.ts
+++ b/packages/web3-eth-accounts/src/common/types.ts
@@ -14,7 +14,7 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import type { Chain, ConsensusAlgorithm, ConsensusType, Hardfork } from './enums';
+import type { Chain, ConsensusAlgorithm, ConsensusType, Hardfork } from './enums.js';
export interface ChainName {
[chainId: string]: string;
diff --git a/packages/web3-eth-accounts/src/common/utils.ts b/packages/web3-eth-accounts/src/common/utils.ts
index 844b52f4276..f243ede269d 100644
--- a/packages/web3-eth-accounts/src/common/utils.ts
+++ b/packages/web3-eth-accounts/src/common/utils.ts
@@ -16,9 +16,9 @@ along with web3.js. If not, see .
*/
import { isHexPrefixed, isHexString } from 'web3-validator';
import { bytesToHex, hexToBytes, numberToHex } from 'web3-utils';
-import { secp256k1 } from '../tx/constants';
-import { Hardfork } from './enums';
-import { ToBytesInputTypes, TypeOutput, TypeOutputReturnType } from './types';
+import { secp256k1 } from '../tx/constants.js';
+import { Hardfork } from './enums.js';
+import { ToBytesInputTypes, TypeOutput, TypeOutputReturnType } from './types.js';
type ConfigHardfork =
// eslint-disable-next-line @typescript-eslint/ban-types
diff --git a/packages/web3-eth-accounts/src/index.ts b/packages/web3-eth-accounts/src/index.ts
index 8f4a57b8575..3d128c65de4 100644
--- a/packages/web3-eth-accounts/src/index.ts
+++ b/packages/web3-eth-accounts/src/index.ts
@@ -37,9 +37,9 @@ along with web3.js. If not, see .
* ```
*/
-export * from './wallet';
-export * from './account';
-export * from './types';
-export * from './schemas';
-export * from './common';
-export * from './tx';
+export * from './wallet.js';
+export * from './account.js';
+export * from './types.js';
+export * from './schemas.js';
+export * from './common/index.js';
+export * from './tx/index.js';
diff --git a/packages/web3-eth-accounts/src/tx/address.ts b/packages/web3-eth-accounts/src/tx/address.ts
index 124680dbed6..7d6f1ace322 100644
--- a/packages/web3-eth-accounts/src/tx/address.ts
+++ b/packages/web3-eth-accounts/src/tx/address.ts
@@ -14,10 +14,10 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { keccak256 } from 'ethereum-cryptography/keccak';
+import { keccak256 } from 'ethereum-cryptography/keccak.js';
import { bytesToHex, uint8ArrayEquals } from 'web3-utils';
-import { secp256k1 } from './constants';
-import { assertIsUint8Array, zeros } from '../common/utils';
+import { secp256k1 } from './constants.js';
+import { assertIsUint8Array, zeros } from '../common/utils.js';
export class Address {
public readonly buf: Uint8Array;
diff --git a/packages/web3-eth-accounts/src/tx/baseTransaction.ts b/packages/web3-eth-accounts/src/tx/baseTransaction.ts
index e54bd897a48..c212b2b8113 100644
--- a/packages/web3-eth-accounts/src/tx/baseTransaction.ts
+++ b/packages/web3-eth-accounts/src/tx/baseTransaction.ts
@@ -17,7 +17,7 @@ along with web3.js. If not, see .
import { Numbers } from 'web3-types';
import { bytesToHex } from 'web3-utils';
-import { MAX_INTEGER, MAX_UINT64, SECP256K1_ORDER_DIV_2, secp256k1 } from './constants';
+import { MAX_INTEGER, MAX_UINT64, SECP256K1_ORDER_DIV_2, secp256k1 } from './constants.js';
import {
Chain,
Common,
@@ -25,7 +25,7 @@ import {
toUint8Array,
uint8ArrayToBigInt,
unpadUint8Array,
-} from '../common';
+} from '../common/index.js';
import type {
AccessListEIP2930TxData,
AccessListEIP2930ValuesArray,
@@ -35,10 +35,10 @@ import type {
TxData,
TxOptions,
TxValuesArray,
-} from './types';
-import { Capability, ECDSASignature } from './types';
-import { Address } from './address';
-import { checkMaxInitCodeSize } from './utils';
+} from './types.js';
+import { Capability, ECDSASignature } from './types.js';
+import { Address } from './address.js';
+import { checkMaxInitCodeSize } from './utils.js';
interface TransactionCache {
hash: Uint8Array | undefined;
diff --git a/packages/web3-eth-accounts/src/tx/eip1559Transaction.ts b/packages/web3-eth-accounts/src/tx/eip1559Transaction.ts
index 3559e86e36a..eafb889220a 100644
--- a/packages/web3-eth-accounts/src/tx/eip1559Transaction.ts
+++ b/packages/web3-eth-accounts/src/tx/eip1559Transaction.ts
@@ -14,20 +14,25 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { keccak256 } from 'ethereum-cryptography/keccak';
+import { keccak256 } from 'ethereum-cryptography/keccak.js';
import { validateNoLeadingZeroes } from 'web3-validator';
import { RLP } from '@ethereumjs/rlp';
import { bytesToHex, hexToBytes, uint8ArrayConcat, uint8ArrayEquals } from 'web3-utils';
-import { MAX_INTEGER } from './constants';
-import { BaseTransaction } from './baseTransaction';
-import { getAccessListData, getAccessListJSON, getDataFeeEIP2930, verifyAccessList } from './utils';
+import { MAX_INTEGER } from './constants.js';
+import { BaseTransaction } from './baseTransaction.js';
+import {
+ getAccessListData,
+ getAccessListJSON,
+ getDataFeeEIP2930,
+ verifyAccessList,
+} from './utils.js';
import {
bigIntToHex,
toUint8Array,
ecrecover,
uint8ArrayToBigInt,
bigIntToUnpaddedUint8Array,
-} from '../common/utils';
+} from '../common/utils.js';
import type {
AccessList,
AccessListUint8Array,
@@ -35,8 +40,8 @@ import type {
FeeMarketEIP1559ValuesArray,
JsonTx,
TxOptions,
-} from './types';
-import type { Common } from '../common';
+} from './types.js';
+import type { Common } from '../common/common.js';
const TRANSACTION_TYPE = 2;
const TRANSACTION_TYPE_UINT8ARRAY = hexToBytes(TRANSACTION_TYPE.toString(16).padStart(2, '0'));
diff --git a/packages/web3-eth-accounts/src/tx/eip2930Transaction.ts b/packages/web3-eth-accounts/src/tx/eip2930Transaction.ts
index 937ab9fbda8..7152fbee58d 100644
--- a/packages/web3-eth-accounts/src/tx/eip2930Transaction.ts
+++ b/packages/web3-eth-accounts/src/tx/eip2930Transaction.ts
@@ -14,20 +14,25 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { keccak256 } from 'ethereum-cryptography/keccak';
+import { keccak256 } from 'ethereum-cryptography/keccak.js';
import { validateNoLeadingZeroes } from 'web3-validator';
import { RLP } from '@ethereumjs/rlp';
import { bytesToHex, hexToBytes, uint8ArrayConcat, uint8ArrayEquals } from 'web3-utils';
-import { MAX_INTEGER } from './constants';
-import { getAccessListData, verifyAccessList, getAccessListJSON, getDataFeeEIP2930 } from './utils';
+import { MAX_INTEGER } from './constants.js';
+import {
+ getAccessListData,
+ verifyAccessList,
+ getAccessListJSON,
+ getDataFeeEIP2930,
+} from './utils.js';
import {
bigIntToHex,
toUint8Array,
ecrecover,
uint8ArrayToBigInt,
bigIntToUnpaddedUint8Array,
-} from '../common/utils';
-import { BaseTransaction } from './baseTransaction';
+} from '../common/utils.js';
+import { BaseTransaction } from './baseTransaction.js';
import type {
AccessList,
AccessListUint8Array,
@@ -35,8 +40,8 @@ import type {
AccessListEIP2930ValuesArray,
JsonTx,
TxOptions,
-} from './types';
-import type { Common } from '../common';
+} from './types.js';
+import type { Common } from '../common/common.js';
const TRANSACTION_TYPE = 1;
const TRANSACTION_TYPE_UINT8ARRAY = hexToBytes(TRANSACTION_TYPE.toString(16).padStart(2, '0'));
diff --git a/packages/web3-eth-accounts/src/tx/index.ts b/packages/web3-eth-accounts/src/tx/index.ts
index 0b5d3ab5628..f02f90cfdbc 100644
--- a/packages/web3-eth-accounts/src/tx/index.ts
+++ b/packages/web3-eth-accounts/src/tx/index.ts
@@ -16,8 +16,8 @@ along with web3.js. If not, see .
*/
// @ethereumjs/tx version 4.1.1
-export { FeeMarketEIP1559Transaction } from './eip1559Transaction';
-export { AccessListEIP2930Transaction } from './eip2930Transaction';
-export { Transaction } from './legacyTransaction';
-export { TransactionFactory } from './transactionFactory';
-export * from './types';
+export { FeeMarketEIP1559Transaction } from './eip1559Transaction.js';
+export { AccessListEIP2930Transaction } from './eip2930Transaction.js';
+export { Transaction } from './legacyTransaction.js';
+export { TransactionFactory } from './transactionFactory.js';
+export * from './types.js';
diff --git a/packages/web3-eth-accounts/src/tx/legacyTransaction.ts b/packages/web3-eth-accounts/src/tx/legacyTransaction.ts
index 27cca273cb5..a7b05b7e4f3 100644
--- a/packages/web3-eth-accounts/src/tx/legacyTransaction.ts
+++ b/packages/web3-eth-accounts/src/tx/legacyTransaction.ts
@@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
import { RLP } from '@ethereumjs/rlp';
-import { keccak256 } from 'ethereum-cryptography/keccak';
+import { keccak256 } from 'ethereum-cryptography/keccak.js';
import { bytesToHex } from 'web3-utils';
import { validateNoLeadingZeroes } from 'web3-validator';
import {
@@ -25,14 +25,14 @@ import {
toUint8Array,
uint8ArrayToBigInt,
unpadUint8Array,
-} from '../common/utils';
-import { MAX_INTEGER } from './constants';
+} from '../common/utils.js';
+import { MAX_INTEGER } from './constants.js';
-import { BaseTransaction } from './baseTransaction';
+import { BaseTransaction } from './baseTransaction.js';
-import type { Common } from '../common';
-import type { JsonTx, TxData, TxOptions, TxValuesArray } from './types';
-import { Capability } from './types';
+import type { Common } from '../common/common.js';
+import type { JsonTx, TxData, TxOptions, TxValuesArray } from './types.js';
+import { Capability } from './types.js';
const TRANSACTION_TYPE = 0;
diff --git a/packages/web3-eth-accounts/src/tx/transactionFactory.ts b/packages/web3-eth-accounts/src/tx/transactionFactory.ts
index f6ff4d2bff7..dd74bee4eee 100644
--- a/packages/web3-eth-accounts/src/tx/transactionFactory.ts
+++ b/packages/web3-eth-accounts/src/tx/transactionFactory.ts
@@ -14,13 +14,18 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { toUint8Array, uint8ArrayToBigInt } from '../common/utils';
-import { FeeMarketEIP1559Transaction } from './eip1559Transaction';
-import { AccessListEIP2930Transaction } from './eip2930Transaction';
-import { Transaction } from './legacyTransaction';
-import type { TypedTransaction } from '../types';
+import { toUint8Array, uint8ArrayToBigInt } from '../common/utils.js';
+import { FeeMarketEIP1559Transaction } from './eip1559Transaction.js';
+import { AccessListEIP2930Transaction } from './eip2930Transaction.js';
+import { Transaction } from './legacyTransaction.js';
+import type { TypedTransaction } from '../types.js';
-import type { AccessListEIP2930TxData, FeeMarketEIP1559TxData, TxData, TxOptions } from './types';
+import type {
+ AccessListEIP2930TxData,
+ FeeMarketEIP1559TxData,
+ TxData,
+ TxOptions,
+} from './types.js';
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
export class TransactionFactory {
diff --git a/packages/web3-eth-accounts/src/tx/types.ts b/packages/web3-eth-accounts/src/tx/types.ts
index 973d39d1a19..f62cea29f02 100644
--- a/packages/web3-eth-accounts/src/tx/types.ts
+++ b/packages/web3-eth-accounts/src/tx/types.ts
@@ -16,9 +16,9 @@ along with web3.js. If not, see .
*/
import type { HexString, Numbers } from 'web3-types';
-import type { Common } from '../common/common';
+import type { Common } from '../common/common.js';
import type { Uint8ArrayLike, PrefixedHexString } from '../common/types';
-import { Address } from './address';
+import { Address } from './address.js';
/**
* Can be used in conjunction with {@link Transaction.supports}
diff --git a/packages/web3-eth-accounts/src/tx/utils.ts b/packages/web3-eth-accounts/src/tx/utils.ts
index 54d0307fa22..3b2fabbe4ed 100644
--- a/packages/web3-eth-accounts/src/tx/utils.ts
+++ b/packages/web3-eth-accounts/src/tx/utils.ts
@@ -16,11 +16,11 @@ along with web3.js. If not, see .
*/
import { HexString } from 'web3-types';
import { bytesToHex } from 'web3-utils';
-import { setLengthLeft, toUint8Array } from '../common/utils';
-import type { AccessList, AccessListUint8Array, AccessListItem } from './types';
-import { isAccessList } from './types';
+import { setLengthLeft, toUint8Array } from '../common/utils.js';
+import type { AccessList, AccessListUint8Array, AccessListItem } from './types.js';
+import { isAccessList } from './types.js';
-import type { Common } from '../common/common';
+import type { Common } from '../common/common.js';
export const checkMaxInitCodeSize = (common: Common, length: number) => {
const maxInitCodeSize = common.param('vm', 'maxInitCodeSize');
diff --git a/packages/web3-eth-accounts/src/types.ts b/packages/web3-eth-accounts/src/types.ts
index 396ccfa9440..ed45ad94ffb 100644
--- a/packages/web3-eth-accounts/src/types.ts
+++ b/packages/web3-eth-accounts/src/types.ts
@@ -16,7 +16,7 @@ along with web3.js. If not, see .
*/
import { Web3BaseWalletAccount, HexString } from 'web3-types';
-import { FeeMarketEIP1559TxData, AccessListEIP2930TxData, TxData } from './tx/types';
+import { FeeMarketEIP1559TxData, AccessListEIP2930TxData, TxData } from './tx/types.js';
import { AccessListEIP2930Transaction, FeeMarketEIP1559Transaction, Transaction } from './tx';
export type SignatureObject = {
diff --git a/packages/web3-eth-accounts/src/wallet.ts b/packages/web3-eth-accounts/src/wallet.ts
index 9378bb673fc..8d50efd557a 100644
--- a/packages/web3-eth-accounts/src/wallet.ts
+++ b/packages/web3-eth-accounts/src/wallet.ts
@@ -17,7 +17,7 @@ along with web3.js. If not, see .
import { Web3BaseWallet, Web3BaseWalletAccount, KeyStore } from 'web3-types';
import { isNullish } from 'web3-validator';
-import { WebStorage } from './types';
+import { WebStorage } from './types.js';
type BrowserError = { code: number; name: string };
diff --git a/packages/web3-eth-contract/src/contract.ts b/packages/web3-eth-contract/src/contract.ts
index f5ad92854ef..7268e1b1a87 100644
--- a/packages/web3-eth-contract/src/contract.ts
+++ b/packages/web3-eth-contract/src/contract.ts
@@ -79,9 +79,9 @@ import {
ValidationSchemaInput,
Web3ValidatorError,
} from 'web3-validator';
-import { ALL_EVENTS_ABI } from './constants';
-import { decodeEventABI, decodeMethodReturn, encodeEventABI, encodeMethodABI } from './encoding';
-import { LogsSubscription } from './log_subscription';
+import { ALL_EVENTS_ABI } from './constants.js';
+import { decodeEventABI, decodeMethodReturn, encodeEventABI, encodeMethodABI } from './encoding.js';
+import { LogsSubscription } from './log_subscription.js';
import {
ContractAbiWithSignature,
ContractEventOptions,
@@ -92,7 +92,7 @@ import {
PayableMethodObject,
PayableTxOptions,
Web3ContractContext,
-} from './types';
+} from './types.js';
import {
getCreateAccessListParams,
getEstimateGasParams,
@@ -100,7 +100,7 @@ import {
getSendTxParams,
isContractInitOptions,
isWeb3ContractContext,
-} from './utils';
+} from './utils.js';
type ContractBoundMethod<
Abi extends AbiFunctionFragment,
diff --git a/packages/web3-eth-contract/src/encoding.ts b/packages/web3-eth-contract/src/encoding.ts
index e177e7574db..082a86c33eb 100644
--- a/packages/web3-eth-contract/src/encoding.ts
+++ b/packages/web3-eth-contract/src/encoding.ts
@@ -47,7 +47,7 @@ import { blockSchema, logSchema } from 'web3-eth';
import { Web3ContractError } from 'web3-errors';
// eslint-disable-next-line import/no-cycle
-import { ContractOptions, ContractAbiWithSignature, EventLog } from './types';
+import { ContractOptions, ContractAbiWithSignature, EventLog } from './types.js';
type Writeable = { -readonly [P in keyof T]: T[P] };
export const encodeEventABI = (
diff --git a/packages/web3-eth-contract/src/index.ts b/packages/web3-eth-contract/src/index.ts
index fe5e0be115a..22937531980 100644
--- a/packages/web3-eth-contract/src/index.ts
+++ b/packages/web3-eth-contract/src/index.ts
@@ -40,12 +40,12 @@ along with web3.js. If not, see .
/**
* This comment _supports3_ [Markdown](https://marked.js.org/)
*/
-import { Contract } from './contract';
+import { Contract } from './contract.js';
-export * from './encoding';
+export * from './encoding.js';
-export * from './contract';
-export * from './log_subscription';
-export * from './types';
+export * from './contract.js';
+export * from './log_subscription.js';
+export * from './types.js';
export default Contract;
diff --git a/packages/web3-eth-contract/src/log_subscription.ts b/packages/web3-eth-contract/src/log_subscription.ts
index f524854968d..3ae67b92cd2 100644
--- a/packages/web3-eth-contract/src/log_subscription.ts
+++ b/packages/web3-eth-contract/src/log_subscription.ts
@@ -18,9 +18,9 @@ along with web3.js. If not, see .
import { AbiEventFragment, LogsInput, HexString, Topic, DataFormat } from 'web3-types';
import { Web3RequestManager, Web3Subscription } from 'web3-core';
// eslint-disable-next-line import/no-cycle
-import { decodeEventABI } from './encoding';
+import { decodeEventABI } from './encoding.js';
// eslint-disable-next-line import/no-cycle
-import { EventLog, ContractAbiWithSignature } from './types';
+import { EventLog, ContractAbiWithSignature } from './types.js';
/**
* LogSubscription to be used to subscribe to events logs.
diff --git a/packages/web3-eth-contract/src/types.ts b/packages/web3-eth-contract/src/types.ts
index 43cc490efb7..6cbfdab32c0 100644
--- a/packages/web3-eth-contract/src/types.ts
+++ b/packages/web3-eth-contract/src/types.ts
@@ -37,7 +37,7 @@ import {
Uint,
} from 'web3-types';
// eslint-disable-next-line import/no-cycle
-import { LogsSubscription } from './log_subscription';
+import { LogsSubscription } from './log_subscription.js';
export type NonPayableTxOptions = NonPayableCallOptions;
export type PayableTxOptions = PayableCallOptions;
diff --git a/packages/web3-eth-contract/src/utils.ts b/packages/web3-eth-contract/src/utils.ts
index bff0c1772ee..3f46f87d075 100644
--- a/packages/web3-eth-contract/src/utils.ts
+++ b/packages/web3-eth-contract/src/utils.ts
@@ -28,8 +28,8 @@ import {
ContractInitOptions,
} from 'web3-types';
import { isNullish, mergeDeep, toHex } from 'web3-utils';
-import { encodeMethodABI } from './encoding';
-import { ContractOptions, Web3ContractContext } from './types';
+import { encodeMethodABI } from './encoding.js';
+import { ContractOptions, Web3ContractContext } from './types.js';
export const getSendTxParams = ({
abi,
diff --git a/packages/web3-eth-contract/test/config/jest.config.js b/packages/web3-eth-contract/test/config/jest.config.js
index eaa5e9049da..c8c21e06e6a 100644
--- a/packages/web3-eth-contract/test/config/jest.config.js
+++ b/packages/web3-eth-contract/test/config/jest.config.js
@@ -10,6 +10,9 @@ module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
verbose: false,
collectCoverage: false,
coverageReporters: ['json'],
diff --git a/packages/web3-eth-ens/src/ens.ts b/packages/web3-eth-ens/src/ens.ts
index 2b594735ba1..26c642efc13 100644
--- a/packages/web3-eth-ens/src/ens.ts
+++ b/packages/web3-eth-ens/src/ens.ts
@@ -27,10 +27,10 @@ import {
SupportedProviders,
Web3NetAPI,
} from 'web3-types';
-import { PublicResolverAbi } from './abi/ens/PublicResolver';
-import { networkIds, registryAddresses } from './config';
-import { Registry } from './registry';
-import { Resolver } from './resolver';
+import { PublicResolverAbi } from './abi/ens/PublicResolver.js';
+import { networkIds, registryAddresses } from './config.js';
+import { Registry } from './registry.js';
+import { Resolver } from './resolver.js';
/**
* This class is designed to interact with the ENS system on the Ethereum blockchain.
diff --git a/packages/web3-eth-ens/src/index.ts b/packages/web3-eth-ens/src/index.ts
index 3726bef9d09..b57e6714f20 100644
--- a/packages/web3-eth-ens/src/index.ts
+++ b/packages/web3-eth-ens/src/index.ts
@@ -28,7 +28,7 @@ along with web3.js. If not, see .
/**
* This comment _supports3_ [Markdown](https://marked.js.org/)
*/
-import { registryAddresses } from './config';
+import { registryAddresses } from './config.js';
-export * from './ens';
+export * from './ens.js';
export { registryAddresses };
diff --git a/packages/web3-eth-ens/src/registry.ts b/packages/web3-eth-ens/src/registry.ts
index 7145e01d5f4..1c41435e54b 100644
--- a/packages/web3-eth-ens/src/registry.ts
+++ b/packages/web3-eth-ens/src/registry.ts
@@ -18,10 +18,10 @@ along with web3.js. If not, see .
import { Web3ContextObject } from 'web3-core';
import { Contract } from 'web3-eth-contract';
import { Address } from 'web3-types';
-import { ENSRegistryAbi } from './abi/ens/ENSRegistry';
-import { PublicResolverAbi } from './abi/ens/PublicResolver';
-import { registryAddresses } from './config';
-import { namehash } from './utils';
+import { ENSRegistryAbi } from './abi/ens/ENSRegistry.js';
+import { PublicResolverAbi } from './abi/ens/PublicResolver.js';
+import { registryAddresses } from './config.js';
+import { namehash } from './utils.js';
export class Registry {
private readonly contract: Contract;
diff --git a/packages/web3-eth-ens/src/resolver.ts b/packages/web3-eth-ens/src/resolver.ts
index a0463cfc16c..3540455f3d5 100644
--- a/packages/web3-eth-ens/src/resolver.ts
+++ b/packages/web3-eth-ens/src/resolver.ts
@@ -19,10 +19,10 @@ import { ResolverMethodMissingError } from 'web3-errors';
import { Contract } from 'web3-eth-contract';
import { isNullish, sha3 } from 'web3-utils';
import { isHexStrict } from 'web3-validator';
-import { PublicResolverAbi } from './abi/ens/PublicResolver';
-import { interfaceIds, methodsInInterface } from './config';
-import { Registry } from './registry';
-import { namehash } from './utils';
+import { PublicResolverAbi } from './abi/ens/PublicResolver.js';
+import { interfaceIds, methodsInInterface } from './config.js';
+import { Registry } from './registry.js';
+import { namehash } from './utils.js';
// Default public resolver
// https://github.com/ensdomains/resolvers/blob/master/contracts/PublicResolver.sol
diff --git a/packages/web3-eth-iban/src/iban.ts b/packages/web3-eth-iban/src/iban.ts
index 86c90013878..598b4b62dd6 100644
--- a/packages/web3-eth-iban/src/iban.ts
+++ b/packages/web3-eth-iban/src/iban.ts
@@ -19,7 +19,7 @@ import { HexString } from 'web3-types';
import { toChecksumAddress, leftPad, hexToNumber } from 'web3-utils';
import { isAddress } from 'web3-validator';
import { InvalidAddressError } from 'web3-errors';
-import { IbanOptions } from './types';
+import { IbanOptions } from './types.js';
/**
* Converts Ethereum addresses to IBAN or BBAN addresses and vice versa.
diff --git a/packages/web3-eth-iban/src/index.ts b/packages/web3-eth-iban/src/index.ts
index 4f3bba15159..bda252d4eb0 100644
--- a/packages/web3-eth-iban/src/index.ts
+++ b/packages/web3-eth-iban/src/index.ts
@@ -15,9 +15,9 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { Iban } from './iban';
+import { Iban } from './iban.js';
-export * from './iban';
-export * from './types';
+export * from './iban.js';
+export * from './types.js';
export default Iban;
diff --git a/packages/web3-eth-personal/src/index.ts b/packages/web3-eth-personal/src/index.ts
index 479b5678fd2..62576d7bae1 100644
--- a/packages/web3-eth-personal/src/index.ts
+++ b/packages/web3-eth-personal/src/index.ts
@@ -33,8 +33,8 @@ along with web3.js. If not, see .
/**
* This comment _supports3_ [Markdown](https://marked.js.org/)
*/
-import { Personal } from './personal';
+import { Personal } from './personal.js';
-export * from './personal';
+export * from './personal.js';
export default Personal;
diff --git a/packages/web3-eth-personal/src/personal.ts b/packages/web3-eth-personal/src/personal.ts
index 62b3bd1074c..f89f6fa1d0c 100644
--- a/packages/web3-eth-personal/src/personal.ts
+++ b/packages/web3-eth-personal/src/personal.ts
@@ -18,7 +18,7 @@ along with web3.js. If not, see .
import { Web3Context } from 'web3-core';
import { Address, EthPersonalAPI, HexString, Transaction } from 'web3-types';
-import * as rpcWrappers from './rpc_method_wrappers';
+import * as rpcWrappers from './rpc_method_wrappers.js';
export class Personal extends Web3Context {
/**
diff --git a/packages/web3-eth-personal/test/config/jest.config.js b/packages/web3-eth-personal/test/config/jest.config.js
index eaa5e9049da..c8c21e06e6a 100644
--- a/packages/web3-eth-personal/test/config/jest.config.js
+++ b/packages/web3-eth-personal/test/config/jest.config.js
@@ -10,6 +10,9 @@ module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
verbose: false,
collectCoverage: false,
coverageReporters: ['json'],
diff --git a/packages/web3-eth/src/index.ts b/packages/web3-eth/src/index.ts
index a04620d500a..d5160727be0 100644
--- a/packages/web3-eth/src/index.ts
+++ b/packages/web3-eth/src/index.ts
@@ -50,17 +50,17 @@ along with web3.js. If not, see .
*/
import 'setimmediate';
-import { Web3Eth } from './web3_eth';
+import { Web3Eth } from './web3_eth.js';
-export * from './web3_eth';
-export * from './schemas';
-export * from './types';
-export * from './validation';
-export * from './rpc_method_wrappers';
-export * from './utils/format_transaction';
-export * from './utils/prepare_transaction_for_signing';
-export * from './web3_subscriptions';
-export { detectTransactionType } from './utils/detect_transaction_type';
-export { transactionBuilder } from './utils/transaction_builder';
+export * from './web3_eth.js';
+export * from './schemas.js';
+export * from './types.js';
+export * from './validation.js';
+export * from './rpc_method_wrappers.js';
+export * from './utils/format_transaction.js';
+export * from './utils/prepare_transaction_for_signing.js';
+export * from './web3_subscriptions.js';
+export { detectTransactionType } from './utils/detect_transaction_type.js';
+export { transactionBuilder } from './utils/transaction_builder.js';
export default Web3Eth;
diff --git a/packages/web3-eth/src/rpc_method_wrappers.ts b/packages/web3-eth/src/rpc_method_wrappers.ts
index 0e0f8deca11..0b5074a4ab4 100644
--- a/packages/web3-eth/src/rpc_method_wrappers.ts
+++ b/packages/web3-eth/src/rpc_method_wrappers.ts
@@ -62,7 +62,7 @@ import {
} from 'web3-errors';
import { ethRpcMethods } from 'web3-rpc-methods';
-import { decodeSignedTransaction } from './utils/decode_signed_transaction';
+import { decodeSignedTransaction } from './utils/decode_signed_transaction.js';
import {
accountSchema,
blockSchema,
@@ -72,28 +72,28 @@ import {
transactionInfoSchema,
accessListResultSchema,
SignatureObjectSchema,
-} from './schemas';
+} from './schemas.js';
import {
SendSignedTransactionEvents,
SendSignedTransactionOptions,
SendTransactionEvents,
SendTransactionOptions,
-} from './types';
+} from './types.js';
// eslint-disable-next-line import/no-cycle
-import { getTransactionFromOrToAttr } from './utils/transaction_builder';
-import { formatTransaction } from './utils/format_transaction';
+import { getTransactionFromOrToAttr } from './utils/transaction_builder.js';
+import { formatTransaction } from './utils/format_transaction.js';
// eslint-disable-next-line import/no-cycle
-import { getTransactionGasPricing } from './utils/get_transaction_gas_pricing';
+import { getTransactionGasPricing } from './utils/get_transaction_gas_pricing.js';
// eslint-disable-next-line import/no-cycle
-import { trySendTransaction } from './utils/try_send_transaction';
+import { trySendTransaction } from './utils/try_send_transaction.js';
// eslint-disable-next-line import/no-cycle
-import { waitForTransactionReceipt } from './utils/wait_for_transaction_receipt';
-import { watchTransactionForConfirmations } from './utils/watch_transaction_for_confirmations';
-import { NUMBER_DATA_FORMAT } from './constants';
+import { waitForTransactionReceipt } from './utils/wait_for_transaction_receipt.js';
+import { watchTransactionForConfirmations } from './utils/watch_transaction_for_confirmations.js';
+import { NUMBER_DATA_FORMAT } from './constants.js';
// eslint-disable-next-line import/no-cycle
-import { getTransactionError } from './utils/get_transaction_error';
+import { getTransactionError } from './utils/get_transaction_error.js';
// eslint-disable-next-line import/no-cycle
-import { getRevertReason } from './utils/get_revert_reason';
+import { getRevertReason } from './utils/get_revert_reason.js';
/**
* View additional documentations here: {@link Web3Eth.getProtocolVersion}
diff --git a/packages/web3-eth/src/utils/decode_signed_transaction.ts b/packages/web3-eth/src/utils/decode_signed_transaction.ts
index 8621105218b..b7b9c9f86e3 100644
--- a/packages/web3-eth/src/utils/decode_signed_transaction.ts
+++ b/packages/web3-eth/src/utils/decode_signed_transaction.ts
@@ -22,8 +22,8 @@ import {
} from 'web3-types';
import { bytesToHex, format, hexToBytes, keccak256 } from 'web3-utils';
import { TransactionFactory } from 'web3-eth-accounts';
-import { detectRawTransactionType } from './detect_transaction_type';
-import { formatTransaction } from './format_transaction';
+import { detectRawTransactionType } from './detect_transaction_type.js';
+import { formatTransaction } from './format_transaction.js';
/**
* Decodes an [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/#top) encoded transaction.
diff --git a/packages/web3-eth/src/utils/detect_transaction_type.ts b/packages/web3-eth/src/utils/detect_transaction_type.ts
index b6db659b587..01aad19ab6c 100644
--- a/packages/web3-eth/src/utils/detect_transaction_type.ts
+++ b/packages/web3-eth/src/utils/detect_transaction_type.ts
@@ -21,7 +21,7 @@ import { EthExecutionAPI, HardforksOrdered, Transaction, ETH_DATA_FORMAT } from
import { Web3ValidatorError, isNullish, validator } from 'web3-validator';
import { InvalidPropertiesForTransactionTypeError } from 'web3-errors';
-import { InternalTransaction } from '../types';
+import { InternalTransaction } from '../types.js';
// undefined is treated as null for JSON schema validator
const transactionType0x0Schema = {
diff --git a/packages/web3-eth/src/utils/format_transaction.ts b/packages/web3-eth/src/utils/format_transaction.ts
index ac97f45b3a0..aa3d4a063cb 100644
--- a/packages/web3-eth/src/utils/format_transaction.ts
+++ b/packages/web3-eth/src/utils/format_transaction.ts
@@ -19,7 +19,7 @@ import { Transaction, DataFormat, DEFAULT_RETURN_FORMAT, FormatType } from 'web3
import { isNullish, ValidationSchemaInput } from 'web3-validator';
import { TransactionDataAndInputError } from 'web3-errors';
import { mergeDeep, bytesToHex, format } from 'web3-utils';
-import { transactionSchema } from '../schemas';
+import { transactionSchema } from '../schemas.js';
export function formatTransaction<
ReturnFormat extends DataFormat = typeof DEFAULT_RETURN_FORMAT,
diff --git a/packages/web3-eth/src/utils/get_revert_reason.ts b/packages/web3-eth/src/utils/get_revert_reason.ts
index fbbe60a132e..4b4b7d596a9 100644
--- a/packages/web3-eth/src/utils/get_revert_reason.ts
+++ b/packages/web3-eth/src/utils/get_revert_reason.ts
@@ -28,8 +28,8 @@ import {
} from 'web3-types';
// eslint-disable-next-line import/no-cycle
-import { call } from '../rpc_method_wrappers';
-import { RevertReason, RevertReasonWithCustomError } from '../types';
+import { call } from '../rpc_method_wrappers.js';
+import { RevertReason, RevertReasonWithCustomError } from '../types.js';
export const parseTransactionError = (error: unknown, contractAbi?: ContractAbi) => {
if (
diff --git a/packages/web3-eth/src/utils/get_transaction_error.ts b/packages/web3-eth/src/utils/get_transaction_error.ts
index a416fa9b1a5..4cb0f520937 100644
--- a/packages/web3-eth/src/utils/get_transaction_error.ts
+++ b/packages/web3-eth/src/utils/get_transaction_error.ts
@@ -28,9 +28,9 @@ import {
TransactionCall,
TransactionReceipt,
} from 'web3-types';
-import { RevertReason, RevertReasonWithCustomError } from '../types';
+import { RevertReason, RevertReasonWithCustomError } from '../types.js';
// eslint-disable-next-line import/no-cycle
-import { getRevertReason, parseTransactionError } from './get_revert_reason';
+import { getRevertReason, parseTransactionError } from './get_revert_reason.js';
export async function getTransactionError(
web3Context: Web3Context,
diff --git a/packages/web3-eth/src/utils/get_transaction_gas_pricing.ts b/packages/web3-eth/src/utils/get_transaction_gas_pricing.ts
index a3aa70f0154..035d217065d 100644
--- a/packages/web3-eth/src/utils/get_transaction_gas_pricing.ts
+++ b/packages/web3-eth/src/utils/get_transaction_gas_pricing.ts
@@ -28,10 +28,10 @@ import { isNullish } from 'web3-validator';
import { Eip1559NotSupportedError, UnsupportedTransactionTypeError } from 'web3-errors';
import { format } from 'web3-utils';
// eslint-disable-next-line import/no-cycle
-import { getBlock, getGasPrice } from '../rpc_method_wrappers';
-import { InternalTransaction } from '../types';
+import { getBlock, getGasPrice } from '../rpc_method_wrappers.js';
+import { InternalTransaction } from '../types.js';
// eslint-disable-next-line import/no-cycle
-import { getTransactionType } from './transaction_builder';
+import { getTransactionType } from './transaction_builder.js';
async function getEip1559GasPricing(
transaction: FormatType,
diff --git a/packages/web3-eth/src/utils/index.ts b/packages/web3-eth/src/utils/index.ts
index 590a7892d0a..1251c4a6cc9 100644
--- a/packages/web3-eth/src/utils/index.ts
+++ b/packages/web3-eth/src/utils/index.ts
@@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-export * from './detect_transaction_type';
-export * from './format_transaction';
-export * from './prepare_transaction_for_signing';
-export * from './transaction_builder';
+export * from './detect_transaction_type.js';
+export * from './format_transaction.js';
+export * from './prepare_transaction_for_signing.js';
+export * from './transaction_builder.js';
diff --git a/packages/web3-eth/src/utils/prepare_transaction_for_signing.ts b/packages/web3-eth/src/utils/prepare_transaction_for_signing.ts
index 35d4bb2f90f..e69705430f5 100644
--- a/packages/web3-eth/src/utils/prepare_transaction_for_signing.ts
+++ b/packages/web3-eth/src/utils/prepare_transaction_for_signing.ts
@@ -30,9 +30,9 @@ import { Web3Context } from 'web3-core';
import { toNumber } from 'web3-utils';
import { TransactionFactory, TxOptions, Common } from 'web3-eth-accounts';
import { isNullish } from 'web3-validator';
-import { validateTransactionForSigning } from '../validation';
-import { formatTransaction } from './format_transaction';
-import { transactionBuilder } from './transaction_builder';
+import { validateTransactionForSigning } from '../validation.js';
+import { formatTransaction } from './format_transaction.js';
+import { transactionBuilder } from './transaction_builder.js';
const getEthereumjsTxDataFromTransaction = (
transaction: FormatType,
diff --git a/packages/web3-eth/src/utils/reject_if_block_timeout.ts b/packages/web3-eth/src/utils/reject_if_block_timeout.ts
index 93078f3295e..3f7faa7e0f1 100644
--- a/packages/web3-eth/src/utils/reject_if_block_timeout.ts
+++ b/packages/web3-eth/src/utils/reject_if_block_timeout.ts
@@ -19,10 +19,10 @@ import { Web3Context } from 'web3-core';
import { rejectIfConditionAtInterval } from 'web3-utils';
import { TransactionBlockTimeoutError } from 'web3-errors';
-import { NUMBER_DATA_FORMAT } from '../constants';
+import { NUMBER_DATA_FORMAT } from '../constants.js';
// eslint-disable-next-line import/no-cycle
-import { getBlockNumber } from '../rpc_method_wrappers';
-import { NewHeadsSubscription } from '../web3_subscriptions';
+import { getBlockNumber } from '../rpc_method_wrappers.js';
+import { NewHeadsSubscription } from '../web3_subscriptions.js';
export interface ResourceCleaner {
clean: () => void;
diff --git a/packages/web3-eth/src/utils/transaction_builder.ts b/packages/web3-eth/src/utils/transaction_builder.ts
index f1b0dba10f0..3901d3aa7c7 100644
--- a/packages/web3-eth/src/utils/transaction_builder.ts
+++ b/packages/web3-eth/src/utils/transaction_builder.ts
@@ -45,14 +45,14 @@ import {
UnableToPopulateNonceError,
} from 'web3-errors';
import { bytesToHex, format } from 'web3-utils';
-import { NUMBER_DATA_FORMAT } from '../constants';
+import { NUMBER_DATA_FORMAT } from '../constants.js';
// eslint-disable-next-line import/no-cycle
-import { getChainId, getTransactionCount } from '../rpc_method_wrappers';
-import { detectTransactionType } from './detect_transaction_type';
-import { transactionSchema } from '../schemas';
-import { InternalTransaction } from '../types';
+import { getChainId, getTransactionCount } from '../rpc_method_wrappers.js';
+import { detectTransactionType } from './detect_transaction_type.js';
+import { transactionSchema } from '../schemas.js';
+import { InternalTransaction } from '../types.js';
// eslint-disable-next-line import/no-cycle
-import { getTransactionGasPricing } from './get_transaction_gas_pricing';
+import { getTransactionGasPricing } from './get_transaction_gas_pricing.js';
export const getTransactionFromOrToAttr = (
attr: 'from' | 'to',
diff --git a/packages/web3-eth/src/utils/try_send_transaction.ts b/packages/web3-eth/src/utils/try_send_transaction.ts
index abd86b81360..b3a677c6270 100644
--- a/packages/web3-eth/src/utils/try_send_transaction.ts
+++ b/packages/web3-eth/src/utils/try_send_transaction.ts
@@ -20,7 +20,7 @@ import { AsyncFunction, rejectIfTimeout } from 'web3-utils';
import { TransactionSendTimeoutError } from 'web3-errors';
// eslint-disable-next-line import/no-cycle
-import { rejectIfBlockTimeout } from './reject_if_block_timeout';
+import { rejectIfBlockTimeout } from './reject_if_block_timeout.js';
/**
* An internal function to send a transaction or throws if sending did not finish during the timeout during the blocks-timeout.
diff --git a/packages/web3-eth/src/utils/wait_for_transaction_receipt.ts b/packages/web3-eth/src/utils/wait_for_transaction_receipt.ts
index 1f66210059c..1809654bc1a 100644
--- a/packages/web3-eth/src/utils/wait_for_transaction_receipt.ts
+++ b/packages/web3-eth/src/utils/wait_for_transaction_receipt.ts
@@ -22,9 +22,9 @@ import { EthExecutionAPI, Bytes, TransactionReceipt, DataFormat } from 'web3-typ
// eslint-disable-next-line import/no-cycle
import { pollTillDefined, rejectIfTimeout } from 'web3-utils';
// eslint-disable-next-line import/no-cycle
-import { rejectIfBlockTimeout } from './reject_if_block_timeout';
+import { rejectIfBlockTimeout } from './reject_if_block_timeout.js';
// eslint-disable-next-line import/no-cycle
-import { getTransactionReceipt } from '../rpc_method_wrappers';
+import { getTransactionReceipt } from '../rpc_method_wrappers.js';
export async function waitForTransactionReceipt(
web3Context: Web3Context,
diff --git a/packages/web3-eth/src/utils/watch_transaction_by_pooling.ts b/packages/web3-eth/src/utils/watch_transaction_by_pooling.ts
index 1e99b955491..6be3c572742 100644
--- a/packages/web3-eth/src/utils/watch_transaction_by_pooling.ts
+++ b/packages/web3-eth/src/utils/watch_transaction_by_pooling.ts
@@ -20,8 +20,8 @@ import { format, numberToHex } from 'web3-utils';
import { ethRpcMethods } from 'web3-rpc-methods';
import { DataFormat } from 'web3-types';
-import { SendSignedTransactionEvents, SendTransactionEvents } from '../types';
-import { transactionReceiptSchema } from '../schemas';
+import { SendSignedTransactionEvents, SendTransactionEvents } from '../types.js';
+import { transactionReceiptSchema } from '../schemas.js';
export type Web3PromiEventEventTypeBase =
| SendTransactionEvents
diff --git a/packages/web3-eth/src/utils/watch_transaction_by_subscription.ts b/packages/web3-eth/src/utils/watch_transaction_by_subscription.ts
index f5801294c92..8cdaa8fc214 100644
--- a/packages/web3-eth/src/utils/watch_transaction_by_subscription.ts
+++ b/packages/web3-eth/src/utils/watch_transaction_by_subscription.ts
@@ -18,9 +18,9 @@ import { Bytes, Numbers, BlockHeaderOutput, TransactionReceipt } from 'web3-type
import { format } from 'web3-utils';
import { DataFormat } from 'web3-types';
-import { NewHeadsSubscription } from '../web3_subscriptions';
-import { transactionReceiptSchema } from '../schemas';
-import { WaitProps, watchTransactionByPolling } from './watch_transaction_by_pooling';
+import { NewHeadsSubscription } from '../web3_subscriptions.js';
+import { transactionReceiptSchema } from '../schemas.js';
+import { WaitProps, watchTransactionByPolling } from './watch_transaction_by_pooling.js';
/**
* This function watches a Transaction by subscribing to new heads.
diff --git a/packages/web3-eth/src/utils/watch_transaction_for_confirmations.ts b/packages/web3-eth/src/utils/watch_transaction_for_confirmations.ts
index 1594e76b8ce..414494bb3d5 100644
--- a/packages/web3-eth/src/utils/watch_transaction_for_confirmations.ts
+++ b/packages/web3-eth/src/utils/watch_transaction_for_confirmations.ts
@@ -24,12 +24,12 @@ import {
TransactionReceiptMissingBlockNumberError,
} from 'web3-errors';
import { DataFormat } from 'web3-types';
-import { transactionReceiptSchema } from '../schemas';
+import { transactionReceiptSchema } from '../schemas.js';
import {
watchTransactionByPolling,
Web3PromiEventEventTypeBase,
-} from './watch_transaction_by_pooling';
-import { watchTransactionBySubscription } from './watch_transaction_by_subscription';
+} from './watch_transaction_by_pooling.js';
+import { watchTransactionBySubscription } from './watch_transaction_by_subscription.js';
export function watchTransactionForConfirmations<
ReturnFormat extends DataFormat,
diff --git a/packages/web3-eth/src/validation.ts b/packages/web3-eth/src/validation.ts
index 9daab4f48cf..a818cc66c10 100644
--- a/packages/web3-eth/src/validation.ts
+++ b/packages/web3-eth/src/validation.ts
@@ -47,8 +47,8 @@ import {
TransactionGasMismatchError,
UnsupportedFeeMarketError,
} from 'web3-errors';
-import { formatTransaction } from './utils/format_transaction';
-import { InternalTransaction } from './types';
+import { formatTransaction } from './utils/format_transaction.js';
+import { InternalTransaction } from './types.js';
export function isBaseTransaction(value: BaseTransactionAPI): boolean {
if (!isNullish(value.to) && !isAddress(value.to)) return false;
diff --git a/packages/web3-eth/src/web3_eth.ts b/packages/web3-eth/src/web3_eth.ts
index 4aafb61db39..30bd62b3b3d 100644
--- a/packages/web3-eth/src/web3_eth.ts
+++ b/packages/web3-eth/src/web3_eth.ts
@@ -43,14 +43,14 @@ import { TransactionNotFound } from 'web3-errors';
import { toChecksumAddress, isNullish } from 'web3-utils';
import { ethRpcMethods } from 'web3-rpc-methods';
-import * as rpcMethodsWrappers from './rpc_method_wrappers';
-import { SendTransactionOptions } from './types';
+import * as rpcMethodsWrappers from './rpc_method_wrappers.js';
+import { SendTransactionOptions } from './types.js';
import {
LogsSubscription,
NewPendingTransactionsSubscription,
NewHeadsSubscription,
SyncingSubscription,
-} from './web3_subscriptions';
+} from './web3_subscriptions.js';
type RegisteredSubscription = {
logs: typeof LogsSubscription;
diff --git a/packages/web3-eth/src/web3_subscriptions.ts b/packages/web3-eth/src/web3_subscriptions.ts
index 78d22d11b15..9294ca57d9c 100644
--- a/packages/web3-eth/src/web3_subscriptions.ts
+++ b/packages/web3-eth/src/web3_subscriptions.ts
@@ -27,7 +27,7 @@ import {
LogsOutput,
} from 'web3-types';
import { Web3Subscription } from 'web3-core';
-import { blockHeaderSchema, logSchema, syncSchema } from './schemas';
+import { blockHeaderSchema, logSchema, syncSchema } from './schemas.js';
type CommonSubscriptionEvents = {
error: Error;
diff --git a/packages/web3-net/src/index.ts b/packages/web3-net/src/index.ts
index f20513fb723..d2ba11d7682 100644
--- a/packages/web3-net/src/index.ts
+++ b/packages/web3-net/src/index.ts
@@ -45,9 +45,9 @@ along with web3.js. If not, see .
/**
*
*/
-import { Net } from './net';
+import { Net } from './net.js';
-export * from './net';
-export * from './rpc_method_wrappers';
+export * from './net.js';
+export * from './rpc_method_wrappers.js';
export default Net;
diff --git a/packages/web3-net/src/net.ts b/packages/web3-net/src/net.ts
index b5ea60f6c2a..b03dcb23b04 100644
--- a/packages/web3-net/src/net.ts
+++ b/packages/web3-net/src/net.ts
@@ -17,7 +17,7 @@ along with web3.js. If not, see .
import { Web3Context } from 'web3-core';
import { DataFormat, DEFAULT_RETURN_FORMAT, Web3NetAPI } from 'web3-types';
-import * as rpcMethodsWrappers from './rpc_method_wrappers';
+import * as rpcMethodsWrappers from './rpc_method_wrappers.js';
export class Net extends Web3Context {
/**
diff --git a/packages/web3-net/test/config/jest.config.js b/packages/web3-net/test/config/jest.config.js
index eaa5e9049da..c8c21e06e6a 100644
--- a/packages/web3-net/test/config/jest.config.js
+++ b/packages/web3-net/test/config/jest.config.js
@@ -10,6 +10,9 @@ module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
verbose: false,
collectCoverage: false,
coverageReporters: ['json'],
diff --git a/packages/web3-providers-http/src/index.ts b/packages/web3-providers-http/src/index.ts
index e4d56d471d7..64dadd9895d 100644
--- a/packages/web3-providers-http/src/index.ts
+++ b/packages/web3-providers-http/src/index.ts
@@ -27,9 +27,9 @@ import {
Web3ProviderStatus,
} from 'web3-types';
import { InvalidClientError, MethodNotImplementedError, ResponseError } from 'web3-errors';
-import { HttpProviderOptions } from './types';
+import { HttpProviderOptions } from './types.js';
-export { HttpProviderOptions } from './types';
+export { HttpProviderOptions } from './types.js';
export default class HttpProvider<
API extends Web3APISpec = EthExecutionAPI,
diff --git a/packages/web3-providers-ipc/test/config/jest.config.js b/packages/web3-providers-ipc/test/config/jest.config.js
index 7e63cb4e0e2..6c71b126961 100644
--- a/packages/web3-providers-ipc/test/config/jest.config.js
+++ b/packages/web3-providers-ipc/test/config/jest.config.js
@@ -10,6 +10,9 @@ module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
verbose: false,
collectCoverage: false,
coverageReporters: ['json'],
diff --git a/packages/web3-rpc-methods/src/index.ts b/packages/web3-rpc-methods/src/index.ts
index 89338247240..c2fc512f137 100644
--- a/packages/web3-rpc-methods/src/index.ts
+++ b/packages/web3-rpc-methods/src/index.ts
@@ -14,8 +14,8 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import * as ethRpcMethods from './eth_rpc_methods';
-import * as netRpcMethods from './net_rpc_methods';
-import * as personalRpcMethods from './personal_rpc_methods';
+import * as ethRpcMethods from './eth_rpc_methods.js';
+import * as netRpcMethods from './net_rpc_methods.js';
+import * as personalRpcMethods from './personal_rpc_methods.js';
export { ethRpcMethods, netRpcMethods, personalRpcMethods };
diff --git a/packages/web3-types/src/apis/eth_execution_api.ts b/packages/web3-types/src/apis/eth_execution_api.ts
index d404398944e..9bdefe3dd43 100644
--- a/packages/web3-types/src/apis/eth_execution_api.ts
+++ b/packages/web3-types/src/apis/eth_execution_api.ts
@@ -31,8 +31,8 @@ import {
TransactionReceiptBase,
BlockBase,
LogBase,
-} from '../eth_types';
-import { HexString } from '../primitives_types';
+} from '../eth_types.js';
+import { HexString } from '../primitives_types.js';
// The types are generated manually by referring to following doc
// https://github.com/ethereum/execution-apis
diff --git a/packages/web3-types/src/apis/eth_personal_api.ts b/packages/web3-types/src/apis/eth_personal_api.ts
index 02122367561..cab41b22dd8 100644
--- a/packages/web3-types/src/apis/eth_personal_api.ts
+++ b/packages/web3-types/src/apis/eth_personal_api.ts
@@ -14,8 +14,8 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { Address, Transaction } from '../eth_types';
-import { HexString } from '../primitives_types';
+import { Address, Transaction } from '../eth_types.js';
+import { HexString } from '../primitives_types.js';
export type EthPersonalAPI = {
personal_listAccounts: () => Address[];
diff --git a/packages/web3-types/src/apis/web3_eth_execution_api.ts b/packages/web3-types/src/apis/web3_eth_execution_api.ts
index b8989b59252..161e73f8d39 100644
--- a/packages/web3-types/src/apis/web3_eth_execution_api.ts
+++ b/packages/web3-types/src/apis/web3_eth_execution_api.ts
@@ -14,7 +14,7 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { EthExecutionAPI } from './eth_execution_api';
+import { EthExecutionAPI } from './eth_execution_api.js';
import {
AccountObject,
Address,
@@ -22,7 +22,7 @@ import {
HexString32Bytes,
TransactionInfo,
Uint,
-} from '../eth_types';
+} from '../eth_types.js';
export type Web3EthExecutionAPI = EthExecutionAPI & {
eth_pendingTransactions: () => TransactionInfo[];
diff --git a/packages/web3-types/src/apis/web3_net_api.ts b/packages/web3-types/src/apis/web3_net_api.ts
index 9160e25bf46..2cb3566f823 100644
--- a/packages/web3-types/src/apis/web3_net_api.ts
+++ b/packages/web3-types/src/apis/web3_net_api.ts
@@ -14,7 +14,7 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { HexString } from '../primitives_types';
+import { HexString } from '../primitives_types.js';
export type Web3NetAPI = {
net_version: () => string; // https://eth.wiki/json-rpc/API#net_version
diff --git a/packages/web3-types/src/data_format_types.ts b/packages/web3-types/src/data_format_types.ts
index 2be23bae2a3..f0ffe3bc8aa 100644
--- a/packages/web3-types/src/data_format_types.ts
+++ b/packages/web3-types/src/data_format_types.ts
@@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { Bytes, HexString, Numbers } from './primitives_types';
+import { Bytes, HexString, Numbers } from './primitives_types.js';
export enum FMT_NUMBER {
NUMBER = 'NUMBER_NUMBER',
diff --git a/packages/web3-types/src/eth_abi_types.ts b/packages/web3-types/src/eth_abi_types.ts
index bb91651e087..a172bea2855 100644
--- a/packages/web3-types/src/eth_abi_types.ts
+++ b/packages/web3-types/src/eth_abi_types.ts
@@ -15,9 +15,9 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { Address } from './eth_types';
-import { Bytes, Numbers } from './primitives_types';
-import { FixedSizeArray } from './utility_types';
+import { Address } from './eth_types.js';
+import { Bytes, Numbers } from './primitives_types.js';
+import { FixedSizeArray } from './utility_types.js';
type _SolidityIndexRange =
| 1
diff --git a/packages/web3-types/src/eth_contract_types.ts b/packages/web3-types/src/eth_contract_types.ts
index 9a57f054395..6fc0fcc42b1 100644
--- a/packages/web3-types/src/eth_contract_types.ts
+++ b/packages/web3-types/src/eth_contract_types.ts
@@ -15,10 +15,10 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { Address, Uint } from './eth_types';
-import { SupportedProviders } from './web3_base_provider';
-import { Bytes, HexString } from './primitives_types';
-import { EthExecutionAPI } from './apis/eth_execution_api';
+import { Address, Uint } from './eth_types.js';
+import { SupportedProviders } from './web3_base_provider.js';
+import { Bytes, HexString } from './primitives_types.js';
+import { EthExecutionAPI } from './apis/eth_execution_api.js';
export interface ContractInitOptions {
/**
diff --git a/packages/web3-types/src/eth_types.ts b/packages/web3-types/src/eth_types.ts
index 40c783fd5cb..13511ed82b8 100644
--- a/packages/web3-types/src/eth_types.ts
+++ b/packages/web3-types/src/eth_types.ts
@@ -14,7 +14,7 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { Bytes, HexString, Numbers } from './primitives_types';
+import { Bytes, HexString, Numbers } from './primitives_types.js';
export type ValueTypes = 'address' | 'bool' | 'string' | 'int256' | 'uint256' | 'bytes' | 'bigint';
// Hex encoded 32 bytes
diff --git a/packages/web3-types/src/index.ts b/packages/web3-types/src/index.ts
index 7036bfd397f..694ffea34ff 100644
--- a/packages/web3-types/src/index.ts
+++ b/packages/web3-types/src/index.ts
@@ -15,19 +15,19 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-export * from './error_types';
-export * from './apis/eth_execution_api';
-export * from './apis/web3_eth_execution_api';
-export * from './apis/web3_net_api';
-export * from './apis/eth_personal_api';
-export * from './data_format_types';
-export * from './eth_types';
-export * from './eth_abi_types';
-export * from './eth_contract_types';
-export * from './json_rpc_types';
-export * from './primitives_types';
-export * from './utility_types';
-export * from './web3_api_types';
-export * from './web3_base_provider';
-export * from './web3_base_wallet';
-export * from './web3_deferred_promise_type';
+export * from './error_types.js';
+export * from './apis/eth_execution_api.js';
+export * from './apis/web3_eth_execution_api.js';
+export * from './apis/web3_net_api.js';
+export * from './apis/eth_personal_api.js';
+export * from './data_format_types.js';
+export * from './eth_types.js';
+export * from './eth_abi_types.js';
+export * from './eth_contract_types.js';
+export * from './json_rpc_types.js';
+export * from './primitives_types.js';
+export * from './utility_types.js';
+export * from './web3_api_types.js';
+export * from './web3_base_provider.js';
+export * from './web3_base_wallet.js';
+export * from './web3_deferred_promise_type.js';
diff --git a/packages/web3-types/src/utility_types.ts b/packages/web3-types/src/utility_types.ts
index 917b2184ce0..168201fe9da 100644
--- a/packages/web3-types/src/utility_types.ts
+++ b/packages/web3-types/src/utility_types.ts
@@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { Numbers } from './primitives_types';
+import { Numbers } from './primitives_types.js';
// Make each attribute mutable by removing `readonly`
export type Mutable = {
diff --git a/packages/web3-types/src/web3_api_types.ts b/packages/web3-types/src/web3_api_types.ts
index 6edc5c24a5b..2fd94c9ecb8 100644
--- a/packages/web3-types/src/web3_api_types.ts
+++ b/packages/web3-types/src/web3_api_types.ts
@@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { JsonRpcId, JsonRpcIdentifier } from './json_rpc_types';
+import { JsonRpcId, JsonRpcIdentifier } from './json_rpc_types.js';
export interface ProviderMessage {
readonly type: string;
diff --git a/packages/web3-types/src/web3_base_provider.ts b/packages/web3-types/src/web3_base_provider.ts
index e04b39abf78..2db1b9bee37 100644
--- a/packages/web3-types/src/web3_base_provider.ts
+++ b/packages/web3-types/src/web3_base_provider.ts
@@ -16,8 +16,8 @@ along with web3.js. If not, see .
*/
import { Socket } from 'net';
-import { Web3Error } from './error_types';
-import { EthExecutionAPI } from './apis/eth_execution_api';
+import { Web3Error } from './error_types.js';
+import { EthExecutionAPI } from './apis/eth_execution_api.js';
import {
JsonRpcNotification,
JsonRpcPayload,
diff --git a/packages/web3-types/src/web3_base_wallet.ts b/packages/web3-types/src/web3_base_wallet.ts
index 195d95f7591..484e8072603 100644
--- a/packages/web3-types/src/web3_base_wallet.ts
+++ b/packages/web3-types/src/web3_base_wallet.ts
@@ -14,8 +14,8 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { Transaction } from './eth_types';
-import { HexString } from './primitives_types';
+import { Transaction } from './eth_types.js';
+import { HexString } from './primitives_types.js';
export type Cipher = 'aes-128-ctr' | 'aes-128-cbc' | 'aes-256-cbc';
diff --git a/packages/web3-utils/src/converters.ts b/packages/web3-utils/src/converters.ts
index e1ca62930ff..3ccb8cc31c3 100644
--- a/packages/web3-utils/src/converters.ts
+++ b/packages/web3-utils/src/converters.ts
@@ -15,8 +15,8 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { keccak256 } from 'ethereum-cryptography/keccak';
-import { bytesToUtf8, utf8ToBytes } from 'ethereum-cryptography/utils';
+import { keccak256 } from 'ethereum-cryptography/keccak.js';
+import { bytesToUtf8, utf8ToBytes } from 'ethereum-cryptography/utils.js';
import { Address, Bytes, HexString, Numbers, ValueTypes } from 'web3-types';
import {
isAddress,
diff --git a/packages/web3-utils/src/formatter.ts b/packages/web3-utils/src/formatter.ts
index d03a69740a9..0cfeb600b9a 100644
--- a/packages/web3-utils/src/formatter.ts
+++ b/packages/web3-utils/src/formatter.ts
@@ -17,10 +17,10 @@ along with web3.js. If not, see .
import { FormatterError } from 'web3-errors';
import { Bytes, DataFormat, FMT_BYTES, FMT_NUMBER, FormatType } from 'web3-types';
import { isNullish, isObject, JsonSchema, utils, ValidationSchemaInput } from 'web3-validator';
-import { bytesToUint8Array, bytesToHex, numberToHex, toBigInt } from './converters';
-import { mergeDeep } from './objects';
-import { padLeft } from './string_manipulation';
-import { uint8ArrayConcat } from './uint8array';
+import { bytesToUint8Array, bytesToHex, numberToHex, toBigInt } from './converters.js';
+import { mergeDeep } from './objects.js';
+import { padLeft } from './string_manipulation.js';
+import { uint8ArrayConcat } from './uint8array.js';
const { parseBaseType } = utils;
diff --git a/packages/web3-utils/src/hash.ts b/packages/web3-utils/src/hash.ts
index 15c4f4051e2..e97ee4f8ca4 100644
--- a/packages/web3-utils/src/hash.ts
+++ b/packages/web3-utils/src/hash.ts
@@ -15,8 +15,8 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { keccak256 } from 'ethereum-cryptography/keccak';
-import { utf8ToBytes } from 'ethereum-cryptography/utils';
+import { keccak256 } from 'ethereum-cryptography/keccak.js';
+import { utf8ToBytes } from 'ethereum-cryptography/utils.js';
import {
InvalidAddressError,
InvalidBooleanError,
@@ -43,8 +43,8 @@ import {
toHex,
toNumber,
utf8ToHex,
-} from './converters';
-import { leftPad, rightPad, toTwosComplement } from './string_manipulation';
+} from './converters.js';
+import { leftPad, rightPad, toTwosComplement } from './string_manipulation.js';
const SHA3_EMPTY_BYTES = '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
diff --git a/packages/web3-utils/src/index.ts b/packages/web3-utils/src/index.ts
index c6149ef7a42..3990d0a6b0a 100644
--- a/packages/web3-utils/src/index.ts
+++ b/packages/web3-utils/src/index.ts
@@ -15,19 +15,19 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-export * from './converters';
-export * from './validation';
-export * from './formatter';
-export * from './hash';
-export * from './random';
-export * from './string_manipulation';
-export * from './objects';
-export * from './promise_helpers';
-export * from './json_rpc';
-export * as jsonRpc from './json_rpc';
-export * from './web3_deferred_promise';
-export * from './chunk_response_parser';
-export * from './uuid';
-export * from './web3_eip1193_provider';
-export * from './socket_provider';
-export * from './uint8array';
+export * from './converters.js';
+export * from './validation.js';
+export * from './formatter.js';
+export * from './hash.js';
+export * from './random.js';
+export * from './string_manipulation.js';
+export * from './objects.js';
+export * from './promise_helpers.js';
+export * from './json_rpc.js';
+export * as jsonRpc from './json_rpc.js';
+export * from './web3_deferred_promise.js';
+export * from './chunk_response_parser.js';
+export * from './uuid.js';
+export * from './web3_eip1193_provider.js';
+export * from './socket_provider.js';
+export * from './uint8array.js';
diff --git a/packages/web3-utils/src/json_rpc.ts b/packages/web3-utils/src/json_rpc.ts
index 882ebe890fe..5e62c5d9e1f 100644
--- a/packages/web3-utils/src/json_rpc.ts
+++ b/packages/web3-utils/src/json_rpc.ts
@@ -29,7 +29,7 @@ import {
JsonRpcSubscriptionResult,
} from 'web3-types';
import { rpcErrorsMap } from 'web3-errors';
-import { uuidV4 } from './uuid';
+import { uuidV4 } from './uuid.js';
// check if code is a valid rpc server error code
export const isResponseRpcError = (rpcError: JsonRpcResponseWithError) => {
diff --git a/packages/web3-utils/src/random.ts b/packages/web3-utils/src/random.ts
index 766d15f808e..2898c93acf3 100644
--- a/packages/web3-utils/src/random.ts
+++ b/packages/web3-utils/src/random.ts
@@ -15,8 +15,8 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { getRandomBytesSync } from 'ethereum-cryptography/random';
-import { bytesToHex } from './converters';
+import { getRandomBytesSync } from 'ethereum-cryptography/random.js';
+import { bytesToHex } from './converters.js';
/**
* Returns a random byte array by the given bytes size
diff --git a/packages/web3-utils/src/socket_provider.ts b/packages/web3-utils/src/socket_provider.ts
index 4212c7e533b..86017cfd5c7 100644
--- a/packages/web3-utils/src/socket_provider.ts
+++ b/packages/web3-utils/src/socket_provider.ts
@@ -47,11 +47,11 @@ import {
RequestAlreadySentError,
Web3WSProviderError,
} from 'web3-errors';
-import { Eip1193Provider } from './web3_eip1193_provider';
-import { ChunkResponseParser } from './chunk_response_parser';
-import { isNullish } from './validation';
-import { Web3DeferredPromise } from './web3_deferred_promise';
-import * as jsonRpc from './json_rpc';
+import { Eip1193Provider } from './web3_eip1193_provider.js';
+import { ChunkResponseParser } from './chunk_response_parser.js';
+import { isNullish } from './validation.js';
+import { Web3DeferredPromise } from './web3_deferred_promise.js';
+import * as jsonRpc from './json_rpc.js';
export type ReconnectOptions = {
autoReconnect: boolean;
diff --git a/packages/web3-utils/src/string_manipulation.ts b/packages/web3-utils/src/string_manipulation.ts
index e595663083e..7719afeba42 100644
--- a/packages/web3-utils/src/string_manipulation.ts
+++ b/packages/web3-utils/src/string_manipulation.ts
@@ -18,7 +18,7 @@ along with web3.js. If not, see .
import { Numbers } from 'web3-types';
import { NibbleWidthError } from 'web3-errors';
import { isHexStrict, validator, utils as validatorUtils } from 'web3-validator';
-import { numberToHex, toHex, toNumber } from './converters';
+import { numberToHex, toHex, toNumber } from './converters.js';
/**
* Adds a padding on the left of a string, if value is a integer or bigInt will be converted to a hex string.
diff --git a/packages/web3-utils/src/uuid.ts b/packages/web3-utils/src/uuid.ts
index b016743e077..369cdc86c60 100644
--- a/packages/web3-utils/src/uuid.ts
+++ b/packages/web3-utils/src/uuid.ts
@@ -15,8 +15,8 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { bytesToHex } from './converters';
-import { randomBytes } from './random';
+import { bytesToHex } from './converters.js';
+import { randomBytes } from './random.js';
/**
* Generate a version 4 (random) uuid
diff --git a/packages/web3-utils/src/web3_eip1193_provider.ts b/packages/web3-utils/src/web3_eip1193_provider.ts
index ca58c71f53f..8d9b9385305 100644
--- a/packages/web3-utils/src/web3_eip1193_provider.ts
+++ b/packages/web3-utils/src/web3_eip1193_provider.ts
@@ -24,7 +24,7 @@ import {
Web3BaseProvider,
} from 'web3-types';
import { EventEmitter } from 'events';
-import { toPayload } from './json_rpc';
+import { toPayload } from './json_rpc.js';
/**
* This is an abstract class, which extends {@link Web3BaseProvider} class. This class is used to implement a provider that adheres to the EIP-1193 standard for Ethereum providers.
diff --git a/packages/web3-utils/test/config/jest.config.js b/packages/web3-utils/test/config/jest.config.js
index eaa5e9049da..4a60f95b353 100644
--- a/packages/web3-utils/test/config/jest.config.js
+++ b/packages/web3-utils/test/config/jest.config.js
@@ -10,6 +10,9 @@ module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
verbose: false,
collectCoverage: false,
coverageReporters: ['json'],
diff --git a/packages/web3-validator/src/default_validator.ts b/packages/web3-validator/src/default_validator.ts
index d201c070268..ef42bfb22fc 100644
--- a/packages/web3-validator/src/default_validator.ts
+++ b/packages/web3-validator/src/default_validator.ts
@@ -15,6 +15,6 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { Web3Validator } from './web3_validator';
+import { Web3Validator } from './web3_validator.js';
export const validator = new Web3Validator();
diff --git a/packages/web3-validator/src/errors.ts b/packages/web3-validator/src/errors.ts
index 510031ee1ff..0e8e4125c3a 100644
--- a/packages/web3-validator/src/errors.ts
+++ b/packages/web3-validator/src/errors.ts
@@ -18,7 +18,7 @@ along with web3.js. If not, see .
import { BaseWeb3Error, ERR_VALIDATION } from 'web3-errors';
import { Web3ValidationErrorObject } from 'web3-types';
-import { isNullish } from './validation/object';
+import { isNullish } from './validation/object.js';
const errorFormatter = (error: Web3ValidationErrorObject): string => {
if (error.message && error.instancePath && error.params && !isNullish(error.params.value)) {
diff --git a/packages/web3-validator/src/formats.ts b/packages/web3-validator/src/formats.ts
index 5bb6b6a0f60..086b291fea4 100644
--- a/packages/web3-validator/src/formats.ts
+++ b/packages/web3-validator/src/formats.ts
@@ -15,22 +15,16 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
import { Filter } from 'web3-types';
-import { ValidInputTypes } from './types';
-import {
- isAddress,
- isBlockNumber,
- isBlockNumberOrTag,
- isBlockTag,
- isBloom,
- isBoolean,
- isBytes,
- isFilterObject,
- isHexStrict,
- isInt,
- isNumber,
- isString,
- isUInt,
-} from './validation';
+import { ValidInputTypes } from './types.js';
+import { isAddress } from './validation/address.js';
+import { isBlockNumber,isBlockNumberOrTag,
+ isBlockTag, } from './validation/block.js';
+import { isBloom } from './validation/bloom.js';
+import { isBoolean } from './validation/boolean.js';
+import { isBytes } from './validation/bytes.js';
+import { isFilterObject } from './validation/filter.js';
+import { isHexStrict, isString } from './validation/string.js';
+import { isNumber, isInt, isUInt } from './validation/numbers.js';
const formats: { [key: string]: (data: unknown) => boolean } = {
address: (data: unknown) => isAddress(data as ValidInputTypes),
diff --git a/packages/web3-validator/src/index.ts b/packages/web3-validator/src/index.ts
index 2ac4c91cc80..4b816bc84e3 100644
--- a/packages/web3-validator/src/index.ts
+++ b/packages/web3-validator/src/index.ts
@@ -15,10 +15,10 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-export * from './web3_validator';
-export * from './default_validator';
-export * from './types';
-export * from './validation';
-export * as utils from './utils';
-export * from './errors';
-export * from './constants';
+export * from './web3_validator.js';
+export * from './default_validator.js';
+export * from './types.js';
+export * as utils from './utils.js';
+export * from './errors.js';
+export * from './constants.js';
+export * from './validation/index.js';
diff --git a/packages/web3-validator/src/utils.ts b/packages/web3-validator/src/utils.ts
index 7f9032e4596..b6e233c98b8 100644
--- a/packages/web3-validator/src/utils.ts
+++ b/packages/web3-validator/src/utils.ts
@@ -16,7 +16,7 @@ along with web3.js. If not, see .
*/
import { InvalidBytesError, InvalidNumberError } from 'web3-errors';
-import { VALID_ETH_BASE_TYPES } from './constants';
+import { VALID_ETH_BASE_TYPES } from './constants.js';
import {
FullValidationSchema,
JsonSchema,
@@ -24,10 +24,10 @@ import {
ShortValidationSchema,
ValidationSchemaInput,
ValidInputTypes,
-} from './types';
-import { isAbiParameterSchema } from './validation/abi';
-import { isHexStrict } from './validation/string';
-import { Web3ValidatorError } from './errors';
+} from './types.js';
+import { isAbiParameterSchema } from './validation/abi.js';
+import { isHexStrict } from './validation/string.js';
+import { Web3ValidatorError } from './errors.js';
const extraTypes = ['hex', 'number', 'blockNumber', 'blockNumberOrTag', 'filter', 'bloom'];
diff --git a/packages/web3-validator/src/validation/address.ts b/packages/web3-validator/src/validation/address.ts
index 023e745c744..f1c5b820a35 100644
--- a/packages/web3-validator/src/validation/address.ts
+++ b/packages/web3-validator/src/validation/address.ts
@@ -15,11 +15,11 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { keccak256 } from 'ethereum-cryptography/keccak';
-import { utf8ToBytes } from 'ethereum-cryptography/utils';
-import { ValidInputTypes } from '../types';
-import { uint8ArrayToHexString } from '../utils';
-import { isHexStrict } from './string';
+import { keccak256 } from 'ethereum-cryptography/keccak.js';
+import { utf8ToBytes } from 'ethereum-cryptography/utils.js';
+import { ValidInputTypes } from '../types.js';
+import { uint8ArrayToHexString } from '../utils.js';
+import { isHexStrict } from './string.js';
/**
* Checks the checksum of a given address. Will also return false on non-checksum addresses.
diff --git a/packages/web3-validator/src/validation/block.ts b/packages/web3-validator/src/validation/block.ts
index 8a988a65bcc..695ac3e3bbe 100644
--- a/packages/web3-validator/src/validation/block.ts
+++ b/packages/web3-validator/src/validation/block.ts
@@ -16,7 +16,7 @@ along with web3.js. If not, see .
*/
import { BlockTags } from 'web3-types';
-import { isUInt } from './numbers';
+import { isUInt } from './numbers.js';
export const isBlockNumber = (value: string | number | bigint): boolean => isUInt(value);
diff --git a/packages/web3-validator/src/validation/bloom.ts b/packages/web3-validator/src/validation/bloom.ts
index 0a720c5d407..e9cde96b73d 100644
--- a/packages/web3-validator/src/validation/bloom.ts
+++ b/packages/web3-validator/src/validation/bloom.ts
@@ -15,11 +15,11 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { keccak256 } from 'ethereum-cryptography/keccak';
-import { ValidInputTypes } from '../types';
-import { codePointToInt, hexToUint8Array, padLeft, uint8ArrayToHexString } from '../utils';
-import { isAddress } from './address';
-import { isHexStrict } from './string';
+import { keccak256 } from 'ethereum-cryptography/keccak.js';
+import { ValidInputTypes } from '../types.js';
+import { codePointToInt, hexToUint8Array, padLeft, uint8ArrayToHexString } from '../utils.js';
+import { isAddress } from './address.js';
+import { isHexStrict } from './string.js';
/**
* Returns true if the bloom is a valid bloom
diff --git a/packages/web3-validator/src/validation/boolean.ts b/packages/web3-validator/src/validation/boolean.ts
index 2a955cbd32b..b16c7aab502 100644
--- a/packages/web3-validator/src/validation/boolean.ts
+++ b/packages/web3-validator/src/validation/boolean.ts
@@ -15,8 +15,8 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { ValidInputTypes } from '../types';
-import { isHexStrict } from './string';
+import { ValidInputTypes } from '../types.js';
+import { isHexStrict } from './string.js';
export const isBoolean = (value: ValidInputTypes) => {
if (!['number', 'string', 'boolean'].includes(typeof value)) {
diff --git a/packages/web3-validator/src/validation/bytes.ts b/packages/web3-validator/src/validation/bytes.ts
index 3335e00d359..ef15fbc0120 100644
--- a/packages/web3-validator/src/validation/bytes.ts
+++ b/packages/web3-validator/src/validation/bytes.ts
@@ -15,9 +15,9 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { ValidInputTypes } from '../types';
-import { hexToUint8Array, parseBaseType } from '../utils';
-import { isHexStrict } from './string';
+import { ValidInputTypes } from '../types.js';
+import { hexToUint8Array, parseBaseType } from '../utils.js';
+import { isHexStrict } from './string.js';
/**
* checks input if typeof data is valid Uint8Array input
diff --git a/packages/web3-validator/src/validation/eth.ts b/packages/web3-validator/src/validation/eth.ts
index 034f7d915ee..774bba13a83 100644
--- a/packages/web3-validator/src/validation/eth.ts
+++ b/packages/web3-validator/src/validation/eth.ts
@@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { parseBaseType } from '../utils';
+import { parseBaseType } from '../utils.js';
export const isValidEthBaseType = (type: string): boolean => {
const { baseType, baseTypeSize } = parseBaseType(type);
diff --git a/packages/web3-validator/src/validation/filter.ts b/packages/web3-validator/src/validation/filter.ts
index 43b0062e106..2a67bd706c7 100644
--- a/packages/web3-validator/src/validation/filter.ts
+++ b/packages/web3-validator/src/validation/filter.ts
@@ -16,10 +16,10 @@ along with web3.js. If not, see .
*/
import { Filter } from 'web3-types';
-import { isAddress } from './address';
-import { isBlockNumberOrTag } from './block';
-import { isNullish } from './object';
-import { isTopic } from './topic';
+import { isAddress } from './address.js';
+import { isBlockNumberOrTag } from './block.js';
+import { isNullish } from './object.js';
+import { isTopic } from './topic.js';
/**
* First we check if all properties in the provided value are expected,
diff --git a/packages/web3-validator/src/validation/index.ts b/packages/web3-validator/src/validation/index.ts
index 7e2e673cbb4..17912899269 100644
--- a/packages/web3-validator/src/validation/index.ts
+++ b/packages/web3-validator/src/validation/index.ts
@@ -15,14 +15,14 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-export * from './address';
-export * from './block';
-export * from './bloom';
-export * from './boolean';
-export * from './bytes';
-export * from './eth';
-export * from './filter';
-export * from './numbers';
-export * from './string';
-export * from './topic';
-export * from './object';
+export * from './address.js';
+export * from './block.js';
+export * from './bloom.js';
+export * from './boolean.js';
+export * from './bytes.js';
+export * from './eth.js';
+export * from './filter.js';
+export * from './numbers.js';
+export * from './string.js';
+export * from './topic.js';
+export * from './object.js';
diff --git a/packages/web3-validator/src/validation/numbers.ts b/packages/web3-validator/src/validation/numbers.ts
index 847df768378..5ad606a5fe2 100644
--- a/packages/web3-validator/src/validation/numbers.ts
+++ b/packages/web3-validator/src/validation/numbers.ts
@@ -15,9 +15,9 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { ValidInputTypes } from '../types';
-import { parseBaseType, hexToNumber } from '../utils';
-import { isHexStrict } from './string';
+import { ValidInputTypes } from '../types.js';
+import { parseBaseType, hexToNumber } from '../utils.js';
+import { isHexStrict } from './string.js';
/**
* Checks if a given value is a valid big int
diff --git a/packages/web3-validator/src/validation/string.ts b/packages/web3-validator/src/validation/string.ts
index 4ad1cad38de..d586af70057 100644
--- a/packages/web3-validator/src/validation/string.ts
+++ b/packages/web3-validator/src/validation/string.ts
@@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { ValidInputTypes } from '../types';
+import { ValidInputTypes } from '../types.js';
/**
* checks input if typeof data is valid string input
diff --git a/packages/web3-validator/src/validation/topic.ts b/packages/web3-validator/src/validation/topic.ts
index a01a09716a2..4f5ed44c85d 100644
--- a/packages/web3-validator/src/validation/topic.ts
+++ b/packages/web3-validator/src/validation/topic.ts
@@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see .
*/
-import { isBloom, isInBloom } from './bloom';
+import { isBloom, isInBloom } from './bloom.js';
/**
* Checks if its a valid topic
diff --git a/packages/web3-validator/src/validator.ts b/packages/web3-validator/src/validator.ts
index 925ef074933..f57cd639480 100644
--- a/packages/web3-validator/src/validator.ts
+++ b/packages/web3-validator/src/validator.ts
@@ -16,12 +16,12 @@ along with web3.js. If not, see .
*/
import { Web3ValidationErrorObject } from 'web3-types';
-import { toHex, utf8ToBytes } from 'ethereum-cryptography/utils';
-import { blake2b } from 'ethereum-cryptography/blake2b';
+import { toHex, utf8ToBytes } from 'ethereum-cryptography/utils.js';
+import { blake2b } from 'ethereum-cryptography/blake2b.js';
import validator from 'is-my-json-valid';
-import formats from './formats';
-import { Web3ValidatorError } from './errors';
-import { Validate, Json, Schema, RawValidationError } from './types';
+import formats from './formats.js';
+import { Web3ValidatorError } from './errors.js';
+import { Validate, Json, Schema, RawValidationError } from './types.js';
export class Validator {
// eslint-disable-next-line no-use-before-define
diff --git a/packages/web3-validator/src/web3_validator.ts b/packages/web3-validator/src/web3_validator.ts
index bd8002236e5..f56cc36e13f 100644
--- a/packages/web3-validator/src/web3_validator.ts
+++ b/packages/web3-validator/src/web3_validator.ts
@@ -16,10 +16,10 @@ along with web3.js. If not, see .
*/
import { Web3ValidationErrorObject } from 'web3-types';
-import { Validator } from './validator';
-import { ethAbiToJsonSchema } from './utils';
-import { Json, ValidationSchemaInput, Web3ValidationOptions } from './types';
-import { Web3ValidatorError } from './errors';
+import { Validator } from './validator.js';
+import { ethAbiToJsonSchema } from './utils.js';
+import { Json, ValidationSchemaInput, Web3ValidationOptions } from './types.js';
+import { Web3ValidatorError } from './errors.js';
export class Web3Validator {
private readonly _validator: Validator;
diff --git a/packages/web3-validator/test/config/jest.config.js b/packages/web3-validator/test/config/jest.config.js
index eaa5e9049da..4a60f95b353 100644
--- a/packages/web3-validator/test/config/jest.config.js
+++ b/packages/web3-validator/test/config/jest.config.js
@@ -10,6 +10,9 @@ module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
verbose: false,
collectCoverage: false,
coverageReporters: ['json'],
diff --git a/packages/web3/src/index.ts b/packages/web3/src/index.ts
index a35a25de790..bbb6be30a16 100644
--- a/packages/web3/src/index.ts
+++ b/packages/web3/src/index.ts
@@ -322,9 +322,9 @@ along with web3.js. If not, see .
* This comment _supports3_ [Markdown](https://marked.js.org/)
*/
-import Web3 from './web3';
+import Web3 from './web3.js';
-export * from './types';
+export * from './types.js';
export default Web3;
/**
@@ -344,9 +344,9 @@ export { WebSocketProvider } from 'web3-providers-ws';
*/
export * as core from 'web3-core';
export * as errors from 'web3-errors';
-export * as eth from './eth.exports';
+export * as eth from './eth.exports.js';
export * as net from 'web3-net';
-export * as providers from './providers.exports';
+export * as providers from './providers.exports.js';
export * as rpcMethods from 'web3-rpc-methods';
export * as types from 'web3-types';
export * as utils from 'web3-utils';
diff --git a/packages/web3/src/web3.ts b/packages/web3/src/web3.ts
index 9e939c16f99..8162fbb1db3 100644
--- a/packages/web3/src/web3.ts
+++ b/packages/web3/src/web3.ts
@@ -32,10 +32,10 @@ import {
SupportedProviders,
} from 'web3-types';
import { InvalidMethodParamsError } from 'web3-errors';
-import abi from './abi';
-import { initAccountsForContext } from './accounts';
-import { Web3EthInterface } from './types';
-import { Web3PkgInfo } from './version';
+import abi from './abi.js';
+import { initAccountsForContext } from './accounts.js';
+import { Web3EthInterface } from './types.js';
+import { Web3PkgInfo } from './version.js';
export class Web3 extends Web3Context {
public static version = Web3PkgInfo.version;
diff --git a/packages/web3/test/config/jest.config.js b/packages/web3/test/config/jest.config.js
index eaa5e9049da..c8c21e06e6a 100644
--- a/packages/web3/test/config/jest.config.js
+++ b/packages/web3/test/config/jest.config.js
@@ -10,6 +10,9 @@ module.exports = {
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
verbose: false,
collectCoverage: false,
coverageReporters: ['json'],
diff --git a/templates/cypress/webpack.config.js b/templates/cypress/webpack.config.js
index 976a57aa07d..cffd3d85576 100644
--- a/templates/cypress/webpack.config.js
+++ b/templates/cypress/webpack.config.js
@@ -26,6 +26,9 @@ module.exports = {
https: require.resolve('https-browserify'),
stream: require.resolve('readable-stream'),
},
+ extensionAlias: {
+ '.js': ['.js', '.ts'],
+ },
},
plugins: [
new webpack.ProvidePlugin({
diff --git a/templates/jest.config.js.tmpl b/templates/jest.config.js.tmpl
index ee2c5b18998..d7789fbbbd0 100644
--- a/templates/jest.config.js.tmpl
+++ b/templates/jest.config.js.tmpl
@@ -20,12 +20,18 @@ module.exports = {
tsconfig: './test/tsconfig.json',
},
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
rootDir: '../..',
testMatch: ['/test/**/?(*.)+(spec|test).+(ts|tsx|js)'],
setupFilesAfterEnv: ['/test/config/setup.js'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
+ moduleNameMapper: {
+ '^(\\.{1,2}/.*)\\.js$': '$1',
+ },
verbose: false,
collectCoverage: false,
coverageReporters: ['json'],
diff --git a/webpack.base.config.js b/webpack.base.config.js
index 1b9645371cf..833b1e74aa9 100644
--- a/webpack.base.config.js
+++ b/webpack.base.config.js
@@ -51,10 +51,8 @@ function getWebPackConfig(packagePath, filename, library, entry, tsconf) {
fallback: {
stream: require.resolve('readable-stream'),
},
- alias: {
- // To avoid blotting up the `bn.js` library all over the packages
- // use single library instance.
- 'bn.js': path.resolve(__dirname, 'node_modules/bn.js'),
+ extensionAlias: {
+ '.js': ['.js', '.ts'],
},
},
devtool: 'source-map',
diff --git a/yarn.lock b/yarn.lock
index 7a21d0881ac..8321984a3d8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2134,6 +2134,18 @@
node-addon-api "^3.2.1"
node-gyp-build "^4.3.0"
+"@pkgr/utils@^2.3.1":
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.1.tgz#adf291d0357834c410ce80af16e711b56c7b1cd3"
+ integrity sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==
+ dependencies:
+ cross-spawn "^7.0.3"
+ fast-glob "^3.2.12"
+ is-glob "^4.0.3"
+ open "^9.1.0"
+ picocolors "^1.0.0"
+ tslib "^2.5.0"
+
"@polka/url@^1.0.0-next.20":
version "1.0.0-next.21"
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1"
@@ -3450,6 +3462,11 @@ before-after-hook@^2.2.0:
resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e"
integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==
+big-integer@^1.6.44:
+ version "1.6.51"
+ resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686"
+ integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==
+
bigint-crypto-utils@^3.0.23:
version "3.1.7"
resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.1.7.tgz#c4c1b537c7c1ab7aadfaecf3edfd45416bf2c651"
@@ -3526,6 +3543,13 @@ body-parser@1.20.0:
type-is "~1.6.18"
unpipe "1.0.0"
+bplist-parser@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e"
+ integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==
+ dependencies:
+ big-integer "^1.6.44"
+
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -3693,6 +3717,13 @@ builtins@^5.0.0:
dependencies:
semver "^7.0.0"
+bundle-name@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a"
+ integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==
+ dependencies:
+ run-applescript "^5.0.0"
+
busboy@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
@@ -4458,6 +4489,24 @@ deepmerge@^4.2.2:
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
+default-browser-id@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c"
+ integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==
+ dependencies:
+ bplist-parser "^0.2.0"
+ untildify "^4.0.0"
+
+default-browser@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da"
+ integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==
+ dependencies:
+ bundle-name "^3.0.0"
+ default-browser-id "^3.0.0"
+ execa "^7.1.1"
+ titleize "^3.0.0"
+
defaults@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
@@ -4477,6 +4526,11 @@ define-lazy-prop@^2.0.0:
resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f"
integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==
+define-lazy-prop@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f"
+ integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==
+
define-properties@^1.1.3, define-properties@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1"
@@ -4731,6 +4785,14 @@ enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0:
graceful-fs "^4.2.4"
tapable "^2.2.0"
+enhanced-resolve@^5.12.0:
+ version "5.14.1"
+ resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz#de684b6803724477a4af5d74ccae5de52c25f6b3"
+ integrity sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==
+ dependencies:
+ graceful-fs "^4.2.4"
+ tapable "^2.2.0"
+
enquirer@^2.3.0, enquirer@~2.3.6:
version "2.3.6"
resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
@@ -4870,6 +4932,20 @@ eslint-import-resolver-node@^0.3.6:
debug "^3.2.7"
resolve "^1.20.0"
+eslint-import-resolver-typescript@^3.5.5:
+ version "3.5.5"
+ resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz#0a9034ae7ed94b254a360fbea89187b60ea7456d"
+ integrity sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==
+ dependencies:
+ debug "^4.3.4"
+ enhanced-resolve "^5.12.0"
+ eslint-module-utils "^2.7.4"
+ get-tsconfig "^4.5.0"
+ globby "^13.1.3"
+ is-core-module "^2.11.0"
+ is-glob "^4.0.3"
+ synckit "^0.8.5"
+
eslint-module-utils@^2.7.3:
version "2.7.4"
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974"
@@ -4877,6 +4953,13 @@ eslint-module-utils@^2.7.3:
dependencies:
debug "^3.2.7"
+eslint-module-utils@^2.7.4:
+ version "2.8.0"
+ resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49"
+ integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==
+ dependencies:
+ debug "^3.2.7"
+
eslint-plugin-deprecation@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-deprecation/-/eslint-plugin-deprecation-1.3.2.tgz#a8125d28c56158cdfa1a685197e6be8ed86f189e"
@@ -5389,6 +5472,21 @@ execa@^6.1.0:
signal-exit "^3.0.7"
strip-final-newline "^3.0.0"
+execa@^7.1.1:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43"
+ integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==
+ dependencies:
+ cross-spawn "^7.0.3"
+ get-stream "^6.0.1"
+ human-signals "^4.3.0"
+ is-stream "^3.0.0"
+ merge-stream "^2.0.0"
+ npm-run-path "^5.1.0"
+ onetime "^6.0.0"
+ signal-exit "^3.0.7"
+ strip-final-newline "^3.0.0"
+
exit@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
@@ -5543,6 +5641,17 @@ fast-glob@3.2.7:
merge2 "^1.3.0"
micromatch "^4.0.4"
+fast-glob@^3.2.11, fast-glob@^3.2.12:
+ version "3.2.12"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80"
+ integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==
+ dependencies:
+ "@nodelib/fs.stat" "^2.0.2"
+ "@nodelib/fs.walk" "^1.2.3"
+ glob-parent "^5.1.2"
+ merge2 "^1.3.0"
+ micromatch "^4.0.4"
+
fast-glob@^3.2.9:
version "3.2.11"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9"
@@ -5948,6 +6057,13 @@ get-symbol-description@^1.0.0:
call-bind "^1.0.2"
get-intrinsic "^1.1.1"
+get-tsconfig@^4.5.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.6.0.tgz#e977690993a42f3e320e932427502a40f7af6d05"
+ integrity sha512-lgbo68hHTQnFddybKbbs/RDRJnJT5YyGy2kQzVwbq+g67X73i+5MVTval34QxGkOe9X5Ujf1UYpCaphLyltjEg==
+ dependencies:
+ resolve-pkg-maps "^1.0.0"
+
get-value@^2.0.3, get-value@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
@@ -6107,6 +6223,17 @@ globby@^11.0.2, globby@^11.1.0:
merge2 "^1.4.1"
slash "^3.0.0"
+globby@^13.1.3:
+ version "13.1.4"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.4.tgz#2f91c116066bcec152465ba36e5caa4a13c01317"
+ integrity sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==
+ dependencies:
+ dir-glob "^3.0.1"
+ fast-glob "^3.2.11"
+ ignore "^5.2.0"
+ merge2 "^1.4.1"
+ slash "^4.0.0"
+
globby@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
@@ -6445,6 +6572,11 @@ human-signals@^3.0.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5"
integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==
+human-signals@^4.3.0:
+ version "4.3.1"
+ resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2"
+ integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==
+
humanize-ms@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed"
@@ -6695,6 +6827,13 @@ is-core-module@^2.1.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-mod
dependencies:
has "^1.0.3"
+is-core-module@^2.11.0:
+ version "2.12.1"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd"
+ integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==
+ dependencies:
+ has "^1.0.3"
+
is-data-descriptor@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
@@ -6739,6 +6878,11 @@ is-docker@^2.0.0, is-docker@^2.1.1:
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa"
integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==
+is-docker@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200"
+ integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==
+
is-extendable@^0.1.0, is-extendable@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
@@ -6807,6 +6951,13 @@ is-hex-prefixed@1.0.0:
resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554"
integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==
+is-inside-container@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4"
+ integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==
+ dependencies:
+ is-docker "^3.0.0"
+
is-interactive@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e"
@@ -8986,6 +9137,16 @@ open@^8.4.0:
is-docker "^2.1.1"
is-wsl "^2.2.0"
+open@^9.1.0:
+ version "9.1.0"
+ resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6"
+ integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==
+ dependencies:
+ default-browser "^4.0.0"
+ define-lazy-prop "^3.0.0"
+ is-inside-container "^1.0.0"
+ is-wsl "^2.2.0"
+
opener@^1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598"
@@ -9814,6 +9975,11 @@ resolve-from@^5.0.0:
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
+resolve-pkg-maps@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f"
+ integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==
+
resolve-url@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
@@ -9910,6 +10076,13 @@ rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4:
dependencies:
bn.js "^5.2.0"
+run-applescript@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c"
+ integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==
+ dependencies:
+ execa "^5.0.0"
+
run-async@^2.4.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
@@ -10172,6 +10345,11 @@ slash@^3.0.0:
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
+slash@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7"
+ integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==
+
slice-ansi@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787"
@@ -10644,6 +10822,14 @@ supports-preserve-symlinks-flag@^1.0.0:
resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
+synckit@^0.8.5:
+ version "0.8.5"
+ resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3"
+ integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==
+ dependencies:
+ "@pkgr/utils" "^2.3.1"
+ tslib "^2.5.0"
+
tapable@^2.1.1, tapable@^2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
@@ -10745,6 +10931,11 @@ through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8:
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==
+titleize@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53"
+ integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==
+
tmp@0.0.33, tmp@^0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
@@ -10904,6 +11095,11 @@ tslib@^2.0.0, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
+tslib@^2.5.0:
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338"
+ integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==
+
tsort@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786"
@@ -11109,6 +11305,11 @@ unset-value@^1.0.0:
has-value "^0.3.1"
isobject "^3.0.0"
+untildify@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b"
+ integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==
+
upath@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b"