Skip to content
This repository was archived by the owner on Jul 23, 2026. It is now read-only.

Chore: package manager migration from yarn to npm - #278

Draft
yesoreyeram wants to merge 1 commit into
mainfrom
chore/yarn-to-npm-migration
Draft

Chore: package manager migration from yarn to npm#278
yesoreyeram wants to merge 1 commit into
mainfrom
chore/yarn-to-npm-migration

Conversation

@yesoreyeram

Copy link
Copy Markdown
Contributor

What

Migrates this repo's package manager from Yarn Berry (yarn@4.17.1) to npm (npm@11.18.0), part of a fleet-wide yarn → npm migration across grafana-org datasource plugin repos.

Changes

  • Removed yarn.lock, .yarnrc.yml, .yarn/releases/
  • package.json: packageManagernpm@11.18.0, engines.npm added, script fixes for yarn-specific invocations (dev, build)
  • Added .npmrc (fleet-standard template)
  • Regenerated package-lock.json via npm install
  • Removed now-dead yarn references in .gitignore
  • Rewrote CONTRIBUTING.md's local-linking instructions from yarn link/version-branching to npm link (same fix as grafana-aws-sdk-react)

resolutionsoverrides

  • immutable: simple flat rename, no version change.
  • protobufjs@^7.3.0 / protobufjs@^8.0.1 (the two range-qualified entries) were dropped — confirmed via npm ls protobufjs that nothing in the current dependency tree depends on protobufjs at all. This looks like a defensive/proactive pin for a package with no active consumer right now. npm's overrides require nesting under an actual consumer, which doesn't exist here, so this couldn't be faithfully replicated — flagging transparently rather than guessing at a stand-in. Happy to re-add if this comes back as an active transitive dependency later.

Four targeted overrides added

Same peer-conflict patterns seen elsewhere in this migration, fixed with the $package reference syntax (no legacy-peer-deps, no dependency versions bumped):

  • eslint@10.3.0 is newer than eslint-plugin-react/eslint-plugin-react-hooks/eslint-plugin-jsdoc's declared peer ranges.
  • @testing-library/react-hooks@8.0.1's react/react-dom/@types/react peers only cover React 16/17.

Verification (local)

  • npm install — clean, no ERESOLVE errors
  • npm run build (typecheck + rollup bundle) — passes
  • npm run lint — passes
  • npm run test:ci — passes (3/3 suites, 12/12 tests)

Scope note

Part of a batched, wave-based migration. CI workflow files intentionally untouched.

- Remove yarn.lock, .yarnrc.yml, .yarn/releases
- package.json: packageManager -> npm@11.18.0, script fixes for
  yarn-specific invocations (dev, build)
- Convert resolutions -> overrides:
    - immutable: simple flat rename, no version change
    - protobufjs@^7.3.0 / protobufjs@^8.0.1 range-qualified entries
      DROPPED - confirmed via 'npm ls protobufjs' that nothing in the
      current dependency tree actually depends on protobufjs at all
      (this was a defensive/proactive pin for a package with no
      active consumer; npm's overrides require nesting under an
      actual consumer, which doesn't exist here, so this can't be
      faithfully replicated - flagging transparently rather than
      guessing at a stand-in)
- Add 4 targeted overrides: eslint@10.3.0 is newer than several
  plugins' declared peer ranges (same pattern across this
  migration), and @testing-library/react-hooks@8.0.1's peers only
  cover React 16/17. Uses $package override reference syntax.
- Add .npmrc (fleet-standard template)
- Regenerate package-lock.json via npm install (clean, no ERESOLVE,
  no legacy-peer-deps needed)
- Remove now-dead yarn references in .gitignore
- Rewrite CONTRIBUTING.md local-linking instructions from yarn link/
  version-branching to npm link (same fix as grafana-aws-sdk-react)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant