Skip to content
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.20.1"
"version": "5.25.1"
}
3 changes: 1 addition & 2 deletions .config/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
},
"overrides": [
{
"plugins": ["deprecation"],
"files": ["src/**/*.{ts,tsx}"],
"rules": {
"deprecation/deprecation": "warn"
"@typescript-eslint/no-deprecated": "warn"
},
"parserOptions": {
"project": "./tsconfig.json"
Expand Down
3 changes: 1 addition & 2 deletions .config/docker-compose-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
context: .
args:
grafana_image: ${GRAFANA_IMAGE:-grafana-enterprise}
grafana_version: ${GRAFANA_VERSION:-11.5.3}
grafana_version: ${GRAFANA_VERSION:-12.0.2}
development: ${DEVELOPMENT:-false}
anonymous_auth_enabled: ${ANONYMOUS_AUTH_ENABLED:-true}
ports:
Expand All @@ -23,4 +23,3 @@ services:
GF_LOG_LEVEL: debug
GF_DATAPROXY_LOGGING: 1
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS: blueswen-organization-panel
GF_AUTH_BASIC_ENABLED: true
2 changes: 1 addition & 1 deletion .config/webpack/BuildModeWebpackPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as webpack from 'webpack';
import webpack, { type Compiler } from 'webpack';

const PLUGIN_NAME = 'BuildModeWebpack';

Expand Down
15 changes: 10 additions & 5 deletions .config/webpack/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import process from 'process';
import os from 'os';
import path from 'path';
import { glob } from 'glob';
import { SOURCE_DIR } from './constants';
import { SOURCE_DIR } from './constants.ts';

export function isWSL() {
if (process.platform !== 'linux') {
Expand All @@ -21,17 +21,22 @@ export function isWSL() {
}
}

function loadJson(path: string) {
const rawJson = fs.readFileSync(path, 'utf8');
return JSON.parse(rawJson);
}

export function getPackageJson() {
return require(path.resolve(process.cwd(), 'package.json'));
return loadJson(path.resolve(process.cwd(), 'package.json'));
}

export function getPluginJson() {
return require(path.resolve(process.cwd(), `${SOURCE_DIR}/plugin.json`));
return loadJson(path.resolve(process.cwd(), `${SOURCE_DIR}/plugin.json`));
}

export function getCPConfigVersion() {
const cprcJson = path.resolve(__dirname, '../', '.cprc.json');
return fs.existsSync(cprcJson) ? require(cprcJson).version : { version: 'unknown' };
const cprcJson = path.resolve(process.cwd(), './.config', '.cprc.json');
return fs.existsSync(cprcJson) ? loadJson(cprcJson).version : { version: 'unknown' };
}

export function hasReadme() {
Expand Down
14 changes: 8 additions & 6 deletions .config/webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ 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 webpack, { type Configuration } 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 { BuildModeWebpackPlugin } from './BuildModeWebpackPlugin.ts';
import { DIST_DIR, SOURCE_DIR } from './constants.ts';
import { getCPConfigVersion, getEntries, getPackageJson, getPluginJson, hasReadme, isWSL } from './utils.ts';

const pluginJson = getPluginJson();
const cpVersion = getCPConfigVersion();
Expand All @@ -43,7 +43,8 @@ const config = async (env: Env): Promise<Configuration> => {
cache: {
type: 'filesystem',
buildDependencies: {
config: [__filename],
// __filename doesn't work in Node 24
config: [path.resolve(process.cwd(), '.config', 'webpack', 'webpack.config.ts')],
},
},

Expand Down Expand Up @@ -194,7 +195,7 @@ const config = async (env: Env): Promise<Configuration> => {
new BuildModeWebpackPlugin(),
virtualPublicPath,
// Insert create plugin version information into the bundle
new BannerPlugin({
new webpack.BannerPlugin({
banner: '/* [create-plugin] version: ' + cpVersion + ' */',
raw: true,
entryOnly: true,
Expand Down Expand Up @@ -254,6 +255,7 @@ const config = async (env: Env): Promise<Configuration> => {
new ESLintPlugin({
extensions: ['.ts', '.tsx'],
lintDirtyModulesOnly: Boolean(env.development), // don't lint on start, only lint changed files
failOnError: Boolean(env.production),
}),
]
: []),
Expand Down
3 changes: 2 additions & 1 deletion .cprc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"features": {
"bundleGrafanaUI": false,
"useReactRouterV6": false
"useReactRouterV6": false,
"useExperimentalRspack": false
}
}
Loading