Skip to content

Commit 94392be

Browse files
justin808claude
andauthored
Surface v10.1 supplemental packages from README and key docs (#1134)
### Summary v10.1 added optional `shakapacker-webpack` and `shakapacker-rspack` packages with a dedicated migration guide at `docs/migration/v10.1-supplemental-packages.md`, but the guide was only linked from `CHANGELOG.md` and `docs/dependency-strategy.md`. Users arriving via `README.md`, `docs/installation.md`, or `docs/rspack.md` would follow the old multi-dep install flow without ever learning the supplemental packages exist. This PR adds cross-references from those entry points plus `docs/common-upgrades.md` and the two peer-dependency docs so the migration guide is discoverable. The guide content itself is unchanged. Files touched: - `README.md` — added a v10.1 callout in the upgrade-links list - `docs/installation.md` — added an "Optional: Consolidate dev dependencies (10.1+)" subsection after "Run the Installer" - `docs/rspack.md` — added a "Recommended (10.1+): `shakapacker-rspack`" block at the top of Installation; kept the manual install as the alternative for 10.0 and custom setups - `docs/common-upgrades.md` — added an "Adopting Supplemental Packages (10.1+)" top-level section + TOC entry - `docs/peer-dependencies.md` and `docs/optional-peer-dependencies.md` — added tips pointing at supplementals as an alternative to managing individual peers ### Pull Request checklist - ~[ ] Add/update test to cover these changes~ (docs-only) - [x] Update documentation - ~[ ] Update CHANGELOG file~ (per project rules, docs fixes don't get CHANGELOG entries) ### Other Information All link targets (`docs/migration/v10.1-supplemental-packages.md` and the two `packages/shakapacker-*/README.md` files) verified to exist; relative paths resolve correctly from each doc's location. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk docs-only change that adds cross-links and updated install guidance; no runtime or dependency behavior changes. > > **Overview** > **Improves discoverability of Shakapacker 10.1 supplemental packages.** The README and several entry-point docs now call out optional `shakapacker-webpack`/`shakapacker-rspack` packages and link to the `v10.1 supplemental packages migration guide`. > > Installation/upgrade guidance is adjusted to present supplemental packages as the recommended single-dependency path (with manual multi-dependency install as an alternative) and adds a new `Common Upgrades` section describing when to adopt (or avoid) these packages. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ef3df46. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b6c26b2 commit 94392be

6 files changed

Lines changed: 78 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ _📖 **Full documentation at [shakapacker.com](https://shakapacker.com)**_
1111
_Official, actively maintained successor to [rails/webpacker](https://github.com/rails/webpacker). ShakaCode stands behind the long-term maintenance and development of this project for the Rails community._
1212

1313
- ⚠️ See the [6-stable](https://github.com/shakacode/shakapacker/tree/6-stable) branch for Shakapacker v6.x code and documentation. :warning:
14+
- **New in 10.1: optional `shakapacker-webpack` and `shakapacker-rspack` packages let you replace four `devDependencies` with one. See the [v10.1 supplemental packages migration guide](./docs/migration/v10.1-supplemental-packages.md).**
1415
- **See the [v10.0.0 release notes](https://github.com/shakacode/shakapacker/releases/tag/v10.0.0) for upgrading from v9 to v10.**
1516
- **See [V9 Upgrade](./docs/v9_upgrade.md) for upgrading from v8 to v9.**
1617
- See [V8 Upgrade](./docs/v8_upgrade.md) for upgrading from the v7 release.

docs/common-upgrades.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This document provides step-by-step instructions for the most common upgrade sce
77
## Table of Contents
88

99
- [Upgrading Shakapacker](#upgrading-shakapacker)
10+
- [Adopting Supplemental Packages (10.1+)](#adopting-supplemental-packages-101)
1011
- [Automating Updates with Dependabot](#automating-updates-with-dependabot)
1112
- [Migrating Package Managers](#migrating-package-managers)
1213
- [Yarn to npm](#yarn-to-npm)
@@ -97,6 +98,22 @@ For major version upgrades, always consult the version-specific upgrade guides f
9798
9899
---
99100

101+
## Adopting Supplemental Packages (10.1+)
102+
103+
Shakapacker 10.1 introduces two optional npm packages — `shakapacker-webpack` and `shakapacker-rspack` — that bundle the managed-build stack as direct dependencies. Adopting one of them lets you replace four explicit `devDependencies` (`shakapacker` + bundler + CLI + manifest plugin) with a single package that lockstep-pins to the exact versions Shakapacker is tested against.
104+
105+
**This is opt-in.** Apps that don't change anything keep working on 10.1 exactly as they did on 10.0.
106+
107+
**Rspack apps** can replace `shakapacker` + `@rspack/core` + `@rspack/cli` + `rspack-manifest-plugin` with a single `shakapacker-rspack` dev dependency.
108+
109+
**Webpack apps** can replace `shakapacker` + `webpack` + `webpack-cli` + `webpack-assets-manifest` with a single `shakapacker-webpack` dev dependency. One caveat: `shakapacker-webpack` pins `webpack-assets-manifest` to `~6.5.1`, so apps still on `webpack-assets-manifest@5.x` need to upgrade to v6 when adopting it.
110+
111+
**Custom-build apps** (apps that ship their own webpack/rspack/Vite setup and only use Shakapacker to read `manifest.json`) should **not** install a supplemental package — continue using bare `shakapacker`.
112+
113+
See the [v10.1 supplemental packages migration guide](./migration/v10.1-supplemental-packages.md) for before/after `package.json` snippets, the `webpack-assets-manifest` v5→v6 upgrade notes, and the v11 roadmap context. The per-package install references live at [`packages/shakapacker-webpack/README.md`](../packages/shakapacker-webpack/README.md) and [`packages/shakapacker-rspack/README.md`](../packages/shakapacker-rspack/README.md).
114+
115+
---
116+
100117
## Automating Updates with Dependabot
101118

102119
Because Shakapacker ships as both a Ruby gem and an npm package, both sides must

docs/installation.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,20 @@ SKIP=true bundle exec rake shakapacker:install
6262
Accepted truthy values for `FORCE` and `SKIP` are `true`, `1`, and `yes`
6363
case-insensitively. If both are set, `FORCE` wins.
6464

65+
### Optional: Consolidate dev dependencies with a supplemental package (10.1+)
66+
67+
The installer adds the managed-build stack to `package.json` as individual
68+
entries (`shakapacker`, `webpack`, `webpack-cli`, `webpack-assets-manifest` for
69+
webpack apps; `shakapacker`, `@rspack/core`, `@rspack/cli`,
70+
`rspack-manifest-plugin` for rspack apps). On Shakapacker 10.1+ you can
71+
optionally replace those four entries with a single
72+
[`shakapacker-webpack`](../packages/shakapacker-webpack/README.md) or
73+
[`shakapacker-rspack`](../packages/shakapacker-rspack/README.md) dependency.
74+
The supplemental package pulls in the same managed stack at the exact tested
75+
versions and has no runtime impact — adoption is opt-in. See the
76+
[v10.1 supplemental packages migration guide](./migration/v10.1-supplemental-packages.md)
77+
for the before/after.
78+
6579
## Package Manager Selection
6680

6781
Shakapacker uses the

docs/optional-peer-dependencies.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Optional Peer Dependencies in Shakapacker
22

3+
> **Tip (Shakapacker 10.1+):** This document describes the optional peer
4+
> dependency model used by the core `shakapacker` package. If you want a
5+
> tested, lockstep-pinned managed-build stack without listing each peer
6+
> yourself, install
7+
> [`shakapacker-webpack`](../packages/shakapacker-webpack/README.md) or
8+
> [`shakapacker-rspack`](../packages/shakapacker-rspack/README.md) instead.
9+
> See the
10+
> [v10.1 supplemental packages migration guide](./migration/v10.1-supplemental-packages.md)
11+
> for adoption steps and
12+
> [`docs/dependency-strategy.md`](./dependency-strategy.md) for the design
13+
> rationale.
14+
315
## Overview
416

517
As of Shakapacker v9 (and continuing in v10), all peer dependencies are marked as optional via `peerDependenciesMeta`. This design provides maximum flexibility while maintaining clear version constraints.

docs/peer-dependencies.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ Shakapacker declares these packages as optional peer dependencies via
88
chosen bundler/transpiler stack, while the ranges below document what current
99
releases support.
1010

11+
> **Tip (Shakapacker 10.1+):** If you'd rather not manage the managed-build
12+
> stack as individual peers, install
13+
> [`shakapacker-webpack`](../packages/shakapacker-webpack/README.md) or
14+
> [`shakapacker-rspack`](../packages/shakapacker-rspack/README.md). These
15+
> supplemental packages bundle the tested webpack/rspack stack as direct
16+
> dependencies, so a single install brings in `shakapacker` + bundler + CLI +
17+
> manifest plugin at the exact pinned versions. See the
18+
> [v10.1 supplemental packages migration guide](./migration/v10.1-supplemental-packages.md).
19+
> Optional peers (transpilers, dev-server, CSS preprocessors) still apply when
20+
> you adopt a supplemental package.
21+
1122
## Common Packages
1223

1324
```text

docs/rspack.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,34 @@ See the [Rspack v2 breaking changes discussion](https://github.com/web-infra-dev
3030

3131
## Installation
3232

33-
Install the required Rspack dependencies:
33+
### Recommended (Shakapacker 10.1+): `shakapacker-rspack`
34+
35+
`shakapacker-rspack` bundles `shakapacker`, `@rspack/core`, `@rspack/cli`, and `rspack-manifest-plugin` as direct dependencies, so a single install pulls in the full managed Rspack stack:
36+
37+
```bash
38+
npm install shakapacker-rspack -D
39+
# or
40+
yarn add shakapacker-rspack -D
41+
# or
42+
pnpm add shakapacker-rspack -D
43+
# or
44+
bun add shakapacker-rspack -D
45+
```
46+
47+
See [`packages/shakapacker-rspack/README.md`](../packages/shakapacker-rspack/README.md) for the full install reference and the [v10.1 supplemental packages migration guide](./migration/v10.1-supplemental-packages.md) for swapping an existing rspack install over to the supplemental package.
48+
49+
### Manual install (Shakapacker 10.0 and earlier, or self-managed versions)
50+
51+
If you're on Shakapacker 10.0 or prefer to manage `@rspack/core`, `@rspack/cli`, and `rspack-manifest-plugin` versions yourself, install them directly:
3452

3553
```bash
36-
npm install @rspack/core @rspack/cli -D
54+
npm install @rspack/core @rspack/cli rspack-manifest-plugin -D
3755
# or
38-
yarn add @rspack/core @rspack/cli -D
56+
yarn add @rspack/core @rspack/cli rspack-manifest-plugin -D
3957
# or
40-
pnpm add @rspack/core @rspack/cli -D
58+
pnpm add @rspack/core @rspack/cli rspack-manifest-plugin -D
4159
# or
42-
bun add @rspack/core @rspack/cli -D
60+
bun add @rspack/core @rspack/cli rspack-manifest-plugin -D
4361
```
4462

4563
Note: These packages are already listed as optional peer dependencies in Shakapacker, so you may see warnings if they're not installed.

0 commit comments

Comments
 (0)