Skip to content

fix(http-import): migrate lockfile to webpack-compatible format - #527

Merged
stormslowly merged 2 commits into
mainfrom
fix/http-import-lockfile-format
Nov 18, 2026
Merged

stormslowly merged 2 commits into
mainfrom
fix/http-import-lockfile-format

Conversation

@stormslowly

Copy link
Copy Markdown
Contributor

Summary

Fixes the rspack ecosystem CI failure:

Invalid HTTP lockfile entry for entries: missing integrity

Rspack PR web-infra-dev/rspack#16656 (fix!: align HTTP module lockfiles with webpack) changed the HTTP module lockfile format:

  • URL entries are now top-level properties alongside version: 1 (the nested entries wrapper is removed).
  • content_type was renamed to contentType (camelCase).
  • valid_until and etag fields were removed (HTTP validators/expiration are kept in memory).
  • Content cache filenames now match webpack's getCacheKey naming scheme.

The old format with an entries object is no longer supported, so the http-import example fails to build against current rspack.

Changes

  • Rewrite rspack/http-import/http-import.lock into the webpack-compatible flattened format (same integrity and resolved URL).
  • Rename the content cache file/directory to the webpack-compatible key:
    • https___www.unpkg.com/_the-answer@1.0.0_dist_the-answer_<hash>.js
    • → https_www.unpkg.com/the-answer_1.0.0_dist_the-answer_<hash>.js
  • Cache content is unchanged (the stored integrity still matches byte-for-byte).

Verification

Built rspack/http-import with @rspack/core@2.3.3 (the version containing the format change):

  • Old lockfile reproduces the exact eco-ci error: Invalid HTTP lockfile entry for entries: missing integrity.
  • New lockfile builds successfully: Rspack compiled successfully in 21 ms, producing the expected the answer to the universe is 42 output.
  • The committed lockfile is left unchanged after the build.

Refs: failing job https://github.com/rstackjs/rstack-ecosystem-ci/actions/runs/44290323654/job/134754841124

Rspack PR #16656 changed the HTTP module lockfile format to align with
webpack: entries are now top-level properties (no `entries` wrapper),
`content_type` was renamed to `contentType`, and `valid_until` /
`etag` fields were removed. Content cache filenames also changed to
match webpack's naming scheme.

This updates the http-import example's lockfile and cache file to the
new format, fixing the rspack ecosystem CI failure
`Invalid HTTP lockfile entry for entries: missing integrity`.
The new webpack-compatible HTTP lockfile format (top-level URL entries,
contentType, no entries wrapper) is only supported by rspack >= 2.3.3.
The http-import example previously pinned @rspack/core and @rspack/cli
to 2.2.8, whose parser still expects the legacy `entries` object and
rejects the migrated lockfile with:

  Invalid HTTP lockfile: expected an entries object

- Bump @rspack/core and @rspack/cli to 2.3.3 for rspack/http-import
  (@rspack/dev-server stays on 2.2.1; 2.3.x is not published and it is
  only used by the dev script, not the build).
- Bump the root rstack toolchain from ^0.8.3 to ^0.9.2.
- Regenerate pnpm-lock.yaml with pnpm 10.34.1 (lockfileVersion stays 9.0);
  only the http-import rspack specifiers and the rstack dependency tree
  change, no other example is moved off rspack 2.2.8.

Verified: `pnpm --filter @rspack-example/http-import build` succeeds,
the full `node --run build` passes, and the rspack test group is green.
@stormslowly
stormslowly merged commit 260651f into main Nov 18, 2026
1 check passed
@stormslowly
stormslowly deleted the fix/http-import-lockfile-format branch November 18, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant