Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/release/22.0.x' into dockerfile_…
Browse files Browse the repository at this point in the history
…eosio_release
  • Loading branch information
Bradley Hart committed Mar 24, 2021
2 parents c7269e3 + 3190824 commit 2c8d26d
Show file tree
Hide file tree
Showing 7 changed files with 1,132 additions and 1,630 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"semi": ["error", "always"],
"indent": ["error", 4]
},
"parserOptions": {
"requireConfigFile": false
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
Expand Down
28 changes: 15 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,33 @@
"url": "https://github.com/EOSIO/eosjs.git"
},
"dependencies": {
"bn.js": "5.1.3",
"elliptic": "6.5.3",
"bn.js": "5.2.0",
"elliptic": "6.5.4",
"hash.js": "1.1.7",
"pako": "2.0.3"
},
"devDependencies": {
"@blockone/eslint-config-blockone": "^3.0.0",
"@blockone/eslint-config-blockone": "^4.0.0",
"@types/elliptic": "^6.4.12",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.28",
"@types/jest": "^26.0.21",
"@types/node": "^14.14.35",
"@types/node-fetch": "^2.5.8",
"@types/pako": "^1.0.1",
"buffer": "^6.0.3",
"clean-webpack-plugin": "^3.0.0",
"cypress": "^6.5.0",
"crypto-browserify": "^3.12.0",
"cypress": "^6.8.0",
"eosjs-ecc": "^4.0.7",
"eslint": "^6.8.0",
"eslint": "^7.22.0",
"jest": "^26.6.3",
"jest-extended": "^0.11.5",
"jest-fetch-mock": "^3.0.3",
"rimraf": "^3.0.2",
"ts-jest": "^26.5.1",
"ts-loader": "^8.0.17",
"typescript": "^3.9.9",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12"
"ts-jest": "^26.5.4",
"ts-loader": "^8.0.18",
"typescript": "^4.2.3",
"webpack": "^5.28.0",
"webpack-cli": "^4.5.0"
},
"jest": {
"automock": false,
Expand All @@ -71,7 +73,7 @@
},
"globals": {
"ts-jest": {
"tsConfig": "tsconfig.json"
"tsconfig": "tsconfig.json"
}
},
"testRegex": "(/src/.*(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
Expand Down
2 changes: 1 addition & 1 deletion src/eosjs-serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class SerializerState {
* The short form is more convenient, but it can't be converted back to binary (serialized).
* Wherever the anyvar would have {type, value}, it has just the value instead.
*/
export type Anyvar = null | string | number | Anyvar[] | { type: string, value: any } | {};
export type Anyvar = null | string | number | Anyvar[] | { type: string, value: any } | Record<string, unknown>;

interface AnyvarDef {
index: number;
Expand Down
2 changes: 1 addition & 1 deletion src/tests/type-checks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ describe('DB Size API Plugin Endpoints', () => {
describe('Trace API Plugin Endpoints', () => {
it('validates return type of get_block', async () => {
const info: GetInfoResult = await rpc.get_info();
const result: any = await rpc.trace_get_block(info.last_irreversible_block_num);
const result: TraceApiGetBlockResult = await rpc.trace_get_block(info.last_irreversible_block_num);
const traceApiGetBlockResult: any = {
id: 'string',
number: 'number',
Expand Down
12 changes: 11 additions & 1 deletion webpack.debug.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path');
const webpack = require('webpack');

module.exports = {
entry: {
Expand All @@ -23,8 +24,17 @@ module.exports = {
}
]
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
})
],
resolve: {
extensions: ['.tsx', '.ts', '.js']
extensions: ['.tsx', '.ts', '.js'],
fallback: {
buffer: 'buffer',
crypto: 'crypto-browserify'
}
},
output: {
filename: x => x.chunk.name.replace('_', '-') + '.js',
Expand Down
12 changes: 10 additions & 2 deletions webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const webpack = require('webpack');

module.exports = {
entry: {
Expand All @@ -24,10 +25,17 @@ module.exports = {
]
},
plugins: [
new CleanWebpackPlugin({ cleanOnceBeforeBuildPatterns: ['**/*'] })
new CleanWebpackPlugin({ cleanOnceBeforeBuildPatterns: ['**/*'] }),
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
})
],
resolve: {
extensions: ['.tsx', '.ts', '.js']
extensions: ['.tsx', '.ts', '.js'],
fallback: {
buffer: 'buffer',
crypto: 'crypto-browserify'
}
},
output: {
filename: x => x.chunk.name.replace('_', '-') + '.min.js',
Expand Down
Loading

0 comments on commit 2c8d26d

Please sign in to comment.