@grafana/create-plugin 2.3.1-canary.441.04830ee.0 → 2.4.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 +13 -0
- package/dist/commands/generate.plopfile.js +0 -2
- package/dist/commands/version.command.js +12 -2
- package/package.json +2 -2
- package/src/commands/generate.plopfile.ts +0 -2
- package/src/commands/types.ts +0 -1
- package/src/commands/version.command.ts +12 -1
- package/templates/common/.config/_eslintrc +1 -0
- package/dist/utils/utils.version.js +0 -15
- package/src/utils/utils.version.ts +0 -12
- package/templates/common/.config/.create-plugin.json +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# v2.4.0 (Wed Oct 25 2023)
|
|
2
|
+
|
|
3
|
+
#### 🚀 Enhancement
|
|
4
|
+
|
|
5
|
+
- Create Plugin: Lint Deprecation Warnings [#268](https://github.com/grafana/plugin-tools/pull/268) ([@jackw](https://github.com/jackw) [@leventebalogh](https://github.com/leventebalogh))
|
|
6
|
+
|
|
7
|
+
#### Authors: 2
|
|
8
|
+
|
|
9
|
+
- Jack Westbrook ([@jackw](https://github.com/jackw))
|
|
10
|
+
- Levente Balogh ([@leventebalogh](https://github.com/leventebalogh))
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# v2.3.0 (Tue Oct 24 2023)
|
|
2
15
|
|
|
3
16
|
#### 🚀 Enhancement
|
|
@@ -29,7 +29,6 @@ var path_1 = __importDefault(require("path"));
|
|
|
29
29
|
var constants_1 = require("../constants");
|
|
30
30
|
var utils_handlebars_1 = require("../utils/utils.handlebars");
|
|
31
31
|
var utils_path_1 = require("../utils/utils.path");
|
|
32
|
-
var utils_version_1 = require("../utils/utils.version");
|
|
33
32
|
var utils_packageManager_1 = require("../utils/utils.packageManager");
|
|
34
33
|
var print_success_message_1 = require("./generate-actions/print-success-message");
|
|
35
34
|
var update_go_sdk_and_packages_1 = require("./generate-actions/update-go-sdk-and-packages");
|
|
@@ -112,7 +111,6 @@ function default_1(plop) {
|
|
|
112
111
|
packageManagerVersion: packageManagerVersion,
|
|
113
112
|
isAppType: isAppType,
|
|
114
113
|
isNPM: packageManagerName === 'npm',
|
|
115
|
-
packageVersion: (0, utils_version_1.getVersion)(),
|
|
116
114
|
};
|
|
117
115
|
var commonActions = getActionsForTemplateFolder({
|
|
118
116
|
folderPath: constants_1.TEMPLATE_PATHS.common,
|
|
@@ -37,11 +37,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.version = void 0;
|
|
40
|
-
var
|
|
40
|
+
var path_1 = require("path");
|
|
41
|
+
var fs_1 = require("fs");
|
|
41
42
|
var version = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
43
|
return __generator(this, function (_a) {
|
|
43
44
|
try {
|
|
44
|
-
console.log(
|
|
45
|
+
console.log(getVersion());
|
|
45
46
|
}
|
|
46
47
|
catch (error) {
|
|
47
48
|
console.error(error);
|
|
@@ -51,3 +52,12 @@ var version = function () { return __awaiter(void 0, void 0, void 0, function ()
|
|
|
51
52
|
});
|
|
52
53
|
}); };
|
|
53
54
|
exports.version = version;
|
|
55
|
+
var getVersion = function () {
|
|
56
|
+
var packageJsonPath = (0, path_1.resolve)(__dirname, '..', '..', 'package.json');
|
|
57
|
+
var pkg = (0, fs_1.readFileSync)(packageJsonPath, 'utf8');
|
|
58
|
+
var version = JSON.parse(pkg).version;
|
|
59
|
+
if (!version) {
|
|
60
|
+
throw "Could not find the version of sign-plugin";
|
|
61
|
+
}
|
|
62
|
+
return version;
|
|
63
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "packages/create-plugin",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"engines": {
|
|
67
67
|
"node": ">=20"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "534ad78e12d1fd0c371f7659c3c3084ec31bb3c0"
|
|
70
70
|
}
|
|
@@ -5,7 +5,6 @@ import type { ModifyActionConfig, NodePlopAPI } from 'plop';
|
|
|
5
5
|
import { EXTRA_TEMPLATE_VARIABLES, IS_DEV, PARTIALS_DIR, PLUGIN_TYPES, TEMPLATE_PATHS } from '../constants';
|
|
6
6
|
import { ifEq, normalizeId } from '../utils/utils.handlebars';
|
|
7
7
|
import { getExportPath } from '../utils/utils.path';
|
|
8
|
-
import { getVersion } from '../utils/utils.version';
|
|
9
8
|
import { getPackageManagerInstallCmd, getPackageManagerFromUserAgent } from '../utils/utils.packageManager';
|
|
10
9
|
import { printGenerateSuccessMessage } from './generate-actions/print-success-message';
|
|
11
10
|
import { updateGoSdkAndModules } from './generate-actions/update-go-sdk-and-packages';
|
|
@@ -100,7 +99,6 @@ export default function (plop: NodePlopAPI) {
|
|
|
100
99
|
packageManagerVersion,
|
|
101
100
|
isAppType,
|
|
102
101
|
isNPM: packageManagerName === 'npm',
|
|
103
|
-
packageVersion: getVersion(),
|
|
104
102
|
};
|
|
105
103
|
// Copy over files that are shared between plugins types
|
|
106
104
|
const commonActions = getActionsForTemplateFolder({
|
package/src/commands/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolve } from 'path';
|
|
2
|
+
import { readFileSync } from 'fs';
|
|
2
3
|
|
|
3
4
|
export const version = async () => {
|
|
4
5
|
try {
|
|
@@ -8,3 +9,13 @@ export const version = async () => {
|
|
|
8
9
|
process.exit(1);
|
|
9
10
|
}
|
|
10
11
|
};
|
|
12
|
+
|
|
13
|
+
const getVersion = () => {
|
|
14
|
+
const packageJsonPath = resolve(__dirname, '..', '..', 'package.json');
|
|
15
|
+
const pkg = readFileSync(packageJsonPath, 'utf8');
|
|
16
|
+
const { version } = JSON.parse(pkg);
|
|
17
|
+
if (!version) {
|
|
18
|
+
throw `Could not find the version of sign-plugin`;
|
|
19
|
+
}
|
|
20
|
+
return version;
|
|
21
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
|
|
3
|
+
*
|
|
3
4
|
* In order to extend the configuration follow the steps in
|
|
4
5
|
* https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/extend-configurations#extend-the-eslint-config
|
|
5
6
|
*/
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getVersion = void 0;
|
|
4
|
-
var path_1 = require("path");
|
|
5
|
-
var fs_1 = require("fs");
|
|
6
|
-
var getVersion = function () {
|
|
7
|
-
var packageJsonPath = (0, path_1.resolve)(__dirname, '..', '..', 'package.json');
|
|
8
|
-
var pkg = (0, fs_1.readFileSync)(packageJsonPath, 'utf8');
|
|
9
|
-
var version = JSON.parse(pkg).version;
|
|
10
|
-
if (!version) {
|
|
11
|
-
throw "Could not find the version of create-plugin";
|
|
12
|
-
}
|
|
13
|
-
return version;
|
|
14
|
-
};
|
|
15
|
-
exports.getVersion = getVersion;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { resolve } from 'path';
|
|
2
|
-
import { readFileSync } from 'fs';
|
|
3
|
-
|
|
4
|
-
export const getVersion = () => {
|
|
5
|
-
const packageJsonPath = resolve(__dirname, '..', '..', 'package.json');
|
|
6
|
-
const pkg = readFileSync(packageJsonPath, 'utf8');
|
|
7
|
-
const { version } = JSON.parse(pkg);
|
|
8
|
-
if (!version) {
|
|
9
|
-
throw `Could not find the version of create-plugin`;
|
|
10
|
-
}
|
|
11
|
-
return version;
|
|
12
|
-
};
|