Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Auth config regeneration in dev can reuse a cached config

Offen
#550 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Brooooooklyn arbeitet bereits daran.

Seit 22.10.2026.

  • #554 von @Brooooooklyn — offen

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
node.js, typescript

Rechercherichtung

Read packages/void/src/auth/config.ts and the watcher and generation path in packages/void/src/plugin-routing.ts; reproduce the cached-module behavior with loadVoidAuthConfig() after editing a config. Trace how local helper imports and syntax errors affect reloading. Done means regeneration uses current settings after direct config edits and helper edits, and recovers after a syntax error; an open linked pull request is already addressing this issue.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

loadVoidAuthConfig() uses a plain native import() of the config file URL. Loading the same path again in the same Node process can therefore return the original module after the file has been edited.

The dev watcher explicitly handles changes to auth-config files and calls writeAuthDatabaseFiles(), which loads the config through this function. Consequently, that regeneration can use stale settings even though it was triggered by a config edit.

Documentation and intended behavior

The auth guide documents auth.ts customization and automatic auth-table creation during local development, but does not explicitly promise that auth-config edits hot-reload.

This issue is based on the existing implementation: the watcher already responds to those edits and attempts regeneration, which suggests it intends to use the updated config. This is an inference about intended behavior, not a claim that the docs guarantee hot reload. If a restart is intentionally required, that requirement should be made explicit.

Confirmed reproduction

A direct reproduction using the production loadVoidAuthConfig() function:

  1. Write a temporary module exporting { marker: 'auth-before' }.
  2. Load it with loadVoidAuthConfig(path).
  3. Overwrite the same file with { marker: 'auth-after' }.
  4. Call loadVoidAuthConfig(path) again in the same process.

Both calls returned { marker: 'auth-before' }, and the returned objects were identical, although the file contained auth-after.

The loader caching was reproduced directly. A complete auth application with a schema-changing edit has not been tested end to end; the consequence for generated auth files follows from inspection of the watcher and generation path.

Expected behavior and scope

When regeneration runs in response to an auth-config edit, it should evaluate the current configuration. Restarting the dev process is the current workaround.

This behavior already exists on main and is independent of the incremental source-analysis changes in #543.

A fix should preserve existing module compatibility and cover direct config edits, edits to imported local helpers, and recovery after correcting a syntax error. Reloading only the top-level file may leave its imported dependencies cached.

Relevant code: auth config loader, routing watcher and auth-file generation.

Vorherrschende Sprache
TypeScript
Sterne
402
Forks
32
Ø Merge
10 Std. 18 Min.
Gemergte PRs (30 T.)
113

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus voidzero-dev/void

Alle Issues in voidzero-dev/void

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.