From c5794ab851571d20a382e1ce443cd7570d16f22e Mon Sep 17 00:00:00 2001 From: Jonny Kalambay Date: Fri, 12 Oct 2018 10:11:51 -0700 Subject: [PATCH] lib: migrate process.binding('config') to getOptions() PR-URL: https://github.com/nodejs/node/pull/23526 Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- lib/internal/modules/esm/default_resolve.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/internal/modules/esm/default_resolve.js b/lib/internal/modules/esm/default_resolve.js index 8f8efcb5360d63..7707262566c88a 100644 --- a/lib/internal/modules/esm/default_resolve.js +++ b/lib/internal/modules/esm/default_resolve.js @@ -6,8 +6,9 @@ const internalFS = require('internal/fs/utils'); const { NativeModule } = require('internal/bootstrap/loaders'); const { extname } = require('path'); const { realpathSync } = require('fs'); -const preserveSymlinks = !!process.binding('config').preserveSymlinks; -const preserveSymlinksMain = !!process.binding('config').preserveSymlinksMain; +const { getOptions } = internalBinding('options'); +const preserveSymlinks = getOptions('--preserve-symlinks'); +const preserveSymlinksMain = getOptions('--preserve-symlinks-main'); const { ERR_MISSING_MODULE, ERR_MODULE_RESOLUTION_LEGACY,