Conversation
pp-2741: Update plugin, CLI, client injection, and test configurations
# [0.13.0-beta.2](v0.13.0-beta.1...v0.13.0-beta.2) (2026-02-11) ### Bug Fixes * **plugin:** correct DIRNAME path resolution in client injection ([dce83d7](dce83d7)) ### Features * **cli:** support Next.js 16 and fix base path regex escaping ([9182d2a](9182d2a)) * **cli:** watch .env and pp-dev config files, await Next.js check ([69a07f0](69a07f0))
📝 WalkthroughWalkthroughVersion bump to 0.13.0-beta.2 with Next.js 16 support (peer dependency widened), CLI enhancements (config watching, path escaping), DIRNAME resolution supporting CJS/ESM contexts, lazy-loading of Vite plugin, defensive storage initialization, and updated test dependencies across multiple packages. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In `@rollup.config.ts`:
- Around line 41-42: Ensure the built CommonJS output shape matches how
consumers require your package: add or confirm Rollup's output option interop:
'compat' and keep exports: 'auto' (or change to 'default' if you only export a
single default) in your rollup config, then run a post-build check by requiring
the built CJS bundle (e.g., require('./dist/cjs/index.js')) and inspect
Object.keys(...) and whether .default exists to confirm consumers expect a
namespace object (mixed named + default) vs direct module.exports = <default>;
adjust the rollup output.exports setting accordingly and re-run the test until
the observed shape matches your consumption expectations.
In `@src/cli.ts`:
- Around line 1236-1247: Duplicate signal handlers are being registered causing
gracefulShutdown to run multiple times; remove the inner registration inside the
Next.js server's listen callback and keep only the outer process.on handlers
(the handlers that call gracefulShutdown('SIGINT'), gracefulShutdown('SIGTERM'),
gracefulShutdown('uncaughtException'), and
gracefulShutdown('unhandledRejection')); specifically delete the block that
registers process.on(...) inside the server.listen(...) callback and leave the
outer process.on(...) registrations at the action scope so gracefulShutdown is
only invoked once per signal.
In `@tests/test-nextjs-cjs/package.json`:
- Around line 14-33: The package.json has mismatched Next and ESLint configs;
update devDependencies so eslint is bumped to a ^9.x release and
eslint-config-next is updated to ^16.1.6 to match next@^16.1.6 (edit the
"devDependencies" block replacing "eslint": "^8.57.0" with "eslint": "^9" and
"eslint-config-next": "13.5.4" with "eslint-config-next": "^16.1.6"), then run
install/lint to verify compatibility.
In `@tests/test-nextjs-cjs/tsconfig.json`:
- Around line 31-43: The tsconfig.json currently lists "dist/types/**/*.ts" and
"dist/dev/types/**/*.ts" in "include" but also has "dist" in "exclude",
preventing those generated types from being picked up; update the tsconfig.json
to stop excluding the whole dist directory (e.g., remove "dist" from the
"exclude" array and keep only "node_modules", or narrow the exclude so it
doesn't exclude dist/types) so that the include entries ("dist/types/**/*.ts"
and "dist/dev/types/**/*.ts") are actually type-checked.
🧹 Nitpick comments (1)
src/cli.ts (1)
583-583: RedundantprojectRootredeclaration shadows outer variable.
projectRootis already computed at lines 514-516 with the same logic. This redeclaration at line 583 shadows the outer variable unnecessarily.♻️ Suggested fix
- // Load project root - const projectRoot = root ? join(process.cwd(), root) : process.cwd(); + // projectRoot is already defined at outer scope
Technical Improvements
🚀 New Features
.env,.pp-dev, and.pp-watchconfig files in config watcher🔧 Fixes
🧹 Maintenance & Dependencies
📚 Documentation
🧪 Testing
Commit References
9182d2adce83d769a07f0cbb9a6cdf35e2a4e18c6c22d84b9a1113ec39c39c56187b5eBreaking Changes / Compatibility
>=13 <17(Next.js 16 included)Summary by CodeRabbit
Release Notes – v0.13.0-beta.2
Bug Fixes
New Features
.envand dev config files for changesChores