Skip to content

chore: upgrade lib-node-registry to 0.7.0 for cache busting - #30

Merged
albanm merged 1 commit into
masterfrom
fix-npm-cache
Jun 3, 2026
Merged

chore: upgrade lib-node-registry to 0.7.0 for cache busting#30
albanm merged 1 commit into
masterfrom
fix-npm-cache

Conversation

@albanm

@albanm albanm commented Jun 3, 2026

Copy link
Copy Markdown
Member

Upgrade @data-fair/lib-node-registry 0.6.0 → 0.7.0 in api and worker,
and remove the now-redundant cacheBust option from importPluginModule.

Why: 0.7.0 extracts a changed artefact into a content-versioned directory,
so an updated plugin resolves to a brand-new absolute path. That forces Node's
ESM registry to reload the whole module graph (entry + siblings + bundled deps)
— something the old ?imported=<ts> query suffix could never do (it only
reloaded the entry module). The query-string trick was also dead code: no caller
ever passed cacheBust: true.

Regression risks:

  • importPluginModule lost its second opts parameter — a signature change on a
    shared export. All three callers (api, worker, the 0.11.0 upgrade script) pass
    a single argument; check-types passes.
  • Plugin reload behavior changes at runtime: a long-running worker that previously
    could serve a stale module after a plugin update now reloads it. Intended, but
    the behavior shift is the point of the PR.
  • On-disk registry cache layout changed; legacy .meta.json dirs are treated as
    cold and pruned by the lib, so no migration is required.

0.7.0 extracts a changed artefact into a content-versioned directory, so
an updated plugin resolves to a brand-new path and Node's ESM registry
reloads the whole module graph (entry + siblings + bundled deps).

Removes the now-redundant cacheBust option from importPluginModule: the
query-string trick only reloaded the entry module, was strictly worse than
the lib's path-based busting, and was never used by any caller.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@albanm
albanm merged commit 019393c into master Jun 3, 2026
3 checks passed
@albanm
albanm deleted the fix-npm-cache branch June 3, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant