Skip to content

Commit 731cdce

Browse files
authored
Bumped dependencies (#47)
1 parent e785112 commit 731cdce

File tree

8 files changed

+1569
-547
lines changed

8 files changed

+1569
-547
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Publish snapshot package
22
on:
3-
pull_request:
43
push:
54
branches: [ 'master' ]
65
release:
@@ -12,7 +11,7 @@ permissions:
1211
jobs:
1312
publish-snapshots:
1413
environment:
15-
name: prod
14+
name: NPMJS
1615
url: ${{ steps.publish.outputs.url }}
1716
name: Publish snapshot packages
1817
runs-on: ubuntu-latest
@@ -22,15 +21,10 @@ jobs:
2221
with:
2322
registry-url: 'https://registry.npmjs.org'
2423
- run: npm i
25-
- if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
24+
- if: ${{ github.event_name == 'push' }}
2625
run: |
2726
PACKAGE_NAME=$(jq --raw-output .name package.json)
28-
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
29-
PREID="${{ github.event.number }}-snapshot"
30-
else
31-
PREID="snapshot"
32-
fi
33-
npm version prerelease --preid=$PREID --no-git-tag-version
27+
npm version prerelease --preid=snapshot --no-git-tag-version
3428
PREFIX=$(jq --raw-output .version package.json | sed 's/\.[0-9]\+$//')
3529
NEXT=$(npm view $PACKAGE_NAME versions --json \
3630
| jq --raw-output --arg prefix $PREFIX '[.[] | select(startswith($prefix))|capture("snapshot\\.(?<n>[0-9]+)").n|tonumber]|max + 1 // 0')

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ Encrypt bytes using AES algorithm.
359359
```typescript
360360
import { aesEncrypt, randomBytes } from '@waves/ts-lib-crypto'
361361

362-
const data = Uint8Arraty.from([1,2,3])
362+
const data = Uint8Array.from([1,2,3])
363363
const mode = 'CBC' // Possible modes are 'CBC' | 'CFB' | 'CTR' | 'OFB' | 'ECB' | 'GCM'
364364

365365
const key = randomBytes(32)

eslint.config.cjs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// eslint.config.cjs
2+
const tsParser = require('@typescript-eslint/parser');
3+
4+
module.exports = [
5+
{
6+
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
7+
languageOptions: {
8+
parser: tsParser,
9+
parserOptions: {
10+
ecmaVersion: 2025,
11+
sourceType: 'module'
12+
}
13+
},
14+
rules: {
15+
// semicolon: never
16+
'semi': ['error', 'never'],
17+
18+
// arrow-return-shorthand: multiline
19+
'arrow-body-style': ['error', 'as-needed'],
20+
21+
// trailing-comma
22+
'comma-dangle': ['error', {
23+
arrays: 'always-multiline',
24+
objects: 'always-multiline',
25+
functions: 'never',
26+
imports: 'always-multiline',
27+
exports: 'always-multiline'
28+
}],
29+
30+
// indent: 2 spaces
31+
'indent': ['error', 2, { SwitchCase: 1 }],
32+
33+
// whitespace
34+
'space-infix-ops': 'error',
35+
'space-before-blocks': 'error',
36+
'space-before-function-paren': ['error', 'never'],
37+
'space-in-parens': ['error', 'never'],
38+
'space-unary-ops': ['error', { words: true, nonwords: false }],
39+
'keyword-spacing': ['error', { before: true, after: true }],
40+
'semi-spacing': 'error',
41+
'comma-spacing': ['error', { before: false, after: true }],
42+
43+
// quotes
44+
'quotes': ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }]
45+
}
46+
}
47+
];

jest.config.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
module.exports = {
2-
verbose: true,
3-
roots: [
4-
'<rootDir>/test',
5-
],
6-
testRegex: '(/__tests__/.*|(\\.|/)(test))\\.tsx?$',
7-
transform: {
8-
"^.+\\.(ts|tsx)?$": ["ts-jest", {
9-
diagnostics: false,
10-
}]
11-
},
12-
collectCoverage: true,
13-
coverageReporters: [
14-
"json-summary",
15-
"text",
16-
"lcov"
17-
],
18-
preset: 'ts-jest',
19-
testMatch: null,
20-
testEnvironment: 'node',
21-
"moduleFileExtensions": [
22-
"ts",
23-
"tsx",
24-
"js",
25-
"jsx",
26-
"json",
27-
"node"
28-
]
2+
verbose: true,
3+
roots: [
4+
'<rootDir>/test',
5+
],
6+
testRegex: '(/__tests__/.*|(\\.|/)(test))\\.tsx?$',
7+
transform: {
8+
'^.+\\.(ts|tsx)?$': ['ts-jest', {
9+
diagnostics: false,
10+
}],
11+
},
12+
collectCoverage: true,
13+
coverageReporters: [
14+
'json-summary',
15+
'text',
16+
'lcov',
17+
],
18+
preset: 'ts-jest',
19+
testMatch: null,
20+
testEnvironment: 'node',
21+
'moduleFileExtensions': [
22+
'ts',
23+
'tsx',
24+
'js',
25+
'jsx',
26+
'json',
27+
'node',
28+
],
2929
}

0 commit comments

Comments
 (0)