endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
788 stars 70 forks source link

chore: Upgrade to ava ^6 #2144

Closed kriskowal closed 4 months ago

kriskowal commented 4 months ago

Progresses: #2125

kriskowal commented 4 months ago

@turadg This is a wholesale upgrade to ava@^6 in endo and it looks great except there appears to be a bad interaction between ses, execa, and the new ava. I’m investigating this now.

    ℹ REJECTED from ava test("bundle-source command is concurrency safe"): (TypeError#1)
    ℹ TypeError#1: Invalid property descriptor. Cannot both specify accessors and a value or writable attribute, [object Object]
    ℹ   at InertConstructor.defineProperty (<anonymous>)
        at Object.expect (packages/bundle-source/test/execava.js:9:43)
        at packages/bundle-source/test/test-tool-command.js:12:104
        at Array.map (<anonymous>)
        at packages/bundle-source/test/test-tool-command.js:11:52
        at logErrorFirst (packages/ses-ava/src/ses-ava-test.js:96:14)
        at wrappedFunc (packages/ses-ava/src/ses-ava-test.js:216:16)
        at async Promise.all (index 0)
kriskowal commented 4 months ago

@turadg This is a wholesale upgrade to ava@^6 in endo and it looks great except there appears to be a bad interaction between ses, execa, and the new ava. I’m investigating this now.

Root cause of this is in mimic-fn, retained by onetime, retained by execava, which does a hasty toString patch which does not compose well with our “enablements” on toString (replacing the value with a get descriptor). I’ve pushed a patch and seek to get it upstream. https://github.com/sindresorhus/mimic-function/pull/51

kriskowal commented 4 months ago

LGTM. Leaving to your discretion when to drop the patch (since your sindresorhus/mimic-function#51 is released in https://www.npmjs.com/package/mimic-function/v/5.0.1 )

Wow, we’ve never gotten one of these upstreamed overnight.