diff --git a/lib/assert.js b/lib/assert.js index 6963ef41307397..a37329caf2d736 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -27,7 +27,7 @@ const { codes: { ERR_INVALID_ARG_VALUE, ERR_INVALID_RETURN_VALUE } } = require('internal/errors'); -const { AssertionError } = require('internal/assert'); +const AssertionError = require('internal/assert/assertion_error'); const { openSync, closeSync, readSync } = require('fs'); const { inspect, types: { isPromise, isRegExp } } = require('util'); const { EOL } = require('internal/constants'); diff --git a/lib/internal/assert.js b/lib/internal/assert/assertion_error.js similarity index 99% rename from lib/internal/assert.js rename to lib/internal/assert/assertion_error.js index 4e059db6b9d478..a13a610da1a7ba 100644 --- a/lib/internal/assert.js +++ b/lib/internal/assert/assertion_error.js @@ -405,6 +405,4 @@ class AssertionError extends Error { } } -module.exports = { - AssertionError -}; +module.exports = AssertionError; diff --git a/node.gyp b/node.gyp index 74b130a23e2b37..1490f7910ec290 100644 --- a/node.gyp +++ b/node.gyp @@ -84,7 +84,7 @@ 'lib/vm.js', 'lib/worker_threads.js', 'lib/zlib.js', - 'lib/internal/assert.js', + 'lib/internal/assert/assertion_error.js', 'lib/internal/async_hooks.js', 'lib/internal/bash_completion.js', 'lib/internal/buffer.js',