Skip to content

Commit a9680c5

Browse files
authored
chore: improve build tooling and modernize dependencies (#1128)
* chore: wip * style: standardize formatting across TS configs and docs - Format TypeScript configuration files for consistent spacing - Add consistent newlines and semicolons in README code examples - Align formatting between sdk and sdk-communication-layer packages * chore: clean up initializeMobileProvider by removing debug log Cleaned up the initializeMobileProvider by removing an unnecessary console log statement in the setInitializing function. * chore: enhance commitlint config with body-max-line-length rule Enhanced the commitlint configuration by adding a rule to limit the body of commit messages to 100 characters per line.
1 parent 744ab6d commit a9680c5

File tree

17 files changed

+1281
-332
lines changed

17 files changed

+1281
-332
lines changed

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
module.exports = {
22
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'body-max-line-length': [0, 'always', 100],
5+
},
36
};

packages/sdk-communication-layer/package.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
"module": "dist/node/es/metamask-sdk-communication-layer.js",
1717
"browser": "dist/browser/es/metamask-sdk-communication-layer.js",
1818
"react-native": "dist/react-native/es/metamask-sdk-communication-layer.js",
19-
"types": "dist/browser/es/src/index.d.ts",
19+
"types": "dist/types/src/index.d.ts",
2020
"files": [
2121
"/dist"
2222
],
2323
"scripts": {
24-
"build": "rimraf dist && rollup -c --bundleConfigAsCjs",
25-
"build:tsc": "tsc",
26-
"build:dev": "rimraf dist && NODE_ENV=dev rollup -c --bundleConfigAsCjs",
24+
"build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly --outDir dist/types",
25+
"build:clean": "yarn clean && yarn build",
26+
"build": "yarn build:types && rollup -c --bundleConfigAsCjs",
27+
"build:dev": "yarn build:types && NODE_ENV=dev rollup -c --bundleConfigAsCjs",
2728
"build:post-tsc": "echo 'N/A'",
2829
"build:pre-tsc": "echo 'N/A'",
2930
"size": "size-limit",
@@ -60,46 +61,48 @@
6061
"@rollup/plugin-commonjs": "^25.0.0",
6162
"@rollup/plugin-json": "^6.0.0",
6263
"@rollup/plugin-node-resolve": "^15.0.2",
63-
"@rollup/plugin-terser": "^0.4.1",
64+
"@rollup/plugin-replace": "^6.0.1",
65+
"@rollup/plugin-terser": "^0.4.4",
6466
"@size-limit/preset-big-lib": "^11.0.2",
6567
"@types/jest": "^29.2.4",
6668
"@types/node": "^20.1.3",
6769
"@types/uuid": "^9.0.0",
6870
"@typescript-eslint/eslint-plugin": "^4.26.0",
6971
"@typescript-eslint/parser": "^4.26.0",
7072
"cross-fetch": "^4.0.0",
71-
"eciesjs": "^0.3.16",
73+
"eciesjs": "^0.4.11",
7274
"eslint": "^7.30.0",
7375
"eslint-config-prettier": "^8.3.0",
7476
"eslint-plugin-import": "^2.23.4",
7577
"eslint-plugin-jest": "^24.4.0",
7678
"eslint-plugin-jsdoc": "^36.1.0",
7779
"eslint-plugin-node": "^11.1.0",
7880
"eslint-plugin-prettier": "^3.4.0",
79-
"eventemitter2": "^6.4.7",
81+
"eventemitter2": "^6.4.9",
8082
"jest": "^29.3.1",
8183
"prettier": "^2.3.0",
8284
"rimraf": "^3.0.2",
83-
"rollup": "^3.21.7",
85+
"rollup": "^4.26.0",
8486
"rollup-plugin-jscc": "^2.0.0",
8587
"rollup-plugin-natives": "^0.7.5",
8688
"rollup-plugin-node-builtins": "^2.1.2",
8789
"rollup-plugin-node-globals": "^1.4.0",
8890
"rollup-plugin-peer-deps-external": "^2.2.4",
91+
"rollup-plugin-polyfill-node": "^0.13.0",
8992
"rollup-plugin-sizes": "^1.0.6",
9093
"rollup-plugin-typescript2": "^0.31.2",
91-
"rollup-plugin-visualizer": "^5.9.2",
92-
"size-limit": "^11.0.2",
94+
"rollup-plugin-visualizer": "^5.12.0",
95+
"size-limit": "^11.1.6",
9396
"socket.io-client": "^4.5.1",
9497
"stream-browserify": "^3.0.0",
9598
"ts-jest": "^29.0.3",
9699
"ts-node": "^10.9.1",
97-
"typescript": "^4.3.2"
100+
"typescript": "^5.6.3"
98101
},
99102
"peerDependencies": {
100103
"cross-fetch": "^4.0.0",
101104
"eciesjs": "*",
102-
"eventemitter2": "^6.4.7",
105+
"eventemitter2": "^6.4.9",
103106
"readable-stream": "^3.6.2",
104107
"socket.io-client": "^4.5.1"
105108
},

0 commit comments

Comments
 (0)