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

Commit f0e68ec

Browse files
author
Brad Hart
authored
Merge pull request #902 from EOSIO/release/21.0.x
Merging Release/21.0.x into master
2 parents da7cd1b + b4a96c4 commit f0e68ec

9 files changed

+2038
-2468
lines changed

.eslintrc

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"semi": ["error", "always"],
66
"indent": ["error", 4]
77
},
8+
"parserOptions": {
9+
"requireConfigFile": false
10+
},
811
"overrides": [
912
{
1013
"files": ["**/*.ts", "**/*.tsx"],

.github/workflows/publish-edge.yml

+5-12
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,17 @@ jobs:
88
publish-edge:
99
name: Publish Edge
1010
runs-on: ubuntu-18.04
11+
strategy:
12+
matrix:
13+
node-version: [12.14.1]
1114
steps:
1215
- name: Checkout
1316
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
14-
- name: Setup Node.js
17+
- name: Setup Node.js ${{ matrix.node-version }}
1518
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
1619
with:
17-
node-version: '12.14.1'
20+
node-version: ${{ matrix.node-version }}
1821
registry-url: 'https://registry.npmjs.org'
19-
- name: Get yarn cache directory path
20-
id: yarn-cache-dir-path
21-
run: echo "::set-output name=dir::$(yarn cache dir)"
22-
- uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe
23-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
24-
with:
25-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27-
restore-keys: |
28-
${{ runner.os }}-yarn-
2922
- name: Install
3023
run: |
3124
yarn --frozen-lockfile

.github/workflows/publish-release.yml

+10-24
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,17 @@ jobs:
88
if: "!github.event.release.prerelease"
99
name: Publish Release
1010
runs-on: ubuntu-18.04
11+
strategy:
12+
matrix:
13+
node-version: [12.14.1]
1114
steps:
1215
- name: Checkout
1316
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
14-
- name: Setup Node.js
17+
- name: Setup Node.js ${{ matrix.node-version }}
1518
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
1619
with:
17-
node-version: '12.14.1'
20+
node-version: ${{ matrix.node-version }}
1821
registry-url: 'https://registry.npmjs.org'
19-
- name: Get yarn cache directory path
20-
id: yarn-cache-dir-path
21-
run: echo "::set-output name=dir::$(yarn cache dir)"
22-
- uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe
23-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
24-
with:
25-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27-
restore-keys: |
28-
${{ runner.os }}-yarn-
2922
- name: Install
3023
run: |
3124
yarn --frozen-lockfile
@@ -68,24 +61,17 @@ jobs:
6861
if: "github.event.release.prerelease"
6962
name: Publish RC
7063
runs-on: ubuntu-16.04
64+
strategy:
65+
matrix:
66+
node-version: [12.14.1]
7167
steps:
7268
- name: Checkout
7369
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
74-
- name: Setup Node.js
70+
- name: Setup Node.js ${{ matrix.node-version }}
7571
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
7672
with:
77-
node-version: '12.14.1'
73+
node-version: ${{ matrix.node-version }}
7874
registry-url: 'https://registry.npmjs.org'
79-
- name: Get yarn cache directory path
80-
id: yarn-cache-dir-path
81-
run: echo "::set-output name=dir::$(yarn cache dir)"
82-
- uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe
83-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
84-
with:
85-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
86-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
87-
restore-keys: |
88-
${{ runner.os }}-yarn-
8975
- name: Install
9076
run: |
9177
yarn --frozen-lockfile

package.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eosjs",
3-
"version": "21.0.3",
3+
"version": "21.0.4",
44
"description": "Talk to eos API",
55
"main": "dist/index.js",
66
"scripts": {
@@ -26,29 +26,29 @@
2626
"url": "https://github.com/EOSIO/eosjs.git"
2727
},
2828
"dependencies": {
29-
"elliptic": "6.5.3",
29+
"bn.js": "5.2.0",
30+
"elliptic": "6.5.4",
3031
"hash.js": "1.1.7",
31-
"pako": "1.0.11"
32+
"pako": "2.0.3"
3233
},
3334
"devDependencies": {
34-
"@blockone/eslint-config-blockone": "^3.0.0",
35+
"@blockone/eslint-config-blockone": "^4.0.0",
3536
"@types/elliptic": "^6.4.12",
36-
"@types/jest": "^26.0.9",
37-
"@types/node": "^14.0.27",
37+
"@types/jest": "^26.0.22",
38+
"@types/node": "^14.14.41",
3839
"@types/pako": "^1.0.1",
39-
"cypress": "^4.12.1",
40+
"buffer": "^6.0.3",
41+
"crypto-browserify": "^3.12.0",
42+
"cypress": "^7.1.0",
4043
"eosjs-ecc": "^4.0.7",
41-
"eslint": "^6.8.0",
42-
"jest": "^26.3.0",
44+
"eslint": "^7.24.0",
45+
"jest": "^26.6.3",
4346
"jest-fetch-mock": "^3.0.3",
44-
"ts-jest": "^26.2.0",
45-
"ts-loader": "^7.0.5",
46-
"typescript": "^3.9.7",
47-
"webpack": "^4.44.1",
48-
"webpack-cli": "^3.3.12"
49-
},
50-
"resolutions": {
51-
"lodash": "4.17.19"
47+
"ts-jest": "^26.5.5",
48+
"ts-loader": "^8.1.0",
49+
"typescript": "^4.2.4",
50+
"webpack": "^5.34.0",
51+
"webpack-cli": "^4.6.0"
5252
},
5353
"jest": {
5454
"automock": false,
@@ -65,7 +65,7 @@
6565
},
6666
"globals": {
6767
"ts-jest": {
68-
"tsConfig": "tsconfig.json"
68+
"tsconfig": "tsconfig.json"
6969
}
7070
},
7171
"testRegex": "(/src/.*(\\.|/)(test|spec))\\.(jsx?|tsx?)$",

src/eosjs-serialize.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ export class SerialBuffer {
320320
if (typeof s !== 'string') {
321321
throw new Error('Expected string containing name');
322322
}
323-
const regex = new RegExp(/^[.1-5a-z]{1,12}[.1-5a-j]?$/);
323+
const regex = new RegExp(/^[.1-5a-z]{0,12}[.1-5a-j]?$/);
324324
if (!regex.test(s)) {
325325
throw new Error('Name should be less than 13 characters, or less than 14 if last character is between 1-5 or a-j, and only contain the following symbols .12345abcdefghijklmnopqrstuvwxyz'); // eslint-disable-line
326326
}

src/tests/eosjs-serialize.test.ts

-7
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,6 @@ describe('Serialize', () => {
114114
expect(serialBuffer.getName()).toEqual(expectedName);
115115
});
116116

117-
it('should not be able to push name with an account name too short', () => {
118-
const name = '';
119-
120-
const shouldFail = () => serialBuffer.pushName(name);
121-
expect(shouldFail).toThrowError(invalidNameErrorMessage);
122-
});
123-
124117
it('should not be able to push name with an account name too long', () => {
125118
const name = 'abcdabcdabcdab';
126119

webpack.debug.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require('path');
2+
const webpack = require('webpack');
23

34
module.exports = {
45
entry: {
@@ -23,8 +24,17 @@ module.exports = {
2324
}
2425
]
2526
},
27+
plugins: [
28+
new webpack.ProvidePlugin({
29+
Buffer: ["buffer", "Buffer"],
30+
})
31+
],
2632
resolve: {
27-
extensions: ['.tsx', '.ts', '.js']
33+
extensions: ['.tsx', '.ts', '.js'],
34+
fallback: {
35+
buffer: 'buffer',
36+
crypto: 'crypto-browserify'
37+
}
2838
},
2939
output: {
3040
filename: x => x.chunk.name.replace('_', '-') + '.js',

webpack.prod.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require('path');
2+
const webpack = require('webpack');
23

34
module.exports = {
45
entry: {
@@ -22,8 +23,17 @@ module.exports = {
2223
}
2324
]
2425
},
26+
plugins: [
27+
new webpack.ProvidePlugin({
28+
Buffer: ["buffer", "Buffer"],
29+
})
30+
],
2531
resolve: {
26-
extensions: ['.tsx', '.ts', '.js']
32+
extensions: ['.tsx', '.ts', '.js'],
33+
fallback: {
34+
buffer: 'buffer',
35+
crypto: 'crypto-browserify'
36+
}
2737
},
2838
output: {
2939
filename: x => x.chunk.name.replace('_', '-') + '.min.js',

0 commit comments

Comments
 (0)