diff --git a/.config/.cprc.json b/.config/.cprc.json index 12b4f12..fb53be3 100644 --- a/.config/.cprc.json +++ b/.config/.cprc.json @@ -1,3 +1,3 @@ { - "version": "4.10.1" + "version": "4.12.0" } diff --git a/.config/Dockerfile b/.config/Dockerfile index f06da29..c6cbd61 100644 --- a/.config/Dockerfile +++ b/.config/Dockerfile @@ -3,7 +3,7 @@ ARG grafana_image=grafana-enterprise FROM grafana/${grafana_image}:${grafana_version} -ARG development=true +ARG development=false ENV DEV "${development}" diff --git a/.config/webpack/webpack.config.ts b/.config/webpack/webpack.config.ts index 5912d81..bb2a24c 100644 --- a/.config/webpack/webpack.config.ts +++ b/.config/webpack/webpack.config.ts @@ -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'; @@ -72,6 +71,11 @@ const config = async (env): Promise => { }, ], + // Support WebAssembly according to latest spec - makes WebAssembly module async + experiments: { + asyncWebAssembly: true, + }, + mode: env.production ? 'production' : 'development', module: { @@ -83,7 +87,7 @@ const config = async (env): Promise => { loader: 'swc-loader', options: { jsc: { - baseUrl: path.resolve(__dirname, 'src'), + baseUrl: path.resolve(process.cwd(), SOURCE_DIR), target: 'es2015', loose: false, parser: { @@ -141,7 +145,6 @@ const config = async (env): Promise => { }, plugins: [ - new GrafanaPluginMetaExtractor(), new CopyWebpackPlugin({ patterns: [ // If src/README.md exists use it; otherwise the root README @@ -151,14 +154,13 @@ const config = async (env): Promise => { { from: '../LICENSE', to: '.' }, { from: '../CHANGELOG.md', to: '.', force: true }, { from: '**/*.json', to: '.' }, // TODO - // { 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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6308d21..bd1e65d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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' @@ -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 @@ -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 diff --git a/docker-compose.yaml b/docker-compose.yaml index 3c11eb9..43092df 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,5 +1,3 @@ -version: '3.0' - services: grafana: user: root @@ -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: diff --git a/package.json b/package.json index d8d85f7..7d1ea5f 100644 --- a/package.json +++ b/package.json @@ -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", @@ -73,5 +72,5 @@ "react-dom": "18.2.0", "tslib": "2.5.3" }, - "packageManager": "npm@10.5.0" + "packageManager": "npm@10.8.1" } \ No newline at end of file