diff --git a/.babelrc.js b/.babelrc.js deleted file mode 100644 index 7499b3aa92..0000000000 --- a/.babelrc.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2017-2020 @polkadot/api authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -module.exports = require('./babel.config.js'); diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 71c935bfe1..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -.eslintrc.js -**/build/* -**/coverage/* -**/node_modules/* -docs/examples/promise/90_typegen/* diff --git a/.eslintrc.js b/.eslintrc.js index 61510438c7..3543ac3339 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,6 +5,15 @@ const base = require('@polkadot/dev/config/eslint'); module.exports = { ...base, + ignorePatterns: [ + '.eslintrc.js', + '.github/**', + '.vscode/**', + '.yarn/**', + '**/build/*', + '**/coverage/*', + '**/node_modules/*' + ], parserOptions: { ...base.parserOptions, project: [ diff --git a/.github/workflows/pr-any.yml b/.github/workflows/pr-any.yml index 913f3e0dab..28d5e976d6 100644 --- a/.github/workflows/pr-any.yml +++ b/.github/workflows/pr-any.yml @@ -9,7 +9,7 @@ jobs: name: ${{ matrix.step }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: ${{ matrix.step }} run: | yarn install --immutable | grep -v 'YN0013' diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index 85e6f3dde7..a7d4f32c16 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -13,7 +13,7 @@ jobs: if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && github.repository == 'polkadot-js/api'" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: token: ${{ secrets.GH_PAT }} - name: ${{ matrix.step }} diff --git a/.nvmrc b/.nvmrc index f599e28b8a..48082f72f0 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -10 +12 diff --git a/copy-to-apps.sh b/copy-to-apps.sh deleted file mode 100755 index 1452959fa9..0000000000 --- a/copy-to-apps.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017-2020 @polkadot/api authors & contributors -# SPDX-License-Identifier: Apache-2.0 - -function copy_folder () { - SRC="packages/$1/build" - DST="../apps/node_modules/@polkadot/$1" - - echo "** Copying $SRC to $DST" - - rm -rf $DST - cp -r $SRC $DST -} - -yarn polkadot-dev-build-ts - -copy_folder "api" -copy_folder "api-contract" -copy_folder "api-derive" -copy_folder "metadata" -copy_folder "rpc-core" -copy_folder "rpc-provider" -copy_folder "types" -copy_folder "types-known" -copy_folder "typegen" diff --git a/copy-to-test.sh b/copy-to-test.sh deleted file mode 100755 index f287210dab..0000000000 --- a/copy-to-test.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017-2020 @polkadot/api authors & contributors -# SPDX-License-Identifier: Apache-2.0 - -function copy_folder () { - SRC="packages/$1/build" - DST="../test/js-test/node_modules/@polkadot/$1" - - echo "** Copying $SRC to $DST" - - rm -rf $DST - cp -r $SRC $DST -} - -yarn polkadot-dev-build-ts - -copy_folder "api" -copy_folder "api-contract" -copy_folder "api-derive" -copy_folder "metadata" -copy_folder "rpc-core" -copy_folder "rpc-provider" -copy_folder "types" -copy_folder "types-known" -copy_folder "typegen" diff --git a/jest.config.js b/jest.config.js index 4bc66000c5..92e819d892 100644 --- a/jest.config.js +++ b/jest.config.js @@ -25,5 +25,5 @@ module.exports = Object.assign({}, config, { '/packages/types/build', '/packages/types-known/build' ], - resolver: './jest.resolver.js' + resolver: '@polkadot/dev/config/jest-resolver' }); diff --git a/jest.resolver.js b/jest.resolver.js deleted file mode 100644 index aa1f91cde1..0000000000 --- a/jest.resolver.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2017-2020 @polkadot/api authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -const path = require('path'); - -module.exports = function resolver (file, config) { - if (file.includes('package.json')) { - return path.join(config.basedir.replace('/src', '/'), file); - } - - return config.defaultResolver(file, config); -}; diff --git a/package.json b/package.json index c6b2291e5e..714479b786 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "@babel/core": "^7.12.3", "@babel/register": "^7.12.1", "@babel/runtime": "^7.12.1", - "@polkadot/dev": "^0.59.6", - "@polkadot/ts": "^0.3.51", + "@polkadot/dev": "^0.59.9", + "@polkadot/ts": "^0.3.53", "@polkadot/typegen": "workspace:packages/typegen", "@types/jest": "^26.0.15", "copyfiles": "^2.4.0" diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index 47e4182c52..5b76f76422 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -31,8 +31,8 @@ "@polkadot/types": "^2.4.1", "@polkadot/util": "^3.6.1", "@polkadot/util-crypto": "^3.6.1", - "@polkadot/x-fetch": "^0.3.4", - "@polkadot/x-ws": "^0.3.4", + "@polkadot/x-fetch": "^0.3.5", + "@polkadot/x-ws": "^0.3.5", "bn.js": "^5.1.3", "eventemitter3": "^4.0.7" }, diff --git a/yarn.lock b/yarn.lock index fe00bf7e46..d6a87df3fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1764,9 +1764,9 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/dev@npm:^0.59.6": - version: 0.59.6 - resolution: "@polkadot/dev@npm:0.59.6" +"@polkadot/dev@npm:^0.59.9": + version: 0.59.9 + resolution: "@polkadot/dev@npm:0.59.9" dependencies: "@babel/cli": ^7.12.1 "@babel/core": ^7.12.3 @@ -1840,6 +1840,7 @@ __metadata: 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 @@ -1854,7 +1855,7 @@ __metadata: 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: bdd24c2327252ce6be1e44538ed4dadb94917780440291d6184c8073b38f2d6fead2b98a9ada9ff7bac32f4e8628467f391c8b3829bcc4fa2285b75b9b1e59cb + checksum: cbd730bb0423611dee93134e160c3d4c266ec8fac6c9e541f423c6d8882e8e016e6bf597d7eda783c2bc10cc90f3122e8623b3bde4b3bfb5d8156e0ca1a6bf82 languageName: node linkType: hard @@ -1917,8 +1918,8 @@ __metadata: "@polkadot/types": ^2.4.1 "@polkadot/util": ^3.6.1 "@polkadot/util-crypto": ^3.6.1 - "@polkadot/x-fetch": ^0.3.4 - "@polkadot/x-ws": ^0.3.4 + "@polkadot/x-fetch": ^0.3.5 + "@polkadot/x-ws": ^0.3.5 bn.js: ^5.1.3 eventemitter3: ^4.0.7 mock-socket: ^9.0.3 @@ -1926,12 +1927,12 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/ts@npm:^0.3.51": - version: 0.3.51 - resolution: "@polkadot/ts@npm:0.3.51" +"@polkadot/ts@npm:^0.3.53": + version: 0.3.53 + resolution: "@polkadot/ts@npm:0.3.53" dependencies: "@types/chrome": ^0.0.125 - checksum: 15d5eb2f2ffff8e612cd54fd8a9b46eba897224cbaab15a363afa0d801589d29b5e64d802c825cb68b20a8e2fef7b55717316d7aa7d8ac851579eefec15a5316 + checksum: 9453f9e85668705567a482deddc7bbb160b2057c60b8ddf167a228aebd47bfbd8a1ff44ad5114a8f61c4626b199f98ce254a89c8e38699ef6a42820f6270a23b languageName: node linkType: hard @@ -2037,43 +2038,43 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-fetch@npm:^0.3.4": - version: 0.3.4 - resolution: "@polkadot/x-fetch@npm:0.3.4" +"@polkadot/x-fetch@npm:^0.3.5": + version: 0.3.5 + resolution: "@polkadot/x-fetch@npm:0.3.5" dependencies: "@babel/runtime": ^7.12.1 "@types/node-fetch": ^2.5.7 node-fetch: ^2.6.1 - checksum: e5dcf6708aa7c56e87ee8a3c598dbd6f28f357bfd87f83e84a0fa0f4e319381bd7a8cdfa5c78bc9f4358d1850748ce681ed7b9c5367807badd0acbc27d31a143 + checksum: 538bfa601e9869c8ac8387d88a71332726b9efb5572617cd3fc8ef457f800995cf05f392c20b8ab568bf2a5bce7d5208e1710002ae462fcadc6f407d0c1666ac languageName: node linkType: hard "@polkadot/x-textdecoder@npm:^0.3.3": - version: 0.3.4 - resolution: "@polkadot/x-textdecoder@npm:0.3.4" + version: 0.3.5 + resolution: "@polkadot/x-textdecoder@npm:0.3.5" dependencies: "@babel/runtime": ^7.12.1 - checksum: 0d7f89207b19a1d8a7ae71af843bbb1ad85b907dd09dd4e9c2c7961ecc2d0b31a4299cbc8039e342452f74f8f3fe055700ea045524b295b4b4636b88f83a1d22 + checksum: 987ef91c8d09d35e24b09c6d193aaaf5fa4c8a88c895ae8599e957f6aa3e140da58e259b9a4346870215f045b9ff15e645e5c933a07e8f18519009d536f3a4e7 languageName: node linkType: hard "@polkadot/x-textencoder@npm:^0.3.3": - version: 0.3.4 - resolution: "@polkadot/x-textencoder@npm:0.3.4" + version: 0.3.5 + resolution: "@polkadot/x-textencoder@npm:0.3.5" dependencies: "@babel/runtime": ^7.12.1 - checksum: 3819e0376fb104b0cb283c21c43d4f52b803ff4fdc170b2021aad4799db6dbb5635506939a5155f136bc6f75bd8fe99f8597f6d0e2f104b080076435cf221422 + checksum: dbe41a91b993e770cbf5abc9439ad10d2c2f40149f9dc3ebac9a76338f332ae0989284f3b8d53b8d890bdc7808df09fb5cb8671d2b3f906353c047a05664a7d4 languageName: node linkType: hard -"@polkadot/x-ws@npm:^0.3.4": - version: 0.3.4 - resolution: "@polkadot/x-ws@npm:0.3.4" +"@polkadot/x-ws@npm:^0.3.5": + version: 0.3.5 + resolution: "@polkadot/x-ws@npm:0.3.5" dependencies: "@babel/runtime": ^7.12.1 "@types/websocket": ^1.0.1 websocket: ^1.0.32 - checksum: 31b18e89f39f7fa31a0bc27c16dbc9520d6a748c0c117f181b84dcbe8eb1bddced2932173df0d83b2c897e6ef2fd21e5336618e551f4256783f8e903094f4f41 + checksum: 3b451920d3d933689a6d40c9d498c5cb1eac09fcfbf660216ab6afbb0278cb6efd3935c979b4c6c9e101ce03fc7914e00f94427280b40902ed027c52ec7f65d6 languageName: node linkType: hard @@ -10337,8 +10338,8 @@ fsevents@^1.2.7: "@babel/core": ^7.12.3 "@babel/register": ^7.12.1 "@babel/runtime": ^7.12.1 - "@polkadot/dev": ^0.59.6 - "@polkadot/ts": ^0.3.51 + "@polkadot/dev": ^0.59.9 + "@polkadot/ts": ^0.3.53 "@polkadot/typegen": "workspace:packages/typegen" "@types/jest": ^26.0.15 copyfiles: ^2.4.0