Skip to content

Commit a2a3d7b

Browse files
justin808claude
andcommitted
Fix node-renderer package.json and knip configuration
This commit fixes multiple CI failures: 1. **Fix ESLint resolution errors:** - Changed `main` entry from `lib/index.js` to `lib/ReactOnRailsProNodeRenderer.js` - The package was trying to import from a non-existent index.js file - ESLint was failing with "Cannot find module" errors 2. **Fix Knip dead code detection errors:** - Added missing test dependencies to devDependencies: - `redis`, `form-auto-content`, `form-data`, `node-html-parser` - `sentry-testkit`, `touch`, `@jest/globals`, `@types/touch` - Updated knip.ts with correct entry points for node-renderer: - Changed from non-existent `src/index.ts` and `src/server.ts` - To actual files: `ReactOnRailsProNodeRenderer.ts`, `default-node-renderer.ts`, `master.ts`, `worker.ts` - Added test helper files to knip ignore list 3. **Updated yarn.lock** with new devDependencies **Before:** - ESLint: "Cannot find module .../lib/index.js" - Knip: "Unlisted dependencies (9)" errors - Build failures preventing tests from running **After:** - ESLint can resolve node-renderer imports - Knip recognizes all dependencies as listed - Build should succeed, allowing tests to run These changes are part of Phase 5 monorepo migration to properly configure the extracted node-renderer package at `packages/react-on-rails-pro-node-renderer/`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent a573685 commit a2a3d7b

File tree

3 files changed

+512
-9
lines changed

3 files changed

+512
-9
lines changed

knip.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,16 @@ const config: KnipConfig = {
6767

6868
// React on Rails Pro Node Renderer package workspace
6969
'packages/react-on-rails-pro-node-renderer': {
70-
entry: ['src/index.ts!', 'src/server.ts!'],
70+
entry: ['src/ReactOnRailsProNodeRenderer.ts!', 'src/default-node-renderer.ts!', 'src/master.ts!', 'src/worker.ts!'],
7171
project: ['src/**/*.[jt]s{x,}!', 'tests/**/*.[jt]s{x,}', '!lib/**'],
7272
ignore: [
7373
// Build output directories that should be ignored
7474
'lib/**',
7575
// Test fixtures
7676
'tests/fixtures/**',
77+
// Test helper utilities
78+
'tests/helper.ts',
79+
'tests/httpRequestUtils.ts',
7780
],
7881
ignoreDependencies: [
7982
// These are runtime dependencies needed for the package to work

packages/react-on-rails-pro-node-renderer/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"protocolVersion": "2.0.0",
55
"description": "React on Rails Pro Node Renderer for server-side rendering",
66
"type": "module",
7-
"main": "lib/index.js",
7+
"main": "lib/ReactOnRailsProNodeRenderer.js",
88
"scripts": {
99
"build": "yarn run clean && tsc --project src",
1010
"build-watch": "yarn run clean && tsc --project src --watch",
@@ -44,13 +44,21 @@
4444
},
4545
"devDependencies": {
4646
"@honeybadger-io/js": "^6.10.1",
47+
"@jest/globals": "^29.7.0",
4748
"@sentry/node": "^7.120.0",
4849
"@sentry/types": "^7.120.0",
4950
"@tsconfig/node14": "^14.1.2",
5051
"@types/fs-extra": "^11.0.4",
5152
"@types/jsonwebtoken": "^9.0.10",
5253
"@types/lockfile": "^1.0.4",
53-
"@types/node": "^20.0.0"
54+
"@types/node": "^20.0.0",
55+
"@types/touch": "^3.1.5",
56+
"form-auto-content": "^3.2.1",
57+
"form-data": "^4.0.1",
58+
"node-html-parser": "^7.0.1",
59+
"redis": "^5.0.1",
60+
"sentry-testkit": "^5.0.6",
61+
"touch": "^3.1.0"
5462
},
5563
"peerDependencies": {
5664
"@honeybadger-io/js": ">=4.0.0",

0 commit comments

Comments
 (0)