exifreader 4.23.6 → 4.24.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/README.md +10 -5
- package/bin/TagFilterPlugin.js +11 -7
- package/bin/build.js +1 -0
- package/dist/exif-reader.js +1 -1
- package/dist/exif-reader.js.map +1 -1
- package/package.json +4 -4
- package/src/dom-parser.js +2 -7
- package/src/tags-helpers.js +1 -1
- package/webpack.config.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exifreader",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.24.0",
|
|
4
4
|
"description": "Library that parses Exif metadata in images.",
|
|
5
5
|
"author": "Mattias Wallander <mattias@wallander.eu>",
|
|
6
6
|
"repository": {
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
],
|
|
23
23
|
"types": "./exif-reader.d.ts",
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@xmldom/xmldom": "^0.
|
|
25
|
+
"@xmldom/xmldom": "^0.9.4"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
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/src/dom-parser.js
CHANGED
|
@@ -12,13 +12,8 @@ function get() {
|
|
|
12
12
|
}
|
|
13
13
|
try {
|
|
14
14
|
// eslint-disable-next-line no-undef
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
error: () => {
|
|
18
|
-
throw new Error('Faulty XML');
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
});
|
|
15
|
+
const {DOMParser, onErrorStopParsing} = __non_webpack_require__('@xmldom/xmldom');
|
|
16
|
+
return new DOMParser({onError: onErrorStopParsing});
|
|
22
17
|
} catch (error) {
|
|
23
18
|
return undefined;
|
|
24
19
|
}
|
package/src/tags-helpers.js
CHANGED
|
@@ -50,7 +50,7 @@ export function readIfd(dataView, ifdType, tiffHeaderOffset, offset, byteOrder,
|
|
|
50
50
|
if (Constants.USE_THUMBNAIL && (offset < dataView.byteLength - Types.getTypeSize('LONG'))) {
|
|
51
51
|
const nextIfdOffset = Types.getLongAt(dataView, offset, byteOrder);
|
|
52
52
|
if (nextIfdOffset !== 0 && ifdType === IFD_TYPE_0TH) {
|
|
53
|
-
tags['Thumbnail'] = readIfd(dataView, IFD_TYPE_1ST, tiffHeaderOffset, tiffHeaderOffset + nextIfdOffset, byteOrder,
|
|
53
|
+
tags['Thumbnail'] = readIfd(dataView, IFD_TYPE_1ST, tiffHeaderOffset, tiffHeaderOffset + nextIfdOffset, byteOrder, includeUnknown);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
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)
|
|
@@ -163,6 +163,9 @@ function getConfig() {
|
|
|
163
163
|
if (packageJson.include.icc) {
|
|
164
164
|
packageJson.include.exif.push('ICC_Profile');
|
|
165
165
|
}
|
|
166
|
+
if (packageJson.include.thumbnail) {
|
|
167
|
+
packageJson.include.exif.push('JPEGInterchangeFormat', 'JPEGInterchangeFormatLength');
|
|
168
|
+
}
|
|
166
169
|
}
|
|
167
170
|
return {include: packageJson.include};
|
|
168
171
|
}
|