Skip to content

fix: preserve empty strings during export#8727

Merged
ZxBing0066 merged 9 commits into
developfrom
fix/missing-empty-string-environments
May 28, 2025
Merged

fix: preserve empty strings during export#8727
ZxBing0066 merged 9 commits into
developfrom
fix/missing-empty-string-environments

Conversation

@ZxBing0066

Copy link
Copy Markdown
Member

Background

INS-5463

Empty string environments are filtered out during export, which breaks the template render

Changes

  • Preserve empty strings
  • Add test case

@ZxBing0066 ZxBing0066 requested review from a team, Copilot and gatzjames May 19, 2025 08:49
@ZxBing0066 ZxBing0066 self-assigned this May 19, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 INS-5463 by preserving empty string environments during export. It removes the check that filtered out empty strings and introduces a new test to validate that empty strings are retained.

  • Removed the empty string check in filterEmptyValue.
  • Added a test case to validate the new behavior.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/insomnia/src/common/insomnia-v5.ts Updated filterEmptyValue to preserve empty strings.
packages/insomnia/src/common/tests/insomnia-v5.test.ts Added test to ensure empty string environments are preserved.

Comment thread packages/insomnia/src/common/insomnia-v5.ts
Comment thread packages/insomnia/src/common/insomnia-v5.ts
@ZxBing0066 ZxBing0066 requested a review from ryan-willis May 19, 2025 08:53
ryan-willis
ryan-willis previously approved these changes May 19, 2025
Comment thread packages/insomnia/src/common/__tests__/insomnia-v5.test.ts Outdated
@ZxBing0066 ZxBing0066 requested review from Copilot and gatzjames May 22, 2025 06:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 INS-5463 by preserving empty string values during export to ensure environment templates render correctly.

  • Removed empty string check in the filterEmptyValue function.
  • Added a test case to validate that empty string environments are preserved.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/insomnia/src/common/insomnia-v5.ts Removed filtering of empty strings in export logic.
packages/insomnia/src/common/tests/insomnia-v5.test.ts Added a test case verifying empty strings are preserved.

Comment thread packages/insomnia/src/common/insomnia-v5.ts
@ZxBing0066 ZxBing0066 enabled auto-merge (squash) May 28, 2025 09:12
@ZxBing0066 ZxBing0066 merged commit 6120a73 into develop May 28, 2025
10 of 12 checks passed
@ZxBing0066 ZxBing0066 deleted the fix/missing-empty-string-environments branch May 28, 2025 10:31
RoamingLost pushed a commit to RoamingLost/insomnia that referenced this pull request Aug 6, 2025
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.

6 participants