Closed prettydiff closed 7 years ago
If Pretty Diff v2 is not published to NPM then I am not sure how Atom-Beautify will go about it.
There were packages that were not published to NPM and I added their GitHub link directly in package.json
, and then many users experienced Atom-Beautify installation failing to install and caused a lot of (too much) headache.
To list just a few:
This ended up being a huge, unnecessary, PITA. I am uninterested in doing that again.
So, unfortunately, I have no immediate solution for how to use Pretty Diff v2 if it is not available on NPM.
I am definitely surprised about the recent events regarding NPM and the conduct of its managers, however until there is an accepted and well adopted alternative Atom-Beautify will continue to use NPM, if only by extension through Atom's package manager, apm
.
Please let me know your thoughts and potential solutions/workarounds. Thank you.
Once I get version 2 ready for publication I will experiment with registering and publishing directly to the apm repository.
I am ready to publish Pretty Diff v2, but I am having trouble publishing to APM.
When I try:
apm publish prettydiff
I get:
Preparing and tagging a new version ✗
npm ERR! npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]
npm ERR! (run in package dir)
npm ERR! 'npm -v' or 'npm --version' to print npm version (2.13.3)
npm ERR! 'npm view <pkg> version' to view a package's published version
npm ERR! 'npm ls' to inspect current package/dependency versions
I am working through this now, and plan to have this up on APM as soon as I can and be free from NPM.
Quick note: apm is only for Atom packages. npm is for all Node.js packages.
@prettydiff how about making the next Pretty Diff -- which will be distributed over biddle -- a CLI beautifier for Atom-Beautify? Thus, biddle can be the requested installer for users who wish to user Pretty Diff and Atom-Beautify does not use an alternative package manager in its build step, etc.
Furthermore, if biddle can install packages globally, like npm, then maybe there is a way to still require Pretty Diff as a Node.js package instead of CLI with something similar to requireg for biddle.
This implementation would reside in https://github.com/Unibeautify/beautifier-prettydiff and be released along with Unibeautify version of Atom-Beautify.
Yep, this is the goal. I just moved biddle from alpha status to beta status. Not ready for prime time, but good enough for evaluation and to start collecting error reports. I still owe technical documentation and plan to provide it tomorrow.
I have a variant of Pretty Diff for CLI only and the zip file is 173,476 bytes which is a pretty considerable reduction from the nearly 30mb uncompressed full application that was sent to NPM. biddle is still in beta. More work needs to be done to find defects, but the minimal viable product is there and it seems stable.
Keeping everybody informed I have fixed biddle. Check it out now - https://github.com/prettydiff/biddle
I will republish Pretty Diff using biddle in production tomorrow. I am not ready to give it to Atom Beautify just yet though. I actually need users to play around with this thing for a bit so that I can get a sense of where the pain points are and just how bad it works for fails for other people. I wrote a getting started document at https://github.com/prettydiff/biddle/blob/master/documentation/gettingstarted.md
The documentation might be easier to read from the command line though as I included a markdown to CLI parser in biddle. The number at the end defines the word wrap limit:
node biddle markdown documentation/gettingstarted.md 80
Once I complete these two issues biddle will be ready for Atom Beautify:
Any updates?
I am working on this right now. I want to have it complete within the next two weeks.
I think Atom-Beautify will be able to support Pretty Diff as an external beautifier (not automatically installed via npm
/apm
). Users could install biddle
and then install prettydiff
and configure a path for Pretty Diff
for Atom-Beautify
to use. @prettydiff does this approach sound correct? If so, please submit a Pull Request to Atom-Beautify when you are ready. I think we will keep the old Pretty Diff
and add a second one for Pretty Diff 2
or something along those lines. Pretty Diff 1
support in Atom-Beautify because Node.js installed via npm
, and Pretty Diff 2
being a CLI beautifier installed by user. Thus we will be backwards compatible with current users while allowing other users to install Pretty Diff 2
as needed.
My eventual hope would be that other packages might also use biddle so that we can collect dependencies and have everything packaged and configured before a user downloads the software. biddle is OS agnostic and language agnostic. This way things remain up to date from our end and we catch problems related to dependencies before they hit user land. It also means less risk of failure from missing packages via apm/npm.
The only major external difference between Pretty Diff 1 and 2 is NPM. Although there are a lot of internal differences the API is still completely backwards compatible. Both execute from the command line in the very same way.
Status update.
Sorry for the long delay. I wrapped up (long overdue) work to write a new diff algorithm for Pretty Diff. I followed that up with writing a secondary hidden module system for biddle so that biddle itself can be enhanced with dependencies in a way that does not interfere with a user's installed application management or cause circular dependency resolution.
biddle advanced to version 1.0.0 and is production ready, https://github.com/prettydiff/biddle/issues/34
I am working on an enhancement to biddle right now with a new command update
. It will execute biddle's status
command to determine if an installed application is behind the latest published version and only then fetch/install the updated application over the existing application. My goal is to publish this enhancement tonight.
Upon publishing this enhancement I plan to prepare a video demo using the https://asciinema.org/ tool to introduce biddle and explain how to use it with examples.
I will finally begin enhancements to Pretty Diff's test/validation build to tear out git submodule support and then rely upon biddle for its one dependency. My goal is to have this work complete before end of tomorrow.
If all goes well then on Sunday morning biddle/Pretty Diff will be ready for inclusion into Atom Beautify for evaluation by third parties.
I have not finished this yet like I promised, but I am close. I believe the biddle part is done and here is a video demo: https://asciinema.org/a/118428
Pretty Diff 2x is ready for inclusion to Atom Beautify via biddle.
Hold on with taking action just yet. I will mostly work this to complete for Atom-Beautify. I failed to include the one dependency with Pretty Diff, but it will be there in the next release soon. Here is how this is going to work:
biddle status prettydiff
and if a later version is present then overwrite the existing app biddle update prettydiff
.Why?
I believe the distribution model used by NPM favors convenience of publishers without regard for user convenience. The goal of biddle is to invert that model as much as possible.... put the risk and sweat on the publishers so the users can just download 1 application that is always stable.
Pretty Diff v2 can be supported with the upcoming Executables+Docker installation features: https://github.com/Glavin001/atom-beautify/issues/1687
Step 1. Add a Docker image to https://github.com/Unibeautify/docker-beautifiers for Pretty Diff v2 Step 2. Add support for Pretty Diff v2's Docker image once Atom-Beautify's Executables+Docker features are complete. Step 3. Profit!
😄
Update: However, do note that this means Pretty Diff v2 will be treated as a CLI beautifier, instead of a Node.js beautifier. Therefore options will need to be passed down as CLI arguments, as well as any performance impacts because it is not run with the same Node.js process.
Published to v0.30.6
Pretty Diff v2 is about 1-2 weeks away. V2 will not be published to NPM though :(
For more information please see:
Pretty Diff will continue to publish to Bower, Github, and http://prettydiff.com and additional package managers are being investigated. Due to time limitations between this enhancement, my two jobs, and preparation for attendance at WOCS v2 will be released before additional publication and package management options are supported.