@grafana/create-plugin 1.6.0-canary.263.c835f7a.0 → 1.6.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,45 @@
1
+ # v1.6.0 (Tue Jun 06 2023)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - Create Plugin: Enable apps by default [#274](https://github.com/grafana/plugin-tools/pull/274) ([@leventebalogh](https://github.com/leventebalogh))
6
+
7
+ #### Authors: 1
8
+
9
+ - Levente Balogh ([@leventebalogh](https://github.com/leventebalogh))
10
+
11
+ ---
12
+
13
+ # v1.5.2 (Thu Jun 01 2023)
14
+
15
+ :tada: This release contains work from a new contributor! :tada:
16
+
17
+ Thank you, Alex Simonok ([@asimonok](https://github.com/asimonok)), for all your work!
18
+
19
+ #### 🐛 Bug Fix
20
+
21
+ - Create Plugin: Fix Code Coverage for JSX files [#271](https://github.com/grafana/plugin-tools/pull/271) ([@asimonok](https://github.com/asimonok))
22
+
23
+ #### Authors: 1
24
+
25
+ - Alex Simonok ([@asimonok](https://github.com/asimonok))
26
+
27
+ ---
28
+
29
+ # v1.5.1 (Wed May 31 2023)
30
+
31
+ #### 🐛 Bug Fix
32
+
33
+ - Create Plugin: Fix lint:fix not passing args with NPM [#265](https://github.com/grafana/plugin-tools/pull/265) ([@jackw](https://github.com/jackw))
34
+ - Scripts: Add error-handling to generator scripts [#257](https://github.com/grafana/plugin-tools/pull/257) ([@leventebalogh](https://github.com/leventebalogh))
35
+
36
+ #### Authors: 2
37
+
38
+ - Jack Westbrook ([@jackw](https://github.com/jackw))
39
+ - Levente Balogh ([@leventebalogh](https://github.com/leventebalogh))
40
+
41
+ ---
42
+
1
43
  # v1.5.0 (Wed May 24 2023)
2
44
 
3
45
  :tada: This release contains work from a new contributor! :tada:
package/dist/bin/run.js CHANGED
@@ -6,8 +6,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  exports.__esModule = true;
7
7
  var minimist_1 = __importDefault(require("minimist"));
8
8
  var commands_1 = require("../commands");
9
- var utils_os_1 = require("../utils/utils.os");
10
- (0, utils_os_1.operatingSystemCheck)();
11
9
  var args = process.argv.slice(2);
12
10
  var argv = (0, minimist_1["default"])(args);
13
11
  var commands = {
@@ -106,7 +106,8 @@ function default_1(plop) {
106
106
  packageManagerName: packageManagerName,
107
107
  packageManagerInstallCmd: packageManagerInstallCmd,
108
108
  packageManagerVersion: packageManagerVersion,
109
- isAppType: isAppType
109
+ isAppType: isAppType,
110
+ isNPM: packageManagerName === 'npm'
110
111
  };
111
112
  var commonActions = getActionsForTemplateFolder({
112
113
  folderPath: constants_1.TEMPLATE_PATHS.common,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "1.6.0-canary.263.c835f7a.0",
3
+ "version": "1.6.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": ">=16"
68
68
  },
69
- "gitHead": "c835f7a603edc403ec27b9b17f4361faa490a0fc"
69
+ "gitHead": "e39be36286031d2f39ac5a513eeb319bdfb33891"
70
70
  }
package/src/bin/run.ts CHANGED
@@ -2,10 +2,6 @@
2
2
 
3
3
  import minimist from 'minimist';
4
4
  import { generate, update, migrate, version } from '../commands';
5
- import { operatingSystemCheck } from '../utils/utils.os';
6
-
7
- // Exit early if operating system isn't supported.
8
- operatingSystemCheck();
9
5
 
10
6
  const args = process.argv.slice(2);
11
7
  const argv = minimist(args);
@@ -95,6 +95,7 @@ export default function (plop: NodePlopAPI) {
95
95
  packageManagerInstallCmd,
96
96
  packageManagerVersion,
97
97
  isAppType,
98
+ isNPM: packageManagerName === 'npm'
98
99
  };
99
100
  // Copy over files that are shared between plugins types
100
101
  const commonActions = getActionsForTemplateFolder({
@@ -16,4 +16,5 @@ export type TemplateData = {
16
16
  packageManagerInstallCmd: string;
17
17
  packageManagerVersion: string;
18
18
  isAppType: boolean;
19
+ isNPM: boolean;
19
20
  };
@@ -0,0 +1,5 @@
1
+ apiVersion: 1
2
+
3
+ apps:
4
+ - type: '{{ normalize_id pluginName orgName 'app' }}'
5
+ disabled: false
@@ -25,7 +25,7 @@ module.exports = {
25
25
  '^.+\\.(t|j)sx?$': [
26
26
  '@swc/jest',
27
27
  {
28
- sourceMaps: true,
28
+ sourceMaps: 'inline',
29
29
  jsc: {
30
30
  parser: {
31
31
  syntax: 'typescript',
@@ -9,7 +9,7 @@
9
9
  "test:ci": "jest --passWithNoTests --maxWorkers 4",
10
10
  "typecheck": "tsc --noEmit",
11
11
  "lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
12
- "lint:fix": "{{ packageManagerName }} run lint --fix",
12
+ "lint:fix": "{{ packageManagerName }} run lint{{#if isNPM}} --{{/if}} --fix",
13
13
  "e2e": "{{ packageManagerName }} exec cypress install && {{ packageManagerName }} exec grafana-e2e run",
14
14
  "e2e:update": "{{ packageManagerName }} exec cypress install && {{ packageManagerName }} exec grafana-e2e run --update-screenshots",
15
15
  "server": "docker-compose up --build",
@@ -0,0 +1,5 @@
1
+ apiVersion: 1
2
+
3
+ apps:
4
+ - type: '{{ normalize_id pluginName orgName 'app' }}'
5
+ disabled: false
@@ -1,12 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.operatingSystemCheck = void 0;
4
- var os_1 = require("os");
5
- function operatingSystemCheck() {
6
- var os = (0, os_1.platform)();
7
- if (os === 'win32') {
8
- console.error("Unsupported operating system 'Windows' detected. Please use WSL with create-plugin.");
9
- process.exit(1);
10
- }
11
- }
12
- exports.operatingSystemCheck = operatingSystemCheck;
@@ -1,10 +0,0 @@
1
- import { platform } from 'os';
2
-
3
- export function operatingSystemCheck() {
4
- const os = platform();
5
-
6
- if (os === 'win32') {
7
- console.error(`Unsupported operating system 'Windows' detected. Please use WSL with create-plugin.`);
8
- process.exit(1);
9
- }
10
- }