Skip to content

Commit

Permalink
Enable React automatic runtime
Browse files Browse the repository at this point in the history
- Enable the React automatic runtime for the classifier and Zooniverse React Components.
- Fix `@babel/runtime` in classifier builds.
  • Loading branch information
eatyourgreens committed Nov 28, 2022
1 parent 9a89c35 commit 5bc82bb
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
8 changes: 6 additions & 2 deletions packages/lib-classifier/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"@babel/plugin-proposal-logical-assignment-operators"
],
"presets": [
"@babel/preset-react",
["@babel/preset-react", {
"runtime": "automatic"
}],
["@babel/preset-env", {
"modules": false,
"targets": {
Expand All @@ -24,7 +26,9 @@
],
"presets": [
"@babel/preset-env",
"@babel/preset-react"
["@babel/preset-react", {
"runtime": "automatic"
}]
]
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/lib-classifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build-storybook": "build-storybook"
},
"dependencies": {
"@babel/plugin-transform-runtime": "~7.19.1",
"@babel/runtime": "~7.19.1",
"@sentry/browser": "~7.21.0",
"@visx/axis": "~2.14.0",
"@visx/event": "~2.6.0",
Expand Down Expand Up @@ -54,6 +54,7 @@
"@babel/core": "~7.20.2",
"@babel/plugin-proposal-decorators": "~7.20.0",
"@babel/plugin-proposal-logical-assignment-operators": "~7.18.6",
"@babel/plugin-transform-runtime": "~7.19.1",
"@babel/preset-env": "~7.20.2",
"@babel/preset-react": "~7.18.6",
"@babel/register": "~7.18.6",
Expand Down
4 changes: 3 additions & 1 deletion packages/lib-react-components/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"babel-plugin-styled-components"
],
"presets": [
"@babel/preset-react",
["@babel/preset-react", {
"runtime": "automatic"
}],
"@babel/preset-env"
]
}
9 changes: 7 additions & 2 deletions packages/lib-react-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased] 2022-11-08

### Changed
- Enabled the React automatic runtime.

## [1.2.1] 2022-11-03

### Added
- export `useProgressiveImage` hook.
- Export `useProgressiveImage` hook.

### Changed
- removed `react-progressive-image` from the `Media` component.
- Removed `react-progressive-image` from the `Media` component.

## [1.2.0] 2022-10-03

Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,13 @@
dependencies:
regenerator-runtime "^0.13.10"

"@babel/runtime@~7.19.1":
version "7.19.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.4.tgz#a42f814502ee467d55b38dd1c256f53a7b885c78"
integrity sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==
dependencies:
regenerator-runtime "^0.13.4"

"@babel/template@^7.12.7", "@babel/template@^7.18.10", "@babel/template@^7.18.6":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71"
Expand Down

0 comments on commit 5bc82bb

Please sign in to comment.