Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Bump @grafana/create-plugin configuration to 5.18.3 #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/.cprc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "5.14.0"
"version": "5.18.3"
}
3 changes: 2 additions & 1 deletion .config/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG grafana_version=latest
ARG grafana_image=grafana-enterprise

FROM grafana/grafana:${grafana_version}
FROM grafana/${grafana_image}:${grafana_version}

ARG anonymous_auth_enabled=true
ARG development=false
Expand Down
5 changes: 3 additions & 2 deletions .config/docker-compose-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ services:
build:
context: .
args:
grafana_version: ${GRAFANA_VERSION:-9.2.5}
grafana_image: ${GRAFANA_IMAGE:-grafana-enterprise}
grafana_version: ${GRAFANA_VERSION:-11.5.2}
development: ${DEVELOPMENT:-false}
anonymous_auth_enabled: ${ANONYMOUS_AUTH_ENABLED:-true}
ports:
- 3001:3000/tcp
- 3000:3000/tcp
volumes:
- ../dist:/var/lib/grafana/plugins/target-dashboardtabs-panel
- ../provisioning:/etc/grafana/provisioning
Expand Down
70 changes: 34 additions & 36 deletions .config/webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import path from 'path';
import ReplaceInFileWebpackPlugin from 'replace-in-file-webpack-plugin';
import TerserPlugin from 'terser-webpack-plugin';
import {SubresourceIntegrityPlugin} from 'webpack-subresource-integrity';
import {type Configuration, BannerPlugin} from 'webpack';
import { SubresourceIntegrityPlugin } from 'webpack-subresource-integrity';
import { type Configuration, BannerPlugin } from 'webpack';
import LiveReloadPlugin from 'webpack-livereload-plugin';
import VirtualModulesPlugin from 'webpack-virtual-modules';

import {BuildModeWebpackPlugin} from './BuildModeWebpackPlugin';
import {DIST_DIR, SOURCE_DIR} from './constants';
import {getCPConfigVersion, getEntries, getPackageJson, getPluginJson, hasReadme, isWSL} from './utils';
import {type} from "node:os";
import { BuildModeWebpackPlugin } from './BuildModeWebpackPlugin';
import { DIST_DIR, SOURCE_DIR } from './constants';
import { getCPConfigVersion, getEntries, getPackageJson, getPluginJson, hasReadme, isWSL } from './utils';

const pluginJson = getPluginJson();
const cpVersion = getCPConfigVersion();
Expand Down Expand Up @@ -52,7 +51,7 @@ const config = async (env): Promise<Configuration> => {

externals: [
// Required for dynamic publicPath resolution
{'amd-module': 'module'},
{ 'amd-module': 'module' },
'lodash',
'jquery',
'moment',
Expand All @@ -77,7 +76,7 @@ const config = async (env): Promise<Configuration> => {
'@grafana/data',

// Mark legacy SDK imports as external if their name starts with the "grafana/" prefix
({request}, callback) => {
({ request }, callback) => {
const prefix = 'grafana/';
const hasPrefix = (request) => request.indexOf(prefix) === 0;
const stripPrefix = (request) => request.substr(prefix.length);
Expand Down Expand Up @@ -160,15 +159,14 @@ const config = async (env): Promise<Configuration> => {
minimize: Boolean(env.production),
minimizer: [
new TerserPlugin({
minify: undefined,
terserOptions: {
format: {
comments: (_, {type, value}) => type === 'comment2' && value.trim().startsWith('[create-plugin]'),
comments: (_, { type, value }) => type === 'comment2' && value.trim().startsWith('[create-plugin]'),
},
compress: {
drop_console: ['log', 'info'],
},
}
},
}),
],
},
Expand Down Expand Up @@ -201,18 +199,18 @@ const config = async (env): Promise<Configuration> => {
patterns: [
// If src/README.md exists use it; otherwise the root README
// To `compiler.options.output`
{from: hasReadme() ? 'README.md' : '../README.md', to: '.', force: true},
{from: 'plugin.json', to: '.'},
{from: '../LICENSE', to: '.'},
{from: '../CHANGELOG.md', to: '.', force: true},
{from: '**/*.json', to: '.'},
{from: '**/*.svg', to: '.', noErrorOnMissing: true},
{from: '**/*.png', to: '.', noErrorOnMissing: true},
{from: '**/*.html', to: '.', noErrorOnMissing: true},
{from: 'img/**/*', to: '.', noErrorOnMissing: true},
{from: 'libs/**/*', to: '.', noErrorOnMissing: true},
{from: 'static/**/*', to: '.', noErrorOnMissing: true},
{from: '**/query_help.md', to: '.', noErrorOnMissing: true},
{ from: hasReadme() ? 'README.md' : '../README.md', to: '.', force: true },
{ from: 'plugin.json', to: '.' },
{ from: '../LICENSE', to: '.' },
{ from: '../CHANGELOG.md', to: '.', force: true },
{ from: '**/*.json', to: '.' },
{ from: '**/*.svg', to: '.', noErrorOnMissing: true },
{ from: '**/*.png', to: '.', noErrorOnMissing: true },
{ from: '**/*.html', to: '.', noErrorOnMissing: true },
{ from: 'img/**/*', to: '.', noErrorOnMissing: true },
{ from: 'libs/**/*', to: '.', noErrorOnMissing: true },
{ from: 'static/**/*', to: '.', noErrorOnMissing: true },
{ from: '**/query_help.md', to: '.', noErrorOnMissing: true },
],
}),
// Replace certain template-variables in the README and plugin.json
Expand Down Expand Up @@ -241,19 +239,19 @@ const config = async (env): Promise<Configuration> => {
}),
...(env.development
? [
new LiveReloadPlugin(),
new ForkTsCheckerWebpackPlugin({
async: Boolean(env.development),
issue: {
include: [{file: '**/*.{ts,tsx}'}],
},
typescript: {configFile: path.join(process.cwd(), 'tsconfig.json')},
}),
new ESLintPlugin({
extensions: ['.ts', '.tsx'],
lintDirtyModulesOnly: Boolean(env.development), // don't lint on start, only lint changed files
}),
]
new LiveReloadPlugin(),
new ForkTsCheckerWebpackPlugin({
async: Boolean(env.development),
issue: {
include: [{ file: '**/*.{ts,tsx}' }],
},
typescript: { configFile: path.join(process.cwd(), 'tsconfig.json') },
}),
new ESLintPlugin({
extensions: ['.ts', '.tsx'],
lintDirtyModulesOnly: Boolean(env.development), // don't lint on start, only lint changed files
}),
]
: []),
],

Expand Down
Loading