From c9489f2f23306f6bb2b0ef4a462ab5e6f475b55a Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Mon, 8 Jun 2020 10:05:45 -0500 Subject: [PATCH] internal: rename error-serdes for consistency All other JavaScript files in lib use snake case, so make this one consistent. PR-URL: https://github.com/nodejs/node/pull/33793 Reviewed-By: Gus Caplan Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Benjamin Gruenbaum --- lib/internal/{error-serdes.js => error_serdes.js} | 0 lib/internal/main/worker_thread.js | 2 +- lib/internal/worker.js | 2 +- node.gyp | 2 +- test/parallel/test-bootstrap-modules.js | 2 +- test/parallel/test-error-serdes.js | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename lib/internal/{error-serdes.js => error_serdes.js} (100%) diff --git a/lib/internal/error-serdes.js b/lib/internal/error_serdes.js similarity index 100% rename from lib/internal/error-serdes.js rename to lib/internal/error_serdes.js diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js index 61045cf1c08490..e284329426188b 100644 --- a/lib/internal/main/worker_thread.js +++ b/lib/internal/main/worker_thread.js @@ -198,7 +198,7 @@ function workerOnGlobalUncaughtException(error, fromPromise) { let serialized; try { - const { serializeError } = require('internal/error-serdes'); + const { serializeError } = require('internal/error_serdes'); serialized = serializeError(error); } catch {} debug(`[${threadId}] uncaught exception serialized = ${!!serialized}`); diff --git a/lib/internal/worker.js b/lib/internal/worker.js index de005cc9fa4611..fdd096552129e8 100644 --- a/lib/internal/worker.js +++ b/lib/internal/worker.js @@ -42,7 +42,7 @@ const { ReadableWorkerStdio, WritableWorkerStdio } = workerIo; -const { deserializeError } = require('internal/error-serdes'); +const { deserializeError } = require('internal/error_serdes'); const { fileURLToPath, isURLInstance, pathToFileURL } = require('internal/url'); const { diff --git a/node.gyp b/node.gyp index ba03fef4fb8453..bc5e4a11aecde1 100644 --- a/node.gyp +++ b/node.gyp @@ -128,7 +128,7 @@ 'lib/internal/dtrace.js', 'lib/internal/encoding.js', 'lib/internal/errors.js', - 'lib/internal/error-serdes.js', + 'lib/internal/error_serdes.js', 'lib/internal/event_target.js', 'lib/internal/fixed_queue.js', 'lib/internal/freelist.js', diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index 76e4fde2be659b..33c421c2f13fb6 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -98,7 +98,7 @@ if (!common.isMainThread) { 'NativeModule _stream_readable', 'NativeModule _stream_transform', 'NativeModule _stream_writable', - 'NativeModule internal/error-serdes', + 'NativeModule internal/error_serdes', 'NativeModule internal/process/worker_thread_only', 'NativeModule internal/streams/buffer_list', 'NativeModule internal/streams/destroy', diff --git a/test/parallel/test-error-serdes.js b/test/parallel/test-error-serdes.js index 908e81977ba89c..262afc9f389358 100644 --- a/test/parallel/test-error-serdes.js +++ b/test/parallel/test-error-serdes.js @@ -3,7 +3,7 @@ require('../common'); const assert = require('assert'); const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes; -const { serializeError, deserializeError } = require('internal/error-serdes'); +const { serializeError, deserializeError } = require('internal/error_serdes'); function cycle(err) { return deserializeError(serializeError(err));