From abefc567509389328e4fcbc64b1b41f9c79baad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 14 Aug 2019 14:01:55 +0200 Subject: [PATCH] deps: add babel plugins for optional chaining and nullish coalescing They are in Stage 3 and are already dependencies or the React Native preset. References: https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator --- package-lock.json | 28 ++++++++++++++-------------- package.json | 2 ++ webpack.config.js | 8 ++++---- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 47c56a2c1..e2b1ec5b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1574,12 +1574,12 @@ } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.0.0.tgz", - "integrity": "sha512-QIN3UFo1ul4ruAsjIqK43PeXedo1qY74zeGrODJl1KfCGeMc6qJC4rb5Ylml/smzxibqsDeVZGH+TmWHCldRQQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.4.4.tgz", + "integrity": "sha512-Amph7Epui1Dh/xxUxS2+K22/MUi6+6JVTvy3P58tja3B6yKTSjwwx0/d83rF7551D6PVSSoplQb8GCwqec7HRw==", "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.0.0" + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.2.0" } }, "@babel/plugin-proposal-object-rest-spread": { @@ -1601,12 +1601,12 @@ } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.0.0.tgz", - "integrity": "sha512-7x8HLa71OzNiofbQUVakS0Kmg++6a+cXNfS7QKHbbv03SuSaumJyaWsfNgw+T7aqrJlqurYpZqrkPgXu0iZK0w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.2.0.tgz", + "integrity": "sha512-ea3Q6edZC/55wEBVZAEz42v528VulyO0eir+7uky/sT4XRcdkWJcFi1aPtitTlwUzGnECWJNExWww1SStt+yWw==", "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-optional-chaining": "^7.0.0" + "@babel/plugin-syntax-optional-chaining": "^7.2.0" } }, "@babel/plugin-proposal-unicode-property-regex": { @@ -1688,9 +1688,9 @@ } }, "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.0.0.tgz", - "integrity": "sha512-oAJmMsAvTSIk9y0sZdU2S/nY44PEUuHN7EzNDMgbuR4e/OwyfR9lSmoBJBZ2lslFZIqhksrTt4i+av7uKfNYDw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.2.0.tgz", + "integrity": "sha512-lRCEaKE+LTxDQtgbYajI04ddt6WW0WJq57xqkAZ+s11h4YgfRHhVA/Y2VhfPzzFD4qeLHWg32DMp9HooY4Kqlg==", "requires": { "@babel/helper-plugin-utils": "^7.0.0" } @@ -1712,9 +1712,9 @@ } }, "@babel/plugin-syntax-optional-chaining": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.0.0.tgz", - "integrity": "sha512-QXedQsZf8yua1nNrXSePT0TsGSQH9A1iK08m9dhCMdZeJaaxYcQfXdgHWVV6Cp7WE/afPVvSKIsAHK5wP+yxDA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.2.0.tgz", + "integrity": "sha512-HtGCtvp5Uq/jH/WNUPkK6b7rufnCPLLlDAFN7cmACoIjaOOiXxUt3SswU5loHqrhtqTsa/WoLQ1OQ1AGuZqaWA==", "requires": { "@babel/helper-plugin-utils": "^7.0.0" } diff --git a/package.json b/package.json index f9d0960c3..219c76a81 100644 --- a/package.json +++ b/package.json @@ -94,6 +94,8 @@ "@babel/plugin-proposal-class-properties": "7.1.0", "@babel/plugin-proposal-export-default-from": "7.0.0", "@babel/plugin-proposal-export-namespace-from": "7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "7.4.4", + "@babel/plugin-proposal-optional-chaining": "7.2.0", "@babel/plugin-transform-flow-strip-types": "7.0.0", "@babel/preset-env": "7.1.0", "@babel/preset-flow": "7.0.0", diff --git a/webpack.config.js b/webpack.config.js index d8f56f90c..ec54fd4d6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -45,10 +45,10 @@ const config = { plugins: [ require.resolve('@babel/plugin-transform-flow-strip-types'), require.resolve('@babel/plugin-proposal-class-properties'), - require.resolve( - '@babel/plugin-proposal-export-default-from'), - require.resolve( - '@babel/plugin-proposal-export-namespace-from') + require.resolve('@babel/plugin-proposal-export-default-from'), + require.resolve('@babel/plugin-proposal-export-namespace-from'), + require.resolve('@babel/plugin-proposal-nullish-coalescing-operator'), + require.resolve('@babel/plugin-proposal-optional-chaining') ], presets: [ [