Skip to content

[Core Breaking Change] Migrate plugin to TypeScript 6.0.2 compatibility #1412

@angle943

Description

@angle943

Title

[Core Breaking Change] Migrate plugin to TypeScript 6.0.2 compatibility

Body

Summary

The core OpenSearch-Dashboards repo is upgrading from TypeScript 4.6.4 to 6.0.2 (PR #11687). This is a breaking change that requires all plugins to verify compatibility and make updates if needed.

What Changed in Core

  • TypeScript: 4.6.4 → 6.0.2
  • ESLint: 6 → 8
  • @typescript-eslint: v3 → v8
  • babel-eslint@babel/eslint-parser
  • tsconfig.base.json: jsx: "react-jsx", module: "esnext", moduleResolution: "bundler", baseUrl removed, downlevelIteration removed

What Plugins Need To Do

  1. Remove conflicting dependencies from your package.json — packages like typescript, eslint, jest, ts-jest, and various @babel/* packages are now provided by core and should not be declared by plugins.

  2. Verify bootstrap, build, and tests pass:

    • yarn osd bootstrap --single-version=loose (from OSD root)
    • yarn build (from plugin directory)
    • Unit tests (from plugin directory)
  3. Fix any new issues caused by the upgrade (unused React imports, JSX in jest.mock factories, new type errors, etc.)

Automated Migration Tool

A Kiro prompt is available to automate most of the migration work:

👉 osd-ts6-migration-prompt

Setup:

  1. Copy .kiro/prompts/migrate_plugin_ts6.md from the repo above into your OSD workspace's .kiro/prompts/ directory
  2. Open the OSD repo in Kiro
  3. Run: @migrate-plugin-ts6 --plugin_dir=plugins/<your-plugin-name>

The prompt will automatically handle dependency removal, React import cleanup, test fixes, and type error suppression.

Timeline

This change will land in the next minor release. Please complete the migration before the release cut.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions