Skip to content

Commit e5de1c6

Browse files
benmccannmihar-22
authored andcommitted
fix: add back Node 12 support (#83)
1 parent 38961d6 commit e5de1c6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
runs-on: ${{ matrix.os }}
66
strategy:
77
matrix:
8-
node-version: [14, 16]
8+
node-version: [12, 14, 16]
99
os: [ubuntu-latest, windows-latest, macOS-latest]
1010
steps:
1111
- uses: actions/checkout@v1

src/transformer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const dynamicImport = async (filename) => import(pathToFileURL(filename))
1111
* Jest will only call this method when running in ESM mode.
1212
*/
1313
const processAsync = async (source, filename, jestOptions) => {
14-
const options = jestOptions?.transformerConfig ?? {}
14+
const options = jestOptions && jestOptions.transformerConfig ? jestOptions.transformerConfig : {}
1515
const { preprocess, rootMode } = options
1616

1717
if (!preprocess) {
@@ -34,7 +34,7 @@ const processAsync = async (source, filename, jestOptions) => {
3434
* However, Jest calls this method in CJS mode.
3535
*/
3636
const processSync = (source, filename, jestOptions) => {
37-
const options = jestOptions?.transformerConfig ?? {}
37+
const options = jestOptions && jestOptions.transformerConfig ? jestOptions.transformerConfig : {}
3838
const { preprocess, rootMode, maxBuffer, showConsoleLog } = options
3939
if (!preprocess) {
4040
return compiler('cjs', options, filename, source)

0 commit comments

Comments
 (0)