Skip to content

Move script dependencies to top-level package.json #431

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

Closed
wants to merge 1 commit into from

Conversation

alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Jun 9, 2025

Closes #430

Maybe?

Copy link

changeset-bot bot commented Jun 9, 2025

⚠️ No Changeset found

Latest commit: e56fd19

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@alxndrsn alxndrsn requested a review from latin-panda June 9, 2025 11:35
@@ -5,9 +5,5 @@
"type": "module",
"scripts": {
"test": "true"
},
"devDependencies": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The intention is to keep the root's package.json file minimal. In my opinion, it's okay to keep globby and mustache dependencies here because they are not used anywhere else, and these scripts aren't vital for WF functioning.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these scripts aren't vital for WF functioning

I think that's the purpose of devDependencies.

What are the benefits of a minimal root package.json?

If these dependencies are kept in scripts/package.json, would you be open to a PR to add scripts/yarn.lock?

I think additionally, scripts/package.json would then also replicate some of the stuff in /package.json which standardises tools, specifically:

{
  "engines": {
    "node": "^18.20.5 || ^20.18.1 || ^22.12.0",
    "yarn": "1.22.22"
  },
  "volta": {
    "node": "22.12.0",
    "yarn": "1.22.22"
  },
  "packageManager": "yarn@1.22.22"
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatively, maybe scripts/package.json can be removed completely.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like the idea of adding engines, volta, and a lock file to /scripts, which will ensure consistency and maintain isolation and separation from the source. I can prepare a PR with those changes :)

@latin-panda
Copy link
Collaborator

We discussed this during the team meeting and decided to keep the /script with its dependencies. We have added the lock file and node engine definition to the package.json to align with the root. Addressed here. cc: @lognaturel

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.

Dependency installation for scripts/ dir is not documented
2 participants