Skip to content

fix[build]: windows packages build#44

Closed
isonnymichael wants to merge 7 commits into
KiiChain:mainfrom
isonnymichael:fix/windows-packages-build
Closed

fix[build]: windows packages build#44
isonnymichael wants to merge 7 commits into
KiiChain:mainfrom
isonnymichael:fix/windows-packages-build

Conversation

@isonnymichael

Copy link
Copy Markdown
Contributor

Description

This PR fixes build issues on Windows for the proto and rwa packages.
It also resolves a conflict with the root-level glob in the repository that caused the copyfiles command to fail.

Changes ensure that build scripts are now cross-platform and work on Windows, macOS, and Linux.

Summary of changes:

  • Overrides glob dependency in package.json
  • Created missing tsconfig.declaration.json for the RWA package
  • Fixed copy command path in the proto package
  • Updated clean and build scripts in the RWA package to use the new tsconfig

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Built both proto and rwa packages on Windows successfully
  • Verified that commands still work on other OS environments
  • Confirmed copyfiles runs without conflict

Screenshots of error before fix

1_proto 2_rwa

Fixed scripts example

...
"clean": "rimraf dist",
"build": "npm run clean && tsc && tsc -p tsconfig.declaration.json && npm run copy",
"build:dev": "npm run clean && npm run codegen && tsc --declarationMap && tsc -p tsconfig.declaration.json && npm run copy"
...

Also added missing tsconfig.declaration.json file in rwa.

@coderabbitai

coderabbitai Bot commented Sep 11, 2025

Copy link
Copy Markdown

Walkthrough

The changes include: (1) addition of a dependency override for "glob": "7.2.3" in package.json alongside the existing "has-ansi": "5.0.1" override, and (2) creation of a new TypeScript declaration configuration file at packages/rwa/tsconfig.declaration.json that extends the base tsconfig configuration and enables declaration file generation with specific compiler options (outDir, declaration, emitDeclarationOnly, isolatedModules, and preserveConstEnums).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that the glob 7.2.3 override is compatible with other project dependencies and resolves any version conflicts
  • Confirm that the TypeScript declaration configuration in tsconfig.declaration.json is correctly aligned with the project's build requirements and doesn't conflict with existing tsconfig files in the workspace

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'fix[build]: windows packages build' is directly related to the main change in the changeset. The pull request focuses on fixing build issues on Windows for the proto and rwa packages, which aligns well with the title's emphasis on Windows package builds. The title is concise, clear, and accurately captures the primary purpose of the changes.
Description check ✅ Passed The PR description is comprehensive and directly related to the changeset. It explains the specific issues being fixed (Windows build problems, glob dependency conflict), details all the changes made (glob override, tsconfig.declaration.json creation, script updates), and includes testing evidence with screenshots showing the errors before the fix. The description clearly communicates the purpose, changes, and validation of the pull request.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a8823f and 0ccbcdd.

⛔ Files ignored due to path filters (1)
  • .yarn/install-state.gz is excluded by !**/.yarn/**, !**/*.gz
📒 Files selected for processing (1)
  • package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: analyze

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/rwa/tsconfig.declaration.json (1)

1-10: Dedicated declarations config looks good.

The options are appropriate for a declarations-only pass. Optionally add composite if you plan to use project references later, otherwise keep as-is.

Apply if desired:

   "compilerOptions": {
     "outDir": "./dist",
     "declaration": true,
     "emitDeclarationOnly": true,
     "isolatedModules": false,
-    "preserveConstEnums": false
+    "preserveConstEnums": false
+    // "composite": true
   }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e145a77 and 8a8823f.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (5)
  • package.json (1 hunks)
  • packages/evm/package.json (1 hunks)
  • packages/proto/package.json (1 hunks)
  • packages/rwa/package.json (1 hunks)
  • packages/rwa/tsconfig.declaration.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: analyze
🔇 Additional comments (4)
packages/evm/package.json (1)

25-25: LGTM: unquoting the glob improves Windows compatibility.

Prettier handles the pattern; removing single quotes avoids issues in cmd.exe/PowerShell. No further action needed.

packages/rwa/package.json (2)

34-34: LGTM: rimraf dist is safer cross-platform than dist/.**


37-38: Confirm whether codegen is required for release builds (add to build if so).

build:dev runs npm run codegen but build does not — a clean-clone or CI build may miss generated sources and fail.

File: packages/rwa/package.json (lines 37–38)

Suggested diff:

-    "build": "npm run clean && tsc && tsc -p tsconfig.declaration.json && npm run copy",
+    "build": "npm run clean && npm run codegen && tsc && tsc -p tsconfig.declaration.json && npm run copy",
packages/proto/package.json (1)

33-33: LGTM: simplified clean script is correct and avoids glob quirks on Windows.

Comment thread package.json Outdated
Comment thread packages/proto/package.json Outdated
@GiovaniGuizzo

Copy link
Copy Markdown
Collaborator

@isonnymichael thanks for the contribution. Why the addition of glob?

@isonnymichael

Copy link
Copy Markdown
Contributor Author

This is strange — previously I couldn’t build, but after merging to the main branch, resolving the conflicts, and removing glob, I can now build successfully on my Windows device. @GiovaniGuizzo
Screenshot_157

@GiovaniGuizzo

Copy link
Copy Markdown
Collaborator

Yes, I fixed a few things in the repo a few weeks back. I also use Windows.
Feel free to close the PR if you think your issue has been resolved

@isonnymichael

Copy link
Copy Markdown
Contributor Author

okay, @GiovaniGuizzo
OOT: is there any public LCD_ENDPOINT? https://github.com/KiiChain/kiijs-sdk/tree/main/packages/lcd I want to test this

Screenshot_158

@GiovaniGuizzo

Copy link
Copy Markdown
Collaborator

@isonnymichael

Copy link
Copy Markdown
Contributor Author

Yes, there is: https://lcd.uno.sentry.testnet.v3.kiivalidator.com/

okay thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants