Skip to content
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

Upgrades moongose and fixes to work with Node 8 #151

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Upgrades moongose and fixes to work with Node 8 #151

wants to merge 11 commits into from

Conversation

CGeorges
Copy link

@CGeorges CGeorges commented Nov 3, 2017

First release out of many that I'm planning to add.

Copy link
Contributor

@chikh chikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good ideas, but have a few questions...

@@ -9,7 +9,7 @@
"data-centric",
"RAD"
],
"version": "1.24.1",
"version": "1.25.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you are fixing bug (project doesn't work with the Node 8) according to the PR's title. So according to the http://semver.org/ it should be 1.24.2, shoudn't it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having that last update was too long ago, I wanted to avoid any build updates that might break existing projects. It can also be viewed as a feature "Support for Node8), along with the feature that I commited today.

@@ -1,5 +1,5 @@
{
"name": "AllcountJS",
"name": "allcountjs",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have you decided to change letter's case in the name?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per bower warning "bower invalid-meta The "name" is recommended to be lowercase, can contain digits, dots, dashes"

@@ -0,0 +1,8 @@
module.exports = require('./load-image')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain why you've added file blueimp-load-image? What is it for?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File was added by a bower package. I've removed it from repository and added it to .gitignore

package.json Outdated
@@ -58,13 +58,13 @@
"minimist": "^1.1.0",
"mkdirp": "~0.3.5",
"moment": "^2.6.0",
"mongoose": "~3.8.21",
"mongoose-long": "^0.0.2",
"mongoose": "^4.13.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating dependencies is a great idea, but I think it's better to stick with ~ or even "exact version" (no symbol) since ^ could possibly break something.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I've changed to only minor versions ~

package.json Outdated
"node-minify": "^1.2.1",
"parsimmon": "^0.4.0",
"passport": "^0.2.0",
"passport-local": "^1.0.0",
"q": "1.0.1",
"q": "^1.5.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I've changed to only minor versions ~

});
};

service.findRange = function (table, filteringAndSorting, start, count) {
// Force numeric
start = Number(start);
count = Number(count);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well... The idea is OK, but what if someone will pass not a number here? It's better to make full check here. And doesn't driver has it's own protection against wrong arguments?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start&Count are pagination related, they will always be integers. With Node8 and updated moongose this crashes allcountjs as it always expects a number. Unfortunately driver doesn't do the conversion, it would just crash with error.

@CGeorges
Copy link
Author

CGeorges commented Nov 6, 2017

I've made some changes as per your comments along with a new feature to allow filtering on other properties rather than ids for references. blueimp-image-load apparently comes from a bower package, i've removed the file from repository and added it to .gitignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants