ibgreen opened a new pull request, #501: URL: https://github.com/apache/arrow-js/pull/501
## Goals Allow Arrow builders to work in runtimes that prohibit `eval` and the `Function` constructor, without carrying a downstream bundle patch. Closes #54. ## Changes - Replace dynamically compiled switch statements with captured validity predicates. - Preserve the always-valid empty case and use direct comparisons for a single sentinel, including NaN. - Use a snapshot Set for multiple sentinels, retaining primitive type distinctions and positive/negative-zero matching. Membership operates on supplied values directly rather than serializing them; object/symbol sentinels therefore use identity. - Cover null, undefined, NaN, zeros, bigint, quoted/multiline strings, duplicates, input-list mutation and a blocked Function constructor. - Remove the generated-source serializer and update the helper documentation. ## Verification - New predicate tests plus existing builder conformance: 447 passed. - Final predicate rerun: 12 passed; changed-file ESLint passed. - Source build type check: `tsc --noEmit -p tsconfig/tsconfig.esnext.esm.json` passed. - Additional boundary checks passed with Node's `--disallow-code-generation-from-strings` flag. - General root type-check commands report errors outside these changed files (ix resolution and existing bin/test/dependency typings); no compiler configuration is changed here. The old switch-vs-Map performance claim is removed rather than retained for a different implementation. The single-sentinel fast path avoids Set lookup; multi-sentinel performance remains a review consideration. This does not claim to resolve any npm scanning hold. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
