Skip to content

Commit fc1200d

Browse files
Remove redundant dependencies and fix eslint rule for license header
1 parent 1a69d10 commit fc1200d

File tree

9 files changed

+34
-54
lines changed

9 files changed

+34
-54
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"sourceType": "module"
1111
},
1212
"plugins": ["@typescript-eslint", "license-header"],
13-
"ignorePatterns": ["license-header.js"],
13+
"ignorePatterns": ["license-header.js", "**/*.config.js", "**/*.config.cjs", "cjs/**", "esm/**"],
1414
"rules": {
1515
"linebreak-style": ["error", "unix"],
1616
"quotes": ["error", "single"],

.github/workflows/code-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Node.js
2121
uses: actions/setup-node@v2
2222
with:
23-
node-version: '18'
23+
node-version: 20
2424

2525
- name: Install dependencies
2626
run: yarn install

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/setup-node@v3
1616
with:
1717
registry-url: 'https://registry.npmjs.org'
18-
node-version: 18
18+
node-version: 20
1919
cache: 'yarn'
2020

2121
- name: yarn install
@@ -32,14 +32,14 @@ jobs:
3232
id: login-ecr
3333
uses: aws-actions/amazon-ecr-login@v1
3434

35-
- name: set image name
35+
- name: Set image name
3636
run: |
3737
echo "IMG_NAME=${{ steps.login-ecr.outputs.registry }}/kilt/prototype-chain:latest" >> "$GITHUB_ENV"
3838
39-
- name: pull image
39+
- name: Pull Docker image
4040
run: docker pull $IMG_NAME
4141

42-
- name: run tests
42+
- name: Run tests
4343
timeout-minutes: 5
4444
env:
4545
TESTCONTAINERS_NODE_IMG: ${{ env.IMG_NAME }}

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
- uses: actions/setup-node@v3
1111
with:
12-
node-version: 18
12+
node-version: 20
1313
cache: 'yarn'
1414

1515
- name: yarn install

jest.config.cjs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/**
2-
* Copyright (c) 2025, Built on KILT.
3-
*
4-
* This source code is licensed under the BSD 4-Clause "Original" license
5-
* found in the LICENSE file in the root directory of this source tree.
6-
*/
7-
8-
/* eslint-env node */
9-
101
module.exports = {
112
preset: 'ts-jest',
123
testEnvironment: 'node',
@@ -18,9 +9,7 @@ module.exports = {
189
rootDir: 'src',
1910
coverageDirectory: 'coverage',
2011
moduleDirectories: ['node_modules'],
21-
globals: {
22-
'ts-jest': {
23-
tsconfig: 'tsconfig.cjs.json',
24-
},
12+
transform: {
13+
'^.+\\.ts$': ['ts-jest', { tsconfig: 'tsconfig.cjs.json' }],
2514
},
2615
}

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"main": "./index.js",
55
"types": "./index.d.ts",
66
"type": "commonjs",
7+
"engines": {
8+
"node": ">=20.0.0"
9+
},
710
"exports": {
811
".": {
912
"import": "./esm/index.js",
@@ -64,17 +67,8 @@
6467
},
6568
"dependencies": {
6669
"@kiltprotocol/augment-api": "^1.11405.0",
67-
"@kiltprotocol/credentials": "^0.100.0",
68-
"@kiltprotocol/did": "^0.100.0",
6970
"@kiltprotocol/legacy-credentials": "^0.100.0",
7071
"@kiltprotocol/sdk-js": "1.0.0",
71-
"@kiltprotocol/type-definitions": "^1.11502.0",
72-
"@kiltprotocol/types": "^0.100.0",
73-
"@polkadot/api": "^12.2.0",
74-
"@polkadot/keyring": "^13.4.4",
75-
"@polkadot/types": "^12.2.0",
76-
"@polkadot/util": "^13.4.4",
77-
"@polkadot/util-crypto": "^13.4.4",
7872
"yargs": "^17.7.2"
7973
},
8074
"devDependencies": {

src/types/Window.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ import { HexString } from './Imported.js'
1010
import { PubSubSessionV1, PubSubSessionV2 } from './Session.js'
1111

1212
export type This = typeof globalThis
13-
14-
export interface ApiWindow extends This {
15-
kilt: Record<string, InjectedWindowProvider<PubSubSessionV1 | PubSubSessionV2>>
16-
}
17-
1813
export interface InjectedWindowProvider<T> {
1914
startSession: (dAppName: string, dAppEncryptionKeyId: DidUrl, challenge: string) => Promise<T>
2015
name: string

tsconfig.cjs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"target": "ES2022",
55
"module": "CommonJS",
66
"declaration": true,
7-
"outDir": ".",
7+
"outDir": "./cjs",
88
"esModuleInterop": true,
99
"forceConsistentCasingInFileNames": true,
1010
"strict": true,

yarn.lock

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ __metadata:
414414
languageName: node
415415
linkType: hard
416416

417-
"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0":
417+
"@eslint-community/eslint-utils@npm:^4.2.0":
418418
version: 4.6.1
419419
resolution: "@eslint-community/eslint-utils@npm:4.6.1"
420420
dependencies:
@@ -425,6 +425,17 @@ __metadata:
425425
languageName: node
426426
linkType: hard
427427

428+
"@eslint-community/eslint-utils@npm:^4.4.0":
429+
version: 4.7.0
430+
resolution: "@eslint-community/eslint-utils@npm:4.7.0"
431+
dependencies:
432+
eslint-visitor-keys: "npm:^3.4.3"
433+
peerDependencies:
434+
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
435+
checksum: 10c0/c0f4f2bd73b7b7a9de74b716a664873d08ab71ab439e51befe77d61915af41a81ecec93b408778b3a7856185244c34c2c8ee28912072ec14def84ba2dec70adf
436+
languageName: node
437+
linkType: hard
438+
428439
"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.6.1":
429440
version: 4.12.1
430441
resolution: "@eslint-community/regexpp@npm:4.12.1"
@@ -920,7 +931,7 @@ __metadata:
920931
languageName: node
921932
linkType: hard
922933

923-
"@kiltprotocol/credentials@npm:0.100.0, @kiltprotocol/credentials@npm:^0.100.0":
934+
"@kiltprotocol/credentials@npm:0.100.0":
924935
version: 0.100.0
925936
resolution: "@kiltprotocol/credentials@npm:0.100.0"
926937
dependencies:
@@ -952,7 +963,7 @@ __metadata:
952963
languageName: node
953964
linkType: hard
954965

955-
"@kiltprotocol/did@npm:0.100.0, @kiltprotocol/did@npm:^0.100.0":
966+
"@kiltprotocol/did@npm:0.100.0":
956967
version: 0.100.0
957968
resolution: "@kiltprotocol/did@npm:0.100.0"
958969
dependencies:
@@ -1019,17 +1030,8 @@ __metadata:
10191030
resolution: "@kiltprotocol/kilt-extension-api@workspace:."
10201031
dependencies:
10211032
"@kiltprotocol/augment-api": "npm:^1.11405.0"
1022-
"@kiltprotocol/credentials": "npm:^0.100.0"
1023-
"@kiltprotocol/did": "npm:^0.100.0"
10241033
"@kiltprotocol/legacy-credentials": "npm:^0.100.0"
10251034
"@kiltprotocol/sdk-js": "npm:1.0.0"
1026-
"@kiltprotocol/type-definitions": "npm:^1.11502.0"
1027-
"@kiltprotocol/types": "npm:^0.100.0"
1028-
"@polkadot/api": "npm:^12.2.0"
1029-
"@polkadot/keyring": "npm:^13.4.4"
1030-
"@polkadot/types": "npm:^12.2.0"
1031-
"@polkadot/util": "npm:^13.4.4"
1032-
"@polkadot/util-crypto": "npm:^13.4.4"
10331035
"@types/jest": "npm:^28.0.0"
10341036
"@types/node": "npm:^18.8.2"
10351037
"@types/react": "npm:^18.0.21"
@@ -1104,7 +1106,7 @@ __metadata:
11041106
languageName: node
11051107
linkType: hard
11061108

1107-
"@kiltprotocol/type-definitions@npm:^1.11200.0, @kiltprotocol/type-definitions@npm:^1.11502.0":
1109+
"@kiltprotocol/type-definitions@npm:^1.11200.0":
11081110
version: 1.11502.0
11091111
resolution: "@kiltprotocol/type-definitions@npm:1.11502.0"
11101112
peerDependencies:
@@ -1113,7 +1115,7 @@ __metadata:
11131115
languageName: node
11141116
linkType: hard
11151117

1116-
"@kiltprotocol/types@npm:0.100.0, @kiltprotocol/types@npm:^0.100.0":
1118+
"@kiltprotocol/types@npm:0.100.0":
11171119
version: 0.100.0
11181120
resolution: "@kiltprotocol/types@npm:0.100.0"
11191121
dependencies:
@@ -1333,7 +1335,7 @@ __metadata:
13331335
languageName: node
13341336
linkType: hard
13351337

1336-
"@polkadot/api@npm:12.4.2, @polkadot/api@npm:^12.0.0, @polkadot/api@npm:^12.2.0":
1338+
"@polkadot/api@npm:12.4.2, @polkadot/api@npm:^12.0.0":
13371339
version: 12.4.2
13381340
resolution: "@polkadot/api@npm:12.4.2"
13391341
dependencies:
@@ -1358,7 +1360,7 @@ __metadata:
13581360
languageName: node
13591361
linkType: hard
13601362

1361-
"@polkadot/keyring@npm:^13.0.0, @polkadot/keyring@npm:^13.0.2, @polkadot/keyring@npm:^13.4.4":
1363+
"@polkadot/keyring@npm:^13.0.0, @polkadot/keyring@npm:^13.0.2":
13621364
version: 13.4.4
13631365
resolution: "@polkadot/keyring@npm:13.4.4"
13641366
dependencies:
@@ -1492,7 +1494,7 @@ __metadata:
14921494
languageName: node
14931495
linkType: hard
14941496

1495-
"@polkadot/types@npm:12.4.2, @polkadot/types@npm:^12.0.0, @polkadot/types@npm:^12.2.0":
1497+
"@polkadot/types@npm:12.4.2, @polkadot/types@npm:^12.0.0":
14961498
version: 12.4.2
14971499
resolution: "@polkadot/types@npm:12.4.2"
14981500
dependencies:
@@ -1508,7 +1510,7 @@ __metadata:
15081510
languageName: node
15091511
linkType: hard
15101512

1511-
"@polkadot/util-crypto@npm:13.4.4, @polkadot/util-crypto@npm:^13.0.0, @polkadot/util-crypto@npm:^13.0.2, @polkadot/util-crypto@npm:^13.4.4":
1513+
"@polkadot/util-crypto@npm:13.4.4, @polkadot/util-crypto@npm:^13.0.0, @polkadot/util-crypto@npm:^13.0.2":
15121514
version: 13.4.4
15131515
resolution: "@polkadot/util-crypto@npm:13.4.4"
15141516
dependencies:
@@ -1528,7 +1530,7 @@ __metadata:
15281530
languageName: node
15291531
linkType: hard
15301532

1531-
"@polkadot/util@npm:13.4.4, @polkadot/util@npm:^13.0.0, @polkadot/util@npm:^13.0.2, @polkadot/util@npm:^13.4.4":
1533+
"@polkadot/util@npm:13.4.4, @polkadot/util@npm:^13.0.0, @polkadot/util@npm:^13.0.2":
15321534
version: 13.4.4
15331535
resolution: "@polkadot/util@npm:13.4.4"
15341536
dependencies:

0 commit comments

Comments
 (0)