Skip to content

Conversation

jackw
Copy link
Collaborator

@jackw jackw commented Oct 9, 2025

What this PR does / why we need it:

Changes to the npm packages structure has caused 404s in the eslint plugin download paths. This PR should address errors such as:

Please wait... downloading Grafana types information for version 11.6.0.
Failed to download @grafana/data: HTTP status 404

Oops! Something went wrong! :(

ESLint: 9.28.0

Error: Error while loading rule '@grafana/plugins/import-is-compatible': Failed to download types for @grafana/data@11.6.0: Command failed: node -e "const https = require('https'); https.get('https://cdn.jsdelivr.net/npm/@grafana/data@11.6.0/dist/index.d.ts', (res) => {
            let data = '';
            res.on('data', chunk => data += chunk);
            res.on('end', () => {
              if (res.statusCode === 200) {
                require('fs').writeFileSync('/var/folders/7f/1_46h_kj2d15rltqk2jzh81c0000gn/T/gf-eslint-plugin-compatible-11.6.0/node_modules/@grafana/data/index.d.ts', data);
                process.exit(0);
              }
              console.error('Failed to download @grafana/data: HTTP status ' + res.statusCode);
              process.exit(1);
            });
          }).on('error', (e) => {
            console.error('Failed to download @grafana/data: ' + e.message);
            process.exit(1);
          })"
Failed to download @grafana/data: HTTP status 404

It also fixes the issue where the packages declarations are split across multiple files (>=12.1.0) by using npm install instead of attempting to download a single d.ts file from the cdn.

Which issue(s) this PR fixes:

Fixes #2210

Special notes for your reviewer:

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @grafana/eslint-plugin-plugins@0.5.1-canary.2208.18380752954.0
npm install @grafana/plugin-e2e@2.2.2-canary.2208.18380752954.0
# or 
yarn add @grafana/eslint-plugin-plugins@0.5.1-canary.2208.18380752954.0
yarn add @grafana/plugin-e2e@2.2.2-canary.2208.18380752954.0

@jackw jackw self-assigned this Oct 9, 2025
@jackw jackw added the patch Increment the patch version when merged label Oct 9, 2025
@jackw jackw requested a review from a team as a code owner October 9, 2025 07:42
@jackw jackw added the release Create a release when this pr is merged label Oct 9, 2025
@jackw jackw requested a review from a team as a code owner October 9, 2025 07:42
@jackw jackw requested review from s4kh, toddtreece and wbrowne October 9, 2025 07:43
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged and will trigger a new patch release.
NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.

Copy link
Contributor

@hugohaggmark hugohaggmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉 but I left a comment that you might want to look at

@github-project-automation github-project-automation bot moved this from 📬 Triage to 🔬 In review in Plugins Platform / Grafana Community Oct 9, 2025
Copy link
Contributor

@sunker sunker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@jackw jackw force-pushed the jackw/fix-eslint-iscompatible branch from 706ed44 to 1ef4341 Compare October 9, 2025 15:31
Copy link
Collaborator

@leventebalogh leventebalogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Increment the patch version when merged release Create a release when this pr is merged

Projects

Status: 🔬 In review

Development

Successfully merging this pull request may close these issues.

Bug: Eslint plugin failed downloads

4 participants