Irrelon / ForerunnerDB

A JavaScript database with mongo-like query language, data-binding support, runs in browsers and hybrid mobile apps as a client-side DB or on the server via Node.js!

Home Page:http://www.irrelon.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Package.json file fixes

nmn opened this issue · comments

There are a number of problems with the package.json file as it stands right now.

  1. Don't use '*' for version number of dependencies:
    Using * or the latest version of all dependencies is a bad idea and can cause problems down the road when the dependencies introduce breaking changes. In order to stay up-to-date, we should provide either ranges of version numbers or the typical '^x.x.x' which follows server and updates to the newest non-breaking version of each dependency.
  2. Mention "main" file:
    The package.json file should mention a main file for both npm and node.js to be able to use it easily. Specifically, in case there is a fork down the road between the node.js version and the browser version, it becomes easy to just mention a browser: field to point to a different entry file for browsers via browserify or webpack.
  3. Change Dependencies to DevDependencies:
    Most of the dependencies that are mentioned in the package.json file are for development. But they are listed under the list of dependencies. As a result, all these meaningless dependencies are installed when I try to install ForefunnerDB for a project. Putting them under devDependencies, will solve the problem.

Agreed. Added to roadmap for 1.2.8. 👍

Pull Request ready for these changes. Don't know how to attach it to this thread so I'm making it separately.

Something didn't work right. Browserify isn't picking up the correct file even now. I'll try to fix it.

This issue has been fixed.