Skip to content

chore: deps + security + drop EOL Node + tsup→Rollup + tsconfig cleanup#14

Merged
KayleeWilliams merged 7 commits into
mainfrom
KayleeWilliams/Nautilus
May 10, 2026
Merged

chore: deps + security + drop EOL Node + tsup→Rollup + tsconfig cleanup#14
KayleeWilliams merged 7 commits into
mainfrom
KayleeWilliams/Nautilus

Conversation

@KayleeWilliams
Copy link
Copy Markdown
Collaborator

@KayleeWilliams KayleeWilliams commented May 9, 2026

Summary

Four coupled cleanups before the leadtype library publishes.

1. Dependencies + security advisories

Closes the three open Dependabot advisories (1 high, 2 moderate):

  • valibot 1.0.0 → 1.4.0 — High: ReDoS in EMOJI_REGEX (packages/leadtype)
  • nitro 3.0.260415-beta → 3.0.260429-beta — Moderate: open redirect via protocol-relative URL bypass (apps/example)
  • nitro (same bump) — Moderate: proxy scope bypass via percent-encoded path traversal in routeRules

Major bumps (verified): vite 7→8, vitest 2→4 (97/97 passing), @vitejs/plugin-react 5→6, vite-tsconfig-paths 5→6, @types/node 22→25, @changesets/changelog-github 0.6→0.7.

Minor/patch bumps: @biomejs/biome 2.4.14, @changesets/cli 2.31.0, turbo 2.9.12, ultracite 7.6.5, @typescript/native-preview 20260509.2, @tanstack/react-router 1.169.2, @tanstack/react-start 1.167.65, ai 6.0.177, tailwindcss 4.3.0, @tanstack/ai 0.15.0, just-bash 2.14.5.

Side-effect fix: Biome 2.4.14 added a rule against ** in files.includes when extending a config with its own catch-all. Removed from biome.jsonc:15.

2. Drop EOL Node, raise floor to 22

  • engines.node: >=18>=22.0.0 (root + packages/leadtype).
  • Node 18 is EOL. Node 20 is EOL April 2026. Vite 8 needs 20.19+; 22 is the active LTS floor.

3. tsup → Rollup migration for packages/leadtype

Replaces tsup@8.x with rollup@4 + rollup-plugin-esbuild + rollup-plugin-dts.

  • CJS: already gone. Source has zero require()/__dirname/module.exports. package.json has no main and no require keys in exports. "type": "module" set. tsup was already format: ["esm"].
  • Output paths preserved: the 13 entry points + cli bin write to the same dist/ paths the existing exports map references.
  • Shebang + 0755 on cli: output.banner fires only on the cli chunk; small chmodCli plugin sets 0755 in writeBundle.
  • cleanDist plugin clears dist/ once at the start of the JS pass (not the dts pass — that would wipe the output we just produced). Rollup has no built-in clean.
  • Code splitting: shared modules now live under dist/_shared/[name]-[hash].js. tsup had splitting: false which inflated per-entry bundles.
  • Build time: full turbo build went 11.4s → 5.3s on this machine.

4. tsconfig overhaul

base.json is now the actual baseline every consumer uses:

  • lib: ["ES2022"] — DOM dropped from base, pushed to apps/example (the only consumer that needs it). Stops leadtype source from accidentally referencing document/window/etc.
  • module: ESNext + moduleResolution: Bundler — matches what every consumer was overriding to. Reflects Rollup/Vite reality.
  • verbatimModuleSyntax: true — ultracite already enforces useImportType, so this is a redundancy gate.
  • incremental: false removed (no-op default).

packages/leadtype/tsconfig.json:

  • Dropped module/moduleResolution overrides (now inherited from base).
  • Dropped noUncheckedIndexedAccess: false and verbatimModuleSyntax: false — the publishable library is no longer the least-strict config in the repo. Source was already index-safe via existing ?. and length guards; zero src/ changes needed.

apps/example/tsconfig.json:

  • Dropped redundant target/module/moduleResolution/verbatimModuleSyntax (all inherited).
  • Switched extends from relative path to package alias.
  • Added @repo/typescript-config: "*" to devDeps (was missing).

Deleted dead typescript-config/nextjs.json and react-library.json — zero consumers anywhere in the repo.

Test plan

  • bun install clean
  • bun run check-types (turbo) — clean across all 3 workspaces with the strictness flags now flipped on
  • bun run check (ultracite/biome 2.4.14) — clean
  • bun run test — vitest 4, 97/97 passing in packages/leadtype
  • bun run build (turbo) — example builds on Vite 8, leadtype builds on Rollup 4
  • dist/cli.js keeps #!/usr/bin/env node shebang + 0755 mode
  • dist/ layout matches the unchanged exports map (e.g. dist/search/cloudflare-index.js)

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Dependency and toolchain version bumps across root and app packages; Biome include pattern narrowed; TypeScript base and presets simplified/removed; apps/example tsconfig and deps updated; packages/leadtype migrated from tsup to Rollup with a new rollup.config.ts and tsup.config.ts removed.

Changes

Monorepo-Wide Dependency Updates & Build Migration

