Skip to content

chore: Upgrade to Typescript 5.7.3#542

Merged
kingston merged 3 commits into
mainfrom
kingston/eng-581-upgrade-typescript-to-57
May 10, 2025
Merged

chore: Upgrade to Typescript 5.7.3#542
kingston merged 3 commits into
mainfrom
kingston/eng-581-upgrade-typescript-to-57

Conversation

@kingston

@kingston kingston commented May 10, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores

    • Upgraded TypeScript and related dependencies to version 5.7.3 for improved compatibility.
    • Updated TypeScript configuration to explicitly disable source map and declaration file generation.
    • Removed ESLint directive comments related to React prop-types across multiple UI component files.
  • Refactor

    • Made certain internal interfaces publicly accessible for external use in Button and Sheet components.

@linear

linear Bot commented May 10, 2025

Copy link
Copy Markdown
ENG-581 Upgrade Typescript to 5.7

Also upgrade the tsconfig for Vite React in project-builder-test

@changeset-bot

changeset-bot Bot commented May 10, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: edf99db

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@halfdomelabs/core-generators Patch
@halfdomelabs/ui-components Patch
@halfdomelabs/fastify-generators Patch
@halfdomelabs/project-builder-server Patch
@halfdomelabs/react-generators Patch
@halfdomelabs/baseplate-plugin-storage Patch
@halfdomelabs/project-builder-lib Patch
@halfdomelabs/project-builder-web Patch
@halfdomelabs/project-builder-cli Patch
@halfdomelabs/project-builder-common Patch
@halfdomelabs/project-builder-test Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai

coderabbitai Bot commented May 10, 2025

Copy link
Copy Markdown

Walkthrough

The changes update the TypeScript version from 5.5.4 to 5.7.3 across project configuration files and constants, upgrade related dependencies, and adjust TypeScript compiler options. Numerous ESLint directive comments disabling react/prop-types are removed from UI component files. Two TypeScript interfaces are made explicitly exported for broader accessibility.

Changes

File(s) Change Summary
.changeset/giant-candles-wink.md Documents dependency upgrades for @halfdomelabs/core-generators and @halfdomelabs/ui-components to align with TypeScript 5.7.3.
packages/core-generators/src/constants/core-packages.ts Updates typescript version in CORE_PACKAGES constant from 5.5.4 to 5.7.3.
pnpm-workspace.yaml Updates TypeScript version in catalog from 5.5.4 to 5.7.3.
packages/ui-components/tsconfig.json Sets "sourceMap": false, "declaration": false, and "declarationMap": false in TypeScript config.
packages/ui-components/tsconfig.build.json Changes base config extension to @halfdomelabs/tools/tsconfig.vite.lib.json, removes some compiler options, adds path alias.
packages/ui-components/src/components/Button/Button.tsx Adds export to ButtonWithOnlyIconProps interface, making it publicly accessible.
packages/ui-components/src/components/Sheet/Sheet.tsx Adds export to SheetContentProps interface and removes ESLint directive disabling react/prop-types.
packages/ui-components/src/components/Breadcrumb/Breadcrumb.tsx
...
Tooltip/Tooltip.tsx
Removes ESLint directive comments disabling react/prop-types from multiple component files including Breadcrumb, Checkbox, Command, Dropdown, FormItem, NavigationMenu (and stories), NavigationTabs, ScrollArea, Select, Separator, SidebarTabs, Switch, Tabs, and Tooltip.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant ProjectConfig
    participant TypeScript
    participant UIComponent

    Developer->>ProjectConfig: Update TypeScript version to 5.7.3
    ProjectConfig->>TypeScript: Apply new compiler options
    Developer->>UIComponent: Remove ESLint prop-types directive
    Developer->>UIComponent: Export interfaces for Button and Sheet
Loading

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel

vercel Bot commented May 10, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baseplate-project-builder-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2025 7:59pm

@socket-security

socket-security Bot commented May 10, 2025

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedtypescript@​5.7.310010089100100

View full report

@socket-security

socket-security Bot commented May 10, 2025

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert (click for details)
Warn High
typescript@5.7.3 has a License Policy Violation.

License: CC-BY-4.0 (package/ThirdPartyNoticeText.txt)

License: MIT-Khronos-old (package/ThirdPartyNoticeText.txt)

From: package.jsonnpm/typescript@5.7.3

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/typescript@5.7.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

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

🧹 Nitpick comments (2)
.changeset/giant-candles-wink.md (1)

6-6: Fix spelling of TypeScript.
For consistency and branding, capitalize the “S” in “TypeScript” in the changeset description.

packages/ui-components/tsconfig.json (1)

5-7: Redundant compilerOptions with noEmit.
With "noEmit": true, the options "sourceMap", "declaration", and "declarationMap" will never emit anything. Consider removing these overrides for a cleaner configuration or documenting why they’re explicitly set.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 1446ebb and edf99db.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • .changeset/giant-candles-wink.md (1 hunks)
  • packages/core-generators/src/constants/core-packages.ts (1 hunks)
  • packages/ui-components/src/components/Breadcrumb/Breadcrumb.tsx (0 hunks)
  • packages/ui-components/src/components/Button/Button.tsx (1 hunks)
  • packages/ui-components/src/components/Checkbox/Checkbox.tsx (0 hunks)
  • packages/ui-components/src/components/Command/Command.tsx (0 hunks)
  • packages/ui-components/src/components/Dropdown/Dropdown.tsx (0 hunks)
  • packages/ui-components/src/components/FormItem/FormItem.tsx (0 hunks)
  • packages/ui-components/src/components/NavigationMenu/NavigationMenu.stories.tsx (0 hunks)
  • packages/ui-components/src/components/NavigationMenu/NavigationMenu.tsx (0 hunks)
  • packages/ui-components/src/components/NavigationTabs/NavigationTabs.tsx (0 hunks)
  • packages/ui-components/src/components/ScrollArea/ScrollArea.tsx (0 hunks)
  • packages/ui-components/src/components/Select/Select.tsx (0 hunks)
  • packages/ui-components/src/components/Separator/Separator.tsx (0 hunks)
  • packages/ui-components/src/components/Sheet/Sheet.tsx (1 hunks)
  • packages/ui-components/src/components/SidebarTabs/SidebarTabs.tsx (0 hunks)
  • packages/ui-components/src/components/Switch/Switch.tsx (0 hunks)
  • packages/ui-components/src/components/Tabs/Tabs.tsx (0 hunks)
  • packages/ui-components/src/components/Tooltip/Tooltip.tsx (1 hunks)
  • packages/ui-components/tsconfig.json (1 hunks)
  • pnpm-workspace.yaml (1 hunks)
💤 Files with no reviewable changes (14)
  • packages/ui-components/src/components/Command/Command.tsx
  • packages/ui-components/src/components/SidebarTabs/SidebarTabs.tsx
  • packages/ui-components/src/components/Select/Select.tsx
  • packages/ui-components/src/components/Separator/Separator.tsx
  • packages/ui-components/src/components/Breadcrumb/Breadcrumb.tsx
  • packages/ui-components/src/components/Dropdown/Dropdown.tsx
  • packages/ui-components/src/components/Switch/Switch.tsx
  • packages/ui-components/src/components/Checkbox/Checkbox.tsx
  • packages/ui-components/src/components/ScrollArea/ScrollArea.tsx
  • packages/ui-components/src/components/NavigationMenu/NavigationMenu.stories.tsx
  • packages/ui-components/src/components/NavigationTabs/NavigationTabs.tsx
  • packages/ui-components/src/components/Tabs/Tabs.tsx
  • packages/ui-components/src/components/NavigationMenu/NavigationMenu.tsx
  • packages/ui-components/src/components/FormItem/FormItem.tsx
🔇 Additional comments (5)
packages/ui-components/src/components/Tooltip/Tooltip.tsx (1)

1-1: Ensure linting rule for React prop-types is disabled appropriately.
The removal of /* eslint-disable react/prop-types */ assumes that the ESLint configuration now ignores this rule for TypeScript components. Please verify that the react/prop-types rule is disabled or adjusted in your ESLint config to prevent lint errors in TSX files.

pnpm-workspace.yaml (1)

6-6: Confirm TypeScript version bump in workspace config.
The TypeScript version in the workspace catalog has been updated to 5.7.3, matching the update in core generator constants. Ensure this aligns with your intended version pinning strategy and that any workspace scripts invoking the TS CLI use the correct version.

packages/core-generators/src/constants/core-packages.ts (1)

3-3: Align CORE_PACKAGES TypeScript version.
TypeScript has been bumped from 5.5.4 to 5.7.3 in CORE_PACKAGES, keeping it consistent with the workspace and other configs.

packages/ui-components/src/components/Sheet/Sheet.tsx (1)

54-56: Good enhancement to interface visibility

Making the SheetContentProps interface exported improves reusability and enables stronger type checking across the codebase. This change aligns with the TypeScript 5.7.3 upgrade by promoting better type safety and component interoperability.

packages/ui-components/src/components/Button/Button.tsx (1)

69-73: Good enhancement to interface visibility

Exporting the ButtonWithOnlyIconProps interface improves type accessibility and promotes reuse in other components. This change is consistent with similar export enhancements throughout the codebase and aligns with the TypeScript 5.7.3 upgrade objectives.

@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)
packages/ui-components/tsconfig.build.json (1)

5-7: Ensure path alias is mirrored in your bundler config.

Adding the "@src/*": ["./src/*"] alias here is helpful for TS imports. To avoid runtime resolution errors, please mirror this alias in your Vite/Rollup setup. For example, in vite.config.ts:

 import { defineConfig } from 'vite';
+import { resolve } from 'path';

 export default defineConfig({
+  resolve: {
+    alias: { '@src': resolve(__dirname, 'src') }
+  },
   // ...other config
 });

This keeps TypeScript and your bundler in sync.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between edf99db and 91d3022.

📒 Files selected for processing (1)
  • packages/ui-components/tsconfig.build.json (1 hunks)

@@ -1,9 +1,10 @@
{
"extends": "./tsconfig.json",
"extends": "@halfdomelabs/tools/tsconfig.vite.lib.json",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify shared config dependency and version lock.

Switching the extends field to @halfdomelabs/tools/tsconfig.vite.lib.json centralizes common build settings, but please confirm that:

  1. The @halfdomelabs/tools package is present in your devDependencies.
  2. The locked version in pnpm-lock.yaml (or package-lock.json) matches your TS upgrade (5.7.3).
    Otherwise, a missing or mismatched config file could break CI or local builds.

To verify the file exists in node_modules, you can run:


🏁 Script executed:

#!/usr/bin/env bash
if [ ! -f node_modules/@halfdomelabs/tools/tsconfig.vite.lib.json ]; then
  echo "ERROR: Shared tsconfig file not found. Please install or pin @halfdomelabs/tools."
  exit 1
fi
echo "Shared tsconfig file present."

Length of output: 254


🏁 Script executed:

#!/usr/bin/env bash

echo "Checking devDependencies for @halfdomelabs/tools in package.json..."
grep -R '"@halfdomelabs/tools":' -n package.json || echo "=> Not found in package.json"

echo
echo "Checking locked version in pnpm-lock.yaml or package-lock.json..."
if [ -f pnpm-lock.yaml ]; then
  grep -R "@halfdomelabs/tools@" -n pnpm-lock.yaml | head -n 5 || echo "=> No entry in pnpm-lock.yaml"
elif [ -f package-lock.json ]; then
  grep -R '"@halfdomelabs/tools":' -n package-lock.json || echo "=> No entry in package-lock.json"
else
  echo "=> No lockfile found"
fi

Length of output: 477


Missing shared tsconfig or mismatched lockfile

The extended config file node_modules/@halfdomelabs/tools/tsconfig.vite.lib.json wasn’t found, which will break CI/local builds. Please:

  • Ensure @halfdomelabs/tools is correctly installed in devDependencies (see package.json line 43).
  • Run pnpm install (or equivalent) so that pnpm-lock.yaml includes @halfdomelabs/tools@….
  • Verify that the file tsconfig.vite.lib.json exists at the root of the @halfdomelabs/tools package (or update the extends path if it has moved).

File: packages/ui-components/tsconfig.build.json

  "extends": "@halfdomelabs/tools/tsconfig.vite.lib.json",

Committable suggestion skipped: line range outside the PR's diff.

@kingston kingston merged commit f5f8346 into main May 10, 2025
@kingston kingston deleted the kingston/eng-581-upgrade-typescript-to-57 branch May 10, 2025 20:04
@github-actions github-actions Bot mentioned this pull request May 10, 2025
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