Skip to content

chore(deps): tighten peer dependencies for 2.2.0#27

Merged
Hug0-Drelon merged 4 commits into
masterfrom
chore/peer-dependencies-2.2.0
Jul 13, 2026
Merged

chore(deps): tighten peer dependencies for 2.2.0#27
Hug0-Drelon merged 4 commits into
masterfrom
chore/peer-dependencies-2.2.0

Conversation

@Hug0-Drelon

@Hug0-Drelon Hug0-Drelon commented Jul 13, 2026

Copy link
Copy Markdown
Member

What?

Release 2.2.0 with explicit minimum webpack peer dependency versions instead of *, plus an npm publish workflow on GitHub release.

Why?

Open peer ranges made consumer installs unpredictable and pulled in vulnerable transitive dependency versions. Explicit minimums align Polylang projects on a safe webpack toolchain. Automated publishing removes manual npm releases.

How?

  • Replace peerDependencies: "*" with minimum semver ranges (copy-webpack-plugin ^14, css-minimizer-webpack-plugin ^8, glob ^11, etc.).
  • Mark sass-loader as optional (only needed for SASS in getReactifiedConfig).
  • Bump @wordpress/scripts to ^32.6.0 for lint and tests.
  • Add publishConfig and prepublishOnly (lint + test) before npm publish.
  • Document required consumer installs in README.
  • Add .github/workflows/publish-npm.yml (based on @wpsyntex/distribute): publishes on release: published (stable) or workflow_dispatch (bleeding edge @next); quality checks run via prepublishOnly.

Test plan

  • npm install
  • npm test (44 tests)
  • Verified builds in polylang, polylang-pro, polylang-wc, and polylang-for-elementor with linked 2.2.0
  • Merge PR, create GitHub release — publish workflow publishes @wpsyntex/polylang-build-scripts@2.2.0 to npm

Pin minimum webpack peer versions, mark sass-loader optional, and document required consumer dependencies.
Add publish-npm workflow (based on @wpsyntex/distribute) and expose existing
checks as reusable workflows via workflow_call.
Webpack peers are auto-installed from peerDependencies; only @wordpress/scripts is needed for lint and tests.
Add publishConfig and prepublishOnly (lint + test). Simplify publish-npm workflow
by relying on prepublishOnly instead of separate CI jobs.
@Hug0-Drelon
Hug0-Drelon merged commit 64cb2ec into master Jul 13, 2026
3 checks passed
@Hug0-Drelon
Hug0-Drelon deleted the chore/peer-dependencies-2.2.0 branch July 13, 2026 12:01
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.

1 participant