[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76X1B24K353TT3WD3SFMEVQ":3,"skill-same:01M76X1B24K353TT3WD3SFMEVQ":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M76X1B24K353TT3WD3SFMEVQ","react-19-plugin-migration",null,"Migrate a Grafana plugin to React 19 compatibility. Use when the user asks to update a plugin for React 19, prepare for React 19, fix React 19 compatibility, upgrade to React 19, migrate to React 19, bump grafanaDependency to 12.3.0, externalize jsx-runtime, or run react-detect. Triggers on phrases like \"update plugin for React 19\", \"React 19 migration\", \"prepare for React 19\", \"plugin React 19 compat\", \"grafanaDependency 12.3.0\", \"JSX runtime externals\", \"react-detect\", \"SECRET_INTERNALS\", \"ReactCurrentOwner\", or \"ReactCurrentDispatcher\".","stanfish06\u002Fskillquarium","stanfish06","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93099613?v=4","01M75F1CK4ZW109ZK3T26VN52F","Zhiyuan","01M75F1CM53VH6F79DZ8GXKKES",12,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Freact-19-plugin-migration\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: react-19-plugin-migration\nlicense: Apache-2.0\ndescription:\n  Migrate a Grafana plugin to React 19 compatibility. Use when the user asks to update a plugin\n  for React 19, prepare for React 19, fix React 19 compatibility, upgrade to React 19, migrate\n  to React 19, bump grafanaDependency to 12.3.0, externalize jsx-runtime, or run react-detect.\n  Triggers on phrases like \"update plugin for React 19\", \"React 19 migration\", \"prepare for\n  React 19\", \"plugin React 19 compat\", \"grafanaDependency 12.3.0\", \"JSX runtime externals\",\n  \"react-detect\", \"SECRET_INTERNALS\", \"ReactCurrentOwner\", or \"ReactCurrentDispatcher\".\n---\n\n# Migrate Grafana Plugin to React 19\n\nGrafana 13 (April 2026) moves from React 18 to React 19. Incompatible plugins will break.\n**Do not upgrade React to 19** — only make forward-compatible changes.\n\nAll changes go in **one PR**. Execute steps in order. Never manually edit `yarn.lock`.\n\n---\n\n## Step 1: Detect plugin context\n\n```bash\nPLUGIN_JSON=$([ -f src\u002Fplugin.json ] && echo \"src\u002Fplugin.json\" \\\n  || ([ -f plugin\u002Fsrc\u002Fplugin.json ] && echo \"plugin\u002Fsrc\u002Fplugin.json\" || echo \"\"))\nPKG_JSON=$([ -f package.json ] && echo \"package.json\" \\\n  || ([ -f plugin\u002Fpackage.json ] && echo \"plugin\u002Fpackage.json\" || echo \"\"))\nPLUGIN_ID=$(jq -r '.id' $PLUGIN_JSON 2>\u002Fdev\u002Fnull)\n[ -f yarn.lock ] && PM=\"yarn\" || ([ -f pnpm-lock.yaml ] && PM=\"pnpm\" || PM=\"npm\")\nCP_VERSION=$(jq -r '.version' .config\u002F.cprc.json 2>\u002Fdev\u002Fnull)\necho \"PLUGIN_ID=$PLUGIN_ID  PM=$PM  CP=$CP_VERSION\"\n```\n\nIf `PLUGIN_ID` is empty, ask the user for the plugin root path.\n\n---\n\n## Step 2: Scan for compatibility issues\n\nBuild the plugin and run the React 19 compatibility scanner:\n\n```bash\nnpm run build 2>&1 | tail -5\nnpx -y @grafana\u002Freact-detect@latest 2>&1\n```\n\nSave the output. It flags:\n\n- `jsxRuntimeImport` \u002F `__SECRET_INTERNALS` → Step 4 fixes this\n- `defaultProps` \u002F `propTypes` \u002F `ReactDOM.render` → Step 8 (source fixes)\n- `findDOMNode` → Step 6 (dependency bump) or Step 8 (source fix)\n\nIf the build fails (plugin hasn't been built before), skip this step and run react-detect\nafter Step 9 instead. If output says \"No breaking changes detected\", still proceed — jsx-runtime\nexternalization and grafanaDependency bump are always required.\n\nRe-run react-detect after Step 9 to confirm all issues are resolved.\n\n---\n\n## Step 3: Update `@grafana\u002Fcreate-plugin`\n\nThe scaffolding update brings in externals extraction, jest mocks, Docker fixes, and webpack\nimprovements needed for React 19. **Always do this before `add externalize-jsx-runtime`.**\n\nRequires a clean git working tree. Create a feature branch first if not already on one.\n\n### Run the update\n\n```bash\nnpx @grafana\u002Fcreate-plugin@latest update 2>&1\n```\n\n### If `yarn install` fails with \"engine is incompatible\"\n\nThe update runs an intermediate `yarn install` without `--ignore-engines`. Complete it manually:\n\n```bash\nyarn install --ignore-scripts --ignore-engines 2>&1 | tail -10\n```\n\nCommit the intermediate state and re-run:\n\n```bash\ngit add -A && git commit -m \"chore: intermediate create-plugin update\" --no-verify\nnpx @grafana\u002Fcreate-plugin@latest update 2>&1\n```\n\n### If ESLint 9 migration (004) fails with a parser error\n\nThe auto-migration can generate invalid JS on plugins with complex ESLint configs.\n**Do not skip** — commit what succeeded, then complete the ESLint 9 migration manually:\n\n```bash\ngit add -A && git commit -m \"chore: update create-plugin (ESLint 9 migration manual)\" --no-verify\n```\n\nThen follow the \"Complete ESLint 9 migration\" section below to finish.\n\n### After the update\n\nAlways run install and verify:\n\n```bash\nyarn install --ignore-scripts --ignore-engines 2>&1 | tail -10\ncat .config\u002F.cprc.json\n```\n\nCommit if there are changes:\n\n```bash\ngit add -A && git diff --cached --quiet || git commit -m \"chore: update create-plugin scaffolding\" --no-verify\n```\n\n---\n\n## Step 3b: Complete ESLint 9 migration\n\nThe `create-plugin update` bumps ESLint to v9, which requires flat config (`eslint.config.js`)\ninstead of `.eslintrc`. Whether the auto-migration (004) succeeded, partially succeeded, or\nfailed, **you must ensure ESLint works before proceeding**.\n\n### Check the current state\n\n```bash\nls eslint.config.js .eslintrc* .config\u002F.eslintrc* 2>\u002Fdev\u002Fnull\nnpx eslint --version 2>&1\n```\n\nThree scenarios:\n\n**A) `eslint.config.js` exists and `yarn lint` passes** — auto-migration succeeded. Proceed.\n\n**B) `eslint.config.js` exists but `yarn lint` fails** — partial migration. Fix the issues:\n\n```bash\nyarn lint 2>&1 | head -30\n```\n\nCommon fixes:\n- `Invalid option '--ignore-path'` or `Invalid option '--ext'` → remove those flags from\n  the `lint` script in `package.json`. In ESLint v9 flat config, ignores and file matching\n  are configured inside `eslint.config.js`, not via CLI flags. Update to: `eslint --cache .`\n- `Cannot find module 'eslint-plugin-deprecation'` → remove the import\u002Freference from\n  `eslint.config.js` (replaced by `@typescript-eslint\u002Fno-deprecated`)\n- Other dead plugin imports → remove them from the config if the package was removed\n\n**C) No `eslint.config.js` exists** — auto-migration failed. Create one manually:\n\n```bash\nls node_modules\u002F@grafana\u002Feslint-config\u002Fflat.js 2>\u002Fdev\u002Fnull\n```\n\nIf `flat.js` exists, create `eslint.config.js` using it as the base:\n\n```js\nimport grafanaConfig from '@grafana\u002Feslint-config\u002Fflat';\n\nexport default [\n  ...grafanaConfig,\n  {\n    ignores: ['**\u002Fdist\u002F', '**\u002Fnode_modules\u002F', '**\u002F.config\u002F', '**\u002Fcoverage\u002F'],\n  },\n];\n```\n\nThen migrate any custom rules from the old `.eslintrc` into additional config objects in the array.\nAfter creating the flat config:\n\n1. Update the `lint` script: `\"lint\": \"eslint --cache .\"`\n2. Delete the root `.eslintrc` (leave `.config\u002F.eslintrc` — it's scaffolded and harmless)\n\n### Verify lint works\n\n```bash\nyarn lint 2>&1 | tail -20\n```\n\nFix auto-fixable issues with `yarn lint --fix`. Commit:\n\n```bash\ngit add -A && git diff --cached --quiet || git commit -m \"chore: complete ESLint 9 flat config migration\" --no-verify\n```\n\n---\n\n## Step 4: Externalize jsx-runtime\n\n**Always use the `create-plugin add` command.** Requires a clean git working tree.\n\n```bash\nnpx @grafana\u002Fcreate-plugin@latest add externalize-jsx-runtime 2>&1\n```\n\nVerify:\n\n```bash\ngrep \"jsx-runtime\" .config\u002Fbundler\u002Fexternals.ts 2>\u002Fdev\u002Fnull\n```\n\n- Found → commit and proceed.\n- Not found → command failed. **Only then** add externals manually to the root `webpack.config.ts`:\n\n```ts\nexternals: ['react\u002Fjsx-runtime', 'react\u002Fjsx-dev-runtime'],\n```\n\nCommit:\n\n```bash\ngit add -A && git diff --cached --quiet || git commit -m \"feat: externalize jsx-runtime\" --no-verify\n```\n\n---\n\n## Step 5: Bump `grafanaDependency`\n\n```bash\njq -r '.dependencies.grafanaDependency' $PLUGIN_JSON\n```\n\nIf not already `>=12.3.0`, update it. The `create-plugin add` in Step 3 may have already done this.\n\n---\n\n## Step 6: Bump dependencies\n\n### Faro (if present)\n\n```bash\ngrep '\"@grafana\u002Ffaro' $PKG_JSON\n```\n\n| Package | Target |\n|---------|--------|\n| `@grafana\u002Ffaro-react` | `^2.2.3` |\n| `@grafana\u002Ffaro-web-sdk` | `^2.2.3` |\n| `@grafana\u002Ffaro-web-tracing` | `^2.0.0` |\n\n### Grafana packages\n\n```bash\ngrep '\"@grafana\u002F' $PKG_JSON | grep -v faro | grep -v create-plugin\n```\n\nBump `@grafana\u002Fdata`, `@grafana\u002Fruntime`, `@grafana\u002Fschema`, `@grafana\u002Fui` to `^12.2.0` or later.\nAdd `@grafana\u002Fi18n@^12.2.0` if the plugin uses translations or `@grafana\u002Fscenes` requires it.\n\n### React types\n\nBump `react` and `react-dom` to `^18.3.0` (surfaces React 19 issues early).\nAdd `@types\u002Freact@^18.3.0` and `@types\u002Freact-dom@^18.3.0` to devDependencies if missing.\n\n### Remove deprecated packages\n\nRemove from devDependencies if present:\n- `eslint-plugin-deprecation` (replaced by `@typescript-eslint\u002Fno-deprecated`)\n- `@types\u002Ftesting-library__jest-dom` (replaced by `setupTests.d.ts`)\n\n### Broken transitive dependencies\n\nIf `yarn install` fails with a stale git reference, **do not edit yarn.lock**. Add a `resolutions` entry:\n\n```json\n\"resolutions\": {\n  \"\u003Cpackage-name>\": \"\u003Cworking-version-or-git-ref>\"\n}\n```\n\nThen delete `yarn.lock` and `node_modules` and reinstall:\n\n```bash\nrm -rf node_modules yarn.lock\nyarn install --ignore-engines 2>&1 | tail -10\n```\n\n---\n\n## Step 7: Fix unmet `@openfeature\u002Fweb-sdk` peer dependency\n\n`@grafana\u002Fruntime` depends on `@openfeature\u002Freact-sdk` which has `@openfeature\u002Fweb-sdk` as a\n**peer dependency**. Yarn v1 (classic) does not auto-install peer deps.\n\nCheck if the plugin uses yarn classic:\n\n```bash\nyarn --version 2>&1 | head -1\n```\n\nIf version starts with `1.`, check for warnings:\n\n```bash\nyarn install --ignore-engines 2>&1 | grep \"unmet peer dependency.*openfeature\u002Fweb-sdk\"\n```\n\nIf warnings are found:\n\n```bash\nyarn add -D @openfeature\u002Fweb-sdk @openfeature\u002Fcore --ignore-engines\n```\n\n**Skip condition:** Yarn v2+ or npm v7+ (peer deps are auto-installed).\n\n---\n\n## Step 8: Fix source code issues\n\n```bash\ngrep -rn \"ReactDOM\\.render\\|ReactDOM\\.unmountComponentAtNode\\|ReactDOM\\.findDOMNode\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\ngrep -rn \"\\.defaultProps\\s*=\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\ngrep -rn \"\\.propTypes\\s*=\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\ngrep -rn \"contextTypes\\|getChildContext\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\ngrep -rn \"createFactory\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\ngrep -rn \"ChangeEvent\u003CHTMLInputElement>\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\n```\n\n| Pattern | Fix |\n|---------|-----|\n| `ReactDOM.render()` | `createRoot(container).render(element)` |\n| `defaultProps` on **function** components | Move to destructured parameter defaults |\n| `defaultProps` on **class** components | Leave — still works |\n| `propTypes` | Remove |\n| `contextTypes` \u002F `getChildContext` | Use `React.createContext()` + `useContext()` |\n| `createFactory` | Use JSX or `createElement()` |\n| `ChangeEvent\u003CHTMLInputElement>` on checkbox | Change to `FormEvent\u003CHTMLInputElement>` |\n\n---\n\n## Step 9: Build, typecheck, test\n\n```bash\nrm -rf node_modules dist\nyarn install --ignore-engines 2>&1 | tail -10\nyarn build 2>&1 | tail -10\nyarn typecheck 2>&1 | tail -10\nyarn test --watchAll=false 2>&1 | tail -10\n```\n\n| Error | Fix |\n|-------|-----|\n| `Cannot find module 'react\u002Fjsx-runtime'` | Step 4 not applied — re-run `create-plugin add` |\n| `Cannot find module '@openfeature\u002Fweb-sdk'` | Step 7 — `yarn add -D @openfeature\u002Fweb-sdk @openfeature\u002Fcore` |\n| `Can't resolve '@grafana\u002Fi18n'` | `yarn add @grafana\u002Fi18n@^12.2.0` |\n| `Cannot read properties of undefined (reading 'ReactCurrentOwner')` | Bump `@grafana-cloud\u002F*` packages — see Step 6 |\n| `aria-label is missing` on icon-only `Button` | Add `aria-label` prop (newer `@grafana\u002Fui` requires it) |\n| Stale git hash in `yarn.lock` | Add `resolutions` in `package.json`, delete lockfile, reinstall |\n\nFor detailed known issues (i18n crash, `@grafana\u002Fschema` type breaks, publicPath mismatch), see\n[references\u002Fknown-issues.md](references\u002Fknown-issues.md).\n\n---\n\n## Step 10: Update CI (if applicable)\n\n```bash\ngrep -rn \"plugin-ci-workflows\\|e2e-version\" .github\u002Fworkflows\u002F 2>\u002Fdev\u002Fnull\n```\n\n- `plugin-ci-workflows@main` or >= 6.0.0 → already tests React 19. No changes needed.\n- `plugin-actions\u002Fe2e-version` → add `skip-grafana-react-19-preview-image: false`.\n- Neither found → test manually with `GRAFANA_VERSION=dev-preview-react19 docker compose up --build`.\n\n---\n\n## Step 11: Squash and push\n\n```bash\ngit reset --soft origin\u002Fmain\ngit add -A\ngit commit -m \"fix: Prepare plugin for React 19 compatibility\"\n```\n\nCommit message body should list: create-plugin version change, ESLint 9 migration, key dependency\nbumps, and any source code fixes.\n\n---\n\n## References\n\n- [Migration guide](https:\u002F\u002Fgrafana.com\u002Fdevelopers\u002Fplugin-tools\u002Fmigration-guides\u002Fupdate-from-grafana-versions\u002Fmigrate-12_x-to-13_x)\n- [React 19 blog post for plugin developers](https:\u002F\u002Fgrafana.com\u002Fblog\u002Freact-19-is-coming-to-grafana-what-plugin-developers-need-to-know\u002F)\n- [React 19 changelog](https:\u002F\u002Freact.dev\u002Fblog\u002F2024\u002F12\u002F05\u002Freact-19)\n- [grafana-collector-app #1337](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana-collector-app\u002Fpull\u002F1337) — full migration with create-plugin update + source fixes\n- [grafana\u002Fscenes issues](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fscenes\u002Fissues) — upstream i18n tracking\n","# Migrate Grafana Plugin to React 19\n\nGrafana 13 (April 2026) moves from React 18 to React 19. Incompatible plugins will break.\n**Do not upgrade React to 19** — only make forward-compatible changes.\n\nAll changes go in **one PR**. Execute steps in order. Never manually edit `yarn.lock`.\n\n---\n\n## Step 1: Detect plugin context\n\n```bash\nPLUGIN_JSON=$([ -f src\u002Fplugin.json ] && echo \"src\u002Fplugin.json\" \\\n  || ([ -f plugin\u002Fsrc\u002Fplugin.json ] && echo \"plugin\u002Fsrc\u002Fplugin.json\" || echo \"\"))\nPKG_JSON=$([ -f package.json ] && echo \"package.json\" \\\n  || ([ -f plugin\u002Fpackage.json ] && echo \"plugin\u002Fpackage.json\" || echo \"\"))\nPLUGIN_ID=$(jq -r '.id' $PLUGIN_JSON 2>\u002Fdev\u002Fnull)\n[ -f yarn.lock ] && PM=\"yarn\" || ([ -f pnpm-lock.yaml ] && PM=\"pnpm\" || PM=\"npm\")\nCP_VERSION=$(jq -r '.version' .config\u002F.cprc.json 2>\u002Fdev\u002Fnull)\necho \"PLUGIN_ID=$PLUGIN_ID  PM=$PM  CP=$CP_VERSION\"\n```\n\nIf `PLUGIN_ID` is empty, ask the user for the plugin root path.\n\n---\n\n## Step 2: Scan for compatibility issues\n\nBuild the plugin and run the React 19 compatibility scanner:\n\n```bash\nnpm run build 2>&1 | tail -5\nnpx -y @grafana\u002Freact-detect@latest 2>&1\n```\n\nSave the output. It flags:\n\n- `jsxRuntimeImport` \u002F `__SECRET_INTERNALS` → Step 4 fixes this\n- `defaultProps` \u002F `propTypes` \u002F `ReactDOM.render` → Step 8 (source fixes)\n- `findDOMNode` → Step 6 (dependency bump) or Step 8 (source fix)\n\nIf the build fails (plugin hasn't been built before), skip this step and run react-detect\nafter Step 9 instead. If output says \"No breaking changes detected\", still proceed — jsx-runtime\nexternalization and grafanaDependency bump are always required.\n\nRe-run react-detect after Step 9 to confirm all issues are resolved.\n\n---\n\n## Step 3: Update `@grafana\u002Fcreate-plugin`\n\nThe scaffolding update brings in externals extraction, jest mocks, Docker fixes, and webpack\nimprovements needed for React 19. **Always do this before `add externalize-jsx-runtime`.**\n\nRequires a clean git working tree. Create a feature branch first if not already on one.\n\n### Run the update\n\n```bash\nnpx @grafana\u002Fcreate-plugin@latest update 2>&1\n```\n\n### If `yarn install` fails with \"engine is incompatible\"\n\nThe update runs an intermediate `yarn install` without `--ignore-engines`. Complete it manually:\n\n```bash\nyarn install --ignore-scripts --ignore-engines 2>&1 | tail -10\n```\n\nCommit the intermediate state and re-run:\n\n```bash\ngit add -A && git commit -m \"chore: intermediate create-plugin update\" --no-verify\nnpx @grafana\u002Fcreate-plugin@latest update 2>&1\n```\n\n### If ESLint 9 migration (004) fails with a parser error\n\nThe auto-migration can generate invalid JS on plugins with complex ESLint configs.\n**Do not skip** — commit what succeeded, then complete the ESLint 9 migration manually:\n\n```bash\ngit add -A && git commit -m \"chore: update create-plugin (ESLint 9 migration manual)\" --no-verify\n```\n\nThen follow the \"Complete ESLint 9 migration\" section below to finish.\n\n### After the update\n\nAlways run install and verify:\n\n```bash\nyarn install --ignore-scripts --ignore-engines 2>&1 | tail -10\ncat .config\u002F.cprc.json\n```\n\nCommit if there are changes:\n\n```bash\ngit add -A && git diff --cached --quiet || git commit -m \"chore: update create-plugin scaffolding\" --no-verify\n```\n\n---\n\n## Step 3b: Complete ESLint 9 migration\n\nThe `create-plugin update` bumps ESLint to v9, which requires flat config (`eslint.config.js`)\ninstead of `.eslintrc`. Whether the auto-migration (004) succeeded, partially succeeded, or\nfailed, **you must ensure ESLint works before proceeding**.\n\n### Check the current state\n\n```bash\nls eslint.config.js .eslintrc* .config\u002F.eslintrc* 2>\u002Fdev\u002Fnull\nnpx eslint --version 2>&1\n```\n\nThree scenarios:\n\n**A) `eslint.config.js` exists and `yarn lint` passes** — auto-migration succeeded. Proceed.\n\n**B) `eslint.config.js` exists but `yarn lint` fails** — partial migration. Fix the issues:\n\n```bash\nyarn lint 2>&1 | head -30\n```\n\nCommon fixes:\n- `Invalid option '--ignore-path'` or `Invalid option '--ext'` → remove those flags from\n  the `lint` script in `package.json`. In ESLint v9 flat config, ignores and file matching\n  are configured inside `eslint.config.js`, not via CLI flags. Update to: `eslint --cache .`\n- `Cannot find module 'eslint-plugin-deprecation'` → remove the import\u002Freference from\n  `eslint.config.js` (replaced by `@typescript-eslint\u002Fno-deprecated`)\n- Other dead plugin imports → remove them from the config if the package was removed\n\n**C) No `eslint.config.js` exists** — auto-migration failed. Create one manually:\n\n```bash\nls node_modules\u002F@grafana\u002Feslint-config\u002Fflat.js 2>\u002Fdev\u002Fnull\n```\n\nIf `flat.js` exists, create `eslint.config.js` using it as the base:\n\n```js\nimport grafanaConfig from '@grafana\u002Feslint-config\u002Fflat';\n\nexport default [\n  ...grafanaConfig,\n  {\n    ignores: ['**\u002Fdist\u002F', '**\u002Fnode_modules\u002F', '**\u002F.config\u002F', '**\u002Fcoverage\u002F'],\n  },\n];\n```\n\nThen migrate any custom rules from the old `.eslintrc` into additional config objects in the array.\nAfter creating the flat config:\n\n1. Update the `lint` script: `\"lint\": \"eslint --cache .\"`\n2. Delete the root `.eslintrc` (leave `.config\u002F.eslintrc` — it's scaffolded and harmless)\n\n### Verify lint works\n\n```bash\nyarn lint 2>&1 | tail -20\n```\n\nFix auto-fixable issues with `yarn lint --fix`. Commit:\n\n```bash\ngit add -A && git diff --cached --quiet || git commit -m \"chore: complete ESLint 9 flat config migration\" --no-verify\n```\n\n---\n\n## Step 4: Externalize jsx-runtime\n\n**Always use the `create-plugin add` command.** Requires a clean git working tree.\n\n```bash\nnpx @grafana\u002Fcreate-plugin@latest add externalize-jsx-runtime 2>&1\n```\n\nVerify:\n\n```bash\ngrep \"jsx-runtime\" .config\u002Fbundler\u002Fexternals.ts 2>\u002Fdev\u002Fnull\n```\n\n- Found → commit and proceed.\n- Not found → command failed. **Only then** add externals manually to the root `webpack.config.ts`:\n\n```ts\nexternals: ['react\u002Fjsx-runtime', 'react\u002Fjsx-dev-runtime'],\n```\n\nCommit:\n\n```bash\ngit add -A && git diff --cached --quiet || git commit -m \"feat: externalize jsx-runtime\" --no-verify\n```\n\n---\n\n## Step 5: Bump `grafanaDependency`\n\n```bash\njq -r '.dependencies.grafanaDependency' $PLUGIN_JSON\n```\n\nIf not already `>=12.3.0`, update it. The `create-plugin add` in Step 3 may have already done this.\n\n---\n\n## Step 6: Bump dependencies\n\n### Faro (if present)\n\n```bash\ngrep '\"@grafana\u002Ffaro' $PKG_JSON\n```\n\n| Package | Target |\n|---------|--------|\n| `@grafana\u002Ffaro-react` | `^2.2.3` |\n| `@grafana\u002Ffaro-web-sdk` | `^2.2.3` |\n| `@grafana\u002Ffaro-web-tracing` | `^2.0.0` |\n\n### Grafana packages\n\n```bash\ngrep '\"@grafana\u002F' $PKG_JSON | grep -v faro | grep -v create-plugin\n```\n\nBump `@grafana\u002Fdata`, `@grafana\u002Fruntime`, `@grafana\u002Fschema`, `@grafana\u002Fui` to `^12.2.0` or later.\nAdd `@grafana\u002Fi18n@^12.2.0` if the plugin uses translations or `@grafana\u002Fscenes` requires it.\n\n### React types\n\nBump `react` and `react-dom` to `^18.3.0` (surfaces React 19 issues early).\nAdd `@types\u002Freact@^18.3.0` and `@types\u002Freact-dom@^18.3.0` to devDependencies if missing.\n\n### Remove deprecated packages\n\nRemove from devDependencies if present:\n- `eslint-plugin-deprecation` (replaced by `@typescript-eslint\u002Fno-deprecated`)\n- `@types\u002Ftesting-library__jest-dom` (replaced by `setupTests.d.ts`)\n\n### Broken transitive dependencies\n\nIf `yarn install` fails with a stale git reference, **do not edit yarn.lock**. Add a `resolutions` entry:\n\n```json\n\"resolutions\": {\n  \"\u003Cpackage-name>\": \"\u003Cworking-version-or-git-ref>\"\n}\n```\n\nThen delete `yarn.lock` and `node_modules` and reinstall:\n\n```bash\nrm -rf node_modules yarn.lock\nyarn install --ignore-engines 2>&1 | tail -10\n```\n\n---\n\n## Step 7: Fix unmet `@openfeature\u002Fweb-sdk` peer dependency\n\n`@grafana\u002Fruntime` depends on `@openfeature\u002Freact-sdk` which has `@openfeature\u002Fweb-sdk` as a\n**peer dependency**. Yarn v1 (classic) does not auto-install peer deps.\n\nCheck if the plugin uses yarn classic:\n\n```bash\nyarn --version 2>&1 | head -1\n```\n\nIf version starts with `1.`, check for warnings:\n\n```bash\nyarn install --ignore-engines 2>&1 | grep \"unmet peer dependency.*openfeature\u002Fweb-sdk\"\n```\n\nIf warnings are found:\n\n```bash\nyarn add -D @openfeature\u002Fweb-sdk @openfeature\u002Fcore --ignore-engines\n```\n\n**Skip condition:** Yarn v2+ or npm v7+ (peer deps are auto-installed).\n\n---\n\n## Step 8: Fix source code issues\n\n```bash\ngrep -rn \"ReactDOM\\.render\\|ReactDOM\\.unmountComponentAtNode\\|ReactDOM\\.findDOMNode\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\ngrep -rn \"\\.defaultProps\\s*=\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\ngrep -rn \"\\.propTypes\\s*=\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\ngrep -rn \"contextTypes\\|getChildContext\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\ngrep -rn \"createFactory\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\ngrep -rn \"ChangeEvent\u003CHTMLInputElement>\" src\u002F --include=\"*.tsx\" --include=\"*.ts\"\n```\n\n| Pattern | Fix |\n|---------|-----|\n| `ReactDOM.render()` | `createRoot(container).render(element)` |\n| `defaultProps` on **function** components | Move to destructured parameter defaults |\n| `defaultProps` on **class** components | Leave — still works |\n| `propTypes` | Remove |\n| `contextTypes` \u002F `getChildContext` | Use `React.createContext()` + `useContext()` |\n| `createFactory` | Use JSX or `createElement()` |\n| `ChangeEvent\u003CHTMLInputElement>` on checkbox | Change to `FormEvent\u003CHTMLInputElement>` |\n\n---\n\n## Step 9: Build, typecheck, test\n\n```bash\nrm -rf node_modules dist\nyarn install --ignore-engines 2>&1 | tail -10\nyarn build 2>&1 | tail -10\nyarn typecheck 2>&1 | tail -10\nyarn test --watchAll=false 2>&1 | tail -10\n```\n\n| Error | Fix |\n|-------|-----|\n| `Cannot find module 'react\u002Fjsx-runtime'` | Step 4 not applied — re-run `create-plugin add` |\n| `Cannot find module '@openfeature\u002Fweb-sdk'` | Step 7 — `yarn add -D @openfeature\u002Fweb-sdk @openfeature\u002Fcore` |\n| `Can't resolve '@grafana\u002Fi18n'` | `yarn add @grafana\u002Fi18n@^12.2.0` |\n| `Cannot read properties of undefined (reading 'ReactCurrentOwner')` | Bump `@grafana-cloud\u002F*` packages — see Step 6 |\n| `aria-label is missing` on icon-only `Button` | Add `aria-label` prop (newer `@grafana\u002Fui` requires it) |\n| Stale git hash in `yarn.lock` | Add `resolutions` in `package.json`, delete lockfile, reinstall |\n\nFor detailed known issues (i18n crash, `@grafana\u002Fschema` type breaks, publicPath mismatch), see\n[references\u002Fknown-issues.md](references\u002Fknown-issues.md).\n\n---\n\n## Step 10: Update CI (if applicable)\n\n```bash\ngrep -rn \"plugin-ci-workflows\\|e2e-version\" .github\u002Fworkflows\u002F 2>\u002Fdev\u002Fnull\n```\n\n- `plugin-ci-workflows@main` or >= 6.0.0 → already tests React 19. No changes needed.\n- `plugin-actions\u002Fe2e-version` → add `skip-grafana-react-19-preview-image: false`.\n- Neither found → test manually with `GRAFANA_VERSION=dev-preview-react19 docker compose up --build`.\n\n---\n\n## Step 11: Squash and push\n\n```bash\ngit reset --soft origin\u002Fmain\ngit add -A\ngit commit -m \"fix: Prepare plugin for React 19 compatibility\"\n```\n\nCommit message body should list: create-plugin version change, ESLint 9 migration, key dependency\nbumps, and any source code fixes.\n\n---\n\n## References\n\n- [Migration guide](https:\u002F\u002Fgrafana.com\u002Fdevelopers\u002Fplugin-tools\u002Fmigration-guides\u002Fupdate-from-grafana-versions\u002Fmigrate-12_x-to-13_x)\n- [React 19 blog post for plugin developers](https:\u002F\u002Fgrafana.com\u002Fblog\u002Freact-19-is-coming-to-grafana-what-plugin-developers-need-to-know\u002F)\n- [React 19 changelog](https:\u002F\u002Freact.dev\u002Fblog\u002F2024\u002F12\u002F05\u002Freact-19)\n- [grafana-collector-app #1337](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana-collector-app\u002Fpull\u002F1337) — full migration with create-plugin update + source fixes\n- [grafana\u002Fscenes issues](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fscenes\u002Fissues) — upstream i18n tracking\n",{"name":5,"license":15,"description":7},"master","49e49abf2f670d429e0b7e2c0349739c3fdd5cbe","skills\u002Freact-19-plugin-migration",5,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium","https:\u002F\u002Fgithub.com\u002Fstanfish06","https:\u002F\u002Fwww.stanfish.dev\u002F","2026-11-14 21:31:37",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add stanfish06\u002Fskillquarium --skill react-19-plugin-migration",{"tool":38,"command":39},"bunx","bunx skills add stanfish06\u002Fskillquarium --skill react-19-plugin-migration",{"tool":41,"command":42},"pnpm","pnpm dlx skills add stanfish06\u002Fskillquarium --skill react-19-plugin-migration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Freact-19-plugin-migration\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"agents\u002Fopenai.yaml","REFERENCE","参考文档",186,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Freact-19-plugin-migration\u002Fagents\u002Fopenai.yaml",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fknown-issues.md",4675,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Freact-19-plugin-migration\u002Freferences\u002Fknown-issues.md",[57,65,73,80,87,94],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M76ZJTRVA456GD7K8Y3EP82H","zarr-python","Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3\u002FGCS storage, and NumPy\u002FDask\u002FXarray integration. Use for array layout, bounded I\u002FO, format migration, or scientific metadata preservation.","MIT","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":69,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M76ZJQZ15Q1HKC5V85NHE325","yeet","Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M76ZJ8ASZ4QYQ70Y6SBA4Z4S","xarray","N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF\u002FGRIB\u002FZarr files, climate\u002Fweather\u002Foceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fxarray\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M76ZHFBXD6VXPQ02VCEG202B","writing-mstest-tests","Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M76ZDFDF4N88RH6HSYGS7GP2","wgs-prs","End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core\u002Fsarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti\u002FTv and Het\u002FHom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwgs-prs\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M76ZCC1SC68J42QK4MDC8RCG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[]]