Skip to content

build(typescript): use workspace for TypeScript packages #157

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

joe-p
Copy link
Collaborator

@joe-p joe-p commented Jun 13, 2025

Uses a bun workspace for typescript packages

@Copilot Copilot AI review requested due to automatic review settings June 13, 2025 13:13
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR transitions TypeScript packages to use a bun workspace, centralizing dependency version management via catalog references.

  • Moves dependency versions to catalog-based references, reducing version duplication.
  • Updates peer dependencies (e.g., using workspace:* for algokit-transact) to align with the workspace model.
  • Introduces a new workspaces configuration and catalog definitions in the root package.json.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

File Description
packages/typescript/algokit_transact/package.json Converted version numbers to catalog references; binaryen moved from dependencies to devDependencies.
packages/typescript/algod_api/package.json Updated dependency versions to catalog references and redefined a peer dependency to workspace:*
package.json Added workspaces, catalog, and catalogs sections to manage dependency versions centrally.
Comments suppressed due to low confidence (3)

packages/typescript/algod_api/package.json:69

  • Using 'workspace:*' for the peer dependency ensures local consistency, but consider if additional version constraints might be beneficial for external consumers.
"@algorandfoundation/algokit-transact": "workspace:*"

package.json:2

  • With the new workspaces and catalog configurations introduced, updating the project documentation to reflect these changes would help maintain clarity.
"description": "Defines the workspace for typescript packages and the deps/scripts for serving the docs and semantic release.",

packages/typescript/algokit_transact/package.json:32

  • Binaryen has been moved from dependencies to devDependencies; please verify that this change aligns with its runtime requirements.
"binaryen": "catalog:wasm2js"

},
"peerDependencies": {
"@algorandfoundation/algokit-transact": "^1.0.0-alpha.18"
"@algorandfoundation/algokit-transact": "workspace:*"
Copy link
Collaborator

@neilcampbell neilcampbell Jun 17, 2025

Choose a reason for hiding this comment

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

How does this work when the package is published and has a dependency that needs to be resolved from the package registry when published rather than the workspace?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When published bun will fill in the correct version numbers in the package.json. This makes me realize though that we might need to change the release to use bun publish (presumably it uses npm publish)

Copy link
Collaborator

Choose a reason for hiding this comment

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

From a versioning perspective, we potentially need some control here. Is there a way to control this?
If we add a new feature to algokit-transact we may need to ensure a new version of that package is published before algod-api and the version is updated. In other scenarios we potentially want to keep the min compatible version of algokit-transact to give the widest version support.

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