@grafana/react-detect 0.5.2 → 0.6.0-canary.2448.21993225386.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ const PATTERN_DEFINITIONS = {
|
|
|
4
4
|
impactLevel: "critical",
|
|
5
5
|
description: "React internals __SECRET_INTERNALS renamed to _DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE",
|
|
6
6
|
fix: {
|
|
7
|
-
description: "
|
|
7
|
+
description: "The dependency is relying on React internals that have been renamed in React 19. Search for an updated version, reach out to the maintainer, or find an alternative dependency."
|
|
8
8
|
},
|
|
9
9
|
link: "https://react.dev/blog/2024/04/25/react-19-upgrade-guide#libraries-depending-on-react-internals-may-block-upgrades"
|
|
10
10
|
},
|
|
@@ -13,7 +13,7 @@ const PATTERN_DEFINITIONS = {
|
|
|
13
13
|
impactLevel: "critical",
|
|
14
14
|
description: "Bundling react/jsx-runtime will break with React 19 due to `__SECRET_INTERNALS...` renamed to `_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`",
|
|
15
15
|
fix: {
|
|
16
|
-
description: "
|
|
16
|
+
description: "Run `npx @grafana/create-plugin@latest add externalize-jsx-runtime`. Your plugin will only be compatible with Grafana >=12.3.0"
|
|
17
17
|
},
|
|
18
18
|
link: "https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-webpack-config"
|
|
19
19
|
},
|
package/dist/utils/plugin.js
CHANGED
|
@@ -35,7 +35,11 @@ function readJsonFile(filename) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
function hasExternalisedJsxRuntime() {
|
|
38
|
-
const webpackConfigPathsToCheck = [
|
|
38
|
+
const webpackConfigPathsToCheck = [
|
|
39
|
+
"webpack.config.ts",
|
|
40
|
+
".config/webpack/webpack.config.ts",
|
|
41
|
+
".config/bundler/externals.ts"
|
|
42
|
+
];
|
|
39
43
|
let found = false;
|
|
40
44
|
for (const webpackConfigPath of webpackConfigPathsToCheck) {
|
|
41
45
|
if (isFile(path.join(process.cwd(), webpackConfigPath))) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/react-detect",
|
|
3
3
|
"description": "Run various checks to detect if a Grafana plugin is compatible with React.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0-canary.2448.21993225386.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "packages/react-detect",
|
|
7
7
|
"url": "https://github.com/grafana/plugin-tools"
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=20"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "dba20a5c3a84f5236b0c26c5b7251e02ef3d080e"
|
|
44
44
|
}
|
|
@@ -7,7 +7,7 @@ export const PATTERN_DEFINITIONS: Record<string, PatternDefinition> = {
|
|
|
7
7
|
description: 'React internals __SECRET_INTERNALS renamed to _DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE',
|
|
8
8
|
fix: {
|
|
9
9
|
description:
|
|
10
|
-
'
|
|
10
|
+
'The dependency is relying on React internals that have been renamed in React 19. Search for an updated version, reach out to the maintainer, or find an alternative dependency.',
|
|
11
11
|
},
|
|
12
12
|
link: 'https://react.dev/blog/2024/04/25/react-19-upgrade-guide#libraries-depending-on-react-internals-may-block-upgrades',
|
|
13
13
|
},
|
|
@@ -18,7 +18,7 @@ export const PATTERN_DEFINITIONS: Record<string, PatternDefinition> = {
|
|
|
18
18
|
'Bundling react/jsx-runtime will break with React 19 due to `__SECRET_INTERNALS...` renamed to `_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`',
|
|
19
19
|
fix: {
|
|
20
20
|
description:
|
|
21
|
-
'
|
|
21
|
+
'Run `npx @grafana/create-plugin@latest add externalize-jsx-runtime`. Your plugin will only be compatible with Grafana >=12.3.0',
|
|
22
22
|
},
|
|
23
23
|
link: 'https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-webpack-config',
|
|
24
24
|
},
|
package/src/utils/plugin.ts
CHANGED
|
@@ -50,7 +50,11 @@ export function readJsonFile(filename: string) {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export function hasExternalisedJsxRuntime(): boolean {
|
|
53
|
-
const webpackConfigPathsToCheck = [
|
|
53
|
+
const webpackConfigPathsToCheck = [
|
|
54
|
+
'webpack.config.ts',
|
|
55
|
+
'.config/webpack/webpack.config.ts',
|
|
56
|
+
'.config/bundler/externals.ts',
|
|
57
|
+
];
|
|
54
58
|
let found = false;
|
|
55
59
|
for (const webpackConfigPath of webpackConfigPathsToCheck) {
|
|
56
60
|
if (isFile(path.join(process.cwd(), webpackConfigPath))) {
|