exifreader 4.23.6 → 4.23.7
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/README.md +9 -4
- package/bin/TagFilterPlugin.js +11 -7
- package/bin/build.js +1 -0
- package/package.json +3 -3
- package/webpack.config.js +1 -1
package/README.md
CHANGED
|
@@ -352,10 +352,10 @@ not the source code. That means it's not possible to use the ES module (from the
|
|
|
352
352
|
`src` folder) or any tree shaking to get the benefit of a custom build. Tree
|
|
353
353
|
shaking will actually have close to no effect at all here so don't rely on it.
|
|
354
354
|
|
|
355
|
-
This is for npm users that use the built file. To specify what
|
|
356
|
-
want you can either use include pattern (start with an empty
|
|
357
|
-
exclude pattern (start with full functionality and exclude).
|
|
358
|
-
pattern is set, excludes will not be used.
|
|
355
|
+
This is for npm and yarn users that use the built file. To specify what
|
|
356
|
+
functionality you want you can either use include pattern (start with an empty
|
|
357
|
+
set and include) or exclude pattern (start with full functionality and exclude).
|
|
358
|
+
If an include pattern is set, excludes will not be used.
|
|
359
359
|
|
|
360
360
|
For Exif and IPTC it's also possible to specify which tags you're interested in.
|
|
361
361
|
Those tag groups have huge dictionaries of tags and you may not be interested in
|
|
@@ -413,6 +413,11 @@ npm rebuild exifreader
|
|
|
413
413
|
```
|
|
414
414
|
|
|
415
415
|
With yarn 2+:
|
|
416
|
+
|
|
417
|
+
From my experience, you need a `node_modules` folder for the rebuild command to
|
|
418
|
+
work with yarn 2+. If you don't have it, run `yarn config set nodeLinker
|
|
419
|
+
node-modules` and then run `yarn`. Then you can try to rebuild:
|
|
420
|
+
|
|
416
421
|
```bash
|
|
417
422
|
yarn rebuild exifreader
|
|
418
423
|
```
|
package/bin/TagFilterPlugin.js
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
const modules = {
|
|
6
6
|
exif: [
|
|
7
|
-
'src
|
|
8
|
-
'src
|
|
9
|
-
'src
|
|
10
|
-
'src
|
|
7
|
+
'src[/\\\\]tag-names-0th-ifd.js',
|
|
8
|
+
'src[/\\\\]tag-names-exif-ifd.js',
|
|
9
|
+
'src[/\\\\]tag-names-gps-ifd.js',
|
|
10
|
+
'src[/\\\\]tag-names-interoperability-ifd.js'
|
|
11
11
|
],
|
|
12
12
|
iptc: [
|
|
13
|
-
'src
|
|
13
|
+
'src[/\\\\]iptc-tag-names.js'
|
|
14
14
|
],
|
|
15
15
|
mpf: [
|
|
16
|
-
'src
|
|
16
|
+
'src[/\\\\]tag-names-mpf-ifd.js'
|
|
17
17
|
]
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -70,10 +70,14 @@ module.exports = function TagFilter() {
|
|
|
70
70
|
function getFileModuleType(filename) {
|
|
71
71
|
for (const module in modules) {
|
|
72
72
|
for (const file of modules[module]) {
|
|
73
|
-
if (
|
|
73
|
+
if (endsWith(filename, file)) {
|
|
74
74
|
return module;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
|
+
|
|
81
|
+
function endsWith(string, suffix) {
|
|
82
|
+
return new RegExp(`${suffix}$`).test(string);
|
|
83
|
+
}
|
package/bin/build.js
CHANGED
|
@@ -33,6 +33,7 @@ function checkConfig() {
|
|
|
33
33
|
console.log('Done.'); // eslint-disable-line no-console
|
|
34
34
|
} catch (error) {
|
|
35
35
|
console.error('Could not install requirements for a custom build:', error); // eslint-disable-line no-console
|
|
36
|
+
process.exit(1);
|
|
36
37
|
} finally {
|
|
37
38
|
cleanUpTmpDir(tmpDir);
|
|
38
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exifreader",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.7",
|
|
4
4
|
"description": "Library that parses Exif metadata in images.",
|
|
5
5
|
"author": "Mattias Wallander <mattias@wallander.eu>",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@babel/core": "^7.25.2",
|
|
29
29
|
"@babel/preset-env": "^7.25.4",
|
|
30
30
|
"@babel/register": "^7.24.6",
|
|
31
|
-
"@types/node": "^
|
|
31
|
+
"@types/node": "^20.16.10",
|
|
32
32
|
"babel-loader": "^9.2.1",
|
|
33
33
|
"babel-plugin-rewire": "^1.2.0",
|
|
34
34
|
"chai": "^4.3.10",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"rimraf": "^5.0.5",
|
|
44
44
|
"string-replace-loader": "^3.1.0",
|
|
45
45
|
"terser-webpack-plugin": "^5.3.10",
|
|
46
|
-
"typescript": "^5.
|
|
46
|
+
"typescript": "^5.6.2",
|
|
47
47
|
"webpack": "^5.89.0",
|
|
48
48
|
"webpack-cli": "^5.1.4",
|
|
49
49
|
"webpack-dev-server": "^5.0.4"
|
package/webpack.config.js
CHANGED
|
@@ -81,7 +81,7 @@ module.exports = {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
test:
|
|
84
|
+
test: /[/\\](exif-reader|image-header-?(tiff|jpeg|png|heic|avif|iso-bmff|webp|gif)?|tags|tag-names)\.js$/,
|
|
85
85
|
loader: 'string-replace-loader',
|
|
86
86
|
options: {
|
|
87
87
|
multiple: getConstantReplacements(includedModules)
|