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

Use native ES6 classes over Uptown #166

Closed
wants to merge 3 commits into from
Closed

Use native ES6 classes over Uptown #166

wants to merge 3 commits into from

Conversation

kylef
Copy link
Member

@kylef kylef commented Jan 9, 2018

This removes the dependency on Uptown and uses ES6 classes which are available in Node 4, the lowest Node we support.

Transpilation is done for the browser distribution to maintain compatibility for all browsers.

I've also added use of const/let over var while I was at it.

DO NOT MERGE

As of right now, this change would break downstream minim-api-description and minim-parse-result due to babel/babel#6299 (Babel-transpiled class can't extend from native class), a fix for this can be found in Babel 7 (there are betas available but no final release). We could move peasant and other minim libraries to Babel 7.

An alternative, perhaps we can move minim-* packages to work similar to minim. Where the node sources are not transpiled and instead written for plain Node 4 and then just transpired for the web distribution.

@pksunkara
Copy link
Contributor

I would prefer the babel7 thing. Otherwise, we have to change a lot of code

@kylef kylef force-pushed the kylef/es67 branch 2 times, most recently from f135fd1 to 77369a6 Compare January 9, 2018 02:03
@pksunkara
Copy link
Contributor

@kylef Do we need this anymore?

@kylef
Copy link
Member Author

kylef commented Jun 11, 2018

I'd love to move to ES6 at some point, but I'd say it isn't a priority (if it isn't broken don't "fix" it). Will close PR as it certainly needs to be done again as things have changed and there is large conflict which will be difficult to fix. If done again we should do it more incrementally piece by piece.

@kylef kylef closed this Jun 11, 2018
@kylef kylef deleted the kylef/es67 branch June 11, 2018 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants