Skip to content

Commit

Permalink
fix: update babel preset to include class transforms for hermes (#606)
Browse files Browse the repository at this point in the history
closes #605
  • Loading branch information
satya164 authored Aug 1, 2024
1 parent ab999bf commit f0a7a2f
Show file tree
Hide file tree
Showing 4 changed files with 702 additions and 1,365 deletions.
8 changes: 4 additions & 4 deletions packages/create-react-native-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
"yargs": "^17.5.1"
},
"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/core": "^7.18.5",
"@babel/preset-env": "^7.18.2",
"@babel/preset-typescript": "^7.17.12",
"@babel/cli": "^7.24.8",
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.2",
"@babel/preset-typescript": "^7.24.7",
"@commitlint/config-conventional": "^17.0.2",
"@types/cross-spawn": "^6.0.2",
"@types/dedent": "^0.7.0",
Expand Down
14 changes: 9 additions & 5 deletions packages/react-native-builder-bob/babel-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ module.exports = function (api, options, cwd) {
{
targets: browserslist.findConfig(cwd) || {
browsers: [
'>1%',
'last 2 chrome versions',
'last 2 edge versions',
'last 2 firefox versions',
'last 2 safari versions',
'> 1%',
'chrome 109',
'edge 124',
'firefox 127',
'safari 17.4',
'not dead',
'not ie <= 11',
'not op_mini all',
Expand All @@ -45,6 +45,10 @@ module.exports = function (api, options, cwd) {
],
plugins: [
require.resolve('@babel/plugin-transform-strict-mode'),
require.resolve('@babel/plugin-transform-private-methods'),
require.resolve('@babel/plugin-transform-private-property-in-object'),
require.resolve('@babel/plugin-transform-class-properties'),
require.resolve('@babel/plugin-transform-classes'),
[
require.resolve('./lib/babel'),
{
Expand Down
16 changes: 10 additions & 6 deletions packages/react-native-builder-bob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,16 @@
]
},
"dependencies": {
"@babel/core": "^7.18.5",
"@babel/core": "^7.25.2",
"@babel/plugin-transform-class-properties": "^7.24.7",
"@babel/plugin-transform-classes": "^7.25.0",
"@babel/plugin-transform-private-methods": "^7.24.7",
"@babel/plugin-transform-private-property-in-object": "^7.24.7",
"@babel/plugin-transform-strict-mode": "^7.24.7",
"@babel/preset-env": "^7.18.2",
"@babel/preset-flow": "^7.17.12",
"@babel/preset-react": "^7.17.12",
"@babel/preset-typescript": "^7.17.12",
"@babel/preset-env": "^7.25.2",
"@babel/preset-flow": "^7.24.7",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"babel-plugin-module-resolver": "^5.0.2",
"browserslist": "^4.20.4",
"cosmiconfig": "^9.0.0",
Expand All @@ -69,7 +73,7 @@
"yargs": "^17.5.1"
},
"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/cli": "^7.24.8",
"@jest/globals": "^29.7.0",
"@types/babel__core": "^7.1.19",
"@types/browserslist": "^4.15.0",
Expand Down
Loading

0 comments on commit f0a7a2f

Please sign in to comment.