Repository navigation
fix(http-import): migrate lockfile to webpack-compatible format - #527
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the rspack ecosystem CI failure:
Rspack PR web-infra-dev/rspack#16656 (
fix!: align HTTP module lockfiles with webpack) changed the HTTP module lockfile format:version: 1(the nestedentrieswrapper is removed).content_typewas renamed tocontentType(camelCase).valid_untilandetagfields were removed (HTTP validators/expiration are kept in memory).getCacheKeynaming scheme.The old format with an
entriesobject is no longer supported, so thehttp-importexample fails to build against current rspack.Changes
rspack/http-import/http-import.lockinto the webpack-compatible flattened format (same integrity andresolvedURL).https___www.unpkg.com/_the-answer@1.0.0_dist_the-answer_<hash>.jshttps_www.unpkg.com/the-answer_1.0.0_dist_the-answer_<hash>.jsVerification
Built
rspack/http-importwith@rspack/core@2.3.3(the version containing the format change):Invalid HTTP lockfile entry for entries: missing integrity.Rspack compiled successfully in 21 ms, producing the expectedthe answer to the universe is 42output.Refs: failing job https://github.com/rstackjs/rstack-ecosystem-ci/actions/runs/44290323654/job/134754841124