Skip to content

Commit

Permalink
Update create-plugin to 4.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
6nv committed Jun 21, 2024
1 parent dc7daa6 commit 9b734b9
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .config/.cprc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "4.10.1"
"version": "4.12.0"
}
2 changes: 1 addition & 1 deletion .config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG grafana_image=grafana-enterprise

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

ARG development=true
ARG development=false


ENV DEV "${development}"
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,7 +12,6 @@ import LiveReloadPlugin from 'webpack-livereload-plugin';
import path from 'path';
import ReplaceInFileWebpackPlugin from 'replace-in-file-webpack-plugin';
import { Configuration } from 'webpack';
import { GrafanaPluginMetaExtractor } from '@grafana/plugin-meta-extractor';

import { getPackageJson, getPluginJson, hasReadme, getEntries, isWSL } from './utils';
import { SOURCE_DIR, DIST_DIR } from './constants';
Expand Down Expand Up @@ -72,6 +71,11 @@ const config = async (env): Promise<Configuration> => {
},
],

// Support WebAssembly according to latest spec - makes WebAssembly module async
experiments: {
asyncWebAssembly: true,
},

mode: env.production ? 'production' : 'development',

module: {
Expand All @@ -83,7 +87,7 @@ const config = async (env): Promise<Configuration> => {
loader: 'swc-loader',
options: {
jsc: {
baseUrl: path.resolve(__dirname, 'src'),
baseUrl: path.resolve(process.cwd(), SOURCE_DIR),
target: 'es2015',
loose: false,
parser: {
Expand Down Expand Up @@ -141,7 +145,6 @@ const config = async (env): Promise<Configuration> => {
},

plugins: [
new GrafanaPluginMetaExtractor(),
new CopyWebpackPlugin({
patterns: [
// If src/README.md exists use it; otherwise the root README
Expand All @@ -151,14 +154,13 @@ const config = async (env): Promise<Configuration> => {
{ from: '../LICENSE', to: '.' },
{ from: '../CHANGELOG.md', to: '.', force: true },
{ from: '**/*.json', to: '.' }, // TODO<Add an error for checking the basic structure of the repo>
// { from: '**/*.svg', to: '.', noErrorOnMissing: true }, // Optional
{ from: '**/*.svg', to: '.', noErrorOnMissing: true }, // Optional
{ from: '**/*.png', to: '.', noErrorOnMissing: true }, // Optional
{ from: '**/*.html', to: '.', noErrorOnMissing: true }, // Optional
// { from: 'img/**/*', to: '.', noErrorOnMissing: true }, // Optional
{ from: 'img/**/*', to: '.', noErrorOnMissing: true }, // Optional
{ from: 'libs/**/*', to: '.', noErrorOnMissing: true }, // Optional
{ from: 'static/**/*', to: '.', noErrorOnMissing: true }, // Optional
{ from: '**/query_help.md', to: '.', noErrorOnMissing: true }, // Optional
{ from: 'img/logo.svg', to: './img/', noErrorOnMissing: true }, // Copy logo
],
}),
// Replace certain template-variables in the README and plugin.json
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
provisioning
tests
.config

- name: Download plugin
if: needs.build.outputs.has-backend == 'true'
Expand Down Expand Up @@ -176,7 +171,7 @@ jobs:
interval: 500

- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
run: npm exec playwright install chromium --with-deps

- name: Run Playwright tests
id: run-tests
Expand All @@ -198,12 +193,12 @@ jobs:
path: grafana-server.log
retention-days: 5

# If your repository is public, uploading the Playwright report will make it public on the Internet.
# Beware not to expose sensitive information.
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: ${{ always() && steps.run-tests.outcome == 'failure' }}
with:
name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}}
path: playwright-report/
retention-days: 5
# Uncomment this step to upload the Playwright report to Github artifacts.
# If your repository is public, the report will be public on the Internet so beware not to expose sensitive information.
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# if: ${{ always() && steps.run-tests.outcome == 'failure' }}
# with:
# name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}}
# path: playwright-report/
# retention-days: 5
4 changes: 1 addition & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.0'

services:
grafana:
user: root
Expand All @@ -11,7 +9,7 @@ services:
args:
grafana_image: ${GRAFANA_IMAGE:-grafana-enterprise}
grafana_version: ${GRAFANA_VERSION:-10.3.3}
development: ${DEVELOPMENT:-true}
development: ${DEVELOPMENT:-false}
ports:
- 3000:3000/tcp
volumes:
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
"devDependencies": {
"@babel/core": "^7.21.4",
"@grafana/eslint-config": "^7.0.0",
"@grafana/plugin-e2e": "^1.0.1",
"@grafana/plugin-e2e": "1.2.0",
"@grafana/tsconfig": "^1.2.0-rc1",
"@grafana/plugin-meta-extractor": "^0.0.1",
"@playwright/test": "^1.41.2",
"@swc/core": "^1.3.90",
"@swc/helpers": "^0.5.0",
Expand Down Expand Up @@ -73,5 +72,5 @@
"react-dom": "18.2.0",
"tslib": "2.5.3"
},
"packageManager": "npm@10.5.0"
"packageManager": "npm@10.8.1"
}

0 comments on commit 9b734b9

Please sign in to comment.