Layer / File(s) Summary
Tooling Configuration
biome.jsonc
files.includes array narrowed by removing the "**" catch-all pattern.
Root Monorepo Toolchain
package.json
devDependencies bumped (@biomejs/biome, @changesets/*, @typescript/native-preview, turbo, ultracite) and engines.node raised from >=18 to >=22.0.0.
Example App Dependencies
apps/example/package.json
Runtime deps bumped: @tanstack/react-router, @tanstack/react-start, ai, nitro, tailwindcss. DevDeps bumped: @tailwindcss/vite, @typescript/native-preview, @types/node, @vitejs/plugin-react, vite, vite-tsconfig-paths.
TypeScript Base & Presets
packages/typescript-config/base.json, packages/typescript-config/nextjs.json, packages/typescript-config/react-library.json
Base config: lib["ES2022"], moduleESNext, moduleResolutionBundler, added verbatimModuleSyntax. Next.js and react-library preset files removed.
Example App TSConfig
apps/example/tsconfig.json
Switched extends to @repo/typescript-config/base.json; retained inline jsx, lib, noEmit, and allowImportingTsExtensions while removing explicit module/target settings.
Leadtype Package Metadata & Scripts
packages/leadtype/package.json
Added engines.node >=22.0.0; scripts.build/scripts.dev switched from tsup to rollup; bumped valibot; devDependencies/tooling switched (removed tsup, added rollup and plugins); peerDependency minimums raised for @tanstack/ai and just-bash.
Leadtype Rollup Build
packages/leadtype/rollup.config.ts
New Rollup configuration added: multiple entrypoints, externalization, clean hook, esbuild transform (es2022), CLI-only shebang banner, chmod post-step, and .d.ts generation.
Removed tsup Configuration
packages/leadtype/tsup.config.ts
Deleted tsup config that previously declared multi-entry tsup build, types output, and post-build CLI executable handling.
Leadtype TSConfig
packages/leadtype/tsconfig.json
compilerOptions reduced to outDir, rootDir, and types: ["node"]; other module-related flags removed.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant Rollup
  participant Esbuild
  participant DTS
  Dev->>Rollup: run rollup -c
  Rollup->>Esbuild: bundle ESM entries (es2022 target)
  Rollup->>DTS: generate .d.ts files
  Rollup->>Rollup: add CLI shebang for cli chunk
  Rollup->>Rollup: set dist/cli.js executable (chmod)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • inthhq/dsar#33: Overlapping TypeScript toolchain and @typescript/native-preview updates across workspace packages and tsconfig changes.

Poem

🐰 I hopped through packages, bumped each line,
Swapped tsup for Rollup, made the CLI shine.
Biome's scope trimmed, TypeScript cleaned and lean,
Engines raised, build scripts switched — the tree looks green. 🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the four main changes: dependency/security updates, dropping EOL Node, migrating from tsup to Rollup, and TypeScript config cleanup.
Description check ✅ Passed The description comprehensively relates to the changeset, detailing all four major updates with context, test validation, and rationale for each modification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 517c828018

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"unist-util-is": "6.0.1",
"unist-util-visit": "5.1.0",
"valibot": "1.0.0"
"valibot": "1.4.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add a changeset for the security bump

Because leadtype is a published package and the release workflow I inspected uses changesets/action with bun run version/bun run release, this dependency change will not produce a new package version unless the commit also adds a .changeset entry. In that case the valibot advisory fix stays only in the repo/lockfile and consumers installing leadtype from npm will continue receiving the last published package with valibot 1.0.0.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/example/package.json`:
- Around line 62-63: Update the root package.json "engines.node" minimum to
match Vite 8's requirement by setting the Node engine floor to at least 20.19
(e.g., ">=20.19.0") so it is consistent with apps/example using Vite v8; locate
and edit the "engines" object in the root package.json (the property currently
set to "node": ">=18") and raise the version constraint accordingly, then run
CI/lockfile tasks to ensure all toolchains and consumers see the updated Node
requirement.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 45e99cb3-6f9b-4b89-a011-a1a2df1eb40f

📥 Commits

Reviewing files that changed from the base of the PR and between bfccdc2 and 517c828.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • apps/example/package.json
  • biome.jsonc
  • package.json
  • packages/leadtype/package.json
💤 Files with no reviewable changes (1)
  • biome.jsonc
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
🔍 Remote MCP Context7

Summary of Additional Context for PR Review

Based on my research, here are the key findings relevant to this dependency update PR:

Critical Security Fixes

Valibot 1.4.0 – ReDoS Vulnerability (High)
The v1.2+ releases address a ReDoS (Regular Expression Denial of Service) vulnerability in the EMOJI_REGEX pattern. This vulnerability could allow attackers to trigger excessive CPU usage with specially crafted input strings. The team has updated the regex pattern while maintaining validation functionality.

Nitro Security Fixes (Moderate)
The Nitro upgrade addresses route rule security concerns documented in their routing configuration system. The library provides route rules for managing wildcards, redirects, and proxies. Organizations should verify that any existing wildcard route configurations (particularly those using '**' patterns) remain secure after the upgrade.


Major Version Migrations to Verify

Vite 7 → 8
According to Vite documentation, the upgrade includes a built-in compatibility layer that auto-converts existing esbuild and rollupOptions configurations. The migration is intended to be smooth for most projects. Vite provides a future configuration option to opt-in to breaking changes in advance.

Vitest 2 → 4
The PR shows 97/97 tests passing, which is excellent. However, be aware of these breaking changes in Vitest 4.0:

  • Test options argument reordering: Options moved to second argument position (previously third)
  • Deprecated APIs removed: poolMatchGlobs and environmentMatchGlobs replaced by projects configuration
  • Exclude patterns changed: Default exclusions for dist and cypress directories were removed; you may need to manually restore them if relied upon

@types/node 22 → 25
A significant jump in Node type definitions. Review any type-dependent code to ensure compatibility.


Biome Configuration Change

The removal of "**" from files.includes in biome.jsonc aligns with Biome 2.4.14's behavior when extending an ultracite configuration. Biome's file configuration documentation shows files.include and files.ignore patterns control which files are processed. This narrower pattern scope should be validated to ensure all necessary files are still being linted/formatted.


Testing Coverage

✅ The PR demonstrates comprehensive testing:

  • 97/97 Vitest tests passing (vitest 4)
  • All builds successful (vite 8)
  • No type errors across workspaces
  • Clean dependency installation (1590 packages)
🔇 Additional comments (4)
package.json (1)

3-13: Dependency/tooling bumps look consistent with the PR objective.

No issues in this segment; version updates are coherent and scoped.

apps/example/package.json (1)

35-40: Security-driven dependency updates are good here.

The nitro bump and related dependency updates align with the advisory remediation intent.

packages/leadtype/package.json (2)

94-94: Valibot security bump is correctly applied.

This update aligns with the stated advisory remediation.


99-103: Peer minimums are aligned with the upgraded dependency set.

Good to see @tanstack/ai and just-bash peer constraints updated alongside the dependency bump.

Also applies to: 112-115

Comment thread apps/example/package.json
@KayleeWilliams KayleeWilliams changed the title chore: update dependencies + fix valibot/nitro security advisories chore: deps + security advisories + drop EOL Node + tsup → Rollup May 9, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/leadtype/rollup.config.ts`:
- Around line 6-20: Make the entries object literal explicitly immutable by
adding a const assertion (use "entries" with as const) so the keys and string
values are typed as literals, and replace the inline file mode magic number
0o755 with a clearly named constant (e.g., EXECUTABLE_MODE or FILE_MODE_EXECUTE)
declared near the top of the module and used where 0o755 currently appears;
update references in rollup.config.ts to use the new constant and keep entries
as a const-assigned variable (entries as const) to satisfy stronger literal
typing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f31f409b-3165-4f88-a127-324babadd3e3

📥 Commits

Reviewing files that changed from the base of the PR and between 517c828 and 3a3bee6.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • package.json
  • packages/leadtype/package.json
  • packages/leadtype/rollup.config.ts
  • packages/leadtype/tsup.config.ts
💤 Files with no reviewable changes (1)
  • packages/leadtype/tsup.config.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

Files:

  • packages/leadtype/rollup.config.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use descriptive names for functions, variables, and types for meaningful naming
Add comments for complex logic, but prefer self-documenting code

Files:

  • packages/leadtype/rollup.config.ts
🪛 GitHub Actions: Benchmark / 0_Convert + LLM pipeline.txt
package.json

[error] 1-1: Step failed: script "build" exited with code 1

packages/leadtype/rollup.config.ts

[error] 1-1: Rollup build failed: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/runner/work/leadtype/leadtype/packages/leadtype/rollup.config.ts

packages/leadtype/package.json

[error] 1-1: Step failed: script "build" exited with code 1

🪛 GitHub Actions: Benchmark / Convert + LLM pipeline
packages/leadtype/rollup.config.ts

[error] 1-1: Build failed: TypeError: Unknown file extension ".ts" for /home/runner/work/leadtype/leadtype/packages/leadtype/rollup.config.ts (ERR_UNKNOWN_FILE_EXTENSION). Script "build" exited with code 1.


[error] 1-1: Command failed: "cd packages/leadtype && bun run build" (runs "rollup -c && bun run docs:generate").

packages/leadtype/package.json

[error] 1-1: Command failed: "cd packages/leadtype && bun run build" (runs "rollup -c && bun run docs:generate").

🔍 Remote MCP Context7

Summary of additional relevant facts for reviewing PR #14

  • Valibot — ReDoS in EMOJI_REGEX

    • Valibot v1.2 release notes state a critical ReDoS (regular-expression DoS) in the EMOJI_REGEX used by the emoji validator was fixed; users are urged to upgrade (v1.2+ addresses it). The PR’s bump to 1.4.0 therefore includes that fix.,
  • Nitro — routeRules redirect/proxy wildcard risks

    • Nitro docs for routeRules show wildcard redirects/proxies (e.g., '/old-blog/' -> 'https://blog.example.com/') and proxy examples; the cited Nitro security fixes (open redirect via protocol-relative URLs and percent-encoded path-traversal proxy bypass) are directly relevant to any wildcard redirect/proxy rules in apps/example. Verify the app’s routeRules/wildcard patterns for unintended open-redirect or proxy targets after the bump.,
  • Vite 7 → 8 migration notes

    • Vite 8 introduces Rolldown/Oxc replacements and provides a compatibility layer to auto-convert many esbuild/rollupOptions cases; migration guidance recommends a gradual path (rolldown-vite on v7 → v8) for complex projects. The future config can opt into/warn on upcoming breaking changes. Confirm custom rollup/esbuild options or plugin behaviors (e.g., rollup-plugin-esbuild usage in new rollup.config.ts) behave as expected under Vite 8.,

Tools/queries used

  • Resolved libraries: Valibot (/open-circle/valibot), Nitro (/unjs/nitro), Vite (/vitejs/vite).
  • Documentation/changelog queries for ReDoS fix (Valibot), routeRules/redirects/proxy examples (Nitro), and Vite 8 migration/compatibility notes (Vite).
🔇 Additional comments (3)
package.json (1)

3-13: Dependency/tooling and engine updates look aligned with PR intent.

No blocker found in this file’s changed lines.

Also applies to: 37-37

packages/leadtype/package.json (2)

97-113: Security/tooling dependency bumps here are directionally correct.

The valibot and build-toolchain version updates align with the PR security and modernization goals.


71-72: ⚡ Quick win

Build may need config transpilation for rollup.config.ts, but verify the correct plugin.

rollup 4.40.0 requires a --configPlugin option to transpile TypeScript config files. The current build and dev scripts lack this. However, the proposed fix specifies esbuild, while rollup's TypeScript support typically uses typescript as the config plugin. Since rollup-plugin-typescript is not installed (only rollup-plugin-esbuild is), either install the TypeScript plugin or confirm that esbuild can serve as a valid config plugin for this use case. Additionally, the CI currently runs the build successfully, so verify whether this is an actual blocker or a potential issue.

Comment thread packages/leadtype/rollup.config.ts Outdated
Comment on lines +6 to +20
const entries = {
index: "src/index.ts",
"remark/index": "src/remark/index.ts",
"convert/index": "src/convert/index.ts",
"llm/index": "src/llm/index.ts",
"search/index": "src/search/index.ts",
"search/node-index": "src/search/node-index.ts",
"search/ai-index": "src/search/ai-index.ts",
"search/bash-index": "src/search/bash-index.ts",
"search/vercel-index": "src/search/vercel-index.ts",
"search/tanstack-index": "src/search/tanstack-index.ts",
"search/cloudflare-index": "src/search/cloudflare-index.ts",
"lint/index": "src/lint/index.ts",
cli: "src/cli.ts",
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Make immutable config literals explicit and replace inline mode magic number.

Line 6-20 can use as const for stronger literal typing, and Line 32 should use a named constant for 0o755.

Proposed refactor
+const CLI_EXECUTABLE_MODE = 0o755;
+
 const entries = {
   index: "src/index.ts",
   "remark/index": "src/remark/index.ts",
   "convert/index": "src/convert/index.ts",
   "llm/index": "src/llm/index.ts",
   "search/index": "src/search/index.ts",
   "search/node-index": "src/search/node-index.ts",
   "search/ai-index": "src/search/ai-index.ts",
   "search/bash-index": "src/search/bash-index.ts",
   "search/vercel-index": "src/search/vercel-index.ts",
   "search/tanstack-index": "src/search/tanstack-index.ts",
   "search/cloudflare-index": "src/search/cloudflare-index.ts",
   "lint/index": "src/lint/index.ts",
   cli: "src/cli.ts",
-};
+} as const;
@@
-      await chmod(`${options.dir}/cli.js`, 0o755);
+      await chmod(`${options.dir}/cli.js`, CLI_EXECUTABLE_MODE);

As per coding guidelines, "Use const assertions (as const) for immutable values and literal types" and "Use meaningful variable names instead of magic numbers - extract constants with descriptive names".

Also applies to: 32-32

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/leadtype/rollup.config.ts` around lines 6 - 20, Make the entries
object literal explicitly immutable by adding a const assertion (use "entries"
with as const) so the keys and string values are typed as literals, and replace
the inline file mode magic number 0o755 with a clearly named constant (e.g.,
EXECUTABLE_MODE or FILE_MODE_EXECUTE) declared near the top of the module and
used where 0o755 currently appears; update references in rollup.config.ts to use
the new constant and keep entries as a const-assigned variable (entries as
const) to satisfy stronger literal typing.

@KayleeWilliams KayleeWilliams changed the title chore: deps + security advisories + drop EOL Node + tsup → Rollup chore: deps + security + drop EOL Node + tsup→Rollup + tsconfig cleanup May 9, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/example/package.json`:
- Line 51: The dependency entry for "@repo/typescript-config" uses a wildcard
"*" which prevents reproducible installs; update the package.json dependency for
"@repo/typescript-config" to use "workspace:*" or a specific semver/version
(e.g., "1.2.3" or "^1.2.0") instead of "*" so the workspace dependency is pinned
and installs are deterministic.

In `@packages/leadtype/tsconfig.json`:
- Line 7: tsconfig.json declares "types": ["node"] but the project targets Node
>=22 while package devDependencies currently use `@types/node`@^25.6.2; update the
devDependency "@types/node" to a 22.x.x range (e.g. ^22.0.0) in package.json,
run your package manager to reinstall lockfiles, and ensure the "types" entry in
tsconfig.json remains "node" so TypeScript picks up the correct `@types/node`@22
definitions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3c9f4d36-0f58-4821-85ab-a183eba8d74d

📥 Commits

Reviewing files that changed from the base of the PR and between 3a3bee6 and 8ed8c0f.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • apps/example/package.json
  • apps/example/tsconfig.json
  • packages/leadtype/tsconfig.json
  • packages/typescript-config/base.json
  • packages/typescript-config/nextjs.json
  • packages/typescript-config/react-library.json
💤 Files with no reviewable changes (2)
  • packages/typescript-config/nextjs.json
  • packages/typescript-config/react-library.json
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
🔍 Remote MCP Context7

Summary of additional facts relevant to reviewing PR #14

  • Valibot: v1.2 release notes state a critical ReDoS in the EMOJI_REGEX (emoji validator) was fixed and users are strongly encouraged to upgrade; the PR’s bump to 1.4.0 therefore contains that remediation.

  • Nitro: docs show routeRules support wildcard redirects and proxy rules (e.g., '/old-blog/' -> 'https://blog.example.com/' and '/proxy/' -> '/api/'); the cited Nitro security fixes (open redirect via protocol-relative URLs and percent-encoded path-traversal proxy bypass) are directly relevant — reviewers should inspect apps/example routeRules/wildcard redirect or proxy rules for unsafe targets or patterns.

  • Vite 8: official migration guidance notes Vite 8 includes a compatibility layer that auto-converts many esbuild/rollupOptions cases and recommends a gradual path (rolldown-vite → Vite 8) for complex projects; reviewers should confirm custom rollup/esbuild options or plugins (and the new rollup usage in packages/leadtype) remain compatible after the Vite bump.

Tools/sources used

  • Context7 resolver queries and docs for Valibot, Nitro, and Vite.,
🔇 Additional comments (9)
packages/typescript-config/base.json (1)

8-11: Config baseline looks consistent and modern.

The ES2022 + ESNext + Bundler + verbatimModuleSyntax combination is coherent for a shared TS base and aligns with the PR goal of standardizing compiler behavior.

Also applies to: 16-17

apps/example/tsconfig.json (1)

3-3: Shared tsconfig inheritance change looks good.

Using the workspace config package path here is cleaner than a deep relative path and keeps configuration ownership centralized.

apps/example/package.json (7)

35-36: LGTM: TanStack Router updates.

Minor version bumps within the v1 range are safe and maintain API compatibility.


45-45: LGTM: Tailwind v4.3 minor bump.

The 4.2.1 → 4.3.0 update within Tailwind v4 should be safe. If this is the first v4 adoption, ensure the codebase has migrated breaking changes (important modifier syntax text-xl!, opacity slash syntax bg-blue-500/20, etc.).

Also applies to: 52-52


59-59: ⚡ Quick win

@vitejs/plugin-react v6 is compatible with React 19.

The plugin was released specifically to support React 19 and includes explicit handling for React 19's compiler behavior and runtime optimization. No compatibility verification needed.


56-56: ⚡ Quick win

Remove concern about @types/node v25.6.2 validity. The version is a legitimate release published on npm (May 7, 2026) and is available for installation. The major version bump from v22 to v25 reflects the actual progression of the @types/node package.


53-53: ⚖️ Poor tradeoff

TypeScript 6.0.3 is a stable release, not experimental.

The concern about typescript@6.0.3 being a pre-release version is incorrect—it is a standard stable release. However, @typescript/native-preview@7.0.0-dev.20260509.2 (line 53) is genuinely a dev preview version with nightly-based versioning, which may warrant a separate evaluation of production readiness.

			> Likely an incorrect or invalid review comment.

40-40: ⚡ Quick win

Exact pinning of nitro beta version prevents automatic patch updates.

The version 3.0.260429-beta has no caret, meaning no automatic patch updates will be applied. For beta versions that receive frequent updates, consider whether this strict pinning is intentional or if a wildcard pattern (3.0.260429-*) would better balance stability with critical patches.

			> Likely an incorrect or invalid review comment.

63-64: ⚡ Quick win

No compatibility concerns with Vite 8 and vite-tsconfig-paths v6 in this configuration.

The Vite config uses standard plugins and no custom esbuild/rollup options that would be affected by Vite 8's toolchain change. vite-tsconfig-paths v6 has no breaking changes and is confirmed as a drop-in replacement by maintainers. Both versions are compatible with the current setup.

Comment thread apps/example/package.json Outdated
Comment thread packages/leadtype/tsconfig.json
- valibot 1.0.0 → 1.4.0 (CVE: ReDoS in EMOJI_REGEX)
- nitro 3.0.260415-beta → 3.0.260429-beta (CVE: open redirect via
  protocol-relative URL bypass + proxy scope bypass via percent-encoded
  path traversal in routeRules)
- vite 7 → 8, vitest 2 → 4, @vitejs/plugin-react 5 → 6,
  vite-tsconfig-paths 5 → 6, @types/node 22 → 25,
  @changesets/changelog-github 0.6 → 0.7
- minor/patch bumps across @biomejs/biome, @changesets/cli, turbo,
  ultracite, @typescript/native-preview, @tanstack/react-router,
  @tanstack/react-start, ai, tailwindcss, @tanstack/ai, just-bash
- biome.jsonc: drop "**" from files.includes (biome 2.4.14 forbids
  catch-all when extending an ultracite config that already has one)
- engines: bump root + leadtype from >=18 to >=22.0.0. Node 18 EOL,
  Node 20 EOL April 2026; supported Active LTS floor is 22.
- leadtype: replace tsup with Rollup 4 + rollup-plugin-esbuild +
  rollup-plugin-dts. ESM-only output preserved (already no CJS in
  source or exports map). 13 entry points + cli bin keep their
  paths so the package.json exports map is unchanged.
- rollup.config.ts: cleanDist plugin clears dist before the JS pass
  (Rollup has no built-in clean), banner injects shebang only on
  the cli chunk, chmodCli sets 0755 in writeBundle.
- Removes the artificial per-entry duplication tsup imposed via
  splitting:false; shared modules now live under dist/_shared/
  with content-hashed names.
base.json now reflects what every consumer actually wants:
- lib: ["ES2022"] (DOM moves down to apps/example, the only consumer
  that needs it). Stops leadtype source from accidentally referencing
  document/window/etc.
- module/moduleResolution: ESNext + Bundler. Every consumer was
  already overriding NodeNext to this; the base was a fiction.
- verbatimModuleSyntax: true. ultracite already enforces useImportType,
  so this is a redundancy gate rather than a new constraint.
- Drop incremental:false (no-op default).

leadtype/tsconfig.json: drop module/moduleResolution overrides (now
in base) and stop weakening noUncheckedIndexedAccess + verbatimModuleSyntax.
The publishable library shouldn't be the least strict config in the repo.
Source was already index-safe via existing optional chaining and length
guards — zero src/ changes needed.

apps/example/tsconfig.json: drop redundant target/module/moduleResolution
/verbatimModuleSyntax (now inherited). Switch extends from relative path
to package alias and declare @repo/typescript-config in package.json
devDeps to match.

Delete unreferenced typescript-config/nextjs.json and react-library.json
(zero consumers across the repo).
- @repo/typescript-config: "*" → "workspace:*" in apps/example and
  packages/leadtype. Matches the existing "leadtype": "workspace:*"
  pattern; explicit-better-than-implicit, and removes the chance of
  a non-Bun tool trying to resolve "*" against the npm registry.
- packages/leadtype/@types/node: ^25.6.2 → ^22.0.0. The library
  declares engines.node >=22.0.0, so its types should match the
  lowest supported runtime — otherwise consumers on Node 22 LTS
  could pick up types for Node 25-only APIs that don't exist at
  runtime. Resolves to @types/node@22.19.17 in the workspace.
- apps/example/@types/node stays at ^25.6.2 deliberately: the app
  is private (never published) and its devs run whatever Node
  they have locally, so the latest-types choice is fine there.
@KayleeWilliams KayleeWilliams force-pushed the KayleeWilliams/Nautilus branch from fa49c0e to c514084 Compare May 9, 2026 23:40
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
packages/leadtype/rollup.config.ts (2)

6-20: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Use const assertion for immutable entries map.

The entries object is a static configuration that should be explicitly immutable to leverage literal type inference.

♻️ Proposed fix
 const entries = {
   index: "src/index.ts",
   "remark/index": "src/remark/index.ts",
   "convert/index": "src/convert/index.ts",
   "llm/index": "src/llm/index.ts",
   "search/index": "src/search/index.ts",
   "search/node-index": "src/search/node-index.ts",
   "search/ai-index": "src/search/ai-index.ts",
   "search/bash-index": "src/search/bash-index.ts",
   "search/vercel-index": "src/search/vercel-index.ts",
   "search/tanstack-index": "src/search/tanstack-index.ts",
   "search/cloudflare-index": "src/search/cloudflare-index.ts",
   "lint/index": "src/lint/index.ts",
   cli: "src/cli.ts",
-};
+} as const;

As per coding guidelines, "Use const assertions (as const) for immutable values and literal types".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/leadtype/rollup.config.ts` around lines 6 - 20, The entries
configuration object is intended to be immutable but lacks a const assertion;
update the declaration of the entries variable (symbol: entries in
rollup.config.ts) to use a const assertion (e.g., append "as const" to the
object) so TypeScript preserves literal types and prevents accidental mutation,
ensuring downstream code benefits from exact key/value literal types.

32-32: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Extract file mode magic number into named constant.

The octal literal 0o755 should be a named constant for clarity and maintainability.

♻️ Proposed fix
+const CLI_EXECUTABLE_MODE = 0o755;
+
 const entries = {
-      await chmod(`${options.dir}/cli.js`, 0o755);
+      await chmod(`${options.dir}/cli.js`, CLI_EXECUTABLE_MODE);

As per coding guidelines, "Use meaningful variable names instead of magic numbers - extract constants with descriptive names".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/leadtype/rollup.config.ts` at line 32, The chmod call uses a magic
octal literal (0o755); extract this into a descriptive constant (e.g.,
CLI_EXECUTABLE_MODE or FILE_MODE_CLI_EXECUTABLE) and replace the literal in the
chmod invocation (the line calling chmod(`${options.dir}/cli.js`, 0o755)) with
that constant; declare the constant near the top of the module (exported or
file-scoped as appropriate) so the permission meaning is clear and maintainable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/leadtype/package.json`:
- Around line 72-73: The "build" and "dev" npm scripts currently invoke "rollup
-c" which uses Node's Rollup CLI and fails to load TypeScript configs; update
the scripts named "build" and "dev" to prefix the rollup command with "bun"
(i.e., use "bun rollup -c" and "bun rollup -c -w") so Bun's runner and
TypeScript support are used.

In `@packages/leadtype/rollup.config.ts`:
- Around line 1-69: The Rollup config file rollup.config.ts cannot be loaded by
Node's ESM loader when running the existing build script that invokes "rollup
-c" because TypeScript files require Rollup's config plugin; update your build
command to pass the TypeScript config plugin (e.g. change the script invoking
rollup -c to use --config rollup.config.ts --configPlugin typescript) so the CLI
can load rollup.config.ts (the file that defines entries, isExternal,
cliShebang, chmodCli, cleanDist, and the default defineConfig export);
alternatively you can switch to bun rollup -c or convert rollup.config.ts to a
JS config, but prefer adding --configPlugin typescript per Rollup docs.

---

Duplicate comments:
In `@packages/leadtype/rollup.config.ts`:
- Around line 6-20: The entries configuration object is intended to be immutable
but lacks a const assertion; update the declaration of the entries variable
(symbol: entries in rollup.config.ts) to use a const assertion (e.g., append "as
const" to the object) so TypeScript preserves literal types and prevents
accidental mutation, ensuring downstream code benefits from exact key/value
literal types.
- Line 32: The chmod call uses a magic octal literal (0o755); extract this into
a descriptive constant (e.g., CLI_EXECUTABLE_MODE or FILE_MODE_CLI_EXECUTABLE)
and replace the literal in the chmod invocation (the line calling
chmod(`${options.dir}/cli.js`, 0o755)) with that constant; declare the constant
near the top of the module (exported or file-scoped as appropriate) so the
permission meaning is clear and maintainable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 83c231c3-c482-4ec4-82b0-4e458ba6c7ab

📥 Commits

Reviewing files that changed from the base of the PR and between fa49c0e and c514084.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • apps/example/package.json
  • apps/example/tsconfig.json
  • biome.jsonc
  • package.json
  • packages/leadtype/package.json
  • packages/leadtype/rollup.config.ts
  • packages/leadtype/tsconfig.json
  • packages/leadtype/tsup.config.ts
  • packages/typescript-config/base.json
  • packages/typescript-config/nextjs.json
  • packages/typescript-config/react-library.json
💤 Files with no reviewable changes (4)
  • biome.jsonc
  • packages/typescript-config/react-library.json
  • packages/leadtype/tsup.config.ts
  • packages/typescript-config/nextjs.json
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

Files:

  • packages/leadtype/rollup.config.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use descriptive names for functions, variables, and types for meaningful naming
Add comments for complex logic, but prefer self-documenting code

Files:

  • packages/leadtype/rollup.config.ts
🪛 GitHub Actions: Benchmark / 0_Convert + LLM pipeline.txt
packages/leadtype/package.json

[error] 1-1: Command failed: "bun run build" (includes "rollup -c && bun run docs:generate"). Script "build" exited with code 1.

packages/leadtype/rollup.config.ts

[error] 1-1: Build failed while running Rollup config. TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/runner/work/leadtype/leadtype/packages/leadtype/rollup.config.ts


[error] 1-1: Command failed: "bun run build" (includes "rollup -c && bun run docs:generate"). Script "build" exited with code 1.

packages/leadtype/tsconfig.json

[error] 1-1: Command failed: "bun run build" (includes "rollup -c && bun run docs:generate"). Script "build" exited with code 1.

🪛 GitHub Actions: Benchmark / Convert + LLM pipeline
packages/leadtype/rollup.config.ts

[error] 1-1: Rollup build failed with TypeError: Unknown file extension ".ts" for rollup.config.ts. Node ESM cannot load the TypeScript rollup config (ERR_UNKNOWN_FILE_EXTENSION).

🔍 Remote MCP Context7

Summary of additional facts relevant to reviewing PR #14

  • Valibot: v1.2 fixed a critical ReDoS in the EMOJI_REGEX used by the emoji action; maintainers strongly recommend upgrading (relevant to this PR’s bump to 1.4.0). Inspect any usage of valibot’s emoji action or regex-based validators in the repo.

  • Nitro (unjs/nitro): Nitro routeRules support redirects and proxying with wildcard patterns (e.g., '/old-blog/' → 'https://blog.example.com/' and '/proxy/' → '/api/'). Because the PR references Nitro security fixes (open redirect via protocol-relative targets and percent-encoded path-traversal proxy bypass), review any nitro.routeRules, redirects, or proxy targets for unvalidated inputs, protocol-relative targets, or percent-encoded path handling.

  • Rollup: Rollup outputs support per-output banner/footer (useful for injecting a CLI shebang) and plugins/hooks (renderChunk, generateBundle, writeBundle) can modify emitted code and file permissions. Typical approaches to adding a shebang and setting executable permissions are: add a banner for the CLI chunk and use writeBundle/writeFile hooks to set mode (chmod) or emit assets. Confirm the new rollup config’s shebang/banner + chmodCli implementation uses writeBundle/writeFile hooks safely and preserves expected output names/exports.

Files/areas to inspect in this PR with these facts in mind

  • Any code using valibot's emoji validator or custom regex validators (search for v.emoji / EMOJI_REGEX).
  • nitro config files (nitro.config.ts or similar) and any routeRules/redirect/proxy definitions.
  • packages/leadtype/rollup.config.ts:
    • verify the CLI chunk receives a proper banner shebang and that the chmodCli step sets 0o755 reliably in writeBundle/writeFile.
    • verify externals/preserved exports and dist layout match previous tsup outputs.
  • Type/engine alignment:
    • engines.node bumps to >=22.0.0 — ensure @types/node and any native-target builds align.

Tools/sources used

  • Valibot release notes / docs (Context7 query for valibot ReDoS and EMOJI_REGEX)
  • Nitro routing/proxy/redirect docs (Context7 query for nitro routeRules and proxy examples)
  • Rollup docs (banner/output options and plugin hooks for bundle generation / writeBundle for applying shebang/banner and setting permissions)
🔇 Additional comments (14)
package.json (2)

37-37: LGTM: Node floor raised to match Vite 8 and package requirements.

The engines.node bump to >=22.0.0 aligns with packages/leadtype/package.json and satisfies Vite 8's requirement (20.19+). This ensures consistency across the monorepo.


3-13: LGTM: Dependency updates address security advisories.

The dependency bumps include security-critical updates (valibot for ReDoS fix noted in external context) and align with the PR's security objectives.

apps/example/package.json (2)

52-52: LGTM: Workspace dependency properly pinned.

The workspace:* protocol ensures deterministic resolution for the monorepo dependency.


41-41: LGTM: Nitro version updated to address security advisories.

This version (3.0.260429-beta) includes fixes for the open redirect and proxy scope bypass vulnerabilities mentioned in the PR objectives and external context.

packages/typescript-config/base.json (2)

8-11: LGTM: Base config tuned for ESM + Bundler workflow.

The removal of DOM libs and switch to moduleResolution: "Bundler" align with the Rollup migration and ESM-only output strategy. Apps/example properly overrides lib to add DOM where needed.


17-17: LGTM: verbatimModuleSyntax enforces explicit imports.

This stricter mode prevents ambiguous import/export syntax and aligns with modern TypeScript best practices.

apps/example/tsconfig.json (1)

3-3: LGTM: Package-path extension simplifies config management.

Switching from a relative path to @repo/typescript-config/base.json makes the config more portable and aligns with the added devDependency.

packages/leadtype/tsconfig.json (1)

7-7: LGTM: Minimal config delegates to shared base.

The simplified compilerOptions properly inherits module/resolution settings from the base config and restricts to Node types.

packages/leadtype/rollup.config.ts (2)

22-23: LGTM: Clean external dependency detection.

The isExternal predicate correctly identifies Node built-ins and npm packages while preserving relative imports for bundling.


28-35: LGTM: CLI permissions correctly applied in writeBundle.

The chmodCli plugin properly uses the writeBundle hook to set executable permissions after the bundle is written, which is the correct Rollup lifecycle hook for this operation.

packages/leadtype/package.json (4)

10-12: LGTM: Node engine floor set to 22.

This aligns with the root package.json and ensures consistent runtime requirements across the monorepo.


98-98: LGTM: Valibot upgrade addresses ReDoS vulnerability.

The bump from 1.0.0 to 1.4.0 includes the critical fix for the EMOJI_REGEX ReDoS vulnerability (High severity) mentioned in the external context and Dependabot advisories.


106-106: LGTM: @types/node version correctly aligned with runtime.

Using @types/node@^22.0.0 properly matches engines.node: ">=22.0.0", following the @types/node versioning convention where the major version must match the Node.js major version.


110-112: LGTM: Rollup tooling properly configured.

The combination of rollup, rollup-plugin-dts, and rollup-plugin-esbuild replaces the previous tsup setup and supports the new build configuration in rollup.config.ts.

Comment thread packages/leadtype/package.json Outdated
Comment thread packages/leadtype/rollup.config.ts
Documents the entries map as static config data rather than mutable
state. No runtime change — Rollup's input type accepts the readonly
form. Cheap, but skipped the reviewer's other rollup.config suggestions:

- "rollup -c" → "bun rollup -c": already works. Rollup 4 natively
  loads rollup.config.ts when typescript is installed (verified across
  every build this session).
- --configPlugin typescript: same — unnecessary on Rollup 4.
- 0o755 → named constant: 0o755 is itself a Unix idiom for rwxr-xr-x;
  used once; extracting adds indirection without clarity.
CI runs rollup -c under Node, which can't load rollup.config.ts:
  TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"

Locally this masquerades as working because Bun's runtime intercepts
rollup's CLI shebang and handles .ts files natively. On a stock Node
runner that doesn't happen.

Reversing my earlier triage — finding 1 in the last review WAS valid;
I missed it because my local environment hid the bug. Trust CI.
bun rollup -c didn't help: bun resolved the rollup binary but the
spawned node process couldn't load .ts files. Switch to Rollup's
documented flow for TS configs — pass --configPlugin so Rollup uses
the named plugin to transform its own config before loading. Routing
through rollup-plugin-esbuild (already a dep) avoids any new deps.
@KayleeWilliams KayleeWilliams merged commit f64df00 into main May 10, 2026
3 checks passed
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