Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use .js imports in src #3098

Merged
merged 3 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"dnslink-cloudflare": "^3.0.0"
},
"devDependencies": {
"@polkadot/dev": "^0.70.4",
"@polkadot/dev": "^0.71.1",
"@types/node": "^18.14.6"
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/phishing/src/addrcheck.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/phishing/src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/phishing/src/crosscheck.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]>;
Expand Down
4 changes: 2 additions & 2 deletions packages/phishing/src/detectPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion packages/phishing/src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> => {
Expand Down
4 changes: 2 additions & 2 deletions packages/phishing/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
2 changes: 1 addition & 1 deletion packages/phishing/src/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020-2023 @polkadot/phishing authors & contributors
// SPDX-License-Identifier: Apache-2.0

export * from './index';
export * from './index.js';
110 changes: 55 additions & 55 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,9 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/dev@npm:^0.70.4":
version: 0.70.4
resolution: "@polkadot/dev@npm:0.70.4"
"@polkadot/dev@npm:^0.71.1":
version: 0.71.1
resolution: "@polkadot/dev@npm:0.71.1"
dependencies:
"@eslint/js": ^8.35.0
"@rollup/plugin-alias": ^4.0.3
Expand All @@ -371,8 +371,8 @@ __metadata:
"@rollup/plugin-json": ^6.0.0
"@rollup/plugin-node-resolve": ^15.0.1
"@rushstack/eslint-patch": ^1.2.0
"@typescript-eslint/eslint-plugin": ^5.54.0
"@typescript-eslint/parser": ^5.54.0
"@typescript-eslint/eslint-plugin": ^5.54.1
"@typescript-eslint/parser": ^5.54.1
eslint: ^8.35.0
eslint-config-standard: ^17.0.0
eslint-import-resolver-node: ^0.3.7
Expand Down Expand Up @@ -426,7 +426,7 @@ __metadata:
polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs
polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs
polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs
checksum: 446bc7a0637a91d30829d5fccb2b6c74d9f54bc7e67290c11cfca56a0f528a33b5ee1b066ed9bde6b669d866c89e3895ff7a44b79210bb549dd406afccc0ca9d
checksum: 18505f604cd99a6fa858fe0dd6f9f09f6ae46bc3428616dd8df6f4533b4854de1c517f1c0ede5f7c11a881ffea2175ffd48c8526ea16f7da3320595d0ae67cf8
languageName: node
linkType: hard

Expand Down Expand Up @@ -1074,13 +1074,13 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:^5.54.0":
version: 5.54.0
resolution: "@typescript-eslint/eslint-plugin@npm:5.54.0"
"@typescript-eslint/eslint-plugin@npm:^5.54.1":
version: 5.54.1
resolution: "@typescript-eslint/eslint-plugin@npm:5.54.1"
dependencies:
"@typescript-eslint/scope-manager": 5.54.0
"@typescript-eslint/type-utils": 5.54.0
"@typescript-eslint/utils": 5.54.0
"@typescript-eslint/scope-manager": 5.54.1
"@typescript-eslint/type-utils": 5.54.1
"@typescript-eslint/utils": 5.54.1
debug: ^4.3.4
grapheme-splitter: ^1.0.4
ignore: ^5.2.0
Expand All @@ -1094,7 +1094,7 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 4fdb520b8e0f6b9eb878206ddfa4212522f170d1507d7aba8a975159a198efa37af6d2d17982dd560317452d0748f2e2da5dd7347b172bc4446d1c5562ce2e94
checksum: 76476c08ca0142a9bf6e2381f5cd1c037d86fbafa9c0dded4a97bd3b23b5962dd2c3943bade11b21d674195674f0e36dbf80faa15a1906f5a2ca1f699baf1dd5
languageName: node
linkType: hard

Expand All @@ -1109,20 +1109,20 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:^5.54.0":
version: 5.54.0
resolution: "@typescript-eslint/parser@npm:5.54.0"
"@typescript-eslint/parser@npm:^5.54.1":
version: 5.54.1
resolution: "@typescript-eslint/parser@npm:5.54.1"
dependencies:
"@typescript-eslint/scope-manager": 5.54.0
"@typescript-eslint/types": 5.54.0
"@typescript-eslint/typescript-estree": 5.54.0
"@typescript-eslint/scope-manager": 5.54.1
"@typescript-eslint/types": 5.54.1
"@typescript-eslint/typescript-estree": 5.54.1
debug: ^4.3.4
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 368d6dd85be42c3f518f0ddeed23ecd1d3c9484a77ae291ee4e08e2703ed379bed613bde014cd8ab2a3e06e85dd8aef201112ae5e3d2a07deba29ae80bb1fe06
checksum: f466513d306ca926b97c2cec1eebaf2cd15d45bd5633a4358f23ba9a4de1b0ec4630b1c20abc395943934ed1d2ef65f545fd6737c317a7abe579612101e8a83f
languageName: node
linkType: hard

Expand All @@ -1136,30 +1136,30 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/scope-manager@npm:5.54.0":
version: 5.54.0
resolution: "@typescript-eslint/scope-manager@npm:5.54.0"
"@typescript-eslint/scope-manager@npm:5.54.1":
version: 5.54.1
resolution: "@typescript-eslint/scope-manager@npm:5.54.1"
dependencies:
"@typescript-eslint/types": 5.54.0
"@typescript-eslint/visitor-keys": 5.54.0
checksum: e50f12396de0ddb94aab119bdd5f4769b80dd2c273e137fd25e5811e25114d7a3d3668cdb3c454aca9537e940744881d62a1fed2ec86f07f60533dc7382ae15c
"@typescript-eslint/types": 5.54.1
"@typescript-eslint/visitor-keys": 5.54.1
checksum: 9add24cf3a7852634ad0680a827646860ac4698a6ac8aae31e8b781e29f59e84b51f0cdaacffd0747811012647f01b51969d988da9b302ead374ceebffbe204b
languageName: node
linkType: hard

"@typescript-eslint/type-utils@npm:5.54.0":
version: 5.54.0
resolution: "@typescript-eslint/type-utils@npm:5.54.0"
"@typescript-eslint/type-utils@npm:5.54.1":
version: 5.54.1
resolution: "@typescript-eslint/type-utils@npm:5.54.1"
dependencies:
"@typescript-eslint/typescript-estree": 5.54.0
"@typescript-eslint/utils": 5.54.0
"@typescript-eslint/typescript-estree": 5.54.1
"@typescript-eslint/utils": 5.54.1
debug: ^4.3.4
tsutils: ^3.21.0
peerDependencies:
eslint: "*"
peerDependenciesMeta:
typescript:
optional: true
checksum: 9cb5b52c7277bdf74b9ea3282fc40f41fda90ea4b1d33039044476e43cf05a766b1294e7d45f429594f2776828f7d17729cfa4ea027315f3df883e748ba57514
checksum: 0073838b782b7f4619775be124ca6643fec43a2d56043eaf3ceb100960a5193f14ac747b28ce17a5c9ac643fdee8abda82a7d905c81521358de7b27a2dcbc9af
languageName: node
linkType: hard

Expand All @@ -1177,10 +1177,10 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/types@npm:5.54.0":
version: 5.54.0
resolution: "@typescript-eslint/types@npm:5.54.0"
checksum: 0f66b1b93078f3afea6dfcd3d4e2f0abea4f60cd0c613c2cf13f85098e5bf786185484c9846ed80b6c4272de2c31a70c5a8aacb91314cf1b6da7dcb8855cb7ac
"@typescript-eslint/types@npm:5.54.1":
version: 5.54.1
resolution: "@typescript-eslint/types@npm:5.54.1"
checksum: 84a8f725cfa10646af389659e09c510c38d82c65960c7b613f844a264acc0e197471cba03f3e8f4b6411bc35dca28922c8352a7bd44621411c73fd6dd4096da2
languageName: node
linkType: hard

Expand All @@ -1202,12 +1202,12 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:5.54.0, @typescript-eslint/typescript-estree@npm:^5.13.0":
version: 5.54.0
resolution: "@typescript-eslint/typescript-estree@npm:5.54.0"
"@typescript-eslint/typescript-estree@npm:5.54.1, @typescript-eslint/typescript-estree@npm:^5.13.0":
version: 5.54.1
resolution: "@typescript-eslint/typescript-estree@npm:5.54.1"
dependencies:
"@typescript-eslint/types": 5.54.0
"@typescript-eslint/visitor-keys": 5.54.0
"@typescript-eslint/types": 5.54.1
"@typescript-eslint/visitor-keys": 5.54.1
debug: ^4.3.4
globby: ^11.1.0
is-glob: ^4.0.3
Expand All @@ -1216,7 +1216,7 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 377c75c34c4f95b7ab6218c1d96a6db3ea6ed6727711b6a09354582fe0157861dc1b6fb9e3f7113cd09741f713735d59d5ab5845457f5733a4ebad7470bf600a
checksum: ea42bdb4832fa96fa1121237c9b664ac4506e2836646651e08a8542c8601d78af6c288779707f893ca4c884221829bb7d7b4b43c4a9c3ed959519266d03a139b
languageName: node
linkType: hard

Expand Down Expand Up @@ -1256,21 +1256,21 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:5.54.0, @typescript-eslint/utils@npm:^5.10.0":
version: 5.54.0
resolution: "@typescript-eslint/utils@npm:5.54.0"
"@typescript-eslint/utils@npm:5.54.1, @typescript-eslint/utils@npm:^5.10.0":
version: 5.54.1
resolution: "@typescript-eslint/utils@npm:5.54.1"
dependencies:
"@types/json-schema": ^7.0.9
"@types/semver": ^7.3.12
"@typescript-eslint/scope-manager": 5.54.0
"@typescript-eslint/types": 5.54.0
"@typescript-eslint/typescript-estree": 5.54.0
"@typescript-eslint/scope-manager": 5.54.1
"@typescript-eslint/types": 5.54.1
"@typescript-eslint/typescript-estree": 5.54.1
eslint-scope: ^5.1.1
eslint-utils: ^3.0.0
semver: ^7.3.7
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
checksum: b8f344fc2961c7af530b93e53d5a17b5084cdf550b381082e3fb7f349ef16e718d9eebde1b9fc2d8fc4ecf8d60d334b004359977247554265c1afc87323bed37
checksum: 8f428ea4d338ce85d55fd0c9ae2b217b323f29f51b7c9f8077fef7001ca21d28b032c5e5165b67ae6057aef69edb0e7a164c3c483703be6f3e4e574248bbc399
languageName: node
linkType: hard

Expand All @@ -1294,13 +1294,13 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/visitor-keys@npm:5.54.0":
version: 5.54.0
resolution: "@typescript-eslint/visitor-keys@npm:5.54.0"
"@typescript-eslint/visitor-keys@npm:5.54.1":
version: 5.54.1
resolution: "@typescript-eslint/visitor-keys@npm:5.54.1"
dependencies:
"@typescript-eslint/types": 5.54.0
"@typescript-eslint/types": 5.54.1
eslint-visitor-keys: ^3.3.0
checksum: 17fc323c09e6272b603cdaec30a99916600fbbb737e1fbc8c1727a487753b4363cea112277fa43e0562bff34bdd1de9ad73ff9433118b1fd469b112fad0313ca
checksum: 3a691abd2a43b86a0c41526d14a2afcc93a2e0512b5f8b9ec43f6029c493870808036eae5ee4fc655d26e1999017c4a4dffb241f47c36c2a1238ec9fbd08719c
languageName: node
linkType: hard

Expand Down Expand Up @@ -7611,7 +7611,7 @@ fsevents@~2.3.2:
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@pinata/sdk": ^1.2.1
"@polkadot/dev": ^0.70.4
"@polkadot/dev": ^0.71.1
"@types/node": ^18.14.6
dnslink-cloudflare: ^3.0.0
languageName: unknown
Expand Down