Repository navigation
test: remove --proxyquire-shim from common, bigquery, datastore, and dns - #9643
Draft
danieljbruce wants to merge 4 commits into
Draft
danieljbruce wants to merge 4 commits into
danieljbruce wants to merge 4 commits into
Conversation
This was referenced Oct 15, 2026
Contributor
There was a problem hiding this comment.
Code Review
This pull request replaces the external proxyquire dependency with a custom local implementation across multiple packages and updates the test scripts to remove the --proxyquire-shim flag. Feedback on the new proxyquire.ts files highlights a bug in the hasOwn helper, which currently only checks for 'object' types and fails to recognize function-based stubs, thereby ignoring @noCallThru and @global behaviors. It is recommended to update hasOwn to support both 'object' and 'function' types.
danieljbruce
added this pull request to stack #9647
October 15, 2026 21:18
…quire-shim-core-dns-ds-bq
…properties in proxyquire helper
…quire-shim-core-dns-ds-bq
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaces global proxyquire shim with local test helper in four packages.
Impact
Removes --proxyquire-shim from common, bigquery, datastore, and google-cloud-dns test scripts.
Changes
core/common,handwritten/bigquery,handwritten/datastore,handwritten/google-cloud-dns: Add a runtime-agnostictest/proxyquire.tshelper built onModule.prototype.requireandrequire.cachethat works identically in Node.js and Bun.'proxyquire'to'./proxyquire'(or relative path) and remove--proxyquire-shimfrom theirpackage.jsontest scripts.Testing
pnpm testunder both Node.js and Bun (JS_RUNTIME=bun) incore/common,handwritten/bigquery,handwritten/datastore, andhandwritten/google-cloud-dns.bin/linter.mjs --strict.Alternatives
bin/proxyquire-bun-shim.cjspreload shim.