Skip to content

Update agent to handle updates from [email protected] #2617

@bizob2828

Description

@bizob2828

Description

It looks like this PR, broke our wrapReturn shim function which wraps an export in a Proxy. After updating to [email protected] you get

TypeError: getters.get(...)[name] is not a function
    at Object.get (register.js:20:37)
    at Object.set (shimmer.js:648:30)
    at DatastoreShim.wrapEachProperty (shim.js:347:20)
    at Array.forEach (<anonymous>)
    at DatastoreShim.wrap (shim.js:334:14)
    at DatastoreShim.wrapReturn (shim.js:398:15)
    at instrumentPGNative (pg.js:61:10)
    at initialize (pg.js:33:12)
    at _firstPartyInstrumentation (shimmer.js:711:29)
    at loadInstrumentation (shimmer.js:675:25)

It's failing when we try to assign the exported module property as wrapped here

Steps to Reproduce

  1. npm i import-in-the-middle@latest
  2. npm run versioned:internal:major pg-esm

Expected Result

Tests pass

Actual Result

Tests fail

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done: Issues recently completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions