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

Commit

Permalink
Merge pull request #902 from EOSIO/release/21.0.x
Browse files Browse the repository at this point in the history
Merging Release/21.0.x into master
  • Loading branch information
Brad Hart committed Apr 19, 2021
2 parents da7cd1b + b4a96c4 commit f0e68ec
Show file tree
Hide file tree
Showing 9 changed files with 2,038 additions and 2,468 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
17 changes: 5 additions & 12 deletions .github/workflows/publish-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,17 @@ jobs:
publish-edge:
name: Publish Edge
runs-on: ubuntu-18.04
strategy:
matrix:
node-version: [12.14.1]
steps:
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Setup Node.js
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
with:
node-version: '12.14.1'
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: |
yarn --frozen-lockfile
Expand Down
34 changes: 10 additions & 24 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,17 @@ jobs:
if: "!github.event.release.prerelease"
name: Publish Release
runs-on: ubuntu-18.04
strategy:
matrix:
node-version: [12.14.1]
steps:
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Setup Node.js
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
with:
node-version: '12.14.1'
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: |
yarn --frozen-lockfile
Expand Down Expand Up @@ -68,24 +61,17 @@ jobs:
if: "github.event.release.prerelease"
name: Publish RC
runs-on: ubuntu-16.04
strategy:
matrix:
node-version: [12.14.1]
steps:
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Setup Node.js
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
with:
node-version: '12.14.1'
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: |
yarn --frozen-lockfile
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eosjs",
"version": "21.0.3",
"version": "21.0.4",
"description": "Talk to eos API",
"main": "dist/index.js",
"scripts": {
Expand All @@ -26,29 +26,29 @@
"url": "https://github.com/EOSIO/eosjs.git"
},
"dependencies": {
"elliptic": "6.5.3",
"bn.js": "5.2.0",
"elliptic": "6.5.4",
"hash.js": "1.1.7",
"pako": "1.0.11"
"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.9",
"@types/node": "^14.0.27",
"@types/jest": "^26.0.22",
"@types/node": "^14.14.41",
"@types/pako": "^1.0.1",
"cypress": "^4.12.1",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"cypress": "^7.1.0",
"eosjs-ecc": "^4.0.7",
"eslint": "^6.8.0",
"jest": "^26.3.0",
"eslint": "^7.24.0",
"jest": "^26.6.3",
"jest-fetch-mock": "^3.0.3",
"ts-jest": "^26.2.0",
"ts-loader": "^7.0.5",
"typescript": "^3.9.7",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
},
"resolutions": {
"lodash": "4.17.19"
"ts-jest": "^26.5.5",
"ts-loader": "^8.1.0",
"typescript": "^4.2.4",
"webpack": "^5.34.0",
"webpack-cli": "^4.6.0"
},
"jest": {
"automock": false,
Expand All @@ -65,7 +65,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 @@ -320,7 +320,7 @@ export class SerialBuffer {
if (typeof s !== 'string') {
throw new Error('Expected string containing name');
}
const regex = new RegExp(/^[.1-5a-z]{1,12}[.1-5a-j]?$/);
const regex = new RegExp(/^[.1-5a-z]{0,12}[.1-5a-j]?$/);
if (!regex.test(s)) {
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
}
Expand Down
7 changes: 0 additions & 7 deletions src/tests/eosjs-serialize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,6 @@ describe('Serialize', () => {
expect(serialBuffer.getName()).toEqual(expectedName);
});

it('should not be able to push name with an account name too short', () => {
const name = '';

const shouldFail = () => serialBuffer.pushName(name);
expect(shouldFail).toThrowError(invalidNameErrorMessage);
});

it('should not be able to push name with an account name too long', () => {
const name = 'abcdabcdabcdab';

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: 11 additions & 1 deletion webpack.prod.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 @@ -22,8 +23,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('_', '-') + '.min.js',
Expand Down

0 comments on commit f0e68ec

Please sign in to comment.