74233 Commits

Author SHA1 Message Date
Johan Persson a169d7f6e9 fix(cli): add helpful error message for missing jest dependency
Since jest is now a peer dependencies, users must add it as a
devDependency themselves. This commit adds early detection and
a helpful error message when jest is missing, directing users
to the migration guide.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2025-12-11 18:07:01 +01:00
Johan Persson 900053a576 fix(catalog): fix flaky context menu test race condition
The "should render an onClick based context menu item" test was
failing intermittently due to a race condition where the test
would interact with the menu before the entity route parameters
were fully resolved.

Fix by adding explicit waits:
- Wait for entity to load before clicking the menu button
- Wait for menu to open before asserting on menu items

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2025-12-11 18:07:00 +01:00
Johan Persson e70ff47db3 chore: migrate three packages to MSW v2
Migrates test files in config-loader, events-node and kubernetes-react
packages from MSW 1.x to MSW 2.x API to fix compatibility issues with
Jest 30 and JSDOM v26.

Changes:
- Updated msw dependency from ^1.0.0 to ^2.0.0
- Changed imports from `rest` to `http` and `HttpResponse`
- Converted handler syntax from `res(ctx.*)` to `HttpResponse.*`
- Changed `toStrictEqual` to `toEqual` for response assertions

Affected packages:
- @backstage/config-loader
- @backstage/plugin-events-node
- @backstage/plugin-kubernetes-react

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2025-12-11 18:07:00 +01:00
Johan Persson cd0b8a11a3 chore: make jest a peer dependency with v29/v30 support
Move jest from dependencies to peer dependencies, allowing users to
choose between Jest 29 and Jest 30.

The CLI now detects the Jest version at runtime and uses the
appropriate environment:
- Jest 29: Uses standard jest-environment-jsdom
- Jest 30: Uses a custom environment based on @jest/environment-jsdom-abstract
  with fixes for Web API globals (fetch, streams, Error, etc.)

The cross-fetch polyfill is only injected for Jest 29, as with Jest 30+
our patched Jest environment is used. The network request blocker is made
MSW-compatible by checking if fetch was wrapped before blocking.

Jest 30 (with jsdom v27) fixes `Could not parse CSS stylesheet`
warnings/errors when testing components from @backstage/ui or other
packages using CSS `@layer` declarations.

New peer dependencies (install based on your Jest version):
- jest (required, ^29 or ^30)
- Jest 29 requires: jest-environment-jsdom
- Jest 30 requires: @jest/environment-jsdom-abstract, jsdom

Production code changes for jsdom 27 testability:
- AppIdentityProxy: extract navigateToUrl method for spying
- LiveReloadAddon: export utils.reloadPage for spying
- collect.ts: export internal.resolvePackagePath for mocking

MockFetchApi: evaluate global.fetch at call time instead of construction
time, allowing MSW to patch fetch after MockFetchApi is constructed.

Test adaptations for jsdom 27:
- Use RGB values instead of named colors in CSS assertions
- Update error format expectations (hyphenated type names, SyntaxError
  instead of FetchError for JSON parse errors)
- Simplify URL error assertions for cross-version compatibility
- Fix accessible name whitespace handling for external links
- Use history.replaceState for location mocking (non-configurable)
- Use fireEvent.blur for contentEditable elements
- Move async assertions inside waitFor for race conditions
- Remove Blob.prototype.text polyfill (now native)
- Remove test case using credentials in plugin:// URLs

Test adaptations for Jest 30:
- Replace `expect.objectContaining([...])` with direct array equality
- Replace `expect.objectContaining({ length: N })` with
  `expect.any(Array)` + separate `toHaveLength()` assertions
- Use child process for native Node.js module resolution in
  collect.test.ts to work around Jest 30's resolver behavior
- Update snapshot headers for new Jest format

Also removes the jest-haste-map patch which is no longer needed.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2025-12-11 18:06:55 +01:00
Benjamin Janssens dab3d3f642 chore: add changesets
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-11 17:06:23 +01:00
Benjamin Janssens ef1596f49a docs: add documentation
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-11 16:59:36 +01:00
Ben Lambert 6dd4fdfae0 Merge pull request #32102 from backstage/copilot/commit-changeset-result
Exit prerelease mode
2025-12-11 14:55:21 +01:00
Benjamin Janssens 2cb930fe8e chore: update api reports
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-11 14:53:50 +01:00
Benjamin Janssens 2a8a10a87f feat: use translations for RepoOwnerPicker title and description fallback
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-11 14:48:40 +01:00
copilot-swe-agent[bot] 2576e92f29 Exit prerelease mode
Co-authored-by: benjdlambert <3645856+benjdlambert@users.noreply.github.com>
2025-12-11 10:30:59 +00:00
Patrik Oldsberg 0197b44433 Merge pull request #32101 from backstage/rugvip/in
docs: +in
2025-12-11 11:28:57 +01:00
copilot-swe-agent[bot] 93740f4fed Initial plan 2025-12-11 10:25:54 +00:00
Ben Lambert b22618c336 Merge pull request #32099 from backstage/blam/support-public-kety
`integrations`: Add flag for using an app for `publicAccess`
2025-12-11 11:04:13 +01:00
Patrik Oldsberg 8cab6b0b7e docs: +in
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-12-11 11:02:33 +01:00
benjdlambert 45146fbbc7 chore: fix api reports
Signed-off-by: benjdlambert <ben@blam.sh>
2025-12-11 10:47:44 +01:00
Jonas Beck 9fa23b3ea1 feat(events): add backwards compatability to kafkaConsumingEventPublisher config
Signed-off-by: Jonas Beck <dev@jonasbeck.dk>
2025-12-11 10:39:47 +01:00
benjdlambert a26a3229bc chore: add changeset
Signed-off-by: benjdlambert <ben@blam.sh>
2025-12-11 09:39:49 +01:00
benjdlambert f2b7585824 feat: support marking a github app as a public token generator
Signed-off-by: benjdlambert <ben@blam.sh>
2025-12-11 09:33:46 +01:00
Patrik Oldsberg ce948cdf25 Merge pull request #32096 from backstage/rugvip/es2022
cli: move back to ES2022 in tsconfig
2025-12-10 23:40:23 +01:00
Andre Wanlin 6c53ccc136 Merge pull request #31655 from williamwu-mongodb/feature/add-scheduled-tasks-devtools-plugin
feat: add scheduled tasks UI to devtools plugin
2025-12-10 16:26:54 -06:00
Jessica He b3286d57cb feat(catalog): add github user ID in user entity
Signed-off-by: Jessica He <jhe@redhat.com>
2025-12-10 16:14:43 -05:00
Patrik Oldsberg c07af9f966 cli: move back to ES2022 in tsconfig
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-12-10 20:46:08 +01:00
aramissennyeydd 51a4cd3b76 fix type error
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
2025-12-10 13:58:45 -05:00
Dominik Bargowski b35f8b2ac8 fix(auth): fix edge case related to new chunked oauth token cookie having less chunks than previous one and refactor for readability
Signed-off-by: Dominik Bargowski <dominik.bargowski@gmail.com>
2025-12-10 19:58:31 +01:00
Sandor Karpf 8cf6944d82 test: update snapshot tests
Signed-off-by: Sandor Karpf <sandor.karpf@lastpass.com>
2025-12-10 18:09:07 +01:00
Sandor Karpf d1b73d41d2 fix: $contains may have only string value additionally in an entity filter.
Signed-off-by: Sandor Karpf <sandor.karpf@lastpass.com>
2025-12-10 18:08:34 +01:00
Kai Dubauskas c03ea7e6e8 address comments
Signed-off-by: Kai Dubauskas <kai.dubauskas@doordash.com>
2025-12-10 12:07:03 -05:00
Benjamin Janssens 6c5a34ebf8 feat: add RepoOwnerPicker
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-12-10 17:10:12 +01:00
Sandor Karpf c51c901779 fix: Typescript type and Zod parser were not the same.
Signed-off-by: Sandor Karpf <sandor.karpf@lastpass.com>
2025-12-10 16:46:46 +01:00
benjdlambert cf7506ab84 chore: refactor slightly to bring into similar patterns to the scaffolder action.
Signed-off-by: benjdlambert <ben@blam.sh>
2025-12-10 10:45:07 +01:00
renovate[bot] 7fd171ee38 chore(deps): update jamesives/github-pages-deploy-action action to v4.7.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-10 00:20:51 +00:00
backstage-goalie[bot] 08d56dd72d Merge pull request #32085 from backstage/renovate/eslint-rspack-plugin-4.x-lockfile
chore(deps): update dependency eslint-rspack-plugin to v4.3.0
2025-12-10 00:11:37 +00:00
aramissennyeydd d78945eff9 fix test errors by adding to repo test as well
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
2025-12-09 17:52:18 -05:00
williamwu-mongodb c692fbf5e3 Update plugins/devtools-common/src/permissions.ts
Co-authored-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
Signed-off-by: williamwu-mongodb <william.t.wu@mongodb.com>
2025-12-09 12:54:41 -08:00
williamwu-mongodb bf97a69ad0 Update plugins/devtools-common/src/permissions.ts
Co-authored-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
Signed-off-by: williamwu-mongodb <william.t.wu@mongodb.com>
2025-12-09 12:54:32 -08:00
williamwu-mongodb 02b0071484 Update plugins/devtools-common/src/permissions.ts
Co-authored-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
Signed-off-by: williamwu-mongodb <william.t.wu@mongodb.com>
2025-12-09 12:54:21 -08:00
williamwu-mongodb d76c326143 repo fix
Signed-off-by: williamwu-mongodb <william.t.wu@mongodb.com>
2025-12-09 12:45:44 -08:00
williamwu-mongodb c89d74b763 address feedback
Signed-off-by: williamwu-mongodb <william.t.wu@mongodb.com>
2025-12-09 12:07:00 -08:00
williamwu-mongodb ef961b2299 Update .changeset/short-lizards-find.md
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: williamwu-mongodb <william.t.wu@mongodb.com>
2025-12-09 11:15:02 -08:00
williamwu-mongodb 6a552b389a Update plugins/devtools/config.d.ts
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: williamwu-mongodb <william.t.wu@mongodb.com>
2025-12-09 11:14:52 -08:00
milliehartnt123 04ae2de1d2 Fix prettier errors
Signed-off-by: milliehartnt123 <108491788+milliehartnt123@users.noreply.github.com>
2025-12-09 09:02:26 -07:00
Fredrik Adelöw 61b8f93105 Merge pull request #31947 from backstage/changeset-release/master
Version Packages (next)
2025-12-09 17:01:46 +01:00
Vincenzo Scamporlino bd096c93b1 techdocs: use ScmIntegrations instead of using raw config
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-12-09 16:27:29 +01:00
milliehartnt123 3725128021 Moved search-catalog entry and added unregister-delete-component
Signed-off-by: milliehartnt123 <108491788+milliehartnt123@users.noreply.github.com>
2025-12-09 08:11:00 -07:00
milliehartnt123 e31d6436e4 Moved the location of Searching the Catalog
Signed-off-by: milliehartnt123 <108491788+milliehartnt123@users.noreply.github.com>
2025-12-09 08:07:00 -07:00
github-actions[bot] e08f48a9b5 Version Packages (next) 2025-12-09 15:00:09 +00:00
Fredrik Adelöw 081b310d26 Merge pull request #31940 from backstage/renovate/npm-modelcontextprotocol-sdk-vulnerability
chore(deps): update dependency @modelcontextprotocol/sdk to v1.24.0 [security]
2025-12-09 15:53:49 +01:00
milliehartnt123 8a6e310aa9 Update landing page with new Catalog and Component links
Added in all of the new catalog and managing component links. Separated them into to new bulleted categories.

Signed-off-by: milliehartnt123 <108491788+milliehartnt123@users.noreply.github.com>
2025-12-09 07:50:02 -07:00
secustor 9abc06d335 fix:linting issue
Signed-off-by: secustor <sebastian@poxhofer.at>
2025-12-09 15:36:51 +01:00
Thomas Cardonne 0afb8a63ec fix(techdocs): correct colors calculation
Signed-off-by: Thomas Cardonne <thomas.cardonne@adevinta.com>
2025-12-09 15:26:40 +01:00