@grafana/create-plugin 7.5.0-canary.2630.25781735426.0 → 7.5.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v7.5.0 (Wed May 13 2026)
|
|
2
|
+
|
|
3
|
+
#### 🚀 Enhancement
|
|
4
|
+
|
|
5
|
+
- feat: disable package manager script execution [#2630](https://github.com/grafana/plugin-tools/pull/2630) ([@jackw](https://github.com/jackw))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Jack Westbrook ([@jackw](https://github.com/jackw))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v7.4.0 (Wed May 13 2026)
|
|
2
14
|
|
|
3
15
|
#### 🚀 Enhancement
|
|
@@ -8,29 +8,29 @@ const NPM_LOCKFILE = "package-lock.json";
|
|
|
8
8
|
const PNPM_LOCKFILE = "pnpm-lock.yaml";
|
|
9
9
|
const YARN_LOCKFILE = "yarn.lock";
|
|
10
10
|
const SUPPORTED_PACKAGE_MANAGERS = ["npm", "yarn", "pnpm"];
|
|
11
|
-
const DEFAULT_PACKAGE_MANAGER = { packageManagerName: "
|
|
12
|
-
async function configureYarn(cwd
|
|
11
|
+
const DEFAULT_PACKAGE_MANAGER = { packageManagerName: "npm", packageManagerVersion: "10.9.0" };
|
|
12
|
+
async function configureYarn(cwd) {
|
|
13
13
|
try {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
spawnSync("yarn", ["config", "set", "
|
|
14
|
+
spawnSync("yarn", ["set", "version", "stable"], {
|
|
15
|
+
shell: true,
|
|
16
|
+
cwd
|
|
17
|
+
});
|
|
18
|
+
spawnSync("yarn", ["config", "set", "nodeLinker", "node-modules"], {
|
|
19
|
+
shell: true,
|
|
20
|
+
cwd
|
|
21
|
+
});
|
|
22
|
+
spawnSync("yarn", ["config", "set", "enableScripts", "false"], {
|
|
23
|
+
shell: true,
|
|
24
|
+
cwd
|
|
25
|
+
});
|
|
26
|
+
spawnSync("yarn", ["config", "set", "approvedGitRepositories", "--json", `'["https://github.com/grafana/*"]'`], {
|
|
27
27
|
shell: true,
|
|
28
28
|
cwd
|
|
29
29
|
});
|
|
30
|
-
return "Configured Yarn to
|
|
30
|
+
return "Configured Yarn Berry to use node_modules, disabled script execution, and set approved Git repositories.";
|
|
31
31
|
} catch (error) {
|
|
32
32
|
throw new Error(
|
|
33
|
-
"There was an error configuring Yarn. Please run `yarn set version stable && yarn config set nodeLinker node-modules` in your plugin directory."
|
|
33
|
+
"There was an error configuring Yarn. Please run `yarn set version stable && yarn config set nodeLinker node-modules && yarn config set enableScripts false` in your plugin directory."
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "7.5.0
|
|
3
|
+
"version": "7.5.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"directory": "packages/create-plugin",
|
|
6
6
|
"url": "https://github.com/grafana/plugin-tools"
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=20"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "a5b29c0663a14099383f2cda889ff86df36086ae"
|
|
59
59
|
}
|
|
@@ -9,36 +9,36 @@ const NPM_LOCKFILE = 'package-lock.json';
|
|
|
9
9
|
const PNPM_LOCKFILE = 'pnpm-lock.yaml';
|
|
10
10
|
const YARN_LOCKFILE = 'yarn.lock';
|
|
11
11
|
const SUPPORTED_PACKAGE_MANAGERS = ['npm', 'yarn', 'pnpm'];
|
|
12
|
-
const DEFAULT_PACKAGE_MANAGER = { packageManagerName: '
|
|
12
|
+
const DEFAULT_PACKAGE_MANAGER = { packageManagerName: 'npm', packageManagerVersion: '10.9.0' };
|
|
13
13
|
|
|
14
14
|
export type PackageManager = {
|
|
15
15
|
packageManagerName: string;
|
|
16
16
|
packageManagerVersion: string;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export async function configureYarn(cwd: string
|
|
19
|
+
export async function configureYarn(cwd: string) {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
if (isYarnBerry) {
|
|
23
|
-
spawnSync('yarn', ['config', 'set', 'nodeLinker', 'node-modules'], {
|
|
24
|
-
shell: true,
|
|
25
|
-
cwd,
|
|
26
|
-
});
|
|
27
|
-
spawnSync('yarn', ['config', 'set', 'enableScripts', 'false'], {
|
|
28
|
-
shell: true,
|
|
29
|
-
cwd,
|
|
30
|
-
});
|
|
31
|
-
return 'Configured Yarn Berry to use node_modules and disabled script execution during installation.';
|
|
32
|
-
}
|
|
33
|
-
spawnSync('yarn', ['config', 'set', 'ignore-scripts', 'true'], {
|
|
21
|
+
spawnSync('yarn', ['set', 'version', 'stable'], {
|
|
34
22
|
shell: true,
|
|
35
23
|
cwd,
|
|
36
24
|
});
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
spawnSync('yarn', ['config', 'set', 'nodeLinker', 'node-modules'], {
|
|
26
|
+
shell: true,
|
|
27
|
+
cwd,
|
|
28
|
+
});
|
|
29
|
+
spawnSync('yarn', ['config', 'set', 'enableScripts', 'false'], {
|
|
30
|
+
shell: true,
|
|
31
|
+
cwd,
|
|
32
|
+
});
|
|
33
|
+
// TODO: Remove this once grafana/react-data-grid is published to NPM.
|
|
34
|
+
spawnSync('yarn', ['config', 'set', 'approvedGitRepositories', '--json', `'["https://github.com/grafana/*"]'`], {
|
|
35
|
+
shell: true,
|
|
36
|
+
cwd,
|
|
37
|
+
});
|
|
38
|
+
return 'Configured Yarn Berry to use node_modules, disabled script execution, and set approved Git repositories.';
|
|
39
39
|
} catch (error) {
|
|
40
40
|
throw new Error(
|
|
41
|
-
'There was an error configuring Yarn. Please run `yarn set version stable && yarn config set nodeLinker node-modules` in your plugin directory.'
|
|
41
|
+
'There was an error configuring Yarn. Please run `yarn set version stable && yarn config set nodeLinker node-modules && yarn config set enableScripts false` in your plugin directory.'
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -9,11 +9,13 @@ yarn-error.log*
|
|
|
9
9
|
node_modules/
|
|
10
10
|
|
|
11
11
|
# yarn
|
|
12
|
-
.yarn/cache
|
|
13
|
-
.yarn/unplugged
|
|
14
|
-
.yarn/build-state.yml
|
|
15
|
-
.yarn/install-state.gz
|
|
16
12
|
.pnp.*
|
|
13
|
+
.yarn/*
|
|
14
|
+
!.yarn/patches
|
|
15
|
+
!.yarn/plugins
|
|
16
|
+
!.yarn/releases
|
|
17
|
+
!.yarn/sdks
|
|
18
|
+
!.yarn/versions
|
|
17
19
|
|
|
18
20
|
# Runtime data
|
|
19
21
|
pids
|