From 1e03bb28956c8b1118071f0f3cb6f99654baa8b2 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Sat, 18 Apr 2020 22:05:25 -0700 Subject: [PATCH] Bundled Plugins: fix build issues with DirectInput (#23640) * pass query error * and the root * not optional * building bundled plugin * missing file * remove other branch * fix prettier --- .../src/cli/tasks/plugin/bundle.managed.ts | 2 +- plugins-bundled/.gitignore | 3 +++ plugins-bundled/internal/input-datasource/README.md | 2 +- plugins-bundled/internal/input-datasource/jest.config.js | 8 ++++++++ plugins-bundled/internal/input-datasource/package.json | 2 +- plugins-bundled/internal/input-datasource/tsconfig.json | 2 +- 6 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 plugins-bundled/internal/input-datasource/jest.config.js diff --git a/packages/grafana-toolkit/src/cli/tasks/plugin/bundle.managed.ts b/packages/grafana-toolkit/src/cli/tasks/plugin/bundle.managed.ts index c4e011bcac3..3bee164da81 100644 --- a/packages/grafana-toolkit/src/cli/tasks/plugin/bundle.managed.ts +++ b/packages/grafana-toolkit/src/cli/tasks/plugin/bundle.managed.ts @@ -21,7 +21,7 @@ const bundleManagedPluginsRunner: TaskRunner = async () => process.chdir(`${MANAGED_PLUGINS_PATH}/${scope}/${plugin}`); try { console.log(`[${scope}]: ${plugin} building...`); - await execa('yarn', ['dev']); + await execa('yarn', ['build']); console.log(`[${scope}]: ${plugin} bundled`); } catch (e) { console.log(e.stdout); diff --git a/plugins-bundled/.gitignore b/plugins-bundled/.gitignore index f6b56a2cb7c..c1bdb1e0c92 100644 --- a/plugins-bundled/.gitignore +++ b/plugins-bundled/.gitignore @@ -4,3 +4,6 @@ coverage # Ignore external git configs external + +# this file is added automatically +.prettierrc.js \ No newline at end of file diff --git a/plugins-bundled/internal/input-datasource/README.md b/plugins-bundled/internal/input-datasource/README.md index 08f3d5c02be..35c06814afb 100644 --- a/plugins-bundled/internal/input-datasource/README.md +++ b/plugins-bundled/internal/input-datasource/README.md @@ -1,3 +1,3 @@ -# Direct Input Data Source - Native Plugin +# Direct Input Data Source - Bundled Plugin This data source lets you define results directly in CSV. The values are stored either in a shared data source, or directly in panels. diff --git a/plugins-bundled/internal/input-datasource/jest.config.js b/plugins-bundled/internal/input-datasource/jest.config.js new file mode 100644 index 00000000000..bcf17c9087d --- /dev/null +++ b/plugins-bundled/internal/input-datasource/jest.config.js @@ -0,0 +1,8 @@ +// This file is needed because it is used by vscode and other tools that +// call `jest` directly. However, unless you are doing anything special +// do not edit this file + +const standard = require('@grafana/toolkit/src/config/jest.plugin.config'); + +// This process will use the same config that `yarn test` is using +module.exports = standard.jestConfig(); diff --git a/plugins-bundled/internal/input-datasource/package.json b/plugins-bundled/internal/input-datasource/package.json index 3083b6003ee..8e42a3a1aa3 100644 --- a/plugins-bundled/internal/input-datasource/package.json +++ b/plugins-bundled/internal/input-datasource/package.json @@ -1,6 +1,6 @@ { "name": "@grafana-plugins/input-datasource", - "version": "6.6.0-pre", + "version": "7.0.0-pre.0", "description": "Input Datasource", "private": true, "repository": { diff --git a/plugins-bundled/internal/input-datasource/tsconfig.json b/plugins-bundled/internal/input-datasource/tsconfig.json index 1a8b6a087a4..cd034409c3c 100644 --- a/plugins-bundled/internal/input-datasource/tsconfig.json +++ b/plugins-bundled/internal/input-datasource/tsconfig.json @@ -4,6 +4,6 @@ "compilerOptions": { "rootDir": "./src", "baseUrl": "./src", - "typeRoots": ["./node_modules/@types"] + "typeRoots": ["./node_modules/@types", "../../../node_modules/@types"] } }