Commit Graph

620 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
benjdlambert 45146fbbc7 chore: fix api reports
Signed-off-by: benjdlambert <ben@blam.sh>
2025-12-11 10:47:44 +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
github-actions[bot] e08f48a9b5 Version Packages (next) 2025-12-09 15:00:09 +00:00
Fredrik Adelöw fb029b67aa clean up types
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2025-12-03 12:26:22 +01:00
github-actions[bot] 756986e5e7 Version Packages (next) 2025-11-25 16:21:32 +00:00
Ben Lambert 4cd620f5cc Merge pull request #31754 from mrlunchbox777/fix-case-sensitive-github-url
fix: making the github urls case insensitive
2025-11-25 10:40:47 +01:00
github-actions[bot] 792f4d7e3d Version Packages 2025-11-18 12:23:09 +00:00
Andre Wanlin 70d394f307 Fixed more tests
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-11-17 15:52:29 -06:00
Andre Wanlin 9246b57e86 Fixed config logic
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-11-17 14:31:48 -06: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
Andrew Shoell e15fdae80f fix: making the github urls case insensitive
Signed-off-by: Andrew Shoell <mrlunchbox777@gmail.com>
2025-11-13 15:40:56 -05:00
github-actions[bot] 807af8ce0e Version Packages (next) 2025-10-21 16:14:43 +00:00
Patrik Oldsberg b436f73803 Merge pull request #31166 from schultzp2020/constructor-parameters
refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
2025-10-15 18:56:42 +02:00
github-actions[bot] d6ce2db9ca Version Packages 2025-10-14 15:29:54 +00:00
Paul Schultz 05f60e1e0a refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2025-10-14 08:29:21 -05:00
github-actions[bot] c2c60546d2 Version Packages (next) 2025-09-24 12:57:42 +00:00
github-actions[bot] c73bfa46d4 Version Packages (next) 2025-09-23 15:00:29 +00:00
vickstrom d772b516cd remove host from azure blog storage integration type
Signed-off-by: vickstrom <eric.vickstrom98@gmail.com>
2025-09-22 10:36:04 +02:00
Jonathan Roebuck be0a22d4f2 add visibility annotations
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
2025-09-19 09:27:31 +01:00
Jonathan Roebuck 84443f16bc Adds config definitions for Azure Blob Storage in integration and catalog provider
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
2025-09-18 13:46:31 +01:00
github-actions[bot] b799a2d07f Version Packages 2025-09-16 13:22:58 +00:00
Lee Standen 56897d717e Fixes issue with organization name case sensitivity when using allowedInstallationOwners
Signed-off-by: Lee Standen <lee.standen@ironcladhq.com>
2025-09-10 15:57:16 -07:00
github-actions[bot] ac48eeb3ba Version Packages (next) 2025-09-02 12:17:03 +00:00
Benjamin Janssens 03bdc68472 chore(catalog): add changesets; build api reports
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-08-14 15:43:35 +02:00
Benjamin Janssens 94e8ade615 Merge branch 'master' into catalog/github-app-discovery
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-08-14 14:27:40 +02:00
github-actions[bot] 9a7cae26c9 Version Packages 2025-07-15 14:26:41 +00:00
github-actions[bot] 952cefedd8 Version Packages (next) 2025-07-01 11:50:02 +00:00
github-actions[bot] f1e160615c Version Packages (next) 2025-06-24 12:20:36 +00:00
Ben Lambert 577c91f109 Merge pull request #30170 from CptnFizzbin/fix-gitlab-get-projectid
Fix(Integration - GitLab): use authorization header for GitLab requests
2025-06-24 09:50:02 +02:00
Cptn Fizzbin e0189b811d Fix authorization header for GitLab requests
Signed-off-by: Cptn Fizzbin <code@cptnfizzbin.ca>
2025-06-06 10:36:29 -04:00
ElaineDeMattosSilvaB 934df9a475 chore: add api report
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
2025-06-04 08:20:54 +02:00
ElaineDeMattosSilvaB 9afe2702ab fix: pass OAuth token explicitly to avoid config token overwrite
Signed-off-by: ElaineDeMattosSilvaB <elaine.de-mattos-silva-bezerra@deutschebahn.com>
2025-06-03 16:06:54 +02:00
github-actions[bot] 389d265b60 Version Packages 2025-05-20 08:25:02 +00:00
github-actions[bot] 1c0cb7be17 Version Packages (next) 2025-05-13 13:52:18 +00:00
Fredrik Adelöw 9e6af578c0 Merge pull request #28437 from sanderaernouts/users/saernouts/client-assertion-credential
Added support for federated credentials using a managed identity (to generate the client assertion)
2025-05-08 17:00:58 +02:00
Benjamin Janssens 7810e8d998 feat(catalog): implement discovery by GitHub app
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
2025-05-08 16:34:55 +02:00
Vincenzo Scamporlino 2061b44e10 Merge pull request #29732 from backstage/rugvip/new-areas
OWNERS.md: add new distinct areas for maintainer team
2025-05-07 11:02:12 +02:00
github-actions[bot] 35a0c4b598 Version Packages (next) 2025-05-06 13:51:57 +00:00
Patrik Oldsberg 83656f8999 .github/CODEOWNERS: adjust ownership for new project areas
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2025-05-05 14:19:45 +02:00
Andre Wanlin 145d4c5ad3 Merge pull request #28543 from leboncoin/feat-integration-gerrit-edit-mode
feat(integration): add edit url mode for Gerrit integration
2025-05-02 13:52:45 -05:00
github-actions[bot] 125d09682e Version Packages (next) 2025-04-29 14:27:15 +00:00
Andy Ladjadj 221474c980 docs: update packages/integration/config.d.ts
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
Signed-off-by: Andy Ladjadj <andy.ladjadj@adevinta.com>
2025-04-28 11:01:21 +02:00
Cptn Fizzbin 36f77e935c pass user provided token through to gitlab url resolvers
Signed-off-by: Cptn Fizzbin <code@cptnfizzbin.ca>
2025-04-23 10:03:01 -04:00
github-actions[bot] ce2cf32847 Version Packages (next) 2025-04-22 12:36:56 +00:00
Andre Wanlin f3381d330e integration - Added missing organizations property to azure section
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-04-19 18:26:34 -05:00
github-actions[bot] 2582af906d Version Packages 2025-04-15 15:36:15 +00:00
Andy LADJADJ 74c924dcfb Merge branch 'master' into feat-integration-gerrit-edit-mode 2025-04-11 17:07:09 +02:00
github-actions[bot] 2fc663ad48 Version Packages (next) 2025-04-01 13:24:16 +00:00
djamaile 64506f3e20 chore: run api report
Signed-off-by: djamaile <rdjamaile@gmail.com>
2025-03-26 11:35:27 +01:00