Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -1,5 +1,5 @@
{
"version": "1.1.64",
"version": "1.1.69",
"name": "npm",
"publishConfig": {
"proprietary-attribs": false
@@ -39,7 +39,7 @@
"slide": "1",
"abbrev": "1",
"graceful-fs": "~1.1.1",
"minimatch": "~0.2.6",
"minimatch": "~0.2.8",
"nopt": "~2.0",
"rimraf": "2",
"request": "~2.9",
@@ -58,7 +58,7 @@
"chownr": "0",
"npmlog": "0",
"ansi": "~0.1.2",
"npm-registry-client": "~0.2.9",
"npm-registry-client": "~0.2.10",
"read-package-json": "~0.1.8",
"read-installed": "0.0.3",
"glob": "~3.1.14",
@@ -117,7 +117,7 @@
},
"scripts": {
"test": "node ./test/run.js && tap test/tap/*.js",
"prepublish": "npm prune ; rm -rf test/*/*/node_modules ; make -j4 doc",
"prepublish": "node bin/npm-cli.js prune ; rm -rf test/*/*/node_modules ; make -j4 doc",
"dumpconf": "env | grep npm | sort | uniq",
"echo": "node bin/npm-cli.js"
},
@@ -1,6 +1,4 @@
var c = require('child_process').spawn('array-bin', [], {
env: process.env }).on('close', function (code) {
if (code) throw new Error('exited badly with code = ' + code)
require('child_process').exec('array-bin', { env: process.env },
function (err) {
if (err && err.code) throw new Error('exited badly with code = ' + err.code)
})
c.stdout.pipe(process.stdout)
c.stderr.pipe(process.stderr)
@@ -1,5 +1,4 @@
require('child_process').spawn('dir-bin', [], {
env: process.env }).on('exit', function (code) {
if (code) throw new Error('exited badly with code = ' + code)
require('child_process').exec('dir-bin', { stdio: 'pipe',
env: process.env }, function (err) {
if (err && err.code) throw new Error('exited badly with code = ' + err.code)
})

@@ -8,6 +8,6 @@
"minimatch": "~0.1.0"
},
"scripts": {
"test": "bash test.sh"
"test": "node test.js"
}
}
@@ -0,0 +1,21 @@
var path = require("path")
var assert = require("assert")

process.env.npm_config_prefix = process.cwd()
delete process.env.npm_config_global
delete process.env.npm_config_depth

var npm = process.platform === "win32"
? path.resolve(process.env.npm_config_prefix, "../../npm")
: path.resolve(process.env.npm_config_prefix, "../../../bin/npm")

require("child_process").exec(npm + " ls --json", {
stdio: "pipe", env: process.env, cwd: process.cwd() },
function (err, stdout, stderr) {
if (err) throw err

var actual = JSON.parse(stdout).dependencies
var expected = require("./npm-shrinkwrap.json").dependencies

assert.deepEqual(actual, expected)
})

This file was deleted.

@@ -72,8 +72,14 @@ function exec (cmd, shouldFail, cb) {
// special: replace 'node' with the current execPath,
// and 'npm' with the thing we installed.
var cmdShow = cmd
cmd = cmd.replace(/^npm /, path.resolve(npmPath, "npm") + " ")
cmd = cmd.replace(/^node /, process.execPath + " ")
var npmReplace = path.resolve(npmPath, "npm")
var nodeReplace = process.execPath
if (process.platform === "win32") {
npmReplace = '"' + npmReplace + '"'
nodeReplace = '"' + nodeReplace + '"'
}
cmd = cmd.replace(/^npm /, npmReplace + " ")
cmd = cmd.replace(/^node /, nodeReplace + " ")

child_process.exec(cmd, {env: env}, function (er, stdout, stderr) {
if (stdout) {
@@ -138,6 +144,12 @@ function main (cb) {
installAllThenTestAll()

function installAllThenTestAll () {
var packagesToRm = packages.slice(0)
if (process.platform !== "win32") {
// Windows can't handle npm rm npm due to file-in-use issues.
packagesToRm.push("npm")
}

chain
( [ setup
, [ exec, "npm install "+npmpkg ]
@@ -147,7 +159,7 @@ function main (cb) {
, [ execChain, packages.map(function (p) {
return "npm test "+p
}) ]
, [ execChain, packages.concat("npm").map(function (p) {
, [ execChain, packagesToRm.map(function (p) {
return "npm rm " + p
}) ]
, installAndTestEach
@@ -157,16 +169,21 @@ function main (cb) {
}

function installAndTestEach (cb) {
chain
( [ setup
var thingsToChain = [
setup
, [ execChain, packages.map(function (p) {
return [ "npm install packages/"+p
, "npm test "+p
, "npm rm "+p ]
}) ]
, [exec, "npm rm npm"]
, publishTest
], cb )
]
if (process.platform !== "win32") {
// Windows can't handle npm rm npm due to file-in-use issues.
thingsToChain.push([exec, "npm rm npm"])
}
thingsToChain.push(publishTest)

chain(thingsToChain, cb)
}

function publishTest (cb) {
@@ -1,6 +1,6 @@
OPTION DOTNAME
EXTERN OPENSSL_cpuid_setup:NEAR
.CRT$XCU SEGMENT READONLY DWORD
.CRT$XCU SEGMENT READONLY ALIGN(8)
DQ OPENSSL_cpuid_setup

.CRT$XCU ENDS
@@ -40,6 +40,23 @@ encoding method. Here are the different string encodings.

* `'hex'` - Encode each byte as two hexadecimal characters.

`Buffer` can also be used with Typed Array Views and DataViews.

var buff = new Buffer(4);
var ui16 = new Uint16Array(buff);
var view = new DataView(buff);

ui16[0] = 1;
ui16[1] = 2;
console.log(buff);

view.setInt16(0, 1); // set big-endian int16 at byte offset 0
view.setInt16(2, 2, true); // set little-endian int16 at byte offset 2
console.log(buff);

// <Buffer 01 00 02 00>
// <Buffer 00 01 02 00>

## Class: Buffer

The Buffer class is a global type for dealing with binary data directly.
@@ -71,14 +71,6 @@ Process files with the extension `.sjs` as `.js`:

require.extensions['.sjs'] = require.extensions['.js'];

Write your own extension handler:

require.extensions['.sjs'] = function(module, filename) {
var content = fs.readFileSync(filename, 'utf8');
// Parse the file content and give to module.exports
module.exports = content;
};

## __filename

<!-- type=var -->