Skip to content

fix: the reportCodeType when mode:lite#1192

Merged
yifancong merged 1 commit intomainfrom
fix/reportCodeType
Jul 23, 2025
Merged

fix: the reportCodeType when mode:lite#1192
yifancong merged 1 commit intomainfrom
fix/reportCodeType

Conversation

@yifancong
Copy link
Copy Markdown
Contributor

@yifancong yifancong commented Jul 23, 2025

Summary

fix: the reportCodeType when mode:lite.

Fix when in lite mode, the current reportCodeType is noSource, which should be noAssetsAndModuleSource.

Related Links

Copilot AI review requested due to automatic review settings July 23, 2025 05:59
@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 23, 2025

Deploy Preview for rsdoctor ready!

Name Link
🔨 Latest commit 5517244
🔍 Latest deploy log https://app.netlify.com/projects/rsdoctor/deploys/68807a5d638925000824ed7b
😎 Deploy Preview https://deploy-preview-1192--rsdoctor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the reportCodeType behavior when using mode: 'lite' by simplifying the logic to always return NoSourceAndAssets for lite mode, regardless of the noAssetsAndModuleSource setting. The change also moves the noCode check to the beginning of the function for better precedence handling.

  • Simplified lite mode logic to consistently return NoSourceAndAssets
  • Reordered condition checks to prioritize noCode setting
  • Updated corresponding test expectations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/core/src/inner-plugins/utils/config.ts Modified normalizeReportType function to simplify lite mode logic and reorder condition checks
packages/core/tests/build/utils/config.test.ts Updated test expectations and added new test case for lite mode with noCode setting
Comments suppressed due to low confidence (1)

packages/core/tests/build/utils/config.test.ts:50

  • [nitpick] The test description 'should normalize output.reportCodeType and mode:lite' is unclear about what specific behavior is being tested. Consider a more descriptive name like 'should return NoCode when reportCodeType.noCode is true in lite mode'.
  it('should normalize output.reportCodeType and mode:lite', () => {

@yifancong yifancong requested a review from 9aoy July 23, 2025 06:04
@yifancong yifancong merged commit 2dcf9c4 into main Jul 23, 2025
9 checks passed
@yifancong yifancong deleted the fix/reportCodeType branch July 23, 2025 06:11
yifancong added a commit that referenced this pull request Jul 23, 2025
yifancong added a commit that referenced this pull request Jul 23, 2025
yifancong added a commit that referenced this pull request Jul 23, 2025
fix: the reportCodeType when mode:lite (#1192)

update workflows yaml

fix: the test package

Revert "fix: the reportCodeType when mode:lite (#1192)"

This reverts commit 0cee3bd.

Revert "update workflows yaml"

This reverts commit c838e8b.
yifancong added a commit that referenced this pull request Aug 6, 2025
@yifancong yifancong mentioned this pull request Aug 7, 2025
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.

3 participants