Skip to content

Commit

Permalink
chore(deps): upgrade babel plugin proposals (carbon-design-system#11070)
Browse files Browse the repository at this point in the history
### Description

This upgrades various `@babel/plugin-proposal-` packages which have been merged to the ECMAScript standard and are no longer proposals.

### Changelog

**New**

- {{new thing}}

**Changed**

- upgrade various `@babel/plugin-proposal-` deps

**Removed**

- {{removed thing}}

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
kennylam authored Oct 30, 2023
1 parent 061a2e1 commit 0517e0d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
13 changes: 8 additions & 5 deletions carbon-web-components/packages/carbon-web-components/.babelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"plugins": [
"@babel/plugin-transform-typescript",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-class-properties",
["@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": true }],
"@babel/plugin-proposal-nullish-coalescing-operator",
["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": true }],
"@babel/plugin-proposal-optional-chaining",
["@babel/plugin-transform-runtime", { "useESModules": true, "version": "7.8.0" }]
"@babel/plugin-transform-nullish-coalescing-operator",
["@babel/plugin-transform-object-rest-spread", { "useBuiltIns": true }],
"@babel/plugin-transform-optional-chaining",
[
"@babel/plugin-transform-runtime",
{ "useESModules": true, "version": "7.8.0" }
]
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2022
* Copyright IBM Corp. 2020, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -39,8 +39,8 @@ async function reactTypes() {
plugins: [
['@babel/plugin-syntax-decorators', { decoratorsBeforeExport: true }],
'@babel/plugin-syntax-typescript',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-transform-nullish-coalescing-operator',
'@babel/plugin-transform-optional-chaining',
babelPluginCreateReactCustomElementTypeDef,
],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2022
* Copyright IBM Corp. 2020, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -45,8 +45,8 @@ const buildModulesReact = ({ banner, targetEnv = 'browser' }) => {
plugins: [
['@babel/plugin-syntax-decorators', { decoratorsBeforeExport: true }],
'@babel/plugin-syntax-typescript',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-transform-nullish-coalescing-operator',
'@babel/plugin-transform-optional-chaining',
[babelPluginCreateReactCustomElementType, { nonUpgradable: targetEnv === 'node' }],
],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@
},
"devDependencies": {
"@babel/core": "~7.12.0",
"@babel/plugin-proposal-class-properties": "~7.12.0",
"@babel/plugin-proposal-decorators": "~7.12.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "~7.12.0",
"@babel/plugin-proposal-object-rest-spread": "~7.12.0",
"@babel/plugin-proposal-optional-chaining": "~7.12.0",
"@babel/plugin-transform-class-properties": "~7.22.5",
"@babel/plugin-transform-modules-commonjs": "~7.12.0",
"@babel/plugin-transform-nullish-coalescing-operator": "~7.22.11",
"@babel/plugin-transform-object-rest-spread": "~7.22.15",
"@babel/plugin-transform-optional-chaining": "~7.23.0",
"@babel/plugin-transform-runtime": "7.18.5",
"@babel/plugin-transform-template-literals": "~7.12.0",
"@babel/plugin-transform-typescript": "~7.12.0",
"@babel/preset-env": "~7.12.0",
"@babel/preset-env": "~7.23.2",
"@babel/preset-modules": "^0.1.5",
"@babel/template": "~7.12.0",
"@babel/traverse": "~7.23.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2022
* Copyright IBM Corp. 2020, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -137,14 +137,14 @@ function getRollupConfig({
presets: ['@babel/preset-modules'],
plugins: [
'@babel/plugin-transform-typescript',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-class-properties',
[
'@babel/plugin-proposal-decorators',
{ decoratorsBeforeExport: true },
],
'@babel/plugin-proposal-nullish-coalescing-operator',
['@babel/plugin-proposal-object-rest-spread', { useBuiltIns: true }],
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-transform-nullish-coalescing-operator',
['@babel/plugin-transform-object-rest-spread', { useBuiltIns: true }],
'@babel/plugin-transform-optional-chaining',
...(mode === 'development'
? []
: [
Expand Down

0 comments on commit 0517e0d

Please sign in to comment.