From d061dde17465f95f48ed8ac5a47b31eacc36c771 Mon Sep 17 00:00:00 2001 From: mark hughes Date: Thu, 1 Dec 2016 10:24:08 -0600 Subject: [PATCH 1/3] changes var to let & const as appropriate change tests to use assert.strictEqual vs assert.equal --- test/parallel/test-signal-unregister.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-signal-unregister.js b/test/parallel/test-signal-unregister.js index b65ade73db9422..88c6a367a9cb37 100644 --- a/test/parallel/test-signal-unregister.js +++ b/test/parallel/test-signal-unregister.js @@ -1,13 +1,13 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var spawn = require('child_process').spawn; +const common = require('../common'); +const assert = require('assert'); +const spawn = require('child_process').spawn; -var child = spawn(process.argv[0], [common.fixturesDir + '/should_exit.js']); +const child = spawn(process.argv[0], [common.fixturesDir + '/should_exit.js']); child.stdout.once('data', function() { child.kill('SIGINT'); }); child.on('exit', common.mustCall(function(exitCode, signalCode) { - assert.equal(exitCode, null); - assert.equal(signalCode, 'SIGINT'); + assert.strictEqual(exitCode, null); + assert.strictEqual(signalCode, 'SIGINT'); })); From a0070b5fbc9eda185e60ffa45ac6a4452486a784 Mon Sep 17 00:00:00 2001 From: mark hughes Date: Thu, 1 Dec 2016 11:49:43 -0600 Subject: [PATCH 2/3] Update docs for os.platform() * references closed https://github.com/nodejs/node/pull/2446 * updates broken documentation link * fixes copy based on comments from @sam-github --- doc/api/os.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/doc/api/os.md b/doc/api/os.md index bfe20c1bef5c7f..811c8c7b319292 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -293,17 +293,25 @@ added: v0.5.0 * Returns: {String} The `os.platform()` method returns a string identifying the operating system -platform as set during compile time of Node.js. - -Currently possible values are: - -* `'aix'` -* `'darwin'` -* `'freebsd'` -* `'linux'` -* `'openbsd'` -* `'sunos'` -* `'win32'` +platform as set during compile time of Node.js. Some of the possible values are + `"linux"`, `"darwin"`, `"win32"`, `"sunos"` ... + + Its value is based on [`OS` constant of `gyp`](https://chromium.googlesource.com/external/gyp/+/md-pages/docs/InputFormatReference.md#Predefined-Variables) + , but with exceptions in case of Mac OS X, Windows and Solaris. + + On Windows it's value is always `"win32"`, on Mac OS X it's `"darwin"` and on + Solaris it is `"sunos"`. + + Here is a list of possible values for some platforms: + + * Android: `"android"` + * Windows/Cygwin: `"win32"` + * Mac OS X: `"darwin"` + * FreeBSD: `"freebsd"` + * OpenBSD: `"openbsd"` + * IBM AIX: `"aix"` + * Solaris: `"sunos"` + * Linux & Others: `"linux"` Equivalent to [`process.platform`][]. From e7b4ffa2710c63fa93fb6e7e2238e68e23fe7aad Mon Sep 17 00:00:00 2001 From: mark hughes Date: Thu, 1 Dec 2016 13:16:57 -0600 Subject: [PATCH 3/3] Revert " Update docs for os.platform()" This reverts commit a0070b5fbc9eda185e60ffa45ac6a4452486a784. --- doc/api/os.md | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/doc/api/os.md b/doc/api/os.md index 811c8c7b319292..bfe20c1bef5c7f 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -293,25 +293,17 @@ added: v0.5.0 * Returns: {String} The `os.platform()` method returns a string identifying the operating system -platform as set during compile time of Node.js. Some of the possible values are - `"linux"`, `"darwin"`, `"win32"`, `"sunos"` ... - - Its value is based on [`OS` constant of `gyp`](https://chromium.googlesource.com/external/gyp/+/md-pages/docs/InputFormatReference.md#Predefined-Variables) - , but with exceptions in case of Mac OS X, Windows and Solaris. - - On Windows it's value is always `"win32"`, on Mac OS X it's `"darwin"` and on - Solaris it is `"sunos"`. - - Here is a list of possible values for some platforms: - - * Android: `"android"` - * Windows/Cygwin: `"win32"` - * Mac OS X: `"darwin"` - * FreeBSD: `"freebsd"` - * OpenBSD: `"openbsd"` - * IBM AIX: `"aix"` - * Solaris: `"sunos"` - * Linux & Others: `"linux"` +platform as set during compile time of Node.js. + +Currently possible values are: + +* `'aix'` +* `'darwin'` +* `'freebsd'` +* `'linux'` +* `'openbsd'` +* `'sunos'` +* `'win32'` Equivalent to [`process.platform`][].