It looks like the process to create the NPM packages is flawed, for the last several releases. The latest version (1.3.8) just contains the contents of the github repository, not the compiled package, ready for use. Additionally, the contents of the package.json inside the npm package (https://registry.npmjs.org/file-saver/-/file-saver-1.3.8.tgz) seem to contain 1.3.3 information, except for one entry at the bottom which states version: "1.3.8".
While I applaud the rapid code commits, broken packages are hindering the project usefulness.

file-saver-1.3.8 - package.zip

True. It f*ed up building of my project too :/
As far as I can tell, FileSaver.js is a vanilla JS module. Not sure what you would need different, it works fine for me.
The purpose of an npm package is to provide a compiled, minified, etc. version of the application that can be easily installed and updated with newer versions as they are published or choose a particular version. Currently, the npm package is basically just a copy of what is in github, which is incorrect. Further it seems to have been messed up since version 1.3.4 to varying degrees. Either the data inside the npm package used outdated information, was out of sync with the github repository, or was not even compiled correctly, and each new 'release' overwrites the previous release in the npm registry. For example, where is version 1.3.7 which was there previously?
In your case, you may be satisfied with a static, stale version of the application. In that case, feel free to just include the file from github (no offense to your process).
I would prefer to use a correctly formatted and updated npm package, as it is meant to be used. As such, I believe the npm packaging and deployment process should be corrected.
I do agree, and after some more deliberation, we stopped using this package
due to it's issues/incompleteness, although EVERYONE seems to recommend
using it.
On Mon, Apr 2, 2018, 12:15 PM edlangjr notifications@github.com wrote:
The purpose of an npm https://www.npmjs.com package is to provide a
compiled, minified, etc. version of the application that can be easily
installed and updated with newer versions as they are published or choose a
particular version. Currently, the npm package is basically just a copy of
what is in github, which is incorrect. Further it seems to have been messed
up since version 1.3.4 to varying degrees. Either the data inside the npm
package used outdated information, was out of sync with the github
repository, or was not even compiled correctly, and each new 'release'
overwrites the previous release in the npm registry. For example, where is
version 1.3.7 which was there previously?In your case, you may be satisfied with a static, stale version of the
application. In that case, feel free to just include the file from github
(no offense to your process).I would prefer to use a correctly formatted and updated npm package, as it
is meant to be used. As such, I believe the npm packaging and deployment
process should be corrected.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/eligrey/FileSaver.js/issues/433#issuecomment-377967035,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACMx27dRb-sJvNHAskmIxmow_fnf7Q1Sks5tkk6PgaJpZM4TCvr0
.
I tried to install it by bower, it only contains bower.json without the source code or dist folder with source code.
same here
I have forced package manager to use 1.3.3 version, instead of expression ^1.3.3. Next time if you plan to do such major change then maybe consider also change od number to 1.4.0 or something... Please...
Going with "1.3.3" directly (not "^1.3.3) may be an okay stop gap measure. Bumping the major version is not really a solution though as the latest changes were pretty minor code fixes (keep semantic versions correct).
But as I mentioned earlier, the bigger problem there is that the older versions (major, minor, etc...) were removed/replaced (and with something broken). Having used version "1.3.7" for example would have failed because there is no 1.3.7 version in the NPM repository any longer. Will "1.3.3" also disappear?
The NPM package generation process really does need to be corrected.
+1
It seems both filesaver.js and download-js just doesn't care about npm releases. Maybe the authors who specialize in downloading really don't like uploading :-)
Anyway, to get the master branch for this one, the right command is:
yarn add eligrey/FileSaver.js
...
import { saveAs } from 'file-saver/src/FileSaver'
Most helpful comment
I tried to install it by bower, it only contains bower.json without the source code or dist folder with source code.