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 +4 -1
- package/dist/exif-reader.js +1 -1
- package/dist/exif-reader.js.map +1 -1
- package/package.json +20 -1
- package/src/dom-parser.js +3 -2
- package/src/file-loaders.js +11 -14
- package/src/node-require.js +84 -0
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
|
-
|
|
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) {
|