Npm releases
Hi there,
Was wondering if there is an automated process to release to npm, and if not are you guys open for PR? Would be great if all commits to master generate a version to npm even its just a patch/development version.
I am looking to use draft-js as a node module dependencie and the current version on npm does not have some of the fixes
@zpao, thoughts?
For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for npm install: "repository": "npm/npm"
Via https://docs.npmjs.com/files/package.json
So in this case, dropping "draft-js": "facebook/draft-js" into your package.json would use the repo’s master branch. It’s effectively a dev version of Draft.
@gscottolson only problem with that is that we have a build step so it wouldn't actually work. You'd have to install dev dependencies and run the build process.
I personally think doing automated releases after every commit is pretty obnoxious and extraneous. I think releases should have a bit of coherence and planning around them, otherwise you're constantly fighting to keep up. Doing pretty frequent releases is totally fine though. We've only been out a week and I think at this point we probably have enough feedback and fixes to do another release. I haven't been watching closely so I'm not sure if we can call it a 0.1.1 or 0.2, nor do I know if there are things almost done that we'd like to get out. So I'll leave that up to @hellendag. What I think would be good is if we keep a running changelog so that each PR modifies that (I've been following the keepachangelog pattern with "unreleased" in the fbjs project) so that it's really easy to track and decide at any point in time what the next release should be called.
As @zpao has stated, unfortunately we cant just point to the git-hub repository. I also think that maybe a release on each commit could be an overkill and I also like the idea of running a change-log.
On the other hand would be great to have a way to test development branch via NPM, What could be done to work around the build step constraints that block us from being able to point to the git-hub repository directly? Is there any other viable solution?
We'll never be able to point here*. Some pieces could eventually be worked out (eg, using @providesModule) but other things like JSX and Flow annotations need to be compiled out. Even ES6 classes could probably stay in for a GH-only version.
I think this is especially painful in this first week as things get fixed quickly but won't actually be an issue longer term.
(* ok so we could do a really crappy thing and move devDeps into regular dependencies and then do the actual build step when installed but I really don't like that. It would work but I'd have to cry myself to sleep at night)
Thanks for the clarification, @zpao. I hope you get a restful night of sleep. :night_with_stars:
Why not just frequently release with @alpha/@beta/@test tags on npm? As @zpao pointed out, this repo was released only a week ago, but the API will likely change in the starting phase (at least new functions will be introduced like https://github.com/facebook/draft-js/blob/master/src/component/selection/getVisibleSelectionRect.js), which makes a quick release cycle imperative to test these out. Especially since this is mostly based on feedback and users needs.
I am happy with most of the suggestions in here, would be great however to have a new draftjs npm release soon, maybe something like 0.1.1
Aiming for Tuesday. :)
Trying to do releases as often as I can while making sure our use cases on FB remain stable. Hopefully it's been sufficient. :)