gengjiawen
93df085386
test: fix this scope bug in test-stream2-writable.js
...
PR-URL: https://github.com/nodejs/node/pull/27111
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-08 22:40:15 +08:00
Tobias Nießen
969bd1eb7b
crypto: add support for RSA-PSS keys
...
This commit adds support for RSA-PSS keys, including
- KeyObjects of type rsa-pss,
- key pair generation for RSA-PSS, and
- signing and verification using RSA-PSS keys.
PR-URL: https://github.com/nodejs/node/pull/26960
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-04-08 09:22:32 +02:00
Ruben Bridgewater
d834275a48
buffer: fix custom inspection with extra properties
...
This broke due to a recent change that prevents exposing inspect
internals. It now relies on the public API instead and should be a
bit more robust due to that.
PR-URL: https://github.com/nodejs/node/pull/27074
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-08 08:55:46 +02:00
Ruben Bridgewater
75463a9004
assert: fix rejects stack trace and operator
...
This makes sure the stack trace is not removed due to a wrong stack
start function being used. It also fixes the wrong operator caused
by the same reason. This only applies in case an validation object
was used to validate the rejection passed to `assert.reject()` as
first argument.
PR-URL: https://github.com/nodejs/node/pull/27047
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-07 20:25:32 +02:00
Michaël Zasso
58aaf58406
test: fix test-repl-require-after-write
...
Currently, the test creates a file in the cwd and doesn't clean it up.
Use a temporary directory instead.
PR-URL: https://github.com/nodejs/node/pull/27088
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-04-06 23:04:49 +02:00
Nikolai Vavilov
3d8532f851
buffer: add {read|write}Big[U]Int64{BE|LE} methods
...
PR-URL: https://github.com/nodejs/node/pull/19691
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-06 19:30:23 +02:00
Joyee Cheung
de23055536
lib: remove env: node in eslint config for lib files
...
This patch removes the redundant `require-globals` custom
eslint rule by removing `env: node` in the eslint config
and whitelist the globals that can be accessed in native
modules instead of black listing them. This makes sense
for our `lib/` files because here we are creating the
Node.js environment instead of running in a normal user
land Node.js environment.
PR-URL: https://github.com/nodejs/node/pull/27082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-04-06 12:04:36 +08:00
Joyee Cheung
864860e9f3
src: port coverage serialization to C++
...
This patch moves the serialization of coverage profiles into
C++. With this we no longer need to patch `process.reallyExit`
and hook into the exit events, but instead hook into relevant
places in C++ which are safe from user manipulation. This also
makes the code easier to reuse for other types of profiles.
PR-URL: https://github.com/nodejs/node/pull/26874
Reviewed-By: Ben Coe <bencoe@gmail.com >
2019-04-06 12:01:45 +08:00
Ben Noordhuis
f13733d12d
test: test vm.runInNewContext() filename option
...
The 'filename as a string' case was already being tested. This commit
also exercises the 'filename as an option' case.
PR-URL: https://github.com/nodejs/node/pull/27056
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
2019-04-05 05:44:51 +02:00
Tobias Nießen
73bca57988
crypto: fail early if passphrase is too long
...
This causes OpenSSL to fail early if the decryption passphrase is too
long, and produces a somewhat helpful error message.
PR-URL: https://github.com/nodejs/node/pull/27010
Refs: https://github.com/nodejs/node/pull/25208
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-04-04 16:09:11 +02:00
Filip Skokan
b2bb6c2b80
crypto: fix crash of encrypted private key export without cipher
...
PR-URL: https://github.com/nodejs/node/pull/27041
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-04-04 15:54:04 +02:00
Thomas
6fb32ac255
src: prevent crash in TTYWrap::Initialize
...
When console.log is called for the first time it initializes
TTYWrap object. However, if there is not enough space on the
V8 stack, creating function template fails and triggers
empty maybe local exception.
PR-URL: https://github.com/nodejs/node/pull/26832
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-04-04 15:35:02 +02:00
Ruben Bridgewater
4f094c0ae6
buffer: fix concat error message
...
The list argument may only be of type array, not of any other type
as it actually suggests.
PR-URL: https://github.com/nodejs/node/pull/27050
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-04 14:21:11 +02:00
Ruben Bridgewater
3b044962c4
errors: add more information in case of invalid callbacks
...
This adds the actual callback that is passed through to the error
message in case an ERR_INVALID_CALLBACK error is thrown.
PR-URL: https://github.com/nodejs/node/pull/27048
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-04 12:51:03 +02:00
Ruben Bridgewater
a9bf6652b5
util: use minimal object inspection with %s specifier
...
This improves `util.format()` by returning more meaningful results
when using `%s` as specifier and any object as value. Besides that
`BigInt` will also be represented with an `n` at the end to indicate
that it's of type `BigInt`.
PR-URL: https://github.com/nodejs/node/pull/26927
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-04 12:48:57 +02:00
kohta ito
ceb80f4157
doc: fix default maxBuffer size
...
Correctly document the default maxBuffer size for execSync,
execFileSync, and spawnSync. It is 200 * 1024, not Infinity.
Add tests to verify behaviour is as documented.
PR-URL: https://github.com/nodejs/node/pull/22894
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-04-03 18:32:26 -07:00
Gus Caplan
15c0947fee
lib: remove Atomics.wake
...
PR-URL: https://github.com/nodejs/node/pull/27033
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-04-03 16:55:59 -05:00
Ruben Bridgewater
8a6dcd040f
module: fix repl require calling the same file again
...
This makes sure multiple require calls will not fail in case a file
was created after the first attempt.
PR-URL: https://github.com/nodejs/node/pull/26928
Fixes: https://github.com/nodejs/node/issues/26926
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2019-04-03 14:19:59 +02:00
Santiago Gimeno
9e960175d1
dgram: add support for UDP connected sockets
...
Added the `dgram.connect()` and `dgram.disconnect()` methods that
associate/disassociate a udp socket to/from a remote address.
It optimizes for cases where lots of packets are sent to the same
address.
Also added the `dgram.remoteAddress()` method to retrieve the associated
remote address.
PR-URL: https://github.com/nodejs/node/pull/26871
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-03 06:48:13 +02:00
Ruben Bridgewater
f7c96856f9
util: improve error property inspection
...
This makes sure that errors that contain extra properties show those
properties on a separate line.
PR-URL: https://github.com/nodejs/node/pull/26984
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-03 02:31:05 +02:00
Ruben Bridgewater
14b2db0145
util: improve inspect() compact number mode
...
This fixes a proportion calculation for lots of short array entries
with at least one bigger one that alone makes up for more than one
fifth of all other entries together.
PR-URL: https://github.com/nodejs/node/pull/26984
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-03 02:31:02 +02:00
Ruben Bridgewater
75007d64c0
module: mark DEP0019 as End-of-Life
...
In certain cases, `require('.')` could resolve outside the package
directory. This behavior has been removed.
PR-URL: https://github.com/nodejs/node/pull/26973
Refs: https://github.com/nodejs/node/pull/3384
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-03 02:28:24 +02:00
Ruben Bridgewater
666c67e078
test: simplify date inspection tests
...
The code duplicated a lot of logic that was already abstracted. Use
the abstraction instead to remove code overhead.
PR-URL: https://github.com/nodejs/node/pull/26922
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-04-03 02:22:30 +02:00
Ruben Bridgewater
e1e9f1e9ee
util: inspect() should not exceed breakLength
...
Using `util.inspect()` with the `compact` option set to a number
could result in output that exceeded the `breakLength` option. This
change makes sure that limit is taken into account.
PR-URL: https://github.com/nodejs/node/pull/26914
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-03 02:20:31 +02:00
Rich Trott
da79d30c4a
test: remove test-trace-events-api-worker-disabled from flaky
...
PR-URL: https://github.com/nodejs/node/pull/27020
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-04-02 05:50:11 -07:00
Anna Henningsen
5583d4d73e
fs: remove experimental warning for fs.promises
...
This has been warning for long enough, without any API changes
in the last few months.
PR-URL: https://github.com/nodejs/node/pull/26581
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-02 14:20:05 +02:00
Rich Trott
8afab1a5a7
test: add IPv6 brackets but no port to test-dns
...
Add a test case to test-dns to check that supply an IPv6 host with
brackets but no explicit port to `dns.setServers()` yields expected
results. This is the final bit of test coverage missing for
lib/internal/dns/utils.js.
PR-URL: https://github.com/nodejs/node/pull/27006
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-04-01 16:58:25 -07:00
cjihrig
05bd6071a6
crypto: use EVP_PKEY_X448 in GetEphemeralKeyInfo
...
PR-URL: https://github.com/nodejs/node/pull/26988
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-04-01 09:14:17 -04:00
Juan José Arboleda
518d2b6e5a
test: remove unused triggerAsyncId param in test
...
PR-URL: https://github.com/nodejs/node/pull/26800
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-01 21:04:09 +08:00
Filip Skokan
7c1fc93e30
crypto: don't crash on unknown asymmetricKeyType
...
PR-URL: https://github.com/nodejs/node/pull/26786
Fixes: https://github.com/nodejs/node/issues/26775
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-04-01 12:49:17 +02:00
Anna Henningsen
20c3ac2556
stream: do not unconditionally call _read() on resume()
...
`readable.resume()` calls `.read(0)`, which in turn previously set
`needReadable = true`, and so a subsequent `.read()` call would
call `_read()` even though enough data was already available.
This can lead to elevated memory usage, because calling `_read()`
when enough data is in the readable buffer means that backpressure
is not being honoured.
Fixes: https://github.com/nodejs/node/issues/26957
PR-URL: https://github.com/nodejs/node/pull/26965
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-31 14:09:35 +02:00
Anna Henningsen
9fbf0c60b5
worker: use copy of process.env
...
Instead of sharing the OS-backed store for all `process.env` instances,
create a copy of `process.env` for every worker that is created.
The copies do not interact. Native-addons do not see modifications to
`process.env` from Worker threads, but child processes started from
Workers do default to the Worker’s copy of `process.env`.
This makes Workers behave like child processes as far as `process.env`
is concerned, and an option corresponding to the `child_process`
module’s `env` option is added to the constructor.
Fixes: https://github.com/nodejs/node/issues/24947
PR-URL: https://github.com/nodejs/node/pull/26544
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-03-30 22:25:35 +01:00
Thomas
e4e2b0ce13
readline: replace quadratic regex with linear one
...
Simplify regular expression in _wordLeft and _deleteWordLeft readline
methods.
PR-URL: https://github.com/nodejs/node/pull/26778
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-30 13:34:39 +01:00
Juan José Arboleda
83c35dc6e8
test: simplify for loop in test-buffer-zero-fill-cli.js
...
PR-URL: https://github.com/nodejs/node/pull/26799
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-03-30 13:30:15 +01:00
Ruben Bridgewater
75eaf25e78
buffer: use stricter from() input validation
...
So far we did not throw an error for all types of invalid input.
Functions do not return a buffer anymore and `number` and `symbol`
validation is also improved.
PR-URL: https://github.com/nodejs/node/pull/26825
Fixes: https://github.com/nodejs/node/issues/26741
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-30 13:28:24 +01:00
dnlup
f0b3855a90
net: remove usage of require('util')
...
Use `require('internal/util/inspect').inspect`,
`require('internal/util/debuglog').debuglog`,
`require('internal/util').deprecate` and `Object.setPrototypeOf` instead
of `require('util')`.
Fix test in `test/parallel/test-net-access-byteswritten.js` to do not
check the `super_` property that was set when using
`require('util').inherits`.
Refs: https://github.com/nodejs/node/issues/26546
Refs: https://github.com/nodejs/node/pull/26896
PR-URL: https://github.com/nodejs/node/pull/26920
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-30 13:13:42 +01:00
Ruben Bridgewater
e54f237afe
util: add subclass and null prototype support for errors in inspect
...
This adds support to visualize the difference between errors with
null prototype or subclassed errors. This has a couple safeguards
to be sure that the output is not intrusive.
PR-URL: https://github.com/nodejs/node/pull/26923
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-30 13:11:06 +01:00
Luigi Pinca
6a34b85b05
url: add ws: and wss: to slashedProtocol set
...
Fix cases where the pathname is incorrectly parsed as `null`.
PR-URL: https://github.com/nodejs/node/pull/26941
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-03-30 13:05:31 +01:00
Tobias Nießen
2e2c015422
crypto: decode missing passphrase errors
...
When a user attempts to load an encrypted key without supplying a
passphrase, a cryptic OpenSSL error is thrown. This change intercepts
the OpenSSL error and throws a nice error code instead.
PR-URL: https://github.com/nodejs/node/pull/25208
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-03-30 10:31:43 +01:00
cjihrig
aa2ac1981a
dns: remove dns.promises experimental warning
...
PR-URL: https://github.com/nodejs/node/pull/26592
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-29 18:57:04 -04:00
Ruben Bridgewater
520b3e63ea
util: fix map entries inspection
...
This makes sure the arrays returned by Map#entries() are handled as
any other array instead of just visualizing the entries as array.
Therefore options should have an impact on the arrays.
PR-URL: https://github.com/nodejs/node/pull/26918
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-29 11:04:20 +01:00
Brian White
7d0e50dcfe
crypto: add crypto.sign() and crypto.verify()
...
These methods are added primarily to allow signing and verifying
using Ed25519 and Ed448 keys, which do not support streaming of
input data. However, any key type can be used with these new
APIs, to allow better performance when only signing/verifying
a single chunk.
Fixes: https://github.com/nodejs/node/issues/26320
PR-URL: https://github.com/nodejs/node/pull/26611
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-03-28 21:57:53 -04:00
Sam Roberts
8c69e06972
tls: return an OpenSSL error from renegotiate
...
A generic error lacks any of the context or detail of the underlying
OpenSSL error, so throw from C++, and report the OpenSSL error to the
callback.
PR-URL: https://github.com/nodejs/node/pull/26868
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-03-28 14:03:25 -07:00
Sam Roberts
bcbd35a48d
crypto: add openssl specific error properties
...
Don't force the user to parse the long-style OpenSSL error message,
decorate the error with the library, reason, code, function.
PR-URL: https://github.com/nodejs/node/pull/26868
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-03-28 14:03:18 -07:00
Tobias Nießen
c35acc0260
crypto: allow undefined for saltLength and padding
...
PR-URL: https://github.com/nodejs/node/pull/26921
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-03-28 14:33:03 +01:00
Ruben Bridgewater
4bfc06f6b5
util: improve proxy inspection
...
This makes sure the brace is actually handled as any other brace.
It was handled differently so far than any other brace and that had
an impact on how the output would be formatted.
PR-URL: https://github.com/nodejs/node/pull/26919
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-28 12:24:51 +01:00
Ruben Bridgewater
3cf1ffebab
path: fix win32 parse regression
...
This fixes the parse function for single character input that are not
a path separator.
PR-URL: https://github.com/nodejs/node/pull/26912
Fixes: https://github.com/nodejs/node/issues/26911
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-28 12:22:21 +01:00
Ruben Bridgewater
4c4ad120c5
test: refactor path parse test
...
Use destructuring and arrow functions and make one test stricter.
Also inline the error object as there's only a sinlge error that can
currently be thrown in the path module.
PR-URL: https://github.com/nodejs/node/pull/26912
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-28 12:22:17 +01:00
Daiki Ihara
85546c2a04
test: add test about unencrypted PKCS#8 private key for RSA
...
PR-URL: https://github.com/nodejs/node/pull/26898
Refs: https://github.com/nodejs/node/issues/24928
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-03-28 05:47:57 +01:00
Ruben Bridgewater
b5ea925c8e
util: don't set the prototype of callbackified functions
...
Using `util.callbackify()` should not set the prototype for the
returned function to the one from the input function. It could cause
confusion while debugging otherwise.
PR-URL: https://github.com/nodejs/node/pull/26893
Fixes: https://github.com/nodejs/node/issues/26890
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-27 22:45:20 +01:00