Ryan Dahl
b4ff36a41b
Add --cov code coverage option
14 years ago
Ryan Dahl
75db1995b6
Don't conflict with V8's Script class
Closes GH-203.
14 years ago
Ryan Dahl
4a9f2de956
Allow script to be read from stdin
14 years ago
Ryan Dahl
59f7232a30
Simplify startup function in src/node.js
14 years ago
Ryan Dahl
55048cdf79
Update copyright headers
14 years ago
Ryan Dahl
2a05fe784d
Do not use defineGetter in src/node.js for better crankshaft perf
See: https://groups.google.com/d/topic/nodejs/xJqpp1_s6is/discussion
14 years ago
cloudhead
a91b140963
fix process.on edge case with signal event
When adding a listener for a signal event, removing it, and
adding it back again, it triggers a condition with an
undefined variable.
14 years ago
Tj Holowaychuk
42a369620f
Fixed null signal preservation
Closes GH-674.
14 years ago
Ryan Dahl
3ec030535c
stderr should be EventEmitter even if it doesn't emit anything
14 years ago
Ryan Dahl
bc23ec8d05
Add process.stderr stream
14 years ago
Ryan Dahl
bfb6a67d60
Another fix for process.assert
14 years ago
Ryan Dahl
f9f0e5c75c
Pre-process out assert()
14 years ago
Felix Geisendörfer
91cc2d8c4b
Restructure src/node.js startup code
This patch introduces a logical structure and sequence for the
bootstrap code found src/node.js.
14 years ago
Ryan Dahl
9e976abad9
lint
14 years ago
Felix Geisendörfer
5a49f96505
Move commonjs module system into lib/module.js
This de-couples NativeModule from the module system and completes the
main objective of this refactoring.
14 years ago
Bert Belder
0b5bf70bff
Use tty.ReadStream and tty.WriteStream for stdio when appropriate
14 years ago
Felix Geisendörfer
0263f01475
Fix test-require-cache-without-stat.js
This path adds an additional cache to the module system for caching the
location of previously required modules. Since it is embedded in the
loop that iterates over all require.paths, this patch also handles the
case where require.paths is being modified.
The patch also cleans up some code around it.
See: https://groups.google.com/forum/#!topic/nodejs-dev/QGGlrvLDHVs
14 years ago
Felix Geisendörfer
f39fdf2610
Isolate native module system again
See: 2e5dfafcb0 (commitcomment-239719)
14 years ago
Ryan Dahl
d9087c10ad
style
14 years ago
Ryan Dahl
496be457b6
Allow third party hooks before main module load
Just put a file lib/_third_party_main.js into the build directory and take
it from there.
14 years ago
Felix Geisendörfer
f5fbb707b2
Fix NODE_PATH, was broken after cleanup
14 years ago
Felix Geisendörfer
f61277ecb0
Always init module paths
The previous cleanup patch broke module loading in the the REPL by
not initializing require.paths.
14 years ago
Felix Geisendörfer
2e5dfafcb0
Cleanup node module system code
14 years ago
Ryan Dahl
5342e3e925
expose module wrapper to native modules
14 years ago
Mihai Călin Bazon
0853730c35
realpath files during module load
14 years ago
Ryan Dahl
5a05992155
Lint
14 years ago
Bert Belder
1ac133ea6f
Replace string magic + path.join by path.resolve
Because path.resolve is more elegant and windows-safe.
14 years ago
isaacs
48334dc0b1
Fix regression introduced in fe804d9b
It breaks argv[0] on posix systems, and makes it so that npm can't
determine whether node was run from an explicit location, or via "node",
so the configs default improperly.
If on windows, don't do this behavior. On posix, go back to the old
behavior.
14 years ago
Bert Belder
fe6f363837
Revert "realpath files during module load"
This reverts commit 131546e733
.
Doesn't work on windows, coming back soon.
14 years ago
Mihai Călin Bazon
131546e733
realpath files during module load
14 years ago
Ryan Dahl
e4dd5cd6fd
NODE_DEBUG uses strings instead of bitflags
14 years ago
Ryan Dahl
2e3e95ee89
add process.stdin
14 years ago
Ryan Dahl
29626d8731
Syntax error hack for modules.
14 years ago
Ryan Dahl
1c7cd4aac3
Make syntax error display optional
Fixes GH-543
14 years ago
Ryan Dahl
90e55c3357
Rather have the debugger be parent process
14 years ago
Ryan Dahl
8d82ec2130
Add beginning of build-in debugger
+ test-debugger-client (which is currently broken)
14 years ago
Bert Belder
fe804d9bc7
_Partial_ backslash support in node.js argv directory munging
Doesn't do it when node is started from another drive using a drive-relative path.
E.g:
d:
cd nodejs
c:
d:node.exe d:test.js
14 years ago
Felix Geisendörfer
e27418ca3f
Prefer require.cache over native module cache
This patch changes node's module loading behavior so that the
require.cache is always the first place to consider when loading a
module.
The motivation for this change is to help people who are writing
focused tests for their node.js applications, and need a mechanism
to inject test doubles to replace native node.js modules.
14 years ago
Ryan Dahl
180dfca03f
Pretty error message messes up if readFileSync in main module fails.
TODO test/message test for this.
14 years ago
Ryan Dahl
5a21138e37
fix global leak
14 years ago
Anders Conbere
e9c7195471
Reworks the two functions traverser and findModulePath into a more readable form.
This is not the supposed end of these changes, but a first change that
should make future changes easier to reason about.
14 years ago
Ryan Dahl
da96e07bbe
fix global leak
14 years ago
Ryan Dahl
558e5ba2b0
lint util.js and src/node.js
14 years ago
Ryan Dahl
70188499b0
Lazy load console object
14 years ago
Ryan Dahl
b6face1dce
Remove unnecessary variable def
14 years ago
isaacs
b52b4196ab
Fix problem with requireNative not exporting 'module' object
Broke require('constants'). Add unrelated test which breaks it.
14 years ago
Ben Noordhuis
f0b8cc6a94
require() should work with `node --eval`.
with tests
Fix module path resolve bug. Normally the module path is taken from
realpath(__filename) but with eval there is (of course) no filename
14 years ago
Herbert Vojčík
3422263414
requireNative made independent on module system
14 years ago
Ryan Dahl
a16b3c3148
Use runInNewContext instead of process.compile
14 years ago
Ryan Dahl
b1088d6bd2
Load 'path' module with requireNative
(now that requireNative does not depend on path module)
14 years ago