Skip to content

chore: fix deprecation warning#62

Merged
chonk-lain merged 2 commits into
mainfrom
dev
Jul 7, 2026
Merged

chore: fix deprecation warning#62
chonk-lain merged 2 commits into
mainfrom
dev

Conversation

@chonk-lain

@chonk-lain chonk-lain commented Jul 7, 2026

Copy link
Copy Markdown
Member

without this npm run build generates the following error

tsconfig.json:6:25 - error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
  Visit https://aka.ms/ts6 for migration information.

6     "moduleResolution": "node",
                          ~~~~~~

this pr switches to "moduleResolution": "bundler" following our implementation in @chonkiejs/core

Summary by CodeRabbit

  • Chores
    • Updated TypeScript build configuration to align with modern bundler expectations by switching the module target to ESNext and using bundler-style module resolution.
    • Improves compatibility when packaging and integrating the token package in contemporary build pipelines.

Copilot AI review requested due to automatic review settings July 7, 2026 03:22
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
chonkiejs-docs Skipped Skipped Jul 7, 2026 3:30am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e0dc04bb-7429-409c-8071-7ef824b4a63c

📥 Commits

Reviewing files that changed from the base of the PR and between c403cf8 and d4f61be.

📒 Files selected for processing (1)
  • packages/token/tsconfig.json

📝 Walkthrough

Walkthrough

packages/token/tsconfig.json updates TypeScript module output to ESNext and module resolution to bundler. No exported entities or other compiler settings change.

Changes

Config Update

Layer / File(s) Summary
Update module settings
packages/token/tsconfig.json
compilerOptions.module changes to ESNext, and compilerOptions.moduleResolution changes to bundler.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A tiny hop, a config tweak,
bundler now is what we seek.
ESNext shines, the flags align,
This rabbit nods: “All looks fine!” 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the PR’s purpose of fixing a TypeScript deprecation warning, even though it doesn’t mention the config change directly.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the @chonkiejs/token TypeScript configuration to eliminate the TS5107 deprecation warning during npm run build by aligning module resolution with the rest of the repo’s current setup.

Changes:

  • Switch packages/token/tsconfig.json from "moduleResolution": "node" (deprecated via the node10 legacy mode) to "moduleResolution": "bundler".

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/token/tsconfig.json (1)

3-6: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider aligning module with moduleResolution: "bundler".

TS5095 only requires module to be "es2015" or later when using moduleResolution: "bundler", so "ES2020" here won't break the build. However, TypeScript's own guidance for "bundler" mode recommends pairing it with "module": "esnext" (or "preserve"), which is what the repo root tsconfig.json and @chonkiejs/core already do. Keeping module: "ES2020" here is a minor inconsistency with the rest of the monorepo and diverges from the documented "bundler" resolution intent, though it should compile fine as-is.

♻️ Optional alignment
   "compilerOptions": {
     "target": "ES2021",
-    "module": "ES2020",
+    "module": "ESNext",
     "lib": ["ES2021"],
     "moduleResolution": "bundler",
🤖 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/token/tsconfig.json` around lines 3 - 6, The TypeScript config in
this package is slightly inconsistent with the monorepo’s bundler setup. Update
the package tsconfig to align the module setting with moduleResolution:
"bundler" by matching the repo’s existing convention in tsconfig.json and
`@chonkiejs/core`, using the same module style as the rest of the workspace rather
than keeping "ES2020".
🤖 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.

Nitpick comments:
In `@packages/token/tsconfig.json`:
- Around line 3-6: The TypeScript config in this package is slightly
inconsistent with the monorepo’s bundler setup. Update the package tsconfig to
align the module setting with moduleResolution: "bundler" by matching the repo’s
existing convention in tsconfig.json and `@chonkiejs/core`, using the same module
style as the rest of the workspace rather than keeping "ES2020".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e5ba2a3e-f8f8-40d5-8e52-ab92de55148d

📥 Commits

Reviewing files that changed from the base of the PR and between 05cbbb5 and c403cf8.

📒 Files selected for processing (1)
  • packages/token/tsconfig.json

@chonk-lain
chonk-lain merged commit ac50251 into main Jul 7, 2026
9 of 10 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.

2 participants