Skip to content

chore(pluggable-widgets-tools): move shx to devDependencies - #241

Merged
weirdwater merged 1 commit into
mendix:masterfrom
r0b1n:chore/pwt-remove-shx
Oct 29, 2026
Merged

weirdwater merged 1 commit into
mendix:masterfrom
r0b1n:chore/pwt-remove-shx

Conversation

@r0b1n

@r0b1n r0b1n commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

What

Moves shx from dependencies to devDependencies in @mendix/pluggable-widgets-tools, and adds a changelog entry.

Why

shx is only used by the package's own prepack script (shx rm -rf dist && tsc). Nothing shipped in the package uses it: no rollup config, bin script or generator template. Because it sits in dependencies, every widget project that installs PWT also gets shx, and through it the outdated shelljs@0.9.2.

PWT also depends directly on shelljs@^0.10.0 (used by the rollup configs). That stays. After this change, consumers get only shelljs@0.10.x.

Verification

  • pnpm-lock.yaml diff only moves shx between importer sections. No other packages change.
  • pnpm lint:changelog and pnpm test pass in packages/pluggable-widgets-tools (83 tests).
  • pnpm pack runs prepack successfully. The packed package.json has shx only in devDependencies.

Alternative worth considering

Removing shx completely and replacing the script with a one-liner would drop two more dependencies from the repo (shx and shelljs@0.9.2 in the lockfile), for example:

"prepack": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc"

packages/command-tests also lists shx, but nothing there uses it, so it could be removed at the same time. I kept this PR to the smaller change. If the team prefers the full removal, I can update the PR.

shx is only used by the prepack script, so widget projects do not need it.
Moving it to devDependencies stops it, and its transitive shelljs@0.9.2,
from being installed in projects that depend on the tools. The direct
shelljs@^0.10.0 dependency used by the rollup configs is unchanged.

@weirdwater weirdwater left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Changes look good to me.

For crafting I am updating the command tests which removes the dependency from that package. So we can keep it to this for now.

@weirdwater
weirdwater enabled auto-merge October 29, 2026 14:20
@weirdwater
weirdwater merged commit 4f76a3d into mendix:master Oct 29, 2026
7 checks passed
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.

3 participants