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
Address fourth-round PR review feedback on Phase 1 packages
Addressed review feedback from PR #1096 (rounds 4):
- shakapacker-webpack peer: webpack-assets-manifest widened to ^5.0.6 || ^6.0.0
to match the core peer dep range and preserve the additive v10.1 install path
for users already on webpack-assets-manifest@6.
- Root shakapacker peer: webpack-cli widened to add ^7.0.0, matching the
supplemental package and the RFC's "current state" description.
- packages/shakapacker-rspack/index.js and packages/shakapacker-webpack/index.js
now carry a brief comment explaining that the re-export targets a compiled
path produced by `yarn build` (built via prepublishOnly for releases) and
what to do for local monorepo development.
- RFC: bumped v11 Ruby floor from 3.3.0 to 3.4.0 with rationale about Ruby 3.3
EOL (2027-03-31) leaving little headroom for a v11 release.
- RFC release process: added an explicit callout that core 10.1.0 must be
published before either supplemental, plus a note explaining why we use npm
for publishing despite the project pinning Yarn 1 for development.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
-`babel-loader`: 3 major versions (`^8.2.4 || ^9.0.0 || ^10.0.0`)
30
30
@@ -50,13 +50,14 @@ This creates:
50
50
51
51
### Phase 1: v10.1.0 (Non-Breaking, Additive)
52
52
53
-
Restructure the repo and publish the two supplemental packages. **No changes to the core `shakapacker` package's peer deps.** Existing users are unaffected.
53
+
Add the two supplemental packages. **No changes to the core `shakapacker` package's peer deps.** Existing users are unaffected.
54
54
55
55
What ships:
56
-
- Add `"workspaces": ["packages/*"]` to root `package.json`
56
+
57
57
- Create `packages/shakapacker-webpack/` and `packages/shakapacker-rspack/`
58
58
- Core `package/` directory stays in place (NOT moved to `packages/shakapacker/`)
59
-
- Publish supplemental packages at v10.1.0
59
+
- Do not enable root `workspaces` yet: the root `package.json` is also the publishable `shakapacker` package, and Yarn Classic requires workspace roots to be `private: true`
60
+
- Publish core `shakapacker` 10.1.0 first, then publish supplemental packages at v10.1.0 so their core peer deps resolve
60
61
- Update docs and installer to recommend the new pattern for new projects
61
62
- Core `shakapacker` still declares all existing peer deps (nothing removed)
62
63
@@ -69,11 +70,12 @@ This gives the supplemental packages real-world usage before they become the req
69
70
Remove bundler-specific peer deps from core `shakapacker`. Tighten version ranges. Drop EOL runtimes.
70
71
71
72
What ships:
73
+
72
74
- Core `shakapacker` no longer declares webpack/rspack peer deps
73
75
- Users must install `shakapacker-webpack` or `shakapacker-rspack`
74
76
- Drop old major versions (webpack-cli v4/v5, sass-loader v13-15, etc.)
75
77
- Collapse esbuild from 14 ranges to `^0.24.0`
76
-
- Ruby 3.3+, Rails 7.2+ (Ruby 3.1/3.2 are EOL; Rails 7.0/7.1 are unsupported)
78
+
- Ruby 3.4+, Rails 7.2+ (Ruby 3.1/3.2 are EOL; Ruby 3.3 reaches EOL 2027-03; Rails 7.0/7.1 are unsupported)
77
79
78
80
### Three npm Packages
79
81
@@ -92,24 +94,24 @@ The base package that all users install. Contains:
92
94
93
95
**Dependencies (v10.1.0 — no change from today):**
Note: rspack has built-in SWC transpilation, so no external transpiler deps are needed.
183
185
@@ -199,8 +201,8 @@ Following [G-Rath's feedback](https://github.com/shakacode/shakapacker/issues/10
199
201
"shakapacker": "^11.0.0",
200
202
"shakapacker-webpack": "^11.0.0",
201
203
"webpack": "^5.76.0",
202
-
"webpack-cli": "^6.0.0",
203
-
"webpack-assets-manifest": "^5.0.6",
204
+
"webpack-cli": "^6.0.0 || ^7.0.0",
205
+
"webpack-assets-manifest": "^5.0.6 || ^6.0.0",
204
206
"webpack-dev-server": "^5.2.0",
205
207
"@swc/core": "^1.3.0",
206
208
"swc-loader": "^0.2.0",
@@ -256,7 +258,7 @@ shakapacker/
256
258
├── spec/ # Ruby specs
257
259
├── test/ # JS tests
258
260
├── shakapacker.gemspec
259
-
└── package.json # workspace root + core package
261
+
└── package.json # core npm package
260
262
```
261
263
262
264
**Phase 2 (v11.0.0) — core moves into packages/:**
@@ -304,7 +306,7 @@ All three npm packages share the same version number, always. The Ruby gem versi
304
306
1.**Same version, always.** When any package is released, all three are released at the same version. If a release only changes core, the supplemental packages still get the version bump.
305
307
2.**Caret peer dep on core.**`shakapacker-webpack` and `shakapacker-rspack` declare `"shakapacker": "^10.1.0"` as a peer dep. This means minor bumps don't force users to update all packages on the same day, but they stay within the same major.
306
308
3.**Start at v10.1.0.** All three packages begin at the same version. No separate versioning at any point.
307
-
4.**Use npm workspaces** for the monorepo. The root `package.json`declares workspaces, and a single `npm version` + publish script bumps all three.
309
+
4.**Defer workspace tooling until the root can be private.** During Phase 1, the root `package.json`remains the publishable core package, so root workspaces are not enabled under Yarn Classic.
308
310
309
311
**Why lockstep:**
310
312
@@ -313,28 +315,38 @@ All three npm packages share the same version number, always. The Ruby gem versi
313
315
- Users see `"shakapacker": "^10.2.0"` and `"shakapacker-webpack": "^10.2.0"` — easy to reason about compatibility.
314
316
- "Empty bumps" (a supplemental package gets a version bump with no code change) are a tiny cost compared to the coordination headache of independent versions.
315
317
316
-
**Release process:**
318
+
**Initial v10.1.0 release process:**
319
+
320
+
> **Sequencing is load-bearing.** Both supplemental packages declare `"shakapacker": "^10.1.0"` as a required peer dep. Core `shakapacker` 10.1.0 must be published _before_ either supplemental, otherwise installers receive an unresolvable peer dependency error.
317
321
318
322
```bash
319
-
# Bump all three packages to the same version (root + supplemental)
320
-
npm version minor --workspaces --include-workspace-root # or patch, or major
323
+
# Bump the existing root package from 10.0.0 to 10.1.0.
324
+
npm version 10.1.0 --no-git-tag-version
321
325
322
-
# Publish all three
323
-
npm publish --workspaces --include-workspace-root
326
+
# Publish core first so supplemental peer deps resolve.
# Ruby gem is released separately via existing rake task
326
334
bundle exec rake release
327
335
```
328
336
337
+
> **Why npm for publishing despite Yarn 1 for development.** The project pins `packageManager: yarn@1.22.22` and uses Yarn for all development scripts, but Yarn Classic does not have a workspace-aware publish command (and `yarn workspaces version` is not available in v1). We invoke `npm publish` per package directly until v11 picks a dedicated release tool — see Open Question #5.
338
+
339
+
For later Phase 1 releases, bump all three package manifests to the same version in one release commit before publishing. A dedicated workspace or release tool remains an open question for v11, when the core package can move under `packages/shakapacker/` and the repository root can become private.
340
+
329
341
The existing `bundle exec rake update_changelog` task should be updated to handle the monorepo structure, noting which packages were affected in each release.
330
342
331
343
### Ruby gemspec (v11.0.0)
332
344
333
-
| Dependency | Current | v11 Proposed | Reason |
334
-
|------------|---------|-------------|--------|
335
-
|`required_ruby_version`|`>= 2.7.0`|`>= 3.3.0`| Ruby 3.1 (EOL 2025-03-26) and 3.2 (EOL 2026-04-01) are EOL |
0 commit comments