Closed dustinbyrne closed 1 month ago
The isSimpleObject
function in the appmap-node
package does not correctly handle sentinel values such as "ASYNC_OPTIONS_TYPE"
. This leads to an error when such values are passed into the function, as it incorrectly identifies these sentinel values as simple objects.
Enhance isSimpleObject
Function:
isSimpleObject
function to check for and exclude sentinel values like "ASYNC_OPTIONS_TYPE"
.Update parameter
Function and Relevant Callers:
parameter
function and corresponding logic are aligned to correctly propagate any necessary adjustments from isSimpleObject
.Test Cases for Sentinel Values:
isSimpleObject
function.A test case that directly invokes the isSimpleObject
function with a sentinel value to trigger the issue:
import { expect } from "chai";
import { isSimpleObject } from "../src/parameter";
describe("isSimpleObject", () => {
it('should not treat "ASYNC_OPTIONS_TYPE" as a simple object', () => {
const sentinelValue = "ASYNC_OPTIONS_TYPE";
const result = isSimpleObject(sentinelValue);
expect(result).to.be.false;
});
});
This test case ensures that the sentinel value "ASYNC_OPTIONS_TYPE"
is correctly identified as not being a simple object, thereby preventing the error.
:tada: This issue has been resolved in version 2.23.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
via
npm test
in nestjs/nestTest cases:
Exception: