Skip to content

351 add size limit tracking to arkenvvite plugin#352

Merged
yamcodes merged 2 commits intomainfrom
351-add-size-limit-tracking-to-arkenvvite-plugin
Nov 10, 2025
Merged

351 add size limit tracking to arkenvvite plugin#352
yamcodes merged 2 commits intomainfrom
351-add-size-limit-tracking-to-arkenvvite-plugin

Conversation

@yamcodes
Copy link
Owner

@yamcodes yamcodes commented Nov 10, 2025

Closes #351
Closes #323

The issue happened because the size task was defined in the root turbo.json with "dependsOn": ["build"]. In Turborepo, defining a task at the root automatically registers it for all workspaces, even if only one package actually has that script. Since size depended on build, every package pulled its own build task into the graph. The fix was to move the size task definition into packages/arkenv/turbo.json so it only exists in that package. Now, when running turbo run size, only ArkEnv builds and runs its size check.

Summary by CodeRabbit

  • Chores
    • Integrated package size validation tooling with automated size checking into the build system
    • Configured a 2 kB size limit for the vite-plugin package
    • Established dedicated size-checking tasks at the individual package level with appropriate build task dependencies
    • Updated root-level build task configuration to support decentralized package-level task management

@yamcodes yamcodes linked an issue Nov 10, 2025 that may be closed by this pull request
@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

⚠️ No Changeset found

Latest commit: d92ca76

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 Nov 10, 2025

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

Project Deployment Preview Comments Updated (UTC)
arkenv Ready Ready Preview Comment Nov 10, 2025 6:23pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

This PR adds size-limit bundle tracking to the @arkenv/vite-plugin package and restructures the Turbo task configuration. A "size" task is removed from the root turbo.json and defined at the package level for both arkenv and vite-plugin via new turbo.json files. The vite-plugin package gains size-limit dependencies, a size script, and a 2 kB configuration constraint.

Changes

Cohort / File(s) Summary
Turbo task restructuring
turbo.json
Removed "size" task from root task graph
Package-level Turbo configs
packages/arkenv/turbo.json, packages/vite-plugin/turbo.json
New Turbo configurations defining isolated "size" tasks that depend on "build" and disable caching
Size-limit tooling for vite-plugin
packages/vite-plugin/package.json
Added size-limit and @size-limit/preset-small-lib dev dependencies, "size" npm script, and size-limit configuration with 2 kB limit for dist/index.js

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that the size-limit configuration in packages/vite-plugin/package.json matches the specified 2 kB threshold and import pattern (*)
  • Confirm the Turbo task dependencies and caching settings are correctly defined in both new turbo.json files
  • Ensure the root turbo.json modification doesn't break existing task dependencies for other packages

Suggested labels

arkenv, @arkenv/vite-plugin

Poem

🐇 A bundle measured with care,
Two kilobytes to spare,
Tasks decentralized and neat,
Size tracking complete! ✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR only adds dependencies and scripts to vite-plugin/package.json but does not include the size-limit configuration array required by issue #351. Add the size-limit configuration array to packages/vite-plugin/package.json with path, limit, and import fields as specified in issue #351.
Out of Scope Changes check ⚠️ Warning The PR includes unrelated changes to turbo.json files and root turbo.json that are not part of the linked issue requirements. Remove out-of-scope changes from turbo.json files and focus only on configuring size-limit in vite-plugin/package.json as specified in issue #351.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: adding size limit tracking to the vite-plugin, which aligns with the primary objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 351-add-size-limit-tracking-to-arkenvvite-plugin

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.

@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 labels Nov 10, 2025
@arkenv-bot
Copy link
Contributor

arkenv-bot bot commented Nov 10, 2025

📦 Bundle Size Report

Package File Size Limit Diff Status
@arkenv/vite-plugin index.d.ts 807 B 2 kB
arkenv index.js 708 B 2 kB 0.0%

All size limits passed!

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 10, 2025

Open in StackBlitz

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

commit: d92ca76

@yamcodes yamcodes merged commit 5446ead into main Nov 10, 2025
19 checks passed
@yamcodes yamcodes deleted the 351-add-size-limit-tracking-to-arkenvvite-plugin branch November 10, 2025 18:32
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add size-limit tracking to @arkenv/vite-plugin turbo run size triggers builds in unrelated packages

1 participant