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

Babel 6 and dep updates #63

Merged
merged 13 commits into from Jun 21, 2016
Merged

Conversation

rosskevin
Copy link
Contributor

Solves #62

  • Updates to babel 6
  • Updates all dependencies
  • One test assertion debugged/fixed
  • travis.yml added
  • Tests pass

What needs to be done (@jquense):

  • need you to look at doc generation - error on globalization during generation - I'm unfamiliar
  • if you want to run travis, login to https://travis-ci.org/ and turn on this repo. The config should be ready to go

],
"plugins": ["object-assign"]
"plugins": [
"transform-runtime"
Copy link
Owner

Choose a reason for hiding this comment

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

no need for the runtime, i'd like to not rely on it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@jquense
Copy link
Owner

jquense commented Jun 16, 2016

Thanks for the PR!

the issue with the docs is not a simple one unfortunately, and why this has been mostly stuck at babel 5. I'll take a look at it though.

@rosskevin
Copy link
Contributor Author

Changed two things, tests pass. Didn't change the big swath of updated dependencies - can you be more specific on which one breaks what or should I just leave as-is for the moment?

"topeka": "^0.3.5",
"uncontrollable": "^3.2.4",
"warning": "^3.0.0",
"yup": ">=0.18.3"
Copy link
Owner

Choose a reason for hiding this comment

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

sorry similarly with yup, and topeka

@jquense
Copy link
Owner

jquense commented Jun 16, 2016

The react-bootstrap may be fine its just used for the docs, you can leave that one, but the direct deps anything that makes a major version bump (or minor bump if < 1.0.0) is a breaking change, and i don't quite trust the tests enough to rely on that (working on that).

@rosskevin
Copy link
Contributor Author

rosskevin commented Jun 16, 2016

Oh I see, I don't regard minor && patch versions as significant breaking changes (especially < 1.0), these are usually desperately needed fixes. So I take the opposite approach.

Since this is going against master, and I regard master as no guarantee of stability, I think we should we go ahead with fully up to date dependencies until we find an actual problem. At that point, we can revert a single one or more preferably update the tests and code to work.

You can pick and choose as you like, but I have better luck staying up-to-date.

@jquense
Copy link
Owner

jquense commented Jun 16, 2016

the thing is those deps are also owned by me. so I know they will break edge cases :P which is why they aren't updated yet. I would say tho it's a fairly common practice (in node land) to count the minor bump as breaking pre 1.0.0 you might want to watch out for that

@jquense
Copy link
Owner

jquense commented Jun 16, 2016

(I ask know they don't contain major bug fixes so don't worry there)

I've got some cod elocally that will take care of those Dependencies anyway :)

@rosskevin
Copy link
Contributor Author

Great! I'd like to depend on this and help maintain so getting everything up to date is a priority for me. I'll submit anything as a PR that I run into.

@jquense
Copy link
Owner

jquense commented Jun 16, 2016

thanks 👍

@@ -54,7 +54,6 @@
},
"devDependencies": {
"@monastic.panic/component-playground": "^2.0.0",
"babel": "^6.5.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

You still need babel-cli to build... that's a valid dev dep

@rosskevin
Copy link
Contributor Author

Working on the merge.

@rosskevin
Copy link
Contributor Author

Master still has a three tests that don't pass, so it is the same in this PR.

"eslint": "^2.12.0",
"eslint-plugin-react": "^5.1.1",
"file-loader": "^0.8.5",
"globalize": "^1.1.1",
Copy link
Owner

Choose a reason for hiding this comment

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

globalize was intentionally left at x.1.0 the API is vastly different then which is why those bits fail. I'd put that back

@rosskevin
Copy link
Contributor Author

docs now build

@rosskevin
Copy link
Contributor Author

I think this is good to merge to master. @jquense do you want to check it out now that docs are building?

@@ -2,6 +2,7 @@
"name": "react-formal",
"version": "0.17.9",
"description": "Classy HTML form management for React",
"jsnext:main": "src/index.js",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not correct – jsnext:main should be code transpiled to use ES modules rather than CJS modules, not the untranspiled source.

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'm not following you. The source appears to me to be ES2015, and tools that acknowledge jsnext:main can consume it as part of their transpilation pipelines. So as far as my experience with rollup goes, I need to do nothing to the src and this will work fine. Can you point to my misunderstanding?

Copy link
Contributor

Choose a reason for hiding this comment

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

The source is not ES2015 – it's whatever is valid Babel stage 0.

Moreover the target for jsnext:main isn't ES2015 anyway – it's ES5 with ES modules (rather than CJS modules).

Copy link
Owner

Choose a reason for hiding this comment

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

the big thing here is that the source uses jsx, which isn't valid javascript at all in its uncompleted form

Copy link
Contributor Author

@rosskevin rosskevin Jun 20, 2016

Choose a reason for hiding this comment

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

Let me restate then. jsnext:main isn't a standard, it's a pseudo and not one that is fully adopted. I don't think we want to bike shed it into jsnext:main:jsx or something like that in order to allow an app to use it. I see the point of wanting to constrain it to ES only, but what ES only app (have to assume it is react, though not necessarily jsx) would use this UI-only library in a transpilation pipeline that couldn't handle JSX? I realize this is a bigger and more complicated conversation, but lacking another meta indicator, why not use this until we have another way? As-is, I still have to go out of my way to include this in my webpack pipeline.

Copy link
Owner

@jquense jquense Jun 20, 2016

Choose a reason for hiding this comment

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

you are right we don't want bikeshedding anything, we don't need an indicator for general untranspiled code, the src folder signals enough.

JSNEXT is specifically for signally to environments and bundlers where the es module versions of your code is as an interminable solution until transpilation of modules isn't needed because they are natively supported. using it however we feel defeats the usefulness and validity of the convention ppl are trying to establish to solve a specific problem.

Copy link
Owner

@jquense jquense Jun 20, 2016

Choose a reason for hiding this comment

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

not sure what you mean about going out of your way to include this with webpack though... are you saying you can't just require it? you shouldn't have to configure anything to use this.

Copy link
Contributor Author

@rosskevin rosskevin Jun 20, 2016

Choose a reason for hiding this comment

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

Unfortunately, webpack doesn't look to resolve jsnext:main: webpack/webpack#1979 (comment)

I'm prototyping some local resolver code that will add these to my src loader pipeline, but it is really naive and only one level down. Without some kind of indicator, I'll be leaving out react-formal. Not a big deal, I'm just looking for a way to move forward.

Copy link
Owner

Choose a reason for hiding this comment

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

It's not clear why you'd even need webpack to look at that it already understands main. The code is already compiled there is nothing else to be done. Eventually you can get things like tree shaking in webpack 2 but again the point is not to have a general entry point for uncompiled code, but as a way to say "this is where code is that's in the es module format"

Copy link
Contributor Author

@rosskevin rosskevin Jun 20, 2016

Choose a reason for hiding this comment

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

I'm looking at tree shaking and general benefits of navigating code while developing. My local workaround failed miserably, so we are pretty much stuck until webpack catches up and some standardization happens anyway.

"react-dom": "^15.0.1",
"less": "^2.7.1",
"less-loader": "^2.2.3",
"lodash": "^4.13.1",
Copy link
Owner

Choose a reason for hiding this comment

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

This breaks doc code, you need to change the imports in metadata.jsx

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 reverted these.

@jquense
Copy link
Owner

jquense commented Jun 21, 2016

last few comments and then gtg, please Squash the commits as well. Many thanks

@rosskevin
Copy link
Contributor Author

@jquense jquense merged commit 17c1ce0 into jquense:master Jun 21, 2016
@rosskevin rosskevin deleted the babel-6-and-dep-updates branch June 21, 2016 19:21
@rosskevin
Copy link
Contributor Author

Are you going to push the built lib files to master or cut another release?

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.

None yet

3 participants