Skip to content

Conversation

agilgur5
Copy link
Contributor

@agilgur5 agilgur5 commented Nov 3, 2019

  • despite the upgrade to Babel 7 being mentioned in the blog post, it wasn't mentioned in the upgrade walkthrough or the CHANGELOG
  • if one were using the default, auto-generated .babelrc before SDK31, it would cause errors after upgrading to SDK31+, and there are no details about how to fix this when upgrading
  • the default babel config changed with SDK31 to a babel.config.js and no transform-react-jsx-source

I'm not sure if the PR I referenced in the added changelog entry is the correct one to use. While c75b43b of #2373 does change to babel.config.js, it seems to be internal changes only. The changes to the default, auto-generated .babelrc to babel.config.js in the template seemed to have changed in the old universe repo, which no longer exists. #4335 moved the templates over and is the only record I could find of these templates.

Why

I recently upgraded a project from SDK29 to SDK33, and while there were a handful of issues, the one that was most confusing was why I was getting Babel errors. The .babelrc config I was using before was the default, auto-generated one by Expo, not anything custom, but apparently it broke during the SDK31 upgrade. It broke, but nothing about changing the Babel config was mentioned in the upgrade walkthrough docs or in the CHANGELOG (there is a mention of upgrading to Babel 7 in the blog post, but it seemed mostly internal and SDK29 already used Babel 7 RC1). The default Babel config was changed though (no more transform-react-jsx-source) and was changed to a babel.config.js.

I only found out about this issue and its fix by searching online, and there seemed to have been a great many people similarly confused by this:

This is definitely a breaking change, and on top of that, based on the issues and upvotes, it affected a lot of people (and may still affect more who are lagging on upgrades too), so I think it should definitely be mentioned in the upgrade guides and changelog for SDK31

How

Added an entry to the changelog and upgrade docs so that it is clearly addressed for those seeking to upgrade

Test Plan

N/A, just docs

- despite the upgrade to Babel 7 being mentioned in the blog post, it
  wasn't mentioned in the upgrade walkthrough or the CHANGELOG
- if one were using the default, auto-generated .babelrc before SDK31,
  it would cause errors after upgrading to SDK31+, and there are no
  details about how to fix this when upgrading
- the default babel config changed with SDK31 to a babel.config.js
  and no transform-react-jsx-source
Copy link
Contributor

@sjchmiela sjchmiela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I'll apply these suggestions myself and merge this PR. 👏

@@ -74,6 +74,17 @@ Expo maintains ~6 months of backwards compatibility. Once an SDK version has bee
}
```

- If using the default `.babelrc`, change to `babel.config.js`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If using the default `.babelrc`, change to `babel.config.js`:
- If using the default `.babelrc`, change it to `babel.config.js`:

@@ -310,6 +310,7 @@ This is the log of notable changes to the Expo client that are developer-facing.
- Several Haptic enum types have been renamed: NotificationTypes → NotificationFeedbackType, ImpactStyles → ImpactFeedbackStyle
- Several AR enum types have been renamed: BlendShapes → BlendShape, FaceAnchorProps → FaceAnchorProp, PlaneDetectionTypes → PlaneDetection, WorldAlignmentTypes → WorldAlignment, EventTypes → EventType, AnchorTypes → AnchorType, AnchorEventTypes → AnchorEventType, FrameAttributes → FrameAttribute, TrackingStates → TrackingState, TrackingStateReasons → TrackingStateReason, TrackingConfigurations → TrackingConfiguration
- `Audio.Sound.create` has been renamed to `createAsync`
- upgrade `babel` to `7.0.0` by [@ide](https://github.com/ide) ([#2373](https://github.com/expo/expo/pull/2373))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- upgrade `babel` to `7.0.0` by [@ide](https://github.com/ide) ([#2373](https://github.com/expo/expo/pull/2373))
- Upgrade Babel to `7.0.0` by [@ide](https://github.com/ide) ([#2373](https://github.com/expo/expo/pull/2373))

@@ -72,6 +72,17 @@ Expo maintains ~6 months of backwards compatibility. Once an SDK version has bee
}
```

- If using the default `.babelrc`, change to `babel.config.js`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If using the default `.babelrc`, change to `babel.config.js`:
- If using the default `.babelrc`, change it to `babel.config.js`:

@@ -73,6 +73,17 @@ Expo maintains ~6 months of backwards compatibility. Once an SDK version has bee
}
```

- If using the default `.babelrc`, change to `babel.config.js`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If using the default `.babelrc`, change to `babel.config.js`:
- If using the default `.babelrc`, change it to `babel.config.js`:

@@ -97,6 +97,17 @@ Expo maintains ~6 months of backwards compatibility. Once an SDK version has bee
}
```

- If using the default `.babelrc`, change to `babel.config.js`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If using the default `.babelrc`, change to `babel.config.js`:
- If using the default `.babelrc`, change it to `babel.config.js`:

@sjchmiela sjchmiela closed this in c81137a Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants