Allow require() of runtime helpers in Node.js 13.2-13.6 (#12893)

This commit is contained in:
Nicolò Ribaudo
2021-02-25 12:28:50 +01:00
committed by GitHub
parent 039eb2710d
commit bb558aaf28
7 changed files with 516 additions and 502 deletions

View File

@@ -0,0 +1,9 @@
================= require - auto ====================
typeof objectWithoutProperties: function
typeof objectWithoutProperties.default: function
obj: { b: 2, [Symbol(Symbol.toStringTag)]: 5 }
================= require - esm =====================
Error: Must use import to load ES Module: <ROOT>/packages/babel-runtime/helpers/esm/toPrimitive.js
=============== require - corejs ====================
typeof Set: function
arr: 1,2,3

View File

@@ -22,6 +22,8 @@ const expectedCjsAbsolute =
? "expected-cjs-absolute-10.txt"
: major === 13 && minor <= 1
? "expected-cjs-absolute-13.0.txt"
: major === 13 && minor <= 3
? "expected-cjs-absolute-13.2.txt"
: "expected-cjs-absolute.txt";
test(