If you have a circular require chain in which one or more of the modules are
referenced with a ".." relative path, like require("../foo"), node blows up.
This patch un-blows-up that case. There still seem to be issues with
circularity, but this solves one of the more obnoxious ones.
This way let's us do deep comparison between object instances.
I have a suggestion for the sys.inherits function. Today it's impossible to
deep comparison between instance and class.
Take this snippet for example:
function ClassA() {}
function ClassB() {}
sys.inherits(ClassB, ClassA);
var instance = new ClassB();
The instance variable inherits from ClassA but we can't check it (which is
useful sometimes). You can compare the instance against ClassB
(instance.constructor == ClassB) but we can't compare it deeper
(instance.constructor.super == ClassA). The committed change simply assign
super to the super constructor instead of the super prototype.
I can't see any problem with this fix. You can still get the super constructor
by calling super_.prototype.
Express (my framework) uses them as a default
response body when non is present. Others
might use them for something as well.
Beats duplicating the list :D
This is not a bug in process.mixin, but I think it is undesirable
behavior. Right now process.mixin will not copy over keys with undefined
values. To me that is an unexpected filtering that should not happen
unless specifically called for.
Bug #1 occurred when trying to use process.mixin on a function and
produced a fatal exception.
Bug #2 occurred when trying to do a deep merge with an object containing
one or more objects with a nodeType property. In those cases the deep
copy for this part of the object was not performed and a shallow one was
performed instead.
Both of these bugs were artifacts of the jQuery.extend port.
Change the http.Client API so that it provides a single request() method
taking an optional parameter to specify the HTTP method (defaulting to
"GET"), instead of the five methods get(), head(), post(), del() and put().
At the same time implement synchronous wrappers of the POSIX functions.
These will be undocumented until we settle on an API. Works like this
// returns promise as before
posix.mkdir("test").addCallback(function () {
sys.puts("done");
});
// returns undefined, executed synchronously.
posix.mkdirSync("test");
sys.puts("done");
This refactoring is a step towards allowing promises to be implemented
purely in javascript.