Each catch path now decides for itself whether to rethrow or sleep and
continue, so the loop body has a definite Response after the try/catch
and there is no shared `error: unknown` slot that could in principle be
thrown unset. Pulls the exponential delay into a tiny local helper to
share between the two retry paths.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Flip the order of the response/error check so TypeScript narrows the
types itself rather than relying on `response!` to assert what the code
already guarantees by construction.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
- Cancel discarded response bodies before retrying so the underlying
connection can be returned to the pool instead of being held open
until the response is garbage collected.
- Stop asserting on the rejected error message in the network-error
retry test; track rejection via a flag so the test isn't tied to
fetch/MSW error strings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Removes a misplaced `mode: 'same-origin'` option that would have rejected
cross-origin requests when the integration is used from a browser, and
extends the retry wrapper so transient network errors are retried using
the configured `maxRetries`. Caller-initiated aborts still propagate
immediately.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Encapsulate the config-loading and embedded-postgres decision inside
`startEmbeddedDb` so that `runBackend` only needs to pass through the
raw `configPaths` and `targetDir`. This simplifies the interface between
the two modules and keeps all embedded-postgres concerns in one place.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
The readDatabaseConfig function would crash when trying to read
sub-keys of backend.database.connection when the value is a plain
string (e.g. ':memory:' for better-sqlite3). Guard by checking the
raw value type before attempting to read structured connection keys.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
When using the embedded-postgres database client, user-provided
connection config (host, port, user, password) is now forwarded to
the embedded Postgres instance. Only values that the user hasn't
configured are filled in with defaults and injected into the app
config, preserving existing behavior when no config is provided.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
Align PluginHeader spacing across tabbed and non-tabbed variants so the component owns the surrounding page spacing more consistently.
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
Updates the Select component to accept a set of sections with options as opposed to just a flat list of options.
---------
Signed-off-by: James Brooks <jamesbrooks@spotify.com>
@protobufjs/inquire@1.1.1 dropped the eval-based workaround that hid its
dynamic require() from bundlers, which makes webpack/rspack emit a
"Critical dependency: the request of a dependency is an expression"
warning that fails the build under CI=true. protobufjs@7.5.6 also
bumped its dependency on @protobufjs/inquire from ^1.1.0 to ^1.1.1, so
pinning just the inquire range isn't enough — pin protobufjs to 7.5.5
for all known workspace ranges as well.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
- Always render headerTop wrapper for consistent spacing
- Reduce default content padding-top from space-6 to space-3
- Add PluginHeaderAndHeader story and update Spotify theme
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
- Add data-has-tags attribute to reduce header padding-top when tags are present
- Rename beforeSticky/afterSticky classes to headerTop/headerBottom
- Always render headerBottom for consistent bottom margin
- Inline JSX sections into a single return statement
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
useResolvedPath returns the resolved path without the router basename,
eliminating the need for manual basename detection and stripping.
Signed-off-by: Johan Persson <johanopersson@gmail.com>
The license changed in 4.9.0, so we need to cap the allowed version
range across all packages that depend on it.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
- `visitImports` now also reads `exportKind` so `export type { … } from`
statements are classified as type-only, fixing a false positive in the
self-import rule (and correctly skipping them in `no-undeclared-imports`
too).
- The reachability-graph regex in `no-self-package-imports` skips
`import type` / `export type` edges so files reachable only via
type-only re-exports aren't pulled into a runtime bundle and no longer
get false-positive same-entry errors.
- `SOURCE_EXTENSIONS` now includes `.mts` and `.cts` so entries and
barrels using those extensions are followed correctly.
- The ESLint plugin changeset wording matches the `error` severity of
the recommended config.
- Adds regression fixtures and RuleTester cases for `export type …` at
both entries and for a file only reachable via a type-only edge.
Signed-off-by: Marat Dyatko <maratd@spotify.com>
Made-with: Cursor