Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deprecate JavaScript API (part 2) #6859

Merged
merged 4 commits into from
Jun 19, 2024
Merged

feat: deprecate JavaScript API (part 2) #6859

merged 4 commits into from
Jun 19, 2024

Conversation

h-a-n-a
Copy link
Collaborator

@h-a-n-a h-a-n-a commented Jun 19, 2024

Summary

Removed Compilation.currentNormalModuleHooks and mark most of the fields as readonly.

Check out https://github.com/web-infra-dev/rspack/pull/6859/files#diff-d9855ab929a2eaf55ae2836e14953cbcbb409dae7e76183b335068dc21076043 for detailed changes.

closes #6569

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack. labels Jun 19, 2024
Copy link

netlify bot commented Jun 19, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 5371d55
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/6672cd81606c180008cc625c

@h-a-n-a
Copy link
Collaborator Author

h-a-n-a commented Jun 19, 2024

!eco-ci

@rspack-bot
Copy link

rspack-bot commented Jun 19, 2024

📝 Ran ecosystem CI: Open

suite result
modernjs ✅ success
nx ❌ failure
rspress ✅ success
rsbuild ❌ failure
compat ✅ success
examples ✅ success

@h-a-n-a
Copy link
Collaborator Author

h-a-n-a commented Jun 19, 2024

Chunk.files has been changed from string[] to ReadonlySet<string>. Thus, resulting the follow error in rspress:

  . prepare: bundleless DTS failed:
  . prepare: src/rspack/preload/helpers/extractChunks.ts:78:7 - error TS2352: Conversion of type '{ files: string[]; }' to type 'Chunk' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  . prepare:   Type '{ files: string[]; }' is missing the following properties from type 'Chunk': #private, ids, idNameHints, runtime, and 11 more.
  . prepare:  78       {
  . prepare:           ~
  . prepare:  79         files: Object.keys(compilation.assets).filter(
  . prepare:     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  . prepare: ... 
  . prepare:  81         ),
  . prepare:     ~~~~~~~~~~
  . prepare:  82       } as Chunk,
  . prepare:     ~~~~~~~~~~~~~~~~
  . prepare: Found 1 error in src/rspack/preload/helpers/extractChunks.ts:78

cc @9aoy

@h-a-n-a h-a-n-a marked this pull request as ready for review June 19, 2024 12:30
@h-a-n-a h-a-n-a requested a review from LingyuCoder June 19, 2024 12:30
@h-a-n-a h-a-n-a enabled auto-merge (squash) June 19, 2024 12:32
@h-a-n-a h-a-n-a merged commit 87a73c3 into main Jun 19, 2024
32 checks passed
@h-a-n-a h-a-n-a deleted the feat/deprecate-apis branch June 19, 2024 12:39
@h-a-n-a h-a-n-a added the release: breaking change release: breaking change related release(mr only) label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: breaking change release: breaking change related release(mr only) release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Incompatible types of Chunk.files leading to error with purgecss-webpack-plugin
3 participants