Skip to content

fix: Migrate plugin to TypeScript 6.0.2 compatibility - #1427

Open
angle943 wants to merge 2 commits into
opensearch-project:mainfrom
angle943:fix/ts6-migration
Open

fix: Migrate plugin to TypeScript 6.0.2 compatibility#1427
angle943 wants to merge 2 commits into
opensearch-project:mainfrom
angle943:fix/ts6-migration

Conversation

@angle943

@angle943 angle943 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Description

Migrate plugin to be compatible with the TypeScript 6.0.2 upgrade in the core OpenSearch-Dashboards repo (PR #11687).

Changes

  • Remove **/typescript resolution (was pinned to 4.6.4, conflicts with core 6.0.2)
  • Regenerate yarn.lock

Verification

All three success criteria pass:

  1. yarn osd bootstrap --single-version=loose
  2. yarn build
  3. Unit tests ✅

Migration tool: osd-ts6-migration-prompt
Tracker: opensearch-project/OpenSearch-Dashboards#11730

Closes #1424

Remove conflicting dependencies from package.json that clash with
the core OpenSearch-Dashboards TypeScript 6.0.2 upgrade (PR #11687).
Delete yarn.lock so the root lockfile is the source of truth.

Verified: bootstrap, build, and unit tests all pass.

Signed-off-by: Justin Kim <jungkm@amazon.com>
Comment thread yarn.lock Outdated
version "22.14.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.14.0.tgz#d3bfa3936fef0dbacd79ea3eb17d521c628bb47e"
integrity sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==
version "25.6.0"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

guess we should not bump types of node.js version to 25

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have reverted it. but upon fresh yarn lock updates, the issue will happen again. we are currently on node v22.22.0: https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/.nvmrc and so the correct @types/node verison should be 22.19.17.

My first instinct to solve this problem holistiically was to have core OSD dictate what @types/node we use, and upon looking at the code i see that core OSD is using the wrong version: https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/package.json#L14014 . This is wrong, so I have opened a PR to update this:

opensearch-project/OpenSearch-Dashboards#11872

But this change will not "update" the external plugin's yarn.lock resolution, because when "yarn osd bootstrap" runs it, it runs it independently on each plugin. So the correct fix would be for each plugin to declare in the dev dependency the "@types/node" version to match my pull request to OSD above (and only include the yarn resolution if it needs it)

I won't make that change as part of this PR, but that is something we can discuss w/ all plugins on adopting. One ramification of this though is that whenever we do decide to update node in the future, all plugins must also update the @types/node independently as well

Per review feedback, keep @types/node at 22.14.0 (undici-types ~6.21.0) instead of bumping to 25.6.0 (undici-types ~7.19.0).

Signed-off-by: Justin Kim <jungkm@amazon.com>
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.

[Core Breaking Change] Migrate plugin to TypeScript 6.0.2 compatibility

2 participants