Commit Graph

342 Commits

Author SHA1 Message Date
github-actions[bot] ed7c4e3bef Version Packages (next) 2026-03-10 17:34:12 +00:00
github-actions[bot] 4bd6a3a1af Version Packages (next) 2026-02-24 19:24:06 +00:00
github-actions[bot] e6df5d52ce Version Packages 2026-02-17 16:06:18 +00:00
github-actions[bot] 1ea737c1e2 Version Packages (next) 2026-02-03 14:24:29 +00:00
github-actions[bot] d4b85dddee Version Packages (next) 2026-01-27 15:51:11 +00:00
Fredrik Adelöw f02219a054 Merge pull request #32516 from backstage/freben/nodecolon
Add a rule for the use of `node:` prefix on native imports
2026-01-27 14:17:14 +01:00
Fredrik Adelöw 69d880e171 Bump to latest zod
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:52:02 +01:00
Fredrik Adelöw 7455dae884 require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-01-26 13:22:53 +01:00
github-actions[bot] c24788d5bb Version Packages 2025-12-16 14:08:20 +00: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
github-actions[bot] e08f48a9b5 Version Packages (next) 2025-12-09 15:00:09 +00:00
dependabot[bot] de96a60f7a chore(deps): bump express from 4.21.2 to 4.22.0
Bumps [express](https://github.com/expressjs/express) from 4.21.2 to 4.22.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.22.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.2...4.22.0)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 4.22.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 20:33:46 +01:00
github-actions[bot] 756986e5e7 Version Packages (next) 2025-11-25 16:21:32 +00:00
github-actions[bot] 792f4d7e3d Version Packages 2025-11-18 12:23:09 +00:00
github-actions[bot] 3738293d26 Version Packages (next) 2025-11-04 15:00:26 +00:00
Fredrik Adelöw 7a26c0947e Merge pull request #31480 from schultzp2020/fix/erasable-syntax-enums
feat: convert all enums to erasable-syntax compliant patterns
2025-11-04 13:39:59 +01:00
github-actions[bot] 807af8ce0e Version Packages (next) 2025-10-21 16:14:43 +00:00
Paul Schultz b2bef924b2 feat: convert all enums to erasable-syntax compliant patterns
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2025-10-21 10:20:01 -05: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 161999e837 fix tsc issues
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2025-10-14 08:29:22 -05:00
github-actions[bot] c2c60546d2 Version Packages (next) 2025-09-24 12:57:42 +00:00
github-actions[bot] b799a2d07f Version Packages 2025-09-16 13:22:58 +00:00
Paul Schultz 133ac7ad66 fix(repo-tools): resolve knip-reports failure with spaces in workspace paths
Signed-off-by: Paul Schultz <pschultz@pobox.com>
2025-09-15 12:34:26 -05:00
github-actions[bot] ac48eeb3ba Version Packages (next) 2025-09-02 12:17:03 +00:00
github-actions[bot] b93a3471c2 Version Packages 2025-08-19 13:01:39 +00:00
github-actions[bot] 531a48848c Version Packages (next) 2025-07-29 14:40:44 +00: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] 58558ef2c1 Version Packages 2025-06-17 12:45:56 +00:00
github-actions[bot] d57a6f7828 Version Packages (next) 2025-06-03 13:12:47 +00:00
github-actions[bot] 19f0650b16 Version Packages (next) 2025-05-27 14:48:17 +00: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
github-actions[bot] 125d09682e Version Packages (next) 2025-04-29 14:27:15 +00:00
Vincenzo Scamporlino 7853dac010 permission-backend: accept resourceRef as array
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-29 12:54:47 +02:00
Vincenzo Scamporlino 1b4cba98e0 permission-backend: validate resourceRefs
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-29 12:54:47 +02:00
Vincenzo Scamporlino 4d4ec58d6b permission: batch apply conditions payload
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-29 12:54:47 +02:00
Vincenzo Scamporlino a5656fd532 permission-backend: improve request validation
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-29 12:54:46 +02:00
Vincenzo Scamporlino 9692c85d7e permission-backend: add tests for bulk resourceRefs
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-29 12:54:46 +02:00
Vincenzo Scamporlino 1ffe31cf69 permission-backend: accept batched permissions
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-29 12:54:46 +02:00
github-actions[bot] ce2cf32847 Version Packages (next) 2025-04-22 12:36:56 +00:00
Andre Wanlin 471e9e5cd3 Moved express types to devDependencies
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-04-21 13:56:08 -05:00
Andre Wanlin cf8fd51b61 permission-backend - Removed legacy backend support
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2025-04-21 13:34:39 -05:00
github-actions[bot] 2582af906d Version Packages 2025-04-15 15:36:15 +00:00
Vincenzo Scamporlino 02d9f566de permission-backend: fix for disabled auth policy
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-15 16:04:59 +02:00
Vincenzo Scamporlino df133cc3cc permission-backend: throw if resourceRef is passed along with a basic permission
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-15 11:19:27 +02:00
Vincenzo Scamporlino dea4fb1708 test-utils: make optional actor object
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-15 11:19:27 +02:00
Vincenzo Scamporlino ebe9b13b0a permission: clarify resourceRef error
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-15 11:19:26 +02:00
Vincenzo Scamporlino 7a88f85f2f auth: rename issuedBy to actor
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
2025-04-15 11:19:26 +02:00