exifreader 4.49.0 → 4.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js CHANGED
@@ -8,6 +8,7 @@
8
8
 
9
9
  const path = require('path');
10
10
  const fs = require('fs');
11
+ const {createRequire} = require('module');
11
12
  const {readMarker, markerMatches} = require('./custom-build-marker');
12
13
  const {collectImagePaths, loadFullParser, resolveDomParser, analyzeImages, deriveConfig, writeConfigToPackageJson} = require('./analyze');
13
14
  const {verifyImages, loadCustomParser} = require('./verify-build');
@@ -547,7 +548,9 @@ function checkLocalInstall(cwd, options) {
547
548
  }
548
549
 
549
550
  function defaultResolve(cwd) {
550
- return require.resolve('exifreader/package.json', {paths: [cwd]});
551
+ // The parent sits inside node_modules so Node skips package self-reference
552
+ // (an exports map enables it) and searches cwd's node_modules chain.
553
+ return createRequire(path.join(cwd, 'node_modules', 'noop.js')).resolve('exifreader/package.json');
551
554
  }
552
555
 
553
556
  function notInstalledMessage(isPnp) {