-
Notifications
You must be signed in to change notification settings - Fork 19
feat: decouple cli-app-scripts from yarn #933
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
base: master
Are you sure you want to change the base?
Conversation
# [12.7.0-alpha.1](v12.6.4...v12.7.0-alpha.1) (2025-07-23) ### Bug Fixes * **deps:** get rid of warnings shown on initialising new d2 projects ([#929](#929)) ([f5b499f](f5b499f)), closes [#927](#927) [#927](#927) [#928](#928) [#928](#928) [#930](#930) [#930](#930) ### Features * support pnpm and other package managers ([9c81f35](9c81f35))
# [12.7.0-alpha.2](v12.7.0-alpha.1...v12.7.0-alpha.2) (2025-07-23) ### Bug Fixes * correct cli-app-script link ([1d889ff](1d889ff))
# [12.7.0-alpha.3](v12.7.0-alpha.2...v12.7.0-alpha.3) (2025-07-23) ### Bug Fixes * default to pnpm as a package manager ([2fb963f](2fb963f))
# [12.7.0-alpha.4](v12.7.0-alpha.3...v12.7.0-alpha.4) (2025-07-24) ### Bug Fixes * change hoist options for phantom app-shell dependencies ([ac9aa78](ac9aa78))
# [12.7.0-alpha.5](v12.7.0-alpha.4...v12.7.0-alpha.5) (2025-07-24) ### Bug Fixes * add styled-jsx to hoisted dependencies ([9e692bc](9e692bc))
# [12.7.0-alpha.6](v12.7.0-alpha.5...v12.7.0-alpha.6) (2025-07-24) ### Bug Fixes * change cli option for package manager to boolean '--pnpm' ([e971c3d](e971c3d))
# [12.7.0-alpha.7](v12.7.0-alpha.6...v12.7.0-alpha.7) (2025-07-24) ### Bug Fixes * default args to undefined not 'false' to avoid conflict ([2b54a06](2b54a06))
# [12.7.0-alpha.8](v12.7.0-alpha.7...v12.7.0-alpha.8) (2025-07-24) ### Bug Fixes * recommend the use of 'pnpm' as a warning on init command ([e0cda6d](e0cda6d))
# [12.7.0-alpha.9](v12.7.0-alpha.8...v12.7.0-alpha.9) (2025-07-24) ### Bug Fixes * capitalise log messages ([e480586](e480586))
| )} to ${path.relative(paths.base, srcNodeModules)}...` | ||
| ) | ||
| await fs.ensureSymlink(srcNodeModules, destNodeModules) | ||
| fs.ensureSymlinkSync(srcNodeModules, destNodeModules) |
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.
this - and other fs.xSync calls - fix a race condition that happened before the first time we run start where the symlink is sometimes not yet created
# [12.7.0-alpha.10](v12.7.0-alpha.9...v12.7.0-alpha.10) (2025-07-24) ### Bug Fixes * ensure app-shell symlink is created to avoid race conditon ([223350e](223350e)) * ensure npm works as well as pnpm ([2975d2e](2975d2e))
# [12.7.0-alpha.11](v12.7.0-alpha.10...v12.7.0-alpha.11) (2025-07-24) ### Bug Fixes * race condition with symlinks ([fe2d496](fe2d496))
# [12.7.0-alpha.12](v12.7.0-alpha.11...v12.7.0-alpha.12) (2025-07-24) ### Bug Fixes * add corepack packageManager field ([acb4ac0](acb4ac0))
# [12.7.0-alpha.14](v12.7.0-alpha.13...v12.7.0-alpha.14) (2025-07-25) ### Bug Fixes * expose init command in the package ([cc8b7f5](cc8b7f5))
# [12.7.0-alpha.15](v12.7.0-alpha.14...v12.7.0-alpha.15) (2025-07-28) ### Bug Fixes * hoist dependencies needed for plugins and PWAs ([fa91bc5](fa91bc5))
# [12.8.0-alpha.1](v12.7.0...v12.8.0-alpha.1) (2025-07-28) ### Bug Fixes * add corepack packageManager field ([acb4ac0](acb4ac0)) * add styled-jsx to hoisted dependencies ([9e692bc](9e692bc)) * capitalise log messages ([e480586](e480586)) * change cli option for package manager to boolean '--pnpm' ([e971c3d](e971c3d)) * change hoist options for phantom app-shell dependencies ([ac9aa78](ac9aa78)) * correct cli-app-script link ([1d889ff](1d889ff)) * default args to undefined not 'false' to avoid conflict ([2b54a06](2b54a06)) * default to pnpm as a package manager ([2fb963f](2fb963f)) * ensure app-shell symlink is created to avoid race conditon ([223350e](223350e)) * ensure npm works as well as pnpm ([2975d2e](2975d2e)) * expose init command in the package ([cc8b7f5](cc8b7f5)) * force alpha release to npm ([78a2e69](78a2e69)) * hoist dependencies needed for plugins and PWAs ([fa91bc5](fa91bc5)) * race condition with symlinks ([fe2d496](fe2d496)) * recommend the use of 'pnpm' as a warning on init command ([e0cda6d](e0cda6d)) ### Features * support pnpm and other package managers ([9c81f35](9c81f35))
|
23701f5 to
79392dc
Compare
# [12.8.0-alpha.2](v12.8.0-alpha.1...v12.8.0-alpha.2) (2025-10-29) ### Bug Fixes * allow passing a reporter to init command ([ca36333](ca36333))
This reverts commit ca36333.
# [12.8.0-alpha.3](v12.8.0-alpha.2...v12.8.0-alpha.3) (2025-10-29) ### Bug Fixes * Revert "fix: allow passing a reporter to init command ([6028374](6028374))
|







This PR decouples the dependency of
cli-app-scriptsonyarn@v1allowing apps and consumers of the CLI to use more modern package managers such aspnpm(or evennpm).d2-with-pnpm.webm
relates to the CLI PR: dhis2/cli#629
implements https://dhis2.atlassian.net/browse/LIBS-800
Some notes:
yarn@1and should behave the same as before. Users are able to pass a--pnpmargument to opt for usingpnpminstead.pnpm, the dependencies of a new a project are installed using the specified package manager, and the lock file updated.pnpm, we needed to public hoist in order to make phantom dependencies of@dhis2/app-shellwork. These were used directly by the shell, and worked before because of the behaviour ofyarn 1(which was dropped in subsequentyarnversions) to hoist and make available all dependencies - at some point, we should look atapp-shellbehaviour in order to avoid the issue, but for now, this works without issues for consumers.packageManagerfield topackage.json- this enables consumers to know what package manager to use and install it with corepack (which is available for modern node version from 14+) .To test:
pnpm i -g @dhis2/cli@alpha(you can usenpmoryarnif you'd like)d2 app scripts init sample --pnpmcorepack enable- this is just convenient and good practice in general.pnpm start,pnpm buildpnpm test....--pnpmflag to ensure things work withyarnas before.