-
Notifications
You must be signed in to change notification settings - Fork 147
v3.2.15 regression with babel/register and jest #747
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I'm guessing this change. Could you create a repro repo?
Yes, please! Thank you! |
@jdalton on second thought, I think I was using jest is transforming files implicitly with babel, unless overwritten: it seems bridging with my gut feeling tells me it should be left alone, until til then I just let jest using babel for es6 module transforms: // babel.config.js
const {
env: { NODE_ENV },
} = process
const isTest = NODE_ENV === 'test'
const plugins = ['@babel/plugin-transform-flow-strip-types']
if (isTest) {
plugins.push('@babel/plugin-transform-modules-commonjs')
}
module.exports = {
plugins,
} |
If the scenario worked before and now doesn't I'd still like a repro to investigate. Update: Related issue nuxt/nuxt#5203 (comment) Update: From 3.2.14...3.2.15 I think maybe this could be the problem patch dd7d96f. It moved setting the prototype after setting properties. I did this because I thought it would allow setting more properties (since if a non-writable property exists on a prototype it will not be written as an own property either). However, it looks like these added properties are causing problems. Update: Or more likely this change fc232ac#diff-5708a2c960a8a812847884b65cd4590fR154. As it changes the setting of the |
hey @jdalton , sorry, been too busy yesterday. looking into repro now .... update:
I omitted any babel-plugin, babel.config.js etc. as it doesn't seem to be needed to cause the exception. |
Also ran into a related issue with webpack validation
|
@dnalborczyk Thanks for the repro. Confirmed the patch has fixed it. Update
|
the following works with esm v3.14.0 and less, fails with v3.15.0+:
stack trace
@jdalton I can look into creating a test case if you want to keep supporting this scenario.
(changed versions)
The text was updated successfully, but these errors were encountered: