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
Conversation
], | ||
"plugins": ["object-assign"] | ||
"plugins": [ | ||
"transform-runtime" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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. |
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" |
There was a problem hiding this comment.
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
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 < |
Oh I see, I don't regard minor && patch versions as significant breaking changes (especially Since this is going against You can pick and choose as you like, but I have better luck staying up-to-date. |
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 |
(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 :) |
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. |
thanks 👍 |
@@ -54,7 +54,6 @@ | |||
}, | |||
"devDependencies": { | |||
"@monastic.panic/component-playground": "^2.0.0", | |||
"babel": "^6.5.2", |
There was a problem hiding this comment.
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
Working on the merge. |
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", |
There was a problem hiding this comment.
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
docs now build |
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", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
This reverts commit 6b30e2f.
"react-dom": "^15.0.1", | ||
"less": "^2.7.1", | ||
"less-loader": "^2.2.3", | ||
"lodash": "^4.13.1", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted these.
last few comments and then gtg, please Squash the commits as well. Many thanks |
You push merge and squash: |
Are you going to push the built |
Solves #62
What needs to be done (@jquense):