All Issues
24,993 verified issues
Best way to validate an ObjectId
I'm inserting some objectIds as references and I want to make sure that they are valid objectids (right now I'm getting a crash when they aren't valid ids). I'm checking to see if they refer to valid objects by just doing a find() call. How should I check if the strings are in the correct format? I've seen some regexs that check if the string is a 24 character string and stuff like that - seems like a hack. Is there an internal validator on the ObjectId? I couldn't figure out how to use it. Thanks so much!
Add .catch to mpromise
Hey, I noticed that mpromise does not have a .catch, like the promise library we use (bluebird). It's a nice and simple feature, and makes one's promise chains a quite readable. Note, that I did check, that .catch is not part of the Promise/A+ specs, however it does seem to be part of the ECMA Script 6 proposed specs. ( https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promisecatch ) I saw the discussion here ( https://github.com/LearnBoost/mongoose/issues/1699 ), that mpromise will eventually be just a schim until node promises arrive, and I checked out unstable node, the Promise there did have a .catch.
Add support for registry authentication
I was having issues with the cert chain, so I followed what is on this thread for docker-osx: https://github.com/dotcloud/docker/issues/3683 . I'm able to do a docker login just fine using a new binary on mac os x. However when using fig and having the Dockerfile pull from the same private registry I get the following error using fig build: Step 1 : FROM ssl-repo.com/image Pulling repository ssl-repo.com/image Error: Authentication is required. Does fig read the .dockercfg? Any other ideas on what the issue could be here?
Failing to automatically re-connect to New PRIMARY after a replica set failover , from Mongoose (MongoDB, NodeJS Driver)
I am not sure if this is a bug or some mis-configuration from my end. How to solve this ? I made a simple NodeJS App, with Mongoose as MongoDB Driver. And connected to a mongodb replica set. The App is working fine until I shut down the current primary, When the PRIMARY is down, the replica set automatically elected a new PRIMARY. But, after that the node application doesn't seems to be responding for DB queries. CODE: DB Connection [code block] CODE: DB Query [code block] Steps Followed Created a MongoDB replica set in three VMs. Created a simple nodeJS App (Express + Mongoose) with a test API as above Sent GET request to 'test' continuously with some time interval to the app from a local system. Took the PRIMARY instance down APPLICATION STOPPED RESPONDING TO REQUESTS Varsions: "express": "4.10.6", "mongodb": "1.4.23", "mongoose": "3.8.21", A sample app that I have done for debugging this issue is available at https://melvingeorge@bitbucket.org/melvingeorge/nodejsmongorssample.git
Readline errors when running binary on arch linux
Hi! If I get the binary from `https://github.com/orchardup/fig/releases/download/0.3.2/linux` and run on my Arch Linux, I get a few errors on startup: [code block] However, if I install directly from pip, these errors don't appear. From a bit of googling it seems to me they are related to the readline version... Might be some incompatibility with a bundled library in the binary version. I haven't had any issues apart from the annoying messages though (console apps work fine).
Error on installing socket.io - iojs 3.0.0
When I try to install `socket.io` using node v0.12.7 (npm v2.11.3) all works fine [code block] however when I use io.js v3.0.0 (npm v2.13.3), the following is displayed: [code block]
Setting baseURL in default configuration
In some cases my app requires different defaults from the standard ones, and I've been dealing with this by putting something like this in the app's entry point: [code block] My tests are run in Node and I want to override the `baseURL` so that axios will work with Nock even with relative URLs, but the code above doesn't work. Would it be reasonable to add this parameter to the defaultConfig when instantiating Axios? Or is there a better way I should be doing this? I have an example of what I mean here.
Epic: Windows support
This is a meta-issue for keeping track of all the things we're doing around Windows support for Compose. Various things that are part of this: - Building a binary on Windows. PyInstaller, the method we currently use to build binaries for Linux and OS X, also works with Windows. In theory this should just work. It would be useful to have build scripts etc to automate this. - Run Compose inside a container. This may be be easier than building a native binary for Windows. https://github.com/docker/compose/issues/169 https://github.com/docker/compose/pull/1806 - Making Compose Windows compatible. I expect this will be mostly making sure paths work and getting the TTYs to work. - Volume sharing. When running Compose on OS X, it expects `/Users` to be mounted in the right place so volumes work. I wonder if we need something added to Machine/boot2docker to make volumes work as expected on Windows. (The Compose quick start guide has a demonstration of how volumes are used to mount code inside a container.) - Run CI tests on Windows. We don't all test on Windows, so we'd have to be careful about regressions. https://github.com/docker/compose/issues/886 Steps: - [x] Investigate whether binaries will build cleanly on Windows https://github.com/docker/compose/issues/1051 - [x] Investigate whether running Compose inside a container will be easier than running it natively on Windows Related issues: - https://github.com/docker/compose/issues/598
Can't install on Windows with Node 0.12
`npm install socket.io` fails brutally on Windows 8.1 and 7 with Node 0.12, returning errors such as: [code block] Same Node version on Mac OS gives no error at all. Build tools: Microsoft Visual Studio 2013. Full log: https://gist.github.com/frapontillo/e3416bccb5c3cffb4339
TypeScript support for JSX
Would be great if JSX recognized TypeScript constructs.
use Q.js
use Q.js
Configure the promise implementation
I wish to provide my own Promise implementation (core-js), so I do not want browserify do bundle the es6-promise module. Is there a simple way to configure axios not to require this module? [code block]
js-bson: Failed to load c++ bson extension, using pure JS version
I clicked on `Fork`, cloned the repo and I attached this module to my project. I get this error [code block] `nodejs v0.11.13`, latest `osx`. It looks that the problem is with the `mongodb` module (works with bson 0.2.15).
Should I use GraphQL for fine-grained validation?
For example, I want to validate an `email` field. Should I define my own `email scalar type` or just use `GraphQLString` and validate the value in the `resolve` function? [code block] Similar question for checking the `length` of a string. If I have a field that map to a `VARCHAR(100)` in a MySQL database, should I create a specific scalar that check for a valid length? Not sure if it's belongs to GraphQL... or if it is a good practise. Any thoughts? Thanks
'calculateObjectSize' of null
I recently started receiving this error: [code block] And a while later after restarting: [code block] Here are my mongoose dependencies. [code block] Any ideas?
Suggestion: read-only modifier
Some properties in JavaScript are actually read-only, i.e. writes to them either fail silently or cause an exception. These should be modelable in TypeScript. Previous attempts to design this have run into problems. A brief exploration: [code block] Possible solutions? - Allow bivariance of mutability: this is very unsound - Something else clever? C++ did not do well with const contamination
Update logo
What we'd like to do is evolve our current logo. This is what it looks like today: The website adds the text "ESLint" to the right of the logo. While we generally like the logo, it seems like it's time for a refresh (I'm think of a refresh along the lines described in this Node.js issue). What we're looking for: 1. An iteration on the existing logo - so not a complete redesign 2. Still using one or more shades of purple 3. Typography to go with the logo 4. Something that works well with black-and-white, 3-4 colors, as well as full color Our goal is to have a logo that is fit for use on stickers, tshirts, the website, and more. Note: we are a team of volunteers with no budget who donate our time to the project, and as such, this is a request for a donyof your design skills for the project. We will happily give you credit for your work. <bountysource-plugin> Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Express without template engine?
Hi, I'm trying to do something with Express and angular, and a problem confused me for several days.. How to use Express without template engine? I mean , I just wanna use HTML files, as I wanna angular's route.js to control the HTML files sended to browser, not express render the HTMLs, like this: route.js (angular) `$routeProvider.when( '/' , { templateUrl: '../../.html', .... })` Then I needn't to write `res.render(...)` in express.route. I found a solution like this on stackoverflow: `app.engine('html', require('ejs').renderFile)` `app.set('view engine', 'ejs')` That's not what I want. I still need to write `res.render(' .html')` in my express.route. And I don't wanna put these HTML files in express.static(), either. I don't think that's a good idea for angular. So, How to use Express without template engine? Just use HTML files without set template engine? Really hope your replies soon.
Decorators
> ES7 proposal > > The ES7 proposal for decorators can be found here: https://github.com/wycats/javascript-decorators > The ES7 proposal serves as the base of this proposal. Below are notes about how the type system Decorator targets: Class constructor [code block] desugars to: [code block] Methods [code block] desugars to: [code block] Static method [code block] desugars to: [code block] Properties [code block] desugars to: [code block] Method/Accessor formal parameter [code block] desugars to: [code block] Where the __decorate is defined as: [code block] Decorator signatures: A valid decorator should be: 1. Assignable to one of the Decorator types (ClassDecorator | PropertyDecorator | MethodDecorator | ParameterDecorator) as described below. 2. Return a value (in the case of class decorators and method decorator) that is assignable to the decorated value. [code block] Notes: - Decorating a function declaration is not allowed as it will block hoisting the function to the top of the scope, which is a significant change in semantics. - Decorating function expressions and arrow functions are not supported. The same effect can be achived by applying the decorator function as `var x = dec(function () { });` - Decorating function formal parameters is currently not part of the ES7 proposal. - Decorators are not allowed when targeting ES3
Message related to kerberos is out to console in 4.4.2
[code block] on nodejs 0.12.9