-
Notifications
You must be signed in to change notification settings - Fork 6
feat: move CLI project to use pnpm and add @dhis2/create project #629
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
Conversation
## [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.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))
|
🎉 This PR is included in version 5.2.0-alpha.16 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
# [5.2.0-alpha.17](v5.2.0-alpha.16...v5.2.0-alpha.17) (2025-10-29) ### Bug Fixes * rebuild with latest alpha version of app-scripts ([991add9](991add9))
|
🎉 This PR is included in version 5.2.0-alpha.17 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
# [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))
|
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. I also renamed the project to |
# [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) | |||
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.
(Remember to update in dev portal: https://github.com/dhis2/developer-portal/blob/main/sidebarsReferences.js#L313-L335)
Co-authored-by: Kai Vandivier <49666798+KaiVandivier@users.noreply.github.com>
|
|
🎉 This PR is included in version 5.2.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |



This PR moves the CLI to use
pnpminstead 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:
@dhis2/create- this allows new projects to be created using the more modernnpm create, so people are able to scaffold a project withpnpm create @dhis2or npm create @dhis2. The command is just a proxy tod2 app scripts init.semantic-releaseversion - we were stuck in a version that is more than six years old.d2 utils releaseshould be available, it seems to have been deprecated in favour of ouractions/semantic-releasea 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
pnpm i -g @dhis2/cli@alphaor (npm/yarn)npm create @dhis2@alpha new-app(npm create @dhis2 new-apponce merged to master)npx @dhis2/create@alpha new-appRelated 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