Use .js imports in src (#3098)

* Use .js imports in src

* Bump dev
This commit is contained in:
Jaco
2023-03-09 10:45:08 +02:00
committed by GitHub
parent 624e84c176
commit 99862a56f5
9 changed files with 66 additions and 66 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import fs from 'node:fs';
import { decodeAddress } from '@polkadot/util-crypto';
import { fetchJson, fetchText } from './fetch';
import { fetchJson, fetchText } from './fetch.js';
const TICKS = '```';
const TIMEOUT = 5000;
+2 -2
View File
@@ -6,9 +6,9 @@ import type { AddressList, HostList } from './types';
import { u8aEq } from '@polkadot/util';
import { decodeAddress } from '@polkadot/util-crypto';
import { fetchJson } from './fetch';
import { fetchJson } from './fetch.js';
export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
interface Cache<T> {
end: number;
+1 -1
View File
@@ -7,7 +7,7 @@ import { load as yamlParse } from 'js-yaml';
import fs from 'node:fs';
import process from 'node:process';
import { fetchJson, fetchText } from './fetch';
import { fetchJson, fetchText } from './fetch.js';
interface CryptoScamEntry {
addresses: Record<string, string[]>;
+2 -2
View File
@@ -5,7 +5,7 @@
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
import others from './detectOther.js';
import { packageInfo } from './packageInfo.js';
detectPackage(packageInfo, null, others);
+1 -1
View File
@@ -3,7 +3,7 @@
/// <reference types="@polkadot/dev/node/test/node" />
import { checkAddress, checkIfDenied } from '.';
import { checkAddress, checkIfDenied } from './index.js';
describe('checkIfDenied', (): void => {
it('returns false when host is not listed', async (): Promise<void> => {
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2020-2023 @polkadot/phishing authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
import './detectPackage.js';
export * from './bundle';
export * from './bundle.js';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2020-2023 @polkadot/phishing authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './index';
export * from './index.js';