diff --git a/.eslintrc.js b/.eslintrc.js index 7b1a78efd..2a950ebe6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,7 @@ // Copyright 2020 @polkadot/phishing authors & contributors // SPDX-License-Identifier: Apache-2.0 -const base = require('@polkadot/dev/config/eslint'); +const base = require('@polkadot/dev/config/eslint.cjs'); module.exports = { ...base, diff --git a/CHANGELOG.md b/CHANGELOG.md index 4096b2fcd..6efe9a092 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGELOG +## 0.2.1 Nov 11, 2020 + +Changes: + +- Remove default export on package + + ## 0.1.1 Sep 21, 2020 +Changes: + - Initial release diff --git a/babel.config.js b/babel.config.js index 13e18c37b..7c35ad5ae 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,4 +1,4 @@ // Copyright 2020 @polkadot/phishing authors & contributors // SPDX-License-Identifier: Apache-2.0 -module.exports = require('@polkadot/dev/config/babel'); +module.exports = require('@polkadot/dev/config/babel-config-cjs.cjs'); diff --git a/babel.esnext.js b/babel.esnext.js deleted file mode 100644 index 180fc2a5e..000000000 --- a/babel.esnext.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2020 @polkadot/phishing authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -module.exports = require('@polkadot/dev/config/babel.esnext.js'); diff --git a/jest.config.js b/jest.config.js index 5d4401663..e361b3b9d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,7 @@ // Copyright 2020 @polkadot/phishing authors & contributors // SPDX-License-Identifier: Apache-2.0 -const config = require('@polkadot/dev/config/jest'); +const config = require('@polkadot/dev/config/jest.cjs'); module.exports = Object.assign({}, config, { moduleNameMapper: { @@ -9,5 +9,5 @@ module.exports = Object.assign({}, config, { modulePathIgnorePatterns: [ '/build' ], - resolver: '@polkadot/dev/config/jest-resolver' + resolver: '@polkadot/dev/config/jest-resolver.cjs' }); diff --git a/package.json b/package.json index 4d8bdc235..4df445081 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ }, "devDependencies": { "@babel/core": "^7.12.3", - "@polkadot/dev": "^0.59.23", + "@polkadot/dev": "^0.60.1", "@types/jest": "^26.0.15" }, - "version": "0.1.17" + "version": "0.2.0" } diff --git a/packages/phishing/README.md b/packages/phishing/README.md index 3eaf4e217..628fe0cb8 100644 --- a/packages/phishing/README.md +++ b/packages/phishing/README.md @@ -1,9 +1,9 @@ # @polkadot/phishing ```js -import retrieveCheckDeny from '@polkadot/phishing'; +import { checkIfDenied } from '@polkadot/phishing'; -const isOnDeny = await retrieveCheckDeny(window.location.host); +const isOnDeny = await checkIfDenied(window.location.host); console.log(`isOnDeny=${isOnDeny}`); ``` diff --git a/packages/phishing/package.json b/packages/phishing/package.json index f67480f0b..0b97b16a9 100644 --- a/packages/phishing/package.json +++ b/packages/phishing/package.json @@ -1,9 +1,8 @@ { "name": "@polkadot/phishing", - "version": "0.1.17", + "version": "0.2.0", "description": "Simple phishing scripts from a central source", "main": "index.js", - "module": "esm/index.js", "sideEffects": false, "author": "Jaco Greeff ", "maintainers": [], @@ -14,7 +13,7 @@ "homepage": "https://github.com/polkadot-js/common/tree/master/packages/phishing#readme", "dependencies": { "@babel/runtime": "^7.12.1", - "@polkadot/x-fetch": "^4.0.2-11" + "@polkadot/x-fetch": "^4.0.1" }, "devDependencies": { "@types/js-yaml": "^3.12.5", diff --git a/packages/phishing/src/index.spec.ts b/packages/phishing/src/index.spec.ts index d8e144f16..483345ae3 100644 --- a/packages/phishing/src/index.spec.ts +++ b/packages/phishing/src/index.spec.ts @@ -1,7 +1,7 @@ // Copyright 2020 @polkadot/phishing authors & contributors // SPDX-License-Identifier: Apache-2.0 -import checkIfDenied from '.'; +import { checkIfDenied } from '.'; describe('checkIfDenied', (): void => { it('returns false when host in list', async (): Promise => { diff --git a/packages/phishing/src/index.ts b/packages/phishing/src/index.ts index 1852d9f1c..4d2bec59d 100644 --- a/packages/phishing/src/index.ts +++ b/packages/phishing/src/index.ts @@ -48,7 +48,7 @@ export function checkHost (items: string[], host: string): boolean { * Determines if a host is in our deny list. Returns true if host is a problematic one. Returns * true if the host provided is in our list of less-than-honest sites. */ -export default async function checkIfDenied (host: string): Promise { +export async function checkIfDenied (host: string): Promise { try { const { deny } = await retrieveHostList(); diff --git a/packages/unused/package.json b/packages/unused/package.json index dbbac635c..d8fb30ea5 100644 --- a/packages/unused/package.json +++ b/packages/unused/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/unused", - "version": "0.1.17", + "version": "0.2.0", "description": "Dummy", "main": "index.js", "author": "Jaco Greeff ", diff --git a/tsconfig.json b/tsconfig.json index 0535508ee..8c6e26fd2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "./node_modules/@polkadot/dev/config/tsconfig", + "extends": "@polkadot/dev/config/tsconfig.json", "exclude": [ "build/**/*", "**/build/**/*" diff --git a/yarn.lock b/yarn.lock index 7a7964cda..baf2da9e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1746,9 +1746,9 @@ __metadata: languageName: node linkType: hard -"@polkadot/dev@npm:^0.59.23": - version: 0.59.23 - resolution: "@polkadot/dev@npm:0.59.23" +"@polkadot/dev@npm:^0.60.1": + version: 0.60.1 + resolution: "@polkadot/dev@npm:0.60.1" dependencies: "@babel/cli": ^7.12.1 "@babel/core": ^7.12.3 @@ -1813,29 +1813,29 @@ __metadata: typescript: ^4.0.5 yargs: ^16.1.0 bin: - polkadot-ci-ghact-build: scripts/polkadot-ci-ghact-build.js - polkadot-ci-ghact-docs: scripts/polkadot-ci-ghact-docs.js - polkadot-ci-ghpages-force: scripts/polkadot-ci-ghpages-force.js - polkadot-dev-build-docs: scripts/polkadot-dev-build-docs.js - polkadot-dev-build-ts: scripts/polkadot-dev-build-ts.js - polkadot-dev-circular: scripts/polkadot-dev-circular.js - polkadot-dev-clean-build: scripts/polkadot-dev-clean-build.js - polkadot-dev-copy-to: scripts/polkadot-dev-copy-to.js - polkadot-dev-run-lint: scripts/polkadot-dev-run-lint.js - polkadot-dev-run-prettier: scripts/polkadot-dev-run-prettier.js - polkadot-dev-run-test: scripts/polkadot-dev-run-test.js - polkadot-dev-version: scripts/polkadot-dev-version.js - polkadot-dev-yarn-only: scripts/polkadot-dev-yarn-only.js - polkadot-exec-eslint: scripts/polkadot-exec-eslint.js - polkadot-exec-ghpages: scripts/polkadot-exec-ghpages.js - polkadot-exec-ghrelease: scripts/polkadot-exec-ghrelease.js - polkadot-exec-lerna: scripts/polkadot-exec-lerna.js - polkadot-exec-prettier: scripts/polkadot-exec-prettier.js - polkadot-exec-tsc: scripts/polkadot-exec-tsc.js - polkadot-exec-typedoc: scripts/polkadot-exec-typedoc.js - polkadot-exec-vuepress: scripts/polkadot-exec-vuepress.js - polkadot-exec-webpack: scripts/polkadot-exec-webpack.js - checksum: 1b9ba8a275ea59980530a3a7d891840727c8d0e91eabeca6717d8a38cff4f9f9a5629942c3f5e7ff5a309f1107a9486da9bf4782c7459549887c55a398b80c17 + polkadot-ci-ghact-build: scripts/polkadot-ci-ghact-build.cjs + polkadot-ci-ghact-docs: scripts/polkadot-ci-ghact-docs.cjs + polkadot-ci-ghpages-force: scripts/polkadot-ci-ghpages-force.cjs + polkadot-dev-build-docs: scripts/polkadot-dev-build-docs.cjs + polkadot-dev-build-ts: scripts/polkadot-dev-build-ts.cjs + polkadot-dev-circular: scripts/polkadot-dev-circular.cjs + polkadot-dev-clean-build: scripts/polkadot-dev-clean-build.cjs + polkadot-dev-copy-to: scripts/polkadot-dev-copy-to.cjs + polkadot-dev-run-lint: scripts/polkadot-dev-run-lint.cjs + polkadot-dev-run-prettier: scripts/polkadot-dev-run-prettier.cjs + polkadot-dev-run-test: scripts/polkadot-dev-run-test.cjs + polkadot-dev-version: scripts/polkadot-dev-version.cjs + polkadot-dev-yarn-only: scripts/polkadot-dev-yarn-only.cjs + polkadot-exec-eslint: scripts/polkadot-exec-eslint.cjs + polkadot-exec-ghpages: scripts/polkadot-exec-ghpages.cjs + polkadot-exec-ghrelease: scripts/polkadot-exec-ghrelease.cjs + polkadot-exec-lerna: scripts/polkadot-exec-lerna.cjs + polkadot-exec-prettier: scripts/polkadot-exec-prettier.cjs + polkadot-exec-tsc: scripts/polkadot-exec-tsc.cjs + polkadot-exec-typedoc: scripts/polkadot-exec-typedoc.cjs + polkadot-exec-vuepress: scripts/polkadot-exec-vuepress.cjs + polkadot-exec-webpack: scripts/polkadot-exec-webpack.cjs + checksum: 87086fe151f853bad1206099b642a20c381801e67d3564c35f478acc1d5c2dd2f29b8ac4d4aaa71d30880764ab5d678adeb7f2edb6d38607a5e629e3ccb75ba2 languageName: node linkType: hard @@ -1844,7 +1844,7 @@ __metadata: resolution: "@polkadot/phishing@workspace:packages/phishing" dependencies: "@babel/runtime": ^7.12.1 - "@polkadot/x-fetch": ^4.0.2-11 + "@polkadot/x-fetch": ^4.0.1 "@types/js-yaml": ^3.12.5 js-yaml: ^3.14.0 languageName: unknown @@ -1856,14 +1856,14 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/x-fetch@npm:^4.0.2-11": - version: 4.0.2-11 - resolution: "@polkadot/x-fetch@npm:4.0.2-11" +"@polkadot/x-fetch@npm:^4.0.1": + version: 4.0.1 + resolution: "@polkadot/x-fetch@npm:4.0.1" dependencies: "@babel/runtime": ^7.12.1 "@types/node-fetch": ^2.5.7 node-fetch: ^2.6.1 - checksum: c28e4c9087ebae418ea2e838fbb64e6b0748530aebf6081f47a493eeac23385056405db37244fea22aa8393d521551eb92e9656a67676c5d1676c26c115f65d1 + checksum: d1aa6ede4df491c71af8fccbff032b80df27bbefff407aeea9db7bbf842012a75e2e66ceb57ea2ec733397f6188544a19fed509f693680cfb220fcdccb372ac6 languageName: node linkType: hard @@ -8662,7 +8662,7 @@ fsevents@^1.2.7: resolution: "root-workspace-0b6124@workspace:." dependencies: "@babel/core": ^7.12.3 - "@polkadot/dev": ^0.59.23 + "@polkadot/dev": ^0.60.1 "@types/jest": ^26.0.15 languageName: unknown linkType: soft