Skip to content

Fix size-limit failures#509

Merged
yamcodes merged 4 commits intomainfrom
fix-size-limit-failures
Dec 8, 2025
Merged

Fix size-limit failures#509
yamcodes merged 4 commits intomainfrom
fix-size-limit-failures

Conversation

@yamcodes
Copy link
Owner

@yamcodes yamcodes commented Dec 8, 2025

Close #502

Summary by CodeRabbit

  • New Features

    • Size-limit workflow can now be triggered manually via GitHub Actions.
  • Bug Fixes

    • Better detection of changed packages and improved error handling during traversal.
    • Size checks now exclude peer dependencies and several framework/runtime modules from calculations.
  • Chores

    • Added additional debug logging around size-check runs and result reporting.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2025

⚠️ No Changeset found

Latest commit: 788762e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Dec 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
arkenv Ready Ready Preview Comment Dec 8, 2025 2:55pm

@yamcodes yamcodes changed the title Fix size limit failures Fix size-limit failures Dec 8, 2025
@github-actions github-actions bot added arkenv Changes to the `arkenv` npm package. @arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv github actions Pull requests that update GitHub Actions code labels Dec 8, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Reworks size-limit action: adds debug logging, improves file→package detection by traversing up to the nearest package.json with a regex fallback, auto-excludes peerDependencies from bundle checks, updates package size-limit ignore lists, and enables manual workflow_dispatch triggering.

Changes

Cohort / File(s) Summary
Action logging
.github/actions/size-limit/src/index.ts
Added multiple console.log debug statements around size-limit results and table creation (no control-flow or error-handling changes).
Changed-files → package mapping
.github/actions/size-limit/src/package/changes.ts
Traverse from the deepest path upward to find nearest package.json; add its package name when found; ignore invalid JSON while traversing; if none found, fall back to regex extraction of package dir name.
Size-limit package handling
.github/actions/size-limit/src/size-limit/package.ts
Extend the ignore list with keys from packageJson.peerDependencies so peerDependencies are treated as external for size calculations.
Workflow trigger
.github/workflows/size-limit.yml
Add workflow_dispatch trigger and update job if condition to run on manual dispatch as well as path changes.
Package size-limit configs
packages
packages/arkenv/package.json, packages/bun-plugin/package.json, packages/vite-plugin/package.json
Add or extend size-limit entries to include ignore arrays (e.g., arktype, vite, bun, node:path, node:fs, node:process) for the specified dist/index.js targets.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to .github/actions/size-limit/src/package/changes.ts traversal correctness across nested and scoped package layouts and the regex fallback edge cases.
  • Verify .github/actions/size-limit/src/index.ts debug logs do not leak sensitive data and are appropriate for CI output.
  • Confirm peerDependencies extraction in .github/actions/size-limit/src/size-limit/package.ts behaves correctly when peerDependencies is missing or not an object.

Possibly related PRs

Poem

🐰 I hopped through folders, sniffed each name,
Logging footprints so the bug can't blame.
Peer pals hide, workflows wake,
Packages found with regex cake—
A tiny rabbit, fixing size-limit fame 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (2 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive While the PR makes relevant changes to size-limit configuration and debugging, it is unclear whether these changes specifically address the parsing failures mentioned in issue #502. Verify that the added logging in index.ts and adjustments to package detection logic resolve the actual parsing errors. Confirm testing shows failures are fixed.
Out of Scope Changes check ❓ Inconclusive Most changes relate to size-limit configuration, but the connection between added console.log output and fixing parsing failures is unclear without more context. Clarify how the console.log addition and package.json traversal changes directly address the parsing errors reported in issue #502.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix size-limit failures' is clear, concise, and directly summarizes the main change addressing the issue of intermittent size-limit failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33644da and 788762e.

📒 Files selected for processing (1)
  • .github/actions/size-limit/src/index.ts (2 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 8, 2025

Open in StackBlitz

npm i https://pkg.pr.new/arkenv@509
npm i https://pkg.pr.new/@arkenv/bun-plugin@509
npm i https://pkg.pr.new/@arkenv/vite-plugin@509

commit: 33644da

@arkenv-bot
Copy link
Contributor

arkenv-bot bot commented Dec 8, 2025

📦 Bundle Size Report

Package Size Limit Diff Status
@arkenv/bun-plugin 1.43 kB 2 kB 0.0%
arkenv 725 B 2 kB 0.0%
@arkenv/vite-plugin 891 B 2 kB 0.0%

All size limits passed!

Copy link
Contributor

@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: 0

🧹 Nitpick comments (3)
.github/actions/size-limit/src/index.ts (1)

74-74: Enhance debugging to diagnose filtering issues.

The added console.log is helpful but may not reveal why results are being filtered out (which appears to be the root cause when line 76 triggers). When filteredResults.length === 0 but results.length > 0, logging the already-filtered result will only show "No results found."

Consider adding additional debug logs before filtering to better diagnose the issue:

 // Run size-limit on current branch
 const { results, hasErrors } = await runSizeLimit(config.filter);
 
+// Debug: Log results before filtering
+console.log(`🔍 Found ${results.length} total results before filtering`);
+console.log(`🔍 Changed packages: ${changedPackages ? Array.from(changedPackages).join(', ') || '(none)' : '(all)'}`);
+
 // Filter results to only include changed packages (if in PR context)
 const filteredResults = filterChangedPackages(results, changedPackages);
 
+console.log(`🔍 ${filteredResults.length} results after filtering`);
+
 // Log baseline and current sizes for debugging (especially for release PRs)
 logDebugInfo(filteredResults, baselineSizes, config.isReleasePR);

This would reveal whether the issue is in change detection (changedPackages), in the filtering logic (filterChangedPackages), or in result parsing (results being empty).

.github/actions/size-limit/src/size-limit/package.ts (1)

95-113: Peer dependencies auto‑ignore is sound; consider small clarity/perf tweaks.

The new logic that appends Object.keys(packageJson.peerDependencies) into ignore is consistent with treating peers as externals and should reduce noisy size-limit failures from heavy peer deps.

Two optional polish ideas:

  • Precompute const peerDeps = packageJson.peerDependencies ? Object.keys(packageJson.peerDependencies) : []; once outside the map and reuse it, instead of recomputing inside each callback.
  • If you expect ignore to grow further, you might wrap the final array in a new Set([...]) to dedupe values before passing to size-limit/esbuild.

Both are non-blocking; current implementation is correct as-is.

.github/actions/size-limit/src/package/changes.ts (1)

65-110: Package resolution traversal looks solid; be aware of packages/<file> edge case

The new “nearest package.json” traversal plus scoped fallback regex is a nice improvement in robustness and should behave well for the usual layouts:

  • packages/pkg/... → resolves packages/pkg/package.json.
  • packages/@scope/pkg/... → resolves packages/@scope/pkg/package.json.
  • Deleted or unreadable package.json → regex fallback still infers pkg / @scope/pkg.

One edge case to be aware of:

  • For files directly under packages/ (e.g. packages/package.json, packages/README.md), the loop never finds a non‑empty potentialPackageDir, and the fallback regex ^packages\/((?:@[^/]+\/)?[^/]+)\/ requires a trailing /, so those paths won’t map to any package at all. If such files exist and should trigger “treat as all packages changed” (or be mapped specially), you may want to either:
    • Handle packages/package.json explicitly before the loop, or
    • Relax the fallback pattern to also match without a trailing slash and then treat that as a special “workspace” signal in the caller.

If you’re confident nothing relevant lives directly under packages/, the current behavior is fine and the change overall looks good.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 374a563 and 33644da.

📒 Files selected for processing (7)
  • .github/actions/size-limit/src/index.ts (1 hunks)
  • .github/actions/size-limit/src/package/changes.ts (1 hunks)
  • .github/actions/size-limit/src/size-limit/package.ts (2 hunks)
  • .github/workflows/size-limit.yml (2 hunks)
  • packages/arkenv/package.json (1 hunks)
  • packages/bun-plugin/package.json (1 hunks)
  • packages/vite-plugin/package.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
packages/*/package.json

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Packages in packages/ directory must be published to npm and require changesets for versioning, proper exports, and type definitions

Files:

  • packages/arkenv/package.json
  • packages/bun-plugin/package.json
  • packages/vite-plugin/package.json
**/package.json

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use workspace:* protocol for workspace dependencies between packages

Files:

  • packages/arkenv/package.json
  • packages/bun-plugin/package.json
  • packages/vite-plugin/package.json
{packages,apps,tooling}/**/package.json

📄 CodeRabbit inference engine (.cursor/rules/pnpm.mdc)

When referencing workspace packages in dependencies, use the workspace:* protocol instead of version numbers

Files:

  • packages/arkenv/package.json
  • packages/bun-plugin/package.json
  • packages/vite-plugin/package.json
**/*.{ts,tsx,json,md}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Biome for linting and formatting instead of ESLint and Prettier

Files:

  • packages/arkenv/package.json
  • packages/bun-plugin/package.json
  • packages/vite-plugin/package.json
🧠 Learnings (34)
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's type inference for TypeScript types instead of manual type definitions

Applied to files:

  • packages/arkenv/package.json
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Keep environment variable schemas readable and TypeScript-like using ArkType syntax

Applied to files:

  • packages/arkenv/package.json
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Use union types for enums in ArkType schemas (e.g., `"'dev' | 'prod'"`) instead of separate enum definitions

Applied to files:

  • packages/arkenv/package.json
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to packages/arkenv/src/**/*.ts : Main library implementation should be in `src/create-env.ts`, built-in validators in `src/types.ts`, error handling in `src/errors.ts`, and utilities in `src/utils.ts`

Applied to files:

  • packages/arkenv/package.json
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's built-in types (e.g., `string.host`, `number.port`) where possible in environment schemas

Applied to files:

  • packages/arkenv/package.json
📚 Learning: 2025-11-29T08:00:08.044Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/pnpm.mdc:0-0
Timestamp: 2025-11-29T08:00:08.044Z
Learning: Applies to package.json : Configure only built dependencies (native modules) in `pnpm.onlyBuiltDependencies`, including: biomejs/biome, sentry/cli, swc/core, tailwindcss/oxide, vercel/speed-insights, esbuild, and sharp

Applied to files:

  • packages/arkenv/package.json
  • .github/actions/size-limit/src/size-limit/package.ts
  • packages/bun-plugin/package.json
  • packages/vite-plugin/package.json
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Applies to tooling/*/package.json : Tooling in tooling/ directory contains development and testing tools that are not published to npm and excluded from changesets

Applied to files:

  • packages/arkenv/package.json
  • .github/actions/size-limit/src/size-limit/package.ts
  • packages/bun-plugin/package.json
  • packages/vite-plugin/package.json
  • .github/actions/size-limit/src/package/changes.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Use ArkType's `type()` function to define schemas in environment variable definitions

Applied to files:

  • packages/arkenv/package.json
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Applies to packages/*/package.json : Packages in packages/ directory must be published to npm and require changesets for versioning, proper exports, and type definitions

Applied to files:

  • packages/arkenv/package.json
  • .github/actions/size-limit/src/size-limit/package.ts
  • packages/bun-plugin/package.json
  • .github/actions/size-limit/src/package/changes.ts
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Use the scoped `$` type system for custom types defined in `scope.ts`

Applied to files:

  • packages/arkenv/package.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Organize imports automatically (Biome handles this)

Applied to files:

  • packages/arkenv/package.json
  • packages/vite-plugin/package.json
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Prefer tree-shakeable exports for better bundling

Applied to files:

  • packages/arkenv/package.json
  • .github/actions/size-limit/src/size-limit/package.ts
  • packages/bun-plugin/package.json
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/package.json : Use `bun install` instead of `npm install`, `yarn install`, or `pnpm install` for dependency management

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-29T08:57:24.056Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: examples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-29T08:57:24.056Z
Learning: Applies to examples/with-bun-react/**/package.json : Use `bun install` instead of `npm install`, `yarn install`, or `pnpm install`

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-29T08:57:24.056Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: examples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-29T08:57:24.056Z
Learning: Applies to examples/with-bun-react/**/package.json : Use `bun run <script>` instead of `npm run <script>`, `yarn run <script>`, or `pnpm run <script>`

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/package.json : Use `bun install` instead of `npm install`, `yarn install`, or `pnpm install` in package.json scripts

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/package.json : Use `bun run <script>` instead of `npm run <script>`, `yarn run <script>`, or `pnpm run <script>` in package.json scripts

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/package.json : Use `bun run <script>` instead of `npm run <script>`, `yarn run <script>`, or `pnpm run <script>` for running scripts

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Consider bundle size impact when adding new dependencies - aspirational goal: <1kB gzipped, enforced limit: 2kB gzipped

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx,html} : CSS files can be imported directly in TypeScript/JavaScript or referenced in HTML `<link>` tags, and Bun will automatically bundle them

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-29T08:57:24.056Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: examples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-29T08:57:24.056Z
Learning: Applies to examples/with-bun-react/**/*.{ts,tsx,js,jsx} : Prefer `Bun.file` over `node:fs`'s readFile/writeFile

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.html : HTML files can import .tsx, .jsx, or .js files directly; Bun will automatically transpile and bundle

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{ts,tsx,js,jsx} : Bun automatically loads .env files, so don't use `dotenv` library

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{ts,tsx,js,jsx} : Prefer `Bun.file` over `node:fs` readFile/writeFile for file operations

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.{ts,tsx,js,jsx} : Prefer `Bun.file` over `node:fs` readFile/writeFile methods for file operations

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-29T08:57:24.056Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: examples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-29T08:57:24.056Z
Learning: Applies to examples/with-bun-react/**/*.html : HTML files can import .tsx, .jsx, or .js files directly which Bun will transpile and bundle automatically

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-29T08:57:24.056Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: examples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-29T08:57:24.056Z
Learning: Applies to examples/with-bun-react/**/*.{ts,tsx,js,jsx} : Use `bun <file>` instead of `node <file>` or `ts-node <file>`

Applied to files:

  • packages/bun-plugin/package.json
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: packages/arkenv should not depend on other workspace packages; packages/vite-plugin depends on arkenv; apps/www may depend on workspace packages

Applied to files:

  • packages/vite-plugin/package.json
📚 Learning: 2025-11-24T16:04:47.583Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:47.583Z
Learning: Applies to apps/playgrounds/bun-react/**/*.html : Use HTML imports with `Bun.serve()` and don't use Vite for frontend bundling and development

Applied to files:

  • packages/vite-plugin/package.json
📚 Learning: 2025-11-24T16:04:58.629Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: apps/playgrounds/bun/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-24T16:04:58.629Z
Learning: Applies to apps/playgrounds/bun/**/*.{html,tsx,jsx} : Use HTML imports with `Bun.serve()` instead of Vite for frontend development

Applied to files:

  • packages/vite-plugin/package.json
📚 Learning: 2025-11-29T08:57:24.056Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: examples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-29T08:57:24.056Z
Learning: Applies to examples/with-bun-react/**/*.html : Use HTML imports with `Bun.serve()` instead of `vite` for frontend builds

Applied to files:

  • packages/vite-plugin/package.json
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Always run `pnpm changeset` for version bumps in published packages - never skip changesets

Applied to files:

  • .github/actions/size-limit/src/package/changes.ts
📚 Learning: 2025-11-24T16:04:11.901Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/monorepo.mdc:0-0
Timestamp: 2025-11-24T16:04:11.901Z
Learning: Only packages in packages/ directory are published to npm; publishing is handled by changesets using pnpm release

Applied to files:

  • .github/actions/size-limit/src/package/changes.ts
📚 Learning: 2025-11-29T08:00:08.044Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/pnpm.mdc:0-0
Timestamp: 2025-11-29T08:00:08.044Z
Learning: Organize workspace packages into appropriate directories: `packages/` for published npm packages, `apps/` for applications, `tooling/` for development tools (not published), and `examples/` for example projects

Applied to files:

  • .github/actions/size-limit/src/package/changes.ts
🧬 Code graph analysis (1)
.github/actions/size-limit/src/index.ts (1)
.github/actions/size-limit/src/output.ts (1)
  • results (4-21)
⏰ 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). (4)
  • GitHub Check: test-e2e (e2e)
  • GitHub Check: test-e2e (a11y)
  • GitHub Check: test-build (lts/*)
  • GitHub Check: test-build (latest)
🔇 Additional comments (5)
.github/workflows/size-limit.yml (2)

8-8: Manual trigger addition looks good.

Adding workflow_dispatch: supports manual workflow runs for debugging purposes, which aligns well with the PR objective to investigate parsing failures.


28-28: Verify paths-filter behavior with workflow_dispatch events.

The dorny/paths-filter action is designed primarily for pull_request events. When the workflow is manually triggered via workflow_dispatch, the filter may not behave as expected (no PR context), potentially causing changes.outputs.packages to be undefined or false—which would prevent the size-limit job from running even when manually dispatched.

Consider one of these approaches:

  • Explicitly handle the workflow_dispatch case by checking both conditions separately in the job condition, or
  • Verify the actual output behavior of paths-filter on workflow_dispatch events and adjust the condition if needed.
packages/arkenv/package.json (1)

56-65: Verify size-limit configuration syntax and effectiveness in resolving parsing failures.

The changes add "import": "*" alongside an "ignore" array to exclude peerDependencies from size calculations. This pattern appears intended to fix the intermittent "Could not parse size-limit output" failures from issue #502.

Please confirm:

  1. This "import": "*" + "ignore": [...] configuration is valid for your version of size-limit
  2. These changes actually resolve the intermittent parsing failures observed in #502

You may also want to run pnpm -w run size on this package to verify the configuration works locally before merging.

packages/vite-plugin/package.json (1)

62-72: Verify size-limit configuration matches expected behavior.

The ignore list correctly excludes both peerDependencies (vite and arktype) from size calculations. Verify that this configuration works as expected with your version of size-limit.

Also ensure that the bundled size of this package remains under the 2 kB limit with these exclusions in place.

packages/bun-plugin/package.json (1)

62-75: Verify that Node built-in module exclusions in ignore list are appropriate.

The ignore list properly excludes peerDependencies (bun, arktype) and additionally excludes Node built-in modules. Confirm that:

  1. Size-limit configuration syntax is valid for your version
  2. These Node built-in exclusions (node:path, node:fs, node:process) are intentional and necessary for accurate size measurement

This is the most extensive ignore list across the three packages—verify it aligns with the plugin's actual imports.

@yamcodes yamcodes merged commit e16ea75 into main Dec 8, 2025
12 checks passed
@yamcodes yamcodes deleted the fix-size-limit-failures branch December 8, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@arkenv/vite-plugin Issues or Pull Requests involving the Vite plugin for ArkEnv arkenv Changes to the `arkenv` npm package. github actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix size-limit frequent failures

1 participant