Skip to content
This repository was archived by the owner on Dec 6, 2021. It is now read-only.

Commit 745c66b

Browse files
authored
feat(babel): Add optional chaining support to default babel preset (#682)
1 parent e8f4431 commit 745c66b

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

core/poi/lib/babel/preset.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ module.exports = (
123123
require.resolve('@babel/runtime/package.json')
124124
)
125125
}
126-
]
126+
],
127+
require('@babel/plugin-proposal-optional-chaining')
127128
].filter(Boolean)
128129

129130
return {

core/poi/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@babel/core": "^7.1.6",
2020
"@babel/plugin-proposal-class-properties": "^7.1.0",
2121
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
22+
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
2223
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
2324
"@babel/plugin-syntax-jsx": "^7.0.0",
2425
"@babel/plugin-transform-flow-strip-types": "^7.1.6",

yarn.lock

+20
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@
291291
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670"
292292
integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==
293293

294+
"@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
295+
version "7.8.3"
296+
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670"
297+
integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==
298+
294299
"@babel/helper-regex@^7.0.0":
295300
version "7.0.0"
296301
resolved "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27"
@@ -488,6 +493,14 @@
488493
"@babel/helper-plugin-utils" "^7.0.0"
489494
"@babel/plugin-syntax-optional-catch-binding" "^7.0.0"
490495

496+
"@babel/plugin-proposal-optional-chaining@^7.9.0":
497+
version "7.9.0"
498+
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz#31db16b154c39d6b8a645292472b98394c292a58"
499+
integrity sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==
500+
dependencies:
501+
"@babel/helper-plugin-utils" "^7.8.3"
502+
"@babel/plugin-syntax-optional-chaining" "^7.8.0"
503+
491504
"@babel/plugin-proposal-unicode-property-regex@^7.0.0":
492505
version "7.0.0"
493506
resolved "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz#498b39cd72536cd7c4b26177d030226eba08cd33"
@@ -546,6 +559,13 @@
546559
dependencies:
547560
"@babel/helper-plugin-utils" "^7.0.0"
548561

562+
"@babel/plugin-syntax-optional-chaining@^7.8.0":
563+
version "7.8.3"
564+
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a"
565+
integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==
566+
dependencies:
567+
"@babel/helper-plugin-utils" "^7.8.0"
568+
549569
"@babel/plugin-syntax-typescript@^7.0.0":
550570
version "7.1.5"
551571
resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.1.5.tgz#956a1f43dec8a9d6b36221f5c865335555fdcb98"

0 commit comments

Comments
 (0)