Commit Graph

6304 Commits

Author SHA1 Message Date
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
Patrik Oldsberg 8cab6b0b7e docs: +in
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-12-11 11:02:33 +01:00
github-actions[bot] e08f48a9b5 Version Packages (next) 2025-12-09 15:00:09 +00:00
Fredrik Adelöw 2bae83ab2e Version Policy Update - Node 22 to 24
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-12-08 10:53:38 +01:00
Andre Wanlin be6b8aa2af docs - New Frontend System - Add missing --next flag (#32041)
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-12-05 20:42:16 -05:00
Fredrik Adelöw fb0c633893 Merge pull request #31644 from endersonmenezes/patch-2
typo: change permissionPolicyExtension to permissionsPolicyExtension
2025-12-05 16:42:27 +01:00
github-actions[bot] 336db00d21 Version Packages (next) 2025-12-02 15:37:41 +00:00
Ben Lambert a2aa507cbe Merge pull request #31357 from VDVsx/excludeSuspendUsers-GHEnterprise
Exclude suspend users gh enterprise
2025-12-02 11:31:16 +01:00
Peter Macdonald a60afced3e Merge pull request #30850 from Ayushmore1214/fix-cncf-logo
Fix CNCF logo visibility for light/dark modes
2025-11-28 13:27:52 +01:00
github-actions[bot] 756986e5e7 Version Packages (next) 2025-11-25 16:21:32 +00:00
Ben Lambert 41f5876e75 Merge pull request #30974 from angeliski/add-default-enviroment
feat(scaffolder-backend): add defaultEnvironment config to scaffolder
2025-11-25 10:26:51 +01:00
Patrik Oldsberg 11ae484a05 Merge pull request #31820 from backstage/rugvip/backend-start-result
backend-app-api: add backend startup result reporting
2025-11-24 16:55:47 +01:00
Patrik Oldsberg e5a1b33b0b docs/frontend-system: remove use of compatWrapper
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-23 13:04:53 +01:00
Patrik Oldsberg 64e521767d docs: update links to point to frontend-plugin-api
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-23 12:56:08 +01:00
Patrik Oldsberg fa6aa57345 docs/publishing: update with new patch release flow
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-21 13:54:11 +01:00
Valério Valério bad559c1f9 Move the suspended user logic to a transformer filter
Signed-off-by: Valério Valério <vdv100@gmail.com>
2025-11-19 19:46:58 +02:00
Valério Valério 35c23e5463 Update documentation to list the new option 'excludeSuspendedUsers'
Signed-off-by: Valério Valério <vdv100@gmail.com>
2025-11-19 19:36:02 +02:00
Patrik Oldsberg 36f98f12d8 backend-app-api: wrap returned result
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-18 20:40:18 +01:00
Patrik Oldsberg c3273dacd3 docs/backend-system: document backend startup result
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-18 20:40:17 +01:00
benjdlambert 7015891784 chgore: add release notes
Signed-off-by: benjdlambert <ben@blam.sh>
2025-11-18 16:41:35 +01:00
github-actions[bot] 792f4d7e3d Version Packages 2025-11-18 12:23:09 +00:00
Patrik Oldsberg f2bb8c6129 Merge pull request #31804 from backstage/rugvip/compat-route-refs
core-plugin-api: add forwards compatibility for route refs
2025-11-18 11:22:37 +01:00
Patrik Oldsberg 83439b1539 core-plugin-api: add forwards compatibility for route refs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-18 10:26:20 +01:00
Andre Wanlin fa255f530a Bitbucket Cloud - API Token Support
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-11-17 12:49:43 -06:00
Ayush More a907203f7e style: format docs with prettier
Signed-off-by: Ayush More <ayushmore42595@gmail.com>
2025-11-17 06:03:42 +00:00
Rogerio Angeliski 42ea7c2707 Merge branch 'master' into add-default-enviroment 2025-11-13 09:00:13 -03:00
Fredrik Adelöw 35f3bbb4be Fix all current docs quality script warnings
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-11-13 12:04:59 +01:00
Ayush More f8957240e7 Remove CNCF logo from what-is-backstage.md
Removed the CNCF logo image from the Backstage overview document.

Signed-off-by: Ayush More <ayushmore42595@gmail.com>
2025-11-12 22:30:34 +05:30
github-actions[bot] 20fae88bdf Version Packages (next) 2025-11-11 21:45:56 +00:00
Patrik Oldsberg dbd44317f6 Merge pull request #31699 from backstage/rugvip/attach-ts
frontend-plugin-api: add support for attachment point references
2025-11-11 16:13:53 -05:00
Patrik Oldsberg 717ce6dc83 Merge pull request #31515 from backstage/rugvip/relative
frontend-plugin-api: add support for relative attachments
2025-11-11 16:10:50 -05:00
Ayush More 5c2b9a3653 fix: correct image path and format custom.css
Signed-off-by: Ayush More <ayushmore42595@gmail.com>
2025-11-11 16:08:23 +00:00
Fredrik Adelöw df3d308d00 Merge pull request #31316 from henrikedegrd/allow-opt-in-strategy-for-notifications
feat(notifications): Allow for a opt-in strategy for notifications rather than opt-out.
2025-11-11 16:43:02 +01:00
Patrik Oldsberg c6b9f50337 frontend-plugin-api: type safe attachTo references
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-11 09:41:23 -05:00
Ayush More d8ba100ea6 fix
Signed-off-by: Ayush More <ayushmore42595@gmail.com>
2025-11-10 05:39:49 +00:00
Patrik Oldsberg 8b84f39946 frontend-plugin-api: runtime attachTo by reference
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-08 19:01:10 +01:00
Patrik Oldsberg 7c6a66dd9f frontend-plugin-api: add support for relative attachments
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-11-08 11:26:08 +01:00
Ayush More be76b403d8 Json fixxxxx
Signed-off-by: Ayush More <ayushmore42595@gmail.com>
2025-11-07 10:16:50 +00:00
Ayush More f0c4ad7292 Update backend plugin tutorial to refer to /todos endpoint instead of /health
This PR updates the backend plugin tutorial documentation to match the current plugin template.
Previously, the tutorial referenced a /health endpoint, which does not exist in the generated backend plugin.

Signed-off-by: Ayush More <ayushmore42595@gmail.com>
2025-11-07 09:18:24 +00:00
Enderson Menezes (Mr. Enderson) e838d00018 typo: change permissionPolicyExtension to permissionsPolicyExtension
There is a small spelling error that could prevent someone from following the tutorial literally.

Signed-off-by: Enderson Menezes (Mr. Enderson) <endersonster@gmail.com>
2025-11-05 11:52:38 -03:00
github-actions[bot] 3738293d26 Version Packages (next) 2025-11-04 15:00:26 +00:00
Fredrik Adelöw 037536c627 Merge pull request #31474 from abhishekbvs/feat/github-plugin-api-page-sizes
feat: add configurable GitHub API page sizes
2025-11-04 15:22:17 +01:00
Henrik Edegård 87e597c406 Allows for a opt-in strategy for notifications rather than opt-out.
Signed-off-by: Henrik Edegård <henrik.edegard@fortnox.se>
2025-11-04 12:45:19 +00:00
Patrik Oldsberg 3835287df2 Merge pull request #31053 from backstage/sennyeya/instance-metadata-update
feat: promote instance metadata
2025-11-04 13:11:40 +01:00
aramissennyeydd e743d11fad update docs to use root
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
2025-10-30 08:54:29 -04:00
Andre Wanlin 04eadfcc7a Merge pull request #31386 from chriskilding-relx/improve-oidc-from-scratch-docs
Improve 'OIDC From Scratch' documentation
2025-10-29 10:43:17 -05:00
github-actions[bot] 2c1fe37d3b Version Packages (next) 2025-10-24 13:22:48 +00:00
abhishekbvs 999d1c1747 Update docs and code based on review comments
Signed-off-by: abhishekbvs <bvsabhishek@gmail.com>
2025-10-24 00:46:45 +05:30
Aramis Sennyey 9f298e81ee docs: start creating a golden path (#30925)
* docs: starting to fill out the plugin golden path

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* another bit of work

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* create-app docs

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* Apply suggestions from code review

Co-authored-by: Peter Macdonald <peterm4c@pm.me>
Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>

* address PR feedback

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* update to rspack

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* fix lint errors

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

* add flag for golden paths

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>

---------

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
Co-authored-by: Peter Macdonald <peterm4c@pm.me>
2025-10-22 12:02:43 -04:00
Fredrik Adelöw 2a49760606 Merge pull request #31486 from itsrishub/patch-2
Fix grammar in GitHub webhook setup instructions
2025-10-22 16:40:37 +02:00