Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Babel 6 #3362

Merged
merged 1 commit into from
Apr 21, 2016
Merged

Upgrade to Babel 6 #3362

merged 1 commit into from
Apr 21, 2016

Conversation

taion
Copy link
Contributor

@taion taion commented Apr 20, 2016

It turns out what I was doing with the output of matchPattern was an abuse and only worked in loose mode. Granted, we're still using loose mode, but we might as well not abuse ES6 semantics.

@@ -94,37 +94,29 @@ export function matchPattern(pattern, pathname) {
}

const match = pathname.match(new RegExp(`^${regexpSource}`, 'i'))
if (match == null) {
return null
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure we want to change the possible output signature of an exported function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's explicitly not part of the public API.

Copy link
Member

Choose a reason for hiding this comment

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

I mean for internal usage. At least make this into:

return {
  remainingPathname: null,
  paramNames: null,
  paramValues: null
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated all consumers of matchPattern. It's a lot clearer to check for a null response value than check for e.g. matched.paramNames == null.

@timdorr
Copy link
Member

timdorr commented Apr 20, 2016

Maybe this should be against next? Babel 5 isn't hurting us right now, so I'd rather deal with the fallout in a major when things are going to change more substantially anyways.

@taion
Copy link
Contributor Author

taion commented Apr 20, 2016

It lets us drop displayName from the withRouter examples, though. Redux went from Babel 5 to Babel 6 between v3.2.0 to v3.2.1, so there's nothing specifically wrong with Babel 6 upgrades.

@timdorr
Copy link
Member

timdorr commented Apr 21, 2016

Eh, OK. It's your funeral if this doesn't work :P

@timdorr timdorr merged commit 52c268d into master Apr 21, 2016
@timdorr timdorr deleted the babel-6 branch April 21, 2016 05:24
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants