Skip to content

[kibana-presentation] Remove node-fetch dependency in favor of native fetch#250718

Merged
afharo merged 1 commit intoelastic:mainfrom
afharo:remove-node-fetch/kibana-presentation
Jan 29, 2026
Merged

[kibana-presentation] Remove node-fetch dependency in favor of native fetch#250718
afharo merged 1 commit intoelastic:mainfrom
afharo:remove-node-fetch/kibana-presentation

Conversation

@afharo
Copy link
Copy Markdown
Member

@afharo afharo commented Jan 28, 2026

Summary

This PR removes the node-fetch dependency for files owned by @elastic/kibana-presentation.

Why

Node.js 18+ includes a native fetch API (built on undici internally), making the node-fetch package unnecessary. This reduces the dependency footprint by removing one runtime dependency and its transitive dependencies.

Changes

  • Updated Maps WMS client to use native fetch
  • Updated Maps glyphs to use native fetch
  • Updated all related test files to use jest.spyOn(global, 'fetch')

Warning

These changes were vibe-coded using the AI agent claude-4.5-opus-high. Please review carefully.

Test plan

  • Type check passes
  • ESLint passes
  • Unit tests pass for modified files

… fetch

## Changes
- Updated WMS client to use native fetch
- Updated glyphs to use native fetch
- Updated all related test files

> [!WARNING]
> These changes were vibe-coded using the AI agent `claude-4.5-opus-high`. Please review carefully.
@afharo afharo requested a review from a team as a code owner January 28, 2026 13:13
@afharo afharo added backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// labels Jan 28, 2026
@afharo afharo enabled auto-merge (squash) January 28, 2026 17:01
Copy link
Copy Markdown
Contributor

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

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

lgtm! code review and confirmed that wms layers and requests for ems fonts are being fetched correctly.

@afharo afharo merged commit 76d2492 into elastic:main Jan 29, 2026
24 checks passed
@afharo afharo deleted the remove-node-fetch/kibana-presentation branch January 29, 2026 15:04
hannahbrooks pushed a commit to hannahbrooks/kibana that referenced this pull request Jan 30, 2026
… fetch (elastic#250718)

## Summary

This PR removes the `node-fetch` dependency for files owned by
`@elastic/kibana-presentation`.

### Why

Node.js 18+ includes a native `fetch` API (built on undici internally),
making the `node-fetch` package unnecessary. This reduces the dependency
footprint by removing one runtime dependency and its transitive
dependencies.

### Changes
- Updated Maps WMS client to use native fetch
- Updated Maps glyphs to use native fetch
- Updated all related test files to use `jest.spyOn(global, 'fetch')`

> [!WARNING]
> These changes were vibe-coded using the AI agent
`claude-4.5-opus-high`. Please review carefully.

## Test plan
- [x] Type check passes
- [x] ESLint passes
- [ ] Unit tests pass for modified files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants