Skip to content

Commit

Permalink
Bump polkadot/js version. (subquery#222)
Browse files Browse the repository at this point in the history
* Bump polkadot/js version.

* Fix test

* Fix test

* use babel-jest

* Fix
  • Loading branch information
jiqiang90 authored Mar 11, 2021
1 parent 0f8a61b commit 942811f
Show file tree
Hide file tree
Showing 7 changed files with 832 additions and 193 deletions.
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {presets: ['@babel/preset-env']}
9 changes: 7 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ module.exports = {
// timers: "real",

// A map from regular expressions to paths to transformers
"transform": {
"^.+\\.ts$": "ts-jest"
transform: {
'^.+\\.(ts|tsx)?$': 'ts-jest',
"^.+\\.(js|jsx)$": "babel-jest",
},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
Expand All @@ -197,6 +198,10 @@ module.exports = {
// "\\.pnp\\.[^\\/]+$"
// ],

"transformIgnorePatterns": [
"node_modules/(?!(@polkadot|@babel/runtime/helpers/esm)/)"
],

// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,

Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
"packages/*"
],
"devDependencies": {
"@babel/preset-env": "^7.13.10",
"@types/node": "^12.19.15",
"@typescript-eslint/eslint-plugin": "^4.14.2",
"@typescript-eslint/parser": "^4.14.2",
"babel-jest": "^26.6.3",
"eslint": "^7.19.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-header": "^3.1.0",
Expand All @@ -18,14 +20,16 @@
"jest": "^26.6.3",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"regenerator-runtime": "^0.13.7",
"ts-jest": "^26.5.3",
"ts-loader": "^8.0.14",
"ts-node": "^9.1.1",
"tsconfig-paths": "^3.9.0",
"typescript": "^4.1.3",
"vuepress": "^1.8.0"
},
"resolutions": {
"@polkadot/api": "3.11.1"
"@polkadot/api": "4.0.3"
},
"scripts": {
"docs:dev": "vuepress dev docs",
Expand Down
5 changes: 2 additions & 3 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@nestjs/event-emitter": "^0.0.2",
"@nestjs/platform-express": "^7.6.1",
"@nestjs/schedule": "^0.4.2",
"@polkadot/api": "^3",
"@polkadot/api": "4.0.3",
"@subql/common": "workspace:*",
"@subql/types": "workspace:*",
"@willsoto/nestjs-prometheus": "^3.0.0",
Expand Down Expand Up @@ -58,8 +58,7 @@
"@types/yargs": "^16.0.0",
"dotenv": "^8.2.0",
"nodemon": "^2.0.7",
"supertest": "^6.1.3",
"ts-jest": "^26.5.0"
"supertest": "^6.1.3"
},
"files": [
"/dist",
Expand Down
4 changes: 2 additions & 2 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"/dist"
],
"peerDependencies": {
"@polkadot/api": "^3"
"@polkadot/api": "^4"
},
"devDependencies": {
"@polkadot/api": "^3",
"@polkadot/api": "^4",
"@types/app-module-path": "^2.2.0"
}
}
1 change: 1 addition & 0 deletions test/jest-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import 'reflect-metadata';
import 'regenerator-runtime/runtime'
Loading

0 comments on commit 942811f

Please sign in to comment.