Repository navigation
Fix: ensure string authvalues, string header processing - #7646
Conversation
… Postman to Bruno conversion - Introduced `ensureString` function to convert numeric and non-string values to strings, defaulting null/undefined to an empty string. - Updated request handling in `importPostmanV2CollectionItem` to utilize `ensureString` for headers, parameters, and body fields. - Added tests to verify correct conversion of numeric values to strings in headers, query parameters, and body fields.
…formation - Implemented a new test case to verify that numeric values in example request and response fields are correctly converted to strings during the Postman to Bruno conversion process. - The test checks various components including request headers, query parameters, path parameters, and body fields to ensure proper string conversion.
… to Bruno transformation - Added a new test case to verify that numeric values in multipart form data are correctly converted to strings during the Postman to Bruno conversion process. - The test checks the conversion of numeric values in the request body to ensure proper handling in the transformation.
- Added `parseStringHeader` and `normalizeHeaders` functions to handle various header formats, including string headers and concatenated strings. - Updated the request and response handling in `importPostmanV2CollectionItem` to utilize the new header normalization logic. - Introduced tests to verify correct parsing of string headers, including cases with no values and concatenated headers.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds string-coercion and header-normalization helpers to the Postman→Bruno converter and applies them across auth, headers, params, multipart/form, and examples so non-string Postman values are consistently converted to Bruno strings. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Updated the `ensureString` function to accept a fallback parameter, allowing for customizable default values instead of a fixed empty string for null/undefined inputs. - Modified the usage of `ensureString` in the `processAuth` function to utilize the new fallback feature for various authentication fields, improving the handling of optional values.
- Modified the `ensureString` function to return the fallback for null, undefined, or empty string values, enhancing its flexibility in handling various input scenarios.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/bruno-converters/src/postman/postman-to-bruno.js (1)
299-357:⚠️ Potential issue | 🟠 MajorWrap the OAuth2 case body in braces.
The
case AUTH_TYPES.OAUTH2:at line 298 contains multiple lexical declarations (const findValueUsingKey,const oauth2GrantTypeMaps, etc.) directly in the case body. Biome'snoSwitchDeclarationsrule forbids this—lexical declarations in switch cases are hoisted to the entire switch scope, risking uninitialized access from other cases. Wrapping the case body in braces limits scope to that case only.Suggested fix
case AUTH_TYPES.OAUTH2: + { const findValueUsingKey = (key) => ensureString(authValues[key]); // Maps Postman's grant_type to the Bruno's grantType string expected in the target object const oauth2GrantTypeMaps = { authorization_code_with_pkce: 'authorization_code', authorization_code: 'authorization_code', client_credentials: 'client_credentials', password_credentials: 'password' }; // ... rest of case body ... break; + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-converters/src/postman/postman-to-bruno.js` around lines 299 - 357, The OAuth2 case (case AUTH_TYPES.OAUTH2) declares lexical variables like findValueUsingKey, oauth2GrantTypeMaps and baseOAuth2Config directly in the switch case which violates noSwitchDeclarations; wrap the entire case body in its own block (add opening and closing braces immediately after the case label) so those consts are scoped to that case only, keeping the switch structure and all uses of requestObject.auth.oauth2, findValueUsingKey, oauth2GrantTypeMaps and baseOAuth2Config unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/bruno-converters/src/postman/postman-to-bruno.js`:
- Around line 824-831: The code in postman-to-bruno.js uses
contentTypeHeader.value?.toLowerCase() without ensuring the header value is a
string, which throws for non-string values (e.g., 0); update the logic in the
block that finds contentTypeHeader (after normalizeHeaders) to coerce or guard
the value before calling toLowerCase (for example, check typeof
contentTypeHeader.value === 'string' or cast with String(contentTypeHeader.value
|| '')), mirror the pattern used in searchLanguageByHeader(), and ensure that if
coercion/guarding fails you fall back to returning 'text'.
In
`@packages/bruno-converters/tests/postman/postman-to-bruno/postman-to-bruno.spec.js`:
- Around line 819-972: Add two tests in the same spec (near the numeric-value
tests) that cover auth stringification by calling postmanToBruno with (1) an
array-backed auth in a request (e.g., request.auth as [{ key: 'token', value:
123 }]) and (2) an object-backed auth in an example/originalRequest (e.g.,
request.auth as { apiKey: { key: 'key', value: 456 } }), then assert that
brunoCollection.items[n].request.auth (and example.request.auth where
applicable) contains stringified values ('123', '456') to cover both auth
translators; place assertions alongside the existing checks for
headers/params/body and reuse the pattern of inspecting brunoCollection.items
and brunoCollection.items[0].examples[0] to locate converted auth fields.
---
Outside diff comments:
In `@packages/bruno-converters/src/postman/postman-to-bruno.js`:
- Around line 299-357: The OAuth2 case (case AUTH_TYPES.OAUTH2) declares lexical
variables like findValueUsingKey, oauth2GrantTypeMaps and baseOAuth2Config
directly in the switch case which violates noSwitchDeclarations; wrap the entire
case body in its own block (add opening and closing braces immediately after the
case label) so those consts are scoped to that case only, keeping the switch
structure and all uses of requestObject.auth.oauth2, findValueUsingKey,
oauth2GrantTypeMaps and baseOAuth2Config unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c8359e85-9f98-474a-9d97-9fea1878ff6b
📒 Files selected for processing (2)
packages/bruno-converters/src/postman/postman-to-bruno.jspackages/bruno-converters/tests/postman/postman-to-bruno/postman-to-bruno.spec.js
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
packages/bruno-converters/src/postman/postman-to-bruno.js (1)
810-812:⚠️ Potential issue | 🟠 MajorStill lowercasing raw
Content-Typefields.Both helper paths call
.toLowerCase()onheader.key/header.valuebeforeensureString(...). Inputs like{ key: 'Content-Type', value: 0 }still throw here, so the import can fail on the exact mixed-value scenario this PR is targeting.🐛 Suggested fix
const searchLanguageByHeader = (headers) => { let contentType; each(normalizeHeaders(headers), (header) => { - if (header.key?.toLowerCase() === 'content-type' && !header.disabled) { - if (typeof header.value == 'string' && /^[\w\-]+\/([\w\-]+\+)?json/.test(header.value)) { + const headerKey = ensureString(header?.key).toLowerCase(); + const headerValue = ensureString(header?.value).toLowerCase(); + if (headerKey === 'content-type' && !header?.disabled) { + if (/^[\w\-]+\/([\w\-]+\+)?json/.test(headerValue)) { contentType = 'json'; - } else if (typeof header.value == 'string' && /^[\w\-]+\/([\w\-]+\+)?xml/.test(header.value)) { + } else if (/^[\w\-]+\/([\w\-]+\+)?xml/.test(headerValue)) { contentType = 'xml'; } return false; @@ - const contentTypeHeader = normalizedHeaders.find((header) => header.key?.toLowerCase() === 'content-type'); + const contentTypeHeader = normalizedHeaders.find((header) => ensureString(header?.key).toLowerCase() === 'content-type'); if (contentTypeHeader) { - const contentType = contentTypeHeader.value?.toLowerCase(); + const contentType = ensureString(contentTypeHeader?.value).toLowerCase();Also applies to: 829-831
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-converters/src/postman/postman-to-bruno.js` around lines 810 - 812, The code is lowercasing header.key and header.value before converting them to strings, which crashes for non-string values (e.g., {key: 'Content-Type', value: 0}); change the checks in the normalizeHeaders iteration to first coerce via ensureString (or a safe string conversion) and then run .toLowerCase() or the regex test on that coerced string; specifically, use ensureString(header.key) before calling .toLowerCase() when checking the key and use ensureString(header.value) (or cast to string) before applying the /^[\w\-]+\/([\w\-]+\+)?json/ regex, and apply the same fix to the other occurrence around lines 829-831 so both paths no longer call .toLowerCase() on potentially non-string header fields.
🧹 Nitpick comments (1)
packages/bruno-converters/src/postman/postman-to-bruno.js (1)
542-545: Avoid lossyjoin('')for multipart array values.This collapses
['a', 'b']intoab, which is not reversible and doesn't match theensureString(...)behavior used for the other converted fields. Reusing the same helper in both request and example paths keeps the coercion consistent.♻️ Consistent coercion
- : (Array.isArray(param.value) ? param.value.join('') : ensureString(param.value)); + : ensureString(param.value); @@ - : (Array.isArray(param.value) ? param.value.join('') : ensureString(param.value)); + : ensureString(param.value);Also applies to: 738-740
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-converters/src/postman/postman-to-bruno.js` around lines 542 - 545, The multipart param coercion currently collapses arrays via join('') which is lossy; change the assignment that computes value (the const value in postman-to-bruno.js) to preserve array elements by applying ensureString to each element instead of joining, i.e. when Array.isArray(param.value) return param.value.map(ensureString), and leave the non-array branch as ensureString(param.value); make the same change in the other occurrence noted (around the 738–740 area) so both request and example paths use ensureString consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/bruno-converters/src/postman/postman-to-bruno.js`:
- Around line 298-300: The OAuth2 switch branch declares multiple variables and
a nested switch which violates the noSwitchDeclarations rule; wrap the entire
case AUTH_TYPES.OAUTH2: body in a block (add { ... } immediately after the case
and before the break) so declarations like findValueUsingKey,
oauth2GrantTypeMaps, postmanGrantType, targetGrantType, and baseOAuth2Config and
the nested switch are scoped inside the braces and no longer exist as top-level
switch declarations.
---
Duplicate comments:
In `@packages/bruno-converters/src/postman/postman-to-bruno.js`:
- Around line 810-812: The code is lowercasing header.key and header.value
before converting them to strings, which crashes for non-string values (e.g.,
{key: 'Content-Type', value: 0}); change the checks in the normalizeHeaders
iteration to first coerce via ensureString (or a safe string conversion) and
then run .toLowerCase() or the regex test on that coerced string; specifically,
use ensureString(header.key) before calling .toLowerCase() when checking the key
and use ensureString(header.value) (or cast to string) before applying the
/^[\w\-]+\/([\w\-]+\+)?json/ regex, and apply the same fix to the other
occurrence around lines 829-831 so both paths no longer call .toLowerCase() on
potentially non-string header fields.
---
Nitpick comments:
In `@packages/bruno-converters/src/postman/postman-to-bruno.js`:
- Around line 542-545: The multipart param coercion currently collapses arrays
via join('') which is lossy; change the assignment that computes value (the
const value in postman-to-bruno.js) to preserve array elements by applying
ensureString to each element instead of joining, i.e. when
Array.isArray(param.value) return param.value.map(ensureString), and leave the
non-array branch as ensureString(param.value); make the same change in the other
occurrence noted (around the 738–740 area) so both request and example paths use
ensureString consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fbb5accc-be6e-4d35-9cbb-66c863efcff8
📒 Files selected for processing (1)
packages/bruno-converters/src/postman/postman-to-bruno.js
…rsion tests - Added 'no-case-declarations' rule to ESLint configuration to enforce stricter coding standards. - Modified the `processAuth` function to ensure proper block scoping for OAuth2 case handling. - Improved header parsing logic to check for string type in content-type header. - Added new tests to verify conversion of numeric authentication values to strings in both array-backed and object-backed formats during Postman to Bruno transformation.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/bruno-converters/src/postman/postman-to-bruno.js (1)
809-842:⚠️ Potential issue | 🟡 MinorNumeric
header.keycan still throw ontoLowerCase().Lines 812 and 830 use
header.key?.toLowerCase(). Optional chaining guards againstnull/undefinedbut not numeric keys. If a Postman collection has{ key: 123, value: 'application/json' }, this will throwTypeError: 123.toLowerCase is not a function.The value handling was fixed (line 813 and 831 check
typeof ... === 'string'), but the key comparison needs the same treatment orensureString()coercion.🛠️ Suggested fix
const searchLanguageByHeader = (headers) => { let contentType; each(normalizeHeaders(headers), (header) => { - if (header.key?.toLowerCase() === 'content-type' && !header.disabled) { + if (typeof header.key === 'string' && header.key.toLowerCase() === 'content-type' && !header.disabled) { if (typeof header.value == 'string' && /^[\w\-]+\/([\w\-]+\+)?json/.test(header.value)) {const getBodyTypeFromContentTypeHeader = (headers) => { const normalizedHeaders = normalizeHeaders(headers); if (!normalizedHeaders.length) { return 'text'; } - const contentTypeHeader = normalizedHeaders.find((header) => header.key?.toLowerCase() === 'content-type'); + const contentTypeHeader = normalizedHeaders.find((header) => typeof header.key === 'string' && header.key.toLowerCase() === 'content-type');🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-converters/src/postman/postman-to-bruno.js` around lines 809 - 842, Both searchLanguageByHeader and getBodyTypeFromContentTypeHeader call header.key?.toLowerCase(), which will throw if header.key is a non-string (e.g., numeric); update these checks to ensure header.key is a string before calling toLowerCase (for example, check typeof header.key === 'string' && header.key.toLowerCase() === 'content-type') or coerce safely with String(header.key).toLowerCase() when locating the Content-Type header (affecting the header iteration in searchLanguageByHeader and the contentTypeHeader find in getBodyTypeFromContentTypeHeader).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@packages/bruno-converters/src/postman/postman-to-bruno.js`:
- Around line 809-842: Both searchLanguageByHeader and
getBodyTypeFromContentTypeHeader call header.key?.toLowerCase(), which will
throw if header.key is a non-string (e.g., numeric); update these checks to
ensure header.key is a string before calling toLowerCase (for example, check
typeof header.key === 'string' && header.key.toLowerCase() === 'content-type')
or coerce safely with String(header.key).toLowerCase() when locating the
Content-Type header (affecting the header iteration in searchLanguageByHeader
and the contentTypeHeader find in getBodyTypeFromContentTypeHeader).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c9d904a5-35db-42a7-b61e-fbf6e5a8238a
📒 Files selected for processing (3)
eslint.config.jspackages/bruno-converters/src/postman/postman-to-bruno.jspackages/bruno-converters/tests/postman/postman-to-bruno/postman-to-bruno.spec.js
- Added 'no-case-declarations' rule to ESLint configuration to enhance code quality. - Adjusted existing rules for consistency and clarity in the configuration.
* feat: add helper to ensure string conversion for non-string values in Postman to Bruno conversion - Introduced `ensureString` function to convert numeric and non-string values to strings, defaulting null/undefined to an empty string. - Updated request handling in `importPostmanV2CollectionItem` to utilize `ensureString` for headers, parameters, and body fields. - Added tests to verify correct conversion of numeric values to strings in headers, query parameters, and body fields. * test: add test for numeric value conversion in Postman to Bruno transformation - Implemented a new test case to verify that numeric values in example request and response fields are correctly converted to strings during the Postman to Bruno conversion process. - The test checks various components including request headers, query parameters, path parameters, and body fields to ensure proper string conversion. * test: add multipart form value test for numeric conversion in Postman to Bruno transformation - Added a new test case to verify that numeric values in multipart form data are correctly converted to strings during the Postman to Bruno conversion process. - The test checks the conversion of numeric values in the request body to ensure proper handling in the transformation. * feat: enhance header parsing in Postman to Bruno conversion - Added `parseStringHeader` and `normalizeHeaders` functions to handle various header formats, including string headers and concatenated strings. - Updated the request and response handling in `importPostmanV2CollectionItem` to utilize the new header normalization logic. - Introduced tests to verify correct parsing of string headers, including cases with no values and concatenated headers. * refactor: enhance ensureString function for flexible fallback values - Updated the `ensureString` function to accept a fallback parameter, allowing for customizable default values instead of a fixed empty string for null/undefined inputs. - Modified the usage of `ensureString` in the `processAuth` function to utilize the new fallback feature for various authentication fields, improving the handling of optional values. * refactor: update ensureString function to handle empty values - Modified the `ensureString` function to return the fallback for null, undefined, or empty string values, enhancing its flexibility in handling various input scenarios. * chore: update ESLint configuration and enhance Postman to Bruno conversion tests - Added 'no-case-declarations' rule to ESLint configuration to enforce stricter coding standards. - Modified the `processAuth` function to ensure proper block scoping for OAuth2 case handling. - Improved header parsing logic to check for string type in content-type header. - Added new tests to verify conversion of numeric authentication values to strings in both array-backed and object-backed formats during Postman to Bruno transformation. * chore: update ESLint configuration to enforce stricter rules - Added 'no-case-declarations' rule to ESLint configuration to enhance code quality. - Adjusted existing rules for consistency and clarity in the configuration. --------- Co-authored-by: Bijin A B <[email protected]>
* feat: add helper to ensure string conversion for non-string values in Postman to Bruno conversion - Introduced `ensureString` function to convert numeric and non-string values to strings, defaulting null/undefined to an empty string. - Updated request handling in `importPostmanV2CollectionItem` to utilize `ensureString` for headers, parameters, and body fields. - Added tests to verify correct conversion of numeric values to strings in headers, query parameters, and body fields. * test: add test for numeric value conversion in Postman to Bruno transformation - Implemented a new test case to verify that numeric values in example request and response fields are correctly converted to strings during the Postman to Bruno conversion process. - The test checks various components including request headers, query parameters, path parameters, and body fields to ensure proper string conversion. * test: add multipart form value test for numeric conversion in Postman to Bruno transformation - Added a new test case to verify that numeric values in multipart form data are correctly converted to strings during the Postman to Bruno conversion process. - The test checks the conversion of numeric values in the request body to ensure proper handling in the transformation. * feat: enhance header parsing in Postman to Bruno conversion - Added `parseStringHeader` and `normalizeHeaders` functions to handle various header formats, including string headers and concatenated strings. - Updated the request and response handling in `importPostmanV2CollectionItem` to utilize the new header normalization logic. - Introduced tests to verify correct parsing of string headers, including cases with no values and concatenated headers. * refactor: enhance ensureString function for flexible fallback values - Updated the `ensureString` function to accept a fallback parameter, allowing for customizable default values instead of a fixed empty string for null/undefined inputs. - Modified the usage of `ensureString` in the `processAuth` function to utilize the new fallback feature for various authentication fields, improving the handling of optional values. * refactor: update ensureString function to handle empty values - Modified the `ensureString` function to return the fallback for null, undefined, or empty string values, enhancing its flexibility in handling various input scenarios. * chore: update ESLint configuration and enhance Postman to Bruno conversion tests - Added 'no-case-declarations' rule to ESLint configuration to enforce stricter coding standards. - Modified the `processAuth` function to ensure proper block scoping for OAuth2 case handling. - Improved header parsing logic to check for string type in content-type header. - Added new tests to verify conversion of numeric authentication values to strings in both array-backed and object-backed formats during Postman to Bruno transformation. * chore: update ESLint configuration to enforce stricter rules - Added 'no-case-declarations' rule to ESLint configuration to enhance code quality. - Adjusted existing rules for consistency and clarity in the configuration. --------- Co-authored-by: Bijin A B <[email protected]>
* feat: add helper to ensure string conversion for non-string values in Postman to Bruno conversion - Introduced `ensureString` function to convert numeric and non-string values to strings, defaulting null/undefined to an empty string. - Updated request handling in `importPostmanV2CollectionItem` to utilize `ensureString` for headers, parameters, and body fields. - Added tests to verify correct conversion of numeric values to strings in headers, query parameters, and body fields. * test: add test for numeric value conversion in Postman to Bruno transformation - Implemented a new test case to verify that numeric values in example request and response fields are correctly converted to strings during the Postman to Bruno conversion process. - The test checks various components including request headers, query parameters, path parameters, and body fields to ensure proper string conversion. * test: add multipart form value test for numeric conversion in Postman to Bruno transformation - Added a new test case to verify that numeric values in multipart form data are correctly converted to strings during the Postman to Bruno conversion process. - The test checks the conversion of numeric values in the request body to ensure proper handling in the transformation. * feat: enhance header parsing in Postman to Bruno conversion - Added `parseStringHeader` and `normalizeHeaders` functions to handle various header formats, including string headers and concatenated strings. - Updated the request and response handling in `importPostmanV2CollectionItem` to utilize the new header normalization logic. - Introduced tests to verify correct parsing of string headers, including cases with no values and concatenated headers. * refactor: enhance ensureString function for flexible fallback values - Updated the `ensureString` function to accept a fallback parameter, allowing for customizable default values instead of a fixed empty string for null/undefined inputs. - Modified the usage of `ensureString` in the `processAuth` function to utilize the new fallback feature for various authentication fields, improving the handling of optional values. * refactor: update ensureString function to handle empty values - Modified the `ensureString` function to return the fallback for null, undefined, or empty string values, enhancing its flexibility in handling various input scenarios. * chore: update ESLint configuration and enhance Postman to Bruno conversion tests - Added 'no-case-declarations' rule to ESLint configuration to enforce stricter coding standards. - Modified the `processAuth` function to ensure proper block scoping for OAuth2 case handling. - Improved header parsing logic to check for string type in content-type header. - Added new tests to verify conversion of numeric authentication values to strings in both array-backed and object-backed formats during Postman to Bruno transformation. * chore: update ESLint configuration to enforce stricter rules - Added 'no-case-declarations' rule to ESLint configuration to enhance code quality. - Adjusted existing rules for consistency and clarity in the configuration. --------- Co-authored-by: Bijin A B <[email protected]>
Jira
Description
Extends the Postman import robustness (follow-up to #7644) with auth field coercion, string header support, and improved
ensureStringfallback handling.Changes
1. Auth field coercion in
processAuth()|| ''/?.toString()withensureString()across all auth types (Basic, Bearer, AWSV4, API Key, Digest, OAuth1, OAuth2)Yup.string().nullable()with.strict(), so non-string values from Postman would cause schema validation failuresensureString(value, null)to preservenullfallbacksignatureMethod,version) useensureString(value, 'HMAC-SHA1')to preserve default behavior2. String header support via
normalizeHeaders()"Key: Value\r\nKey2: Value2"), or nullparseStringHeader()— parses"Key: Value"format (usesindexOf(':')to handle values containing colons)normalizeHeaders()— normalizes all header formats into an array of objectssearchLanguageByHeader(),getBodyTypeFromContentTypeHeader()3. Improved
ensureStringfallback handlingfallbackparameter:ensureString(value, fallback = '')|| fallbackbehavior for fields with meaningful defaults)Tests added
Contribution Checklist:
Summary by CodeRabbit
Bug Fixes
Refactor
Tests
Chore