Logo Typescript Tooling Migration

Typescript Tooling Migration

Tổ chứcPhổ biến
Arize-ai
typescript-tooling-migration

Migrate or upgrade TypeScript tooling in the Phoenix monorepo. Use when upgrading TypeScript versions, switching tools (ESLint to oxlint, Prettier to oxfmt), upgrading bundlers (Vite, esbuild), or making major dependency upgrades. Triggers on requests to migrate, upgrade, or replace TypeScript/JavaScript tooling.

Tổng quan

Nhà phát hànhArize-ai
Kho mãphoenix
Tên kỹ năngtypescript-tooling-migration
Sao
11.8K
Bản fork
1.2K
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được Arize-ai công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Typescript Tooling Migration trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/Arize-ai/phoenix/tree/main/.agents/skills/typescript-tooling-migration
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Arize-ai/phoenix.git /tmp/phoenix
mkdir -p .claude/skills
cp -r /tmp/phoenix/.agents/skills/typescript-tooling-migration .claude/skills/typescript-tooling-migration
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Typescript Tooling Migration trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Typescript Tooling Migration ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Typescript Tooling Migration không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

TypeScript Tooling Migration

Guide for migrating or upgrading TypeScript tooling in the Phoenix monorepo. This skill covers upgrading core dependencies (TypeScript, React), switching tools (linters, formatters, bundlers), and managing breaking changes across js/app/ and js/ directories.

Monorepo Structure

All TypeScript code lives in a single pnpm workspace rooted at js/:

DirectoryPurpose
js/app/React/TypeScript frontend (main Phoenix UI, workspace package phoenix-ui)
js/packages/*Publishable TypeScript packages (phoenix-client, phoenix-evals, etc.)
js/Workspace root: single pnpm-lock.yaml, pnpm-workspace.yaml, .pnpmfile.cjs

Shared Dependencies

Shared tooling versions are managed at the workspace root where possible:

ToolConfig Location
pnpmjs/package.json → packageManager
TypeScriptpackage.json → devDependencies (keep js/app and js root aligned)
oxlintpackage.json → devDependencies (keep js/app and js root aligned)
oxfmtpackage.json → devDependencies (keep js/app and js root aligned)

Config File Locations

ConfigLocationPurpose
.oxlintrc.jsonRoot + js/app/ + js/Linter config (nested inheritance)
.oxfmtrc.jsoncRootFormatter config (shared)
tsconfig.jsonjs/app/ and js/ packagesTypeScript config
vite.config.tsjs/app/Build/dev server config
relay.config.jsjs/app/GraphQL/Relay config

Migration Types

Type 1: Tool Replacement (e.g., ESLint → oxlint)

Complete replacement of one tool with another.

Workflow:

  1. Research new tool's migration guide
  2. Install new tool alongside old
  3. Create new config, verify it works
  4. Update package scripts
  5. Update pre-commit hooks
  6. Remove old tool and config
  7. Update documentation

Type 2: Major Version Upgrade (e.g., TypeScript 5 → 6)

Upgrading a tool to a new major version with breaking changes.

Workflow:

  1. Read changelog/migration guide for breaking changes
  2. Check compatibility of dependent packages
  3. Upgrade in a branch, fix breaking changes
  4. Run full test suite
  5. Update any deprecated config options
  6. Update documentation if APIs changed

Type 3: Dependency Upgrade (e.g., React 18 → 19)

Upgrading a core dependency that affects application code.

Workflow:

  1. Check compatibility matrix (React + React DOM + types)
  2. Review breaking changes and new features
  3. Upgrade dependencies together
  4. Fix breaking changes in application code
  5. Update any deprecated patterns
  6. Run E2E tests to verify functionality

Migration Workflow

Phase 1: Research and Planning

  1. Read official migration guides - Most tools publish upgrade guides
  2. Check GitHub issues - Look for known migration problems
  3. Identify scope:
    • Which directories affected (js/app/, js/, or both)
    • What config files need changes
    • What dependencies to add/remove/upgrade
    • What code changes are required
  4. Review current configs - Understand existing setup before changing
  5. Check dependent packages - Ensure compatibility across the dependency tree

Phase 2: Create a Migration Branch

bash
git checkout -b chore/migrate-<tool>-to-<version>
# or
git checkout -b chore/upgrade-<tool>-<version>

Phase 3: Install/Upgrade Dependencies

bash
# For js/app/ (the app workspace package)
cd js/app && pnpm add -D <package>@<version>

# For js/ (workspace root)
cd js && pnpm add -D -w <package>@<version>

# For upgrading existing dependencies
cd js/app && pnpm update <package>@<version>

Tip: Keep old tool installed until migration is verified for tool replacements.

Phase 4: Update Configuration

For tool replacements - create new config:

Phoenix uses nested configs with inheritance where possible:

phoenix/
├── .<tool>rc.json           # Shared base config
├── js/app/
│   └── .<tool>rc.json       # Extends base, adds React-specific options
└── js/
    └── .<tool>rc.json       # Extends base, adds Node-specific options

Config inheritance pattern:

json
{
  "$schema": "./node_modules/<tool>/configuration_schema.json",
  "extends": ["../.<tool>rc.json"]
}
For version upgrades - update existing config:
  1. Check for deprecated options in the changelog
  2. Update or remove deprecated settings
  3. Add any new required settings

Phase 5: Fix Breaking Changes

Code changes:
  • Fix type errors from stricter checks
  • Update deprecated API usage
  • Adapt to new syntax requirements
Config changes:
  • Update deprecated config options
  • Adjust for changed defaults

Tip: Use the tool's own CLI to identify issues:

bash
pnpm run typecheck  # TypeScript errors
pnpm run lint       # Linter errors
pnpm run build      # Build errors

Phase 6: Update Package Scripts

Update both js/app/package.json and js/package.json if script invocations changed:

json
{
  "scripts": {
    "lint": "<new-command>",
    "typecheck": "<new-command>"
  }
}

Phase 7: Update Pre-commit Hooks

Edit .pre-commit-config.yaml if the tool is used in pre-commit:

  1. Remove old tool's hook (for replacements)
  2. Update or add new hook:
yaml
- id: <tool>-app
  name: <tool> (app)
  entry: pnpm --dir js/app run <script>
  language: system
  files: ^js/app/.*\.[jt]sx?$
  pass_filenames: false
- id: <tool>-js
  name: <tool> (js)
  entry: pnpm --dir js run <script>
  language: system
  files: ^js/.*\.[jt]sx?$
  pass_filenames: false

Phase 8: Update Editor Settings

  1. Update .vscode/extensions.json if extensions changed
  2. Document any path/binary settings in DEVELOPMENT.md:
json
{
  "<extension>.path.<binary>": "js/app/node_modules/<package>/bin/<binary>"
}

Note: .vscode/settings.json is gitignored - document settings in DEVELOPMENT.md.

Phase 9: Remove Old Tool (for replacements)

bash
# Remove old dependencies
cd js/app && pnpm remove <old-tool> <old-plugins>
cd js && pnpm remove -w <old-tool> <old-plugins>

# Delete old config files
rm js/app/<old-config> js/<old-config>

Phase 10: Test and Verify

bash
# Type checking
cd js/app && pnpm run typecheck
cd js && pnpm run typecheck

# Linting
cd js/app && pnpm run lint
cd js && pnpm run lint

# Formatting
cd js/app && pnpm run fmt:check
cd js && pnpm run fmt:check

# Unit tests
cd js/app && pnpm test
cd js && pnpm run -r test

# Build
cd js/app && pnpm run build
cd js && pnpm run -r build

# E2E tests (for significant changes)
cd js/app && pnpm run test:e2e

# Pre-commit hooks
pre-commit run --all-files

Phase 11: Update Documentation

Files to check and update:

FileWhat to update
AGENTS.mdTool versions, commands, style conventions
DEVELOPMENT.mdSetup instructions, VS Code settings
js/app/README.mdTool references, test commands
.cursor/rules/typescript-packages/RULE.mdCommands, workflow instructions
.claude/settings.jsonPostToolUse hooks
CHANGELOG.mdNote significant tooling changes

Phase 12: Keep Shared Tool Versions Aligned

The app (js/app/package.json) and the workspace root (js/package.json) both declare shared tooling (typescript, oxlint, oxfmt). Keep those versions aligned when upgrading — the single lockfile makes drift visible in review.

Key Principles

Keep Packages in Sync

When upgrading shared tooling, upgrade js/app/ and the js/ workspace root together. Version drift causes subtle bugs and CI failures.

Performance Matters

  • Measure before/after for build times, lint times, test times
  • Some compatibility layers (like JS plugins for linters) add significant overhead
  • Prefer native implementations over compatibility shims

Backwards Compatibility

  • Many tools support legacy config formats (e.g., oxlint supports eslint-disable comments)
  • Don't mass-update working code unless there's a clear benefit
  • Deprecation warnings are informational - fix them but don't block on them

Config Location Strategy

ScenarioApproach
Identical config for both dirsSingle root config
Shared base + dir-specific overridesRoot config + nested configs with extends
Completely different configs per dirSeparate configs (no inheritance)

Out of Scope Directories

These directories have their own tooling and should NOT be included in migrations:

  • scripts/docker/devops/oidc-server/ - Separate OIDC test server
  • scripts/mock-llm-server/ - Separate mock server
  • internal_docs/ - Internal documentation utilities

Troubleshooting

TypeScript Upgrade Issues

Stricter type checking: New TypeScript versions often add stricter checks. Fix errors by:

  1. Adding explicit type annotations
  2. Using type assertions where appropriate
  3. Updating tsconfig.json to temporarily relax checks if needed

Dependency type mismatches: Ensure @types/* packages are compatible with the new TS version.

Build Failures After Upgrade

  1. Clear caches: rm -rf node_modules/.cache js/app/dist js/**/dist
  2. Reinstall: pnpm install
  3. Rebuild: pnpm run build

Config Not Found

  • Check $schema path is relative to the config file location
  • For nested configs, verify extends path (e.g., "../.toolrc.json")

Editor Not Using Updated Tool

  1. Ensure extension is up to date
  2. Set explicit binary path in VS Code settings
  3. Reload VS Code window (Cmd+Shift+P → "Reload Window")

Pre-commit Hook Fails

  • Run pnpm install in both directories
  • Verify script name in package.json matches hook entry
  • Test script manually: pnpm --dir js/app run <script>

CI Fails But Local Passes

  • Check Node version matches CI (see .nvmrc)
  • Ensure lockfile is committed (pnpm-lock.yaml)
  • Run with --frozen-lockfile locally to match CI behavior

CI Workflows

Relevant CI files for TypeScript tooling:

WorkflowPurpose
.github/workflows/typescript-CI.ymlWhole js/ workspace (app + packages): build, typecheck, fmt, lint, codegen drift, test
.github/workflows/playwright.yamlE2E tests

References

General

Current Tools

Câu hỏi thường gặp

Kỹ năng AI Typescript Tooling Migration làm được gì?

Migrate or upgrade TypeScript tooling in the Phoenix monorepo. Use when upgrading TypeScript versions, switching tools (ESLint to oxlint, Prettier to oxfmt), upgrading bundlers (Vite, esbuild), or making major dependency upgrades. Triggers on requests to migrate, upgrade, or replace TypeScript/JavaScript tooling.

Vì sao nên dùng Typescript Tooling Migration trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Typescript Tooling Migration là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Typescript Tooling Migration trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Arize-ai/phoenix/tree/main/.agents/skills/typescript-tooling-migration. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Typescript Tooling Migration?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Typescript Tooling Migration với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Typescript Tooling Migration với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Typescript Tooling Migration có miễn phí không?

Có. Kỹ năng này được Arize-ai phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