Skip to content

Conversation

@kabaros
Copy link
Contributor

@kabaros kabaros commented Jul 15, 2025

This PR moves the CLI to use pnpm instead for packaging and releasing itself. This addresses a major issue with the CLI currently bringing down its size on disk from 585MB to 145MB by just making use of pnpm's efficient disk space usage and 16 seconds to install the CLI as opposed to 55s with npm (and ~2 minutes with yarn 1 - when it works).

In addition, while working on the PR, I took it as a change to:

  • created a new project @dhis2/create - this allows new projects to be created using the more modern npm create, so people are able to scaffold a project with pnpm create @dhis2 or npm create @dhis2. The command is just a proxy to d2 app scripts init.
  • update semantic-release version - we were stuck in a version that is more than six years old.
    • although in theory, this command d2 utils release should be available, it seems to have been deprecated in favour of our actions/semantic-release a while ago and only used internally to publish the CLI itself.
    • d2 utils release (and actions/semantic-release) are mainly wrappers around semantic-release in order for it to support monorepos - there are more modern approaches to address the issues we tried to address here and we should consider them in the future for releasing packages in monorepos.

To Test

Related PRs

CLI PR: dhis2/app-platform#933

implements https://dhis2.atlassian.net/browse/LIBS-775
RFC: https://docs.google.com/document/d/1q4xZgZfVchWAerzt75uWmVybYQ03i02kfCELkDlH8as/edit?tab=t.0

kabaros and others added 30 commits July 9, 2025 07:51
## [5.1.1-alpha.1](v5.1.0...v5.1.1-alpha.1) (2025-07-10)

### Bug Fixes

* point to beta cli-app-scripts ([f7c0899](f7c0899))
# [5.2.0-alpha.1](v5.1.1-alpha.1...v5.2.0-alpha.1) (2025-07-14)

### Features

* first attempt using pnpm ([982f7ac](982f7ac))
# [5.2.0-alpha.2](v5.2.0-alpha.1...v5.2.0-alpha.2) (2025-07-14)

### Bug Fixes

* publish to npm ([9d5d329](9d5d329))
# [5.2.0-alpha.2](v5.2.0-alpha.1...v5.2.0-alpha.2) (2025-07-14)

### Bug Fixes

* force alpha release to npm ([60a7517](60a7517))
* publish to npm ([9d5d329](9d5d329))
* update pnpm lock file before release ([34431a5](34431a5))
# [5.2.0-alpha.3](v5.2.0-alpha.2...v5.2.0-alpha.3) (2025-07-14)

### Bug Fixes

* force alpha release to npm ([8a07187](8a07187))
* update pnpm lock file before release ([39809f0](39809f0))
# [5.2.0-alpha.4](v5.2.0-alpha.3...v5.2.0-alpha.4) (2025-07-14)

### Bug Fixes

* **create:** initial dhis2/create template ([7a762e7](7a762e7))
# [5.2.0-alpha.5](v5.2.0-alpha.4...v5.2.0-alpha.5) (2025-07-14)

### Bug Fixes

* **create:** fix path to bin ([b42cacb](b42cacb))
# [5.2.0-alpha.6](v5.2.0-alpha.5...v5.2.0-alpha.6) (2025-07-14)

### Bug Fixes

* **utils-release:** update pnpm lock file automatically ([398dcc9](398dcc9))
# [5.2.0-alpha.6](v5.2.0-alpha.5...v5.2.0-alpha.6) (2025-07-14)

### Bug Fixes

* revert version for testing ([c756c70](c756c70))
* **utils-release:** update pnpm lock file automatically ([398dcc9](398dcc9))
# [5.2.0-alpha.6](v5.2.0-alpha.5...v5.2.0-alpha.6) (2025-07-14)

### Bug Fixes

* revert version for testing ([5ad38f5](5ad38f5))
* revert version for testing ([74bbd54](74bbd54))
* revert version for testing ([c756c70](c756c70))
* **utils-release:** update pnpm lock file automatically ([398dcc9](398dcc9))
# [5.2.0-alpha.7](v5.2.0-alpha.6...v5.2.0-alpha.7) (2025-07-14)

### Bug Fixes

* try to update pnpm-lock ([ab438ae](ab438ae))
# [5.2.0-alpha.7](v5.2.0-alpha.6...v5.2.0-alpha.7) (2025-07-14)

### Bug Fixes

* try to update pnpm-lock ([00b9c7d](00b9c7d))
* try to update pnpm-lock ([ab438ae](ab438ae))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 5.2.0-alpha.16 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 5.2.0-alpha.17 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kabaros kabaros changed the title feat: move CLI project to use pnpm feat: move CLI project to use pnpm and add @dhis2/create project Oct 29, 2025
# [5.2.0-alpha.18](v5.2.0-alpha.17...v5.2.0-alpha.18) (2025-10-29)

### Bug Fixes

* update the CLI interface ([d091055](d091055))
@kabaros kabaros marked this pull request as ready for review October 29, 2025 21:09
@kabaros
Copy link
Contributor Author

kabaros commented Oct 29, 2025

This is ready for review/testing @amcgee @KaiVandivier - I added a README describing how the CLI work, which I modelled mostly around the nextjs CLI interface. Since this is still on alpha, the commands needed to suffixed with alpha i.e. pnpm create @dhis2/app@alpha project-name or npm create @dhis2/app@alpha project-name.

I also renamed the project to @dhis2/create-app instead of @dhis2/create - we discussed this earlier and as I started writing docs, I felt you were to suggest a /app suffix as part of the name and command.

# [5.2.0-alpha.19](v5.2.0-alpha.18...v5.2.0-alpha.19) (2025-10-30)

### Bug Fixes

* update CLI help ([04962c7](04962c7))
@@ -1,4 +1,5 @@
- [**Getting Started**](getting-started)
- - [Initialize a new web application](commands/create-app)
Copy link
Contributor

Choose a reason for hiding this comment

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

Co-authored-by: Kai Vandivier <49666798+KaiVandivier@users.noreply.github.com>
@sonarqubecloud
Copy link

@kabaros kabaros merged commit 1f58f7c into master Oct 30, 2025
7 checks passed
@kabaros kabaros deleted the alpha branch October 30, 2025 21:12
dhis2-bot added a commit that referenced this pull request Oct 30, 2025
# [5.2.0](v5.1.0...v5.2.0) (2025-10-30)

### Bug Fixes

* force a rebuild ([483f89f](483f89f))

### Features

* move CLI project to use pnpm and add @dhis2/create project ([#629](#629)) ([1f58f7c](1f58f7c))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants