-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: canary esm build and deprecating packages #535
base: dev
Are you sure you want to change the base?
Changes from all commits
ad2fe29
de460fb
199c9e4
49c97a5
195f210
0cff99e
c17bf9f
0d2a71e
c3590af
8a31a9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
}, | ||
"scripts": { | ||
"postinstall": "node etc/bootstrapEnv", | ||
"build": "node etc/bootstrapEnv && lerna run build", | ||
"build": "node etc/bootstrapEnv && patch-package && lerna run build", | ||
"generate:core-proto-ts": "./proto/core/gen.sh", | ||
"publish:core-proto-ts": "./proto/core/publish.sh", | ||
"generate:indexer-proto-ts": "./proto/indexer/gen.sh", | ||
|
@@ -35,10 +35,11 @@ | |
"build:patch:publish": "yarn build:fresh && yarn patch && yarn lerna:publish", | ||
"patch": "lerna version patch", | ||
"clean-up": "lerna run clean && shx rm -rf .build-cache *.log coverage junit.xml", | ||
"bootstrap": "yarn clean-up && yarn install", | ||
"bootstrap": "yarn clean-up && yarn install && patch-package", | ||
"test": "jest", | ||
"test:sdk-ts:core:stargate": "jest ./packages/sdk-ts/src/core/stargate", | ||
"test:sdk-ts:core:modules": "jest ./packages/sdk-ts/src/core/modules", | ||
"test:sdk-ts:core:account": "jest ./packages/sdk-ts/src/core/account", | ||
"test:sdk-ts:core": "jest ./packages/sdk-ts/src/core", | ||
"test:sdk-ts:utils": "jest ./packages/sdk-ts/src/utils", | ||
"test:sdk-ts:client": "jest ./packages/sdk-ts/src/client", | ||
|
@@ -70,8 +71,8 @@ | |
"@babel/preset-env": "^7.19.0", | ||
"@commitlint/cli": "^13.1.0", | ||
"@commitlint/config-conventional": "^13.1.0", | ||
"@types/jest": "^29.4.0", | ||
"@types/node": "^22.9.0", | ||
"@types/jest": "^29.5.14", | ||
"@types/node": "^22.10.1", | ||
Comment on lines
+74
to
+75
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Address peer dependency warnings. The pipeline shows warnings about missing peer dependencies:
Consider:
Also applies to: 93-96, 100-100, 112-112 🧰 Tools🪛 GitHub Actions: Publish canary branch[warning] Missing peer dependency '@babel/core' for multiple packages [warning] Incorrect peer dependency for typedoc-monorepo-link-types, requires [email protected] |
||
"@typescript-eslint/eslint-plugin": "^6.0.0", | ||
"@typescript-eslint/parser": "^6.0.0", | ||
"babel-jest": "^29.4.3", | ||
|
@@ -89,13 +90,14 @@ | |
"eslint-plugin-markdown": "^2.2.1", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"husky": "^7.0.2", | ||
"jest": "^29.4.3", | ||
"jest": "^29.7.0", | ||
"jest-junit": "^15.0.0", | ||
"jest-resolve": "^29.7.0", | ||
"lerna": "6.6.1", | ||
"lerna": "8.1.9", | ||
"lint-staged": "^11.1.2", | ||
"live-server": "^1.2.1", | ||
"markdownlint-cli": "^0.28.1", | ||
"patch-package": "^8.0.0", | ||
"prettier": "^2.4.1", | ||
"serve": "^12.0.1", | ||
"shx": "^0.3.4", | ||
|
@@ -107,11 +109,10 @@ | |
"tsconfig-paths": "^4.2.0", | ||
"typedoc": "^0.25.11", | ||
"typedoc-monorepo-link-types": "^0.0.4", | ||
"typescript": "^5.1.1" | ||
"typescript": "^5.7.2" | ||
}, | ||
"resolutions": { | ||
"@ethereumjs/tx": "^4.1.1", | ||
"**/libsodium": "npm:@bangjelkoski/noop", | ||
"**/libsodium-wrappers": "npm:@bangjelkoski/noop" | ||
"@solana/web3.js": "1.98.0", | ||
"rpc-websockets": "9.0.4" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"extends": "./tsconfig.build.json", | ||
"compilerOptions": { | ||
"module": "ESNext", | ||
"module": "NodeNext", | ||
"outDir": "./dist/esm", | ||
"rootDir": "./src", | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"target": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"moduleResolution": "NodeNext", | ||
"tsBuildInfoFile": "../../.build-cache/exceptions.esm.tsbuildinfo" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { ChainId, EthereumChainId } from '@injectivelabs/ts-types' | ||
import { INJ_DENOM } from '@injectivelabs/utils' | ||
import { ChainInfo } from './types.js' | ||
|
||
const INJ_DENOM = 'inj' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Migration of INJ_DENOM constant appears incomplete The constant is now duplicated across the codebase:
If the goal is to deprecate @injectivelabs/utils, the constant should be fully migrated to the new location and all imports should be updated accordingly. 🔗 Analysis chainLGTM! Moving INJ_DENOM locally aligns with package deprecation goals. The change reduces external dependencies by moving the constant locally, which is consistent with the PR's refactoring objectives. Let's verify there are no inconsistencies in the INJ_DENOM value across the codebase: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any other declarations or usages of INJ_DENOM
# to ensure consistency across the codebase
rg -g '!*.{json,md}' "INJ_DENOM.*=.*['\"]inj['\"]" -A 1
Length of output: 293 Script: #!/bin/bash
# Search for imports of INJ_DENOM from utils package
rg "import.*\{.*INJ_DENOM.*\}.*from.*@injectivelabs/utils" -A 1
# Also check for any other files still using the utils constant
ast-grep --pattern 'from "@injectivelabs/utils"'
Length of output: 1088 |
||
|
||
export const mainnetChainInfo: ChainInfo = { | ||
feeDenom: INJ_DENOM, | ||
chainId: ChainId.Mainnet, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
{ | ||
"extends": "./tsconfig.build.json", | ||
"compilerOptions": { | ||
"module": "ESNext", | ||
"module": "NodeNext", | ||
"outDir": "./dist/esm", | ||
"rootDir": "./src", | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"target": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"moduleResolution": "NodeNext", | ||
"tsBuildInfoFile": "../../.build-cache/networks.esm.tsbuildinfo" | ||
}, | ||
"references": [ | ||
{ | ||
"path": "../exceptions/tsconfig.build.esm.json" | ||
}, | ||
{ | ||
"path": "../ts-types/tsconfig.build.esm.json" | ||
}, | ||
{ | ||
"path": "../utils/tsconfig.build.esm.json" | ||
} | ||
] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Document the purpose and status of 8 wallet-related patches
Found 8 undocumented patches for wallet connectivity dependencies:
Please document:
🔗 Analysis chain
Document patch-package usage.
The addition of
patch-package
to build and bootstrap scripts indicates custom patches are being applied. Please:Also applies to: 38-38
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 375
Script:
Length of output: 361
🧰 Tools
🪛 GitHub Actions: Publish canary branch
[warning] Missing peer dependency '@babel/core' for multiple packages
[warning] Incorrect peer dependency for typedoc-monorepo-link-types, requires [email protected]