Skip to content

chore: typescript build file - #130

Merged
Friedrich482 merged 5 commits into
mainfrom
features
Apr 24, 2026
Merged

chore: typescript build file#130
Friedrich482 merged 5 commits into
mainfrom
features

Conversation

@Friedrich482

@Friedrich482 Friedrich482 commented Apr 24, 2026

Copy link
Copy Markdown
Owner

Commits

  • chore: typescript build file

    • converted the build.js configuration file of the extension to a build.ts file, which is also type checked (tsconfig)
    • migrated to tsx to run that file instead of node, installed tsx as a dev dependency
  • fix: badge

    • fixed the broken version badge in the readme of the vscode extension
  • feat: instructions identification

    • added the instructions language slug in the colors.json file to properly display them in the frontend (dashboard), same color as markdown files
  • chore: extension version

    • bumped the extension version to v0.0.62

Summary by CodeRabbit

Release Notes

  • Chores

    • Bumped VS Code extension version to 0.0.62
    • Updated build tooling and development dependencies
    • Modernized internal module imports
  • Documentation

    • Updated README badges and formatting
    • Refreshed copyright information
  • New Features

    • Added new "Instructions" color to design system

- converted the `build.js` configuration file of the extension to a `build.ts` file, which is also type checked (tsconfig)
- migrated to `tsx` to run that file instead of `node`, installed `tsx` as a dev dependency
- fixed the broken version badge in the readme of the vscode extension
- added the instructions language slug in the colors.json file to properly display them in the frontend (dashboard), same color as markdown files
- bumped the extension version to `v0.0.62`
@coderabbitai

coderabbitai Bot commented Apr 24, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Friedrich482 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 39 minutes and 41 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 39 minutes and 41 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d3b1b50d-fccf-4513-b7d8-5857f1b2dcbc

📥 Commits

Reviewing files that changed from the base of the PR and between f44ed53 and 94daa43.

📒 Files selected for processing (1)
  • apps/vscode-extension/build.ts
📝 Walkthrough

Walkthrough

The PR updates the VS Code extension's build infrastructure and standardizes module imports: converting the build script from CommonJS to ES modules, switching npm build scripts to use tsx for TypeScript execution, updating TypeScript dependencies, standardizing vscode imports across 14 utility files from namespace to default import style, updating documentation, and adding a new color configuration entry.

Changes

Cohort / File(s) Summary
Build Tooling & Configuration
apps/vscode-extension/build.ts, apps/vscode-extension/package.json, apps/vscode-extension/tsconfig.json
Converted build script from CommonJS to ES modules with improved error handling and TypeScript annotations. npm scripts updated to execute build.ts via tsx. DevDependencies bumped (@types/node to ^20.19.39) and tsx added. Build target changed from node16 to esnext. TypeScript config extended to include build.ts in compilation.
vscode Import Standardization
apps/vscode-extension/src/utils/auth/login.ts, apps/vscode-extension/src/utils/auth/store-jwt-token.ts, apps/vscode-extension/src/utils/commands/init-extension-commands.ts, apps/vscode-extension/src/utils/dashboard/open-dashboard.ts, apps/vscode-extension/src/utils/dashboard/serve-dashboard/*, apps/vscode-extension/src/utils/files/*, apps/vscode-extension/src/utils/global-state/get-global-state-data.ts, apps/vscode-extension/src/utils/periodic-sync-data.ts, apps/vscode-extension/src/utils/time/calculate-time.ts
Changed vscode module imports from namespace style (import * as vscode) to default imports (import vscode) across 14 utility files. No logic changes to exported functions or control flow.
Documentation & Assets
apps/vscode-extension/README.md, packages/ui/src/colors.json
README badges converted from HTML to markdown format with updated badge sources. Copyright year updated from 2025 to 2026. New color entry "instructions" with hex value #083fa1 added to colors configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 The imports now dance in a cleaner way,
No asterisks scattered across the day,
Build scripts compile with esnext grace,
Colors and badges find their place,
A tidy extension, refined and bright! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'chore: typescript build file' is overly vague and does not clearly convey the full scope of changes, which includes README badge fixes, colors.json updates, and version bumping in addition to the build file conversion. Revise the title to be more specific and comprehensive, such as 'chore: migrate build to typescript and add ui colors config' or similar to better reflect all significant changes in the changeset.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch features

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/vscode-extension/package.json (1)

115-118: Drop npx — call tsx directly from the npm script.

Since tsx is already declared in devDependencies, npm scripts resolve it from node_modules/.bin without needing npx. Using npx adds a per-invocation lookup/install check and, in some npm configurations, can fall through to fetching from the registry if the local binary isn't found. Calling tsx directly is faster and more deterministic for compile, watch, and package.

♻️ Proposed change
-    "compile": "npx tsx build.ts",
+    "compile": "tsx build.ts",
     "build": "tsc --build",
-    "watch": "npx tsx build.ts --watch",
-    "package": "npx tsx build.ts --production",
+    "watch": "tsx build.ts --watch",
+    "package": "tsx build.ts --production",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/vscode-extension/package.json` around lines 115 - 118, Update the npm
scripts "compile", "watch", and "package" to invoke the local tsx binary
directly instead of prefixing with npx; specifically remove the "npx " prefix
from the "compile", "watch", and "package" script values so they call "tsx
build.ts", "tsx build.ts --watch", and "tsx build.ts --production" respectively,
relying on the devDependency-resolved binary.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/vscode-extension/build.ts`:
- Line 154: The esbuild config currently sets target: "esnext" which can emit
unsupported runtime features for VS Code's Electron/Node; update the build
configuration in build.ts where the esbuild build options include target to use
a pin compatible with VS Code's runtime (replace "esnext" with "node22") so
esbuild will downlevel syntax to match Node 22.21.1/Electron 34; ensure this
aligns with tsconfig (ES2022) and adjust any other esbuild option blocks that
reference target to the same "node22" value.

---

Nitpick comments:
In `@apps/vscode-extension/package.json`:
- Around line 115-118: Update the npm scripts "compile", "watch", and "package"
to invoke the local tsx binary directly instead of prefixing with npx;
specifically remove the "npx " prefix from the "compile", "watch", and "package"
script values so they call "tsx build.ts", "tsx build.ts --watch", and "tsx
build.ts --production" respectively, relying on the devDependency-resolved
binary.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2567cdde-ae79-43bd-99cd-6584ee652871

📥 Commits

Reviewing files that changed from the base of the PR and between 01ddd43 and f44ed53.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (17)
  • apps/vscode-extension/README.md
  • apps/vscode-extension/build.ts
  • apps/vscode-extension/package.json
  • apps/vscode-extension/src/utils/auth/login.ts
  • apps/vscode-extension/src/utils/auth/store-jwt-token.ts
  • apps/vscode-extension/src/utils/commands/init-extension-commands.ts
  • apps/vscode-extension/src/utils/dashboard/open-dashboard.ts
  • apps/vscode-extension/src/utils/dashboard/serve-dashboard/serve-dashboard-dev.ts
  • apps/vscode-extension/src/utils/dashboard/serve-dashboard/serve-dashboard-prod.ts
  • apps/vscode-extension/src/utils/dashboard/serve-dashboard/serve-dashboard.ts
  • apps/vscode-extension/src/utils/files/get-current-file-properties.ts
  • apps/vscode-extension/src/utils/files/update-current-file-obj.ts
  • apps/vscode-extension/src/utils/global-state/get-global-state-data.ts
  • apps/vscode-extension/src/utils/periodic-sync-data.ts
  • apps/vscode-extension/src/utils/time/calculate-time.ts
  • apps/vscode-extension/tsconfig.json
  • packages/ui/src/colors.json

Comment thread apps/vscode-extension/build.ts Outdated
- switched the target to `node22` in the `build.ts` esbuild configuration file
@Friedrich482
Friedrich482 merged commit 0f2de9e into main Apr 24, 2026
1 check passed
@coderabbitai coderabbitai Bot mentioned this pull request Apr 25, 2026
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