You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I have three package.json files - one at the workspace root, and two in sub-packages. I'd like to use package-changed from a script in the main package.json
If the main package.json changes, or either of the subproject package.jsons change, I want the package-changed task to run.
I think this would be relatively simple, all things considered. Trickiest part would be detecting the workspaces in the first place (i.e. changes to src/find-package.ts). After that, I think it'd just require src/get-package-hash.ts to concatenate the various package.json files before hashing.
As an alternative to searching for multiple package.json files, there could also just be explicit cli-provided paths, e.g. "package-changed": "package-changed --package ./package.json --package ./subprojecta/package.json --package ./subprojectb/package.json run 'rm -f .eslintcache && pnpm install'"
Right now, I think the only existing options are to either:
have separate package-changed scripts in each subproject and a script at the root that runs both
use the js api to manually run on multiple cwd
The text was updated successfully, but these errors were encountered:
Currently, I have three package.json files - one at the workspace root, and two in sub-packages. I'd like to use package-changed from a script in the main package.json
For example (I am using
pnpm
):./package.json
(root folder):./subprojecta/package.json
./subprojectb/package.json
If the main package.json changes, or either of the subproject package.jsons change, I want the package-changed task to run.
I think this would be relatively simple, all things considered. Trickiest part would be detecting the workspaces in the first place (i.e. changes to
src/find-package.ts
). After that, I think it'd just requiresrc/get-package-hash.ts
to concatenate the various package.json files before hashing.As an alternative to searching for multiple package.json files, there could also just be explicit cli-provided paths, e.g.
"package-changed": "package-changed --package ./package.json --package ./subprojecta/package.json --package ./subprojectb/package.json run 'rm -f .eslintcache && pnpm install'"
Right now, I think the only existing options are to either:
The text was updated successfully, but these errors were encountered: