Conversation
…olume Co-authored-by: yifancong <18437716+yifancong@users.noreply.github.com>
Co-authored-by: yifancong <18437716+yifancong@users.noreply.github.com>
…dencies Co-authored-by: yifancong <18437716+yifancong@users.noreply.github.com>
Co-authored-by: yifancong <18437716+yifancong@users.noreply.github.com>
Deploying rsdoctor with
|
| Latest commit: |
c6ee984
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c6fd8087.rsdoctor.pages.dev |
| Branch Preview URL: | https://release-v1-5-3-alpha-0.rsdoctor.pages.dev |
There was a problem hiding this comment.
Pull request overview
This PR prepares the repo for the v1.5.3-alpha.0 release while reducing loader-details payload size by omitting large input/result fields from GetLoaderFileDetails and fetching them on-demand via a dedicated API.
Changes:
- Bump package versions to
1.5.3-alpha.0across multiple workspaces. - Strip
input/resultfrom loader file details responses and add on-demandGetLoaderFileInputAndOutputusage in the UI. - Add unit tests covering loader detail stripping and input/output lookup behavior.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/webpack-plugin/package.json | Bumps webpack plugin version to 1.5.3-alpha.0. |
| packages/utils/tests/common/loader.test.ts | Adds tests for loader details stripping and input/output retrieval. |
| packages/utils/src/common/loader.ts | Omits input/result in file details and updates input/output lookup matching. |
| packages/utils/src/common/data/index.ts | Fixes routing for GetLoaderFileInputAndOutput to the correct loader helper. |
| packages/utils/package.json | Bumps utils package version to 1.5.3-alpha.0. |
| packages/types/src/sdk/server/apis/loader.ts | Updates API response typing to omit input/result for GetLoaderFileDetails. |
| packages/types/package.json | Bumps types package version to 1.5.3-alpha.0. |
| packages/sdk/package.json | Bumps sdk package version to 1.5.3-alpha.0. |
| packages/rspack-plugin/package.json | Bumps rspack plugin version to 1.5.3-alpha.0. |
| packages/graph/package.json | Bumps graph package version to 1.5.3-alpha.0. |
| packages/document/package.json | Bumps docs package version to 1.5.3-alpha.0. |
| packages/core/package.json | Bumps core package version to 1.5.3-alpha.0. |
| packages/components/src/components/Loader/executions.tsx | Lazily fetches loader input/output via ServerAPIProvider for the details view. |
| packages/components/package.json | Bumps components package version to 1.5.3-alpha.0. |
| packages/client/package.json | Bumps client package version to 1.5.3-alpha.0. |
| packages/cli/package.json | Bumps cli package version to 1.5.3-alpha.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <Empty | ||
| description={ | ||
| 'No loader result. If you use the Brief Mode, there will not have loader results.' | ||
| } | ||
| /> |
There was a problem hiding this comment.
The empty-state text "there will not have loader results" is grammatically incorrect and can be confusing for users. Consider rephrasing to something like "No loader result. In Brief Mode, loader results are not available."
| children: | ||
| activeKey === 'loaderDetails' ? ( | ||
| <ServerAPIProvider | ||
| api={SDK.ServerAPI.API.GetLoaderFileInputAndOutput} | ||
| body={{ | ||
| file: resource.path, | ||
| loader: loader.loader, | ||
| loaderIndex: loader.loaderIndex, | ||
| }} | ||
| showSkeleton={false} | ||
| > | ||
| {(codeData) => ( | ||
| <LoaderDetailsContent | ||
| loader={loader} | ||
| resource={resource} | ||
| isLight={isLight} | ||
| codeData={codeData} | ||
| /> | ||
| )} | ||
| </ServerAPIProvider> | ||
| ) : null, |
There was a problem hiding this comment.
ServerAPIProvider is mounted even when the selected loader has errors and the UI only renders the error stack, which still triggers a fetch for input/output that will never be displayed. Consider skipping the GetLoaderFileInputAndOutput request when loader.errors?.length is non-zero (or deferring the fetch until the user actually needs to view the diff) to preserve the intended data-volume optimization.
| if ( | ||
| getLoadrName(l.loader) === loader && | ||
| l.loaderIndex === loaderIndex | ||
| ) { |
There was a problem hiding this comment.
getLoaderFileInputAndOutput now matches loaders by getLoadrName(l.loader) === loader, which effectively requires callers to pass the normalized loader name (as produced by getLoadrName). To avoid an accidental breaking change and make the API resilient to callers passing either the raw loader string or the normalized one, normalize the request parameter too (or compare against both forms).
Summary
Related Links