exifreader 4.23.3 → 4.23.5

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 CHANGED
@@ -288,6 +288,11 @@ be negative for values that are south of the equator, west of the IRM, or below
288
288
  sealevel. These are often more convenient values for regular use. For some
289
289
  elaboration or if you need the original values, see [Notes](#notes) below.
290
290
 
291
+ If you're having trouble getting the GPS values on Android and are using a
292
+ `type="file"` input to upload the image, make sure you are not setting the
293
+ `accept` attribute on the input element. Apparently setting the `accept` [will
294
+ strip the GPS values](https://github.com/mattiasw/ExifReader/issues/378#issuecomment-2302705983).
295
+
291
296
  ### Using the thumbnail
292
297
 
293
298
  The thumbnail and its details will be accessible through `tags['Thumbnail']`.
package/bin/build.js CHANGED
@@ -8,54 +8,42 @@ const {execSync} = require('child_process');
8
8
  const dependentHasExifReaderConfig = require('./findDependentConfig');
9
9
 
10
10
  const WEBPACK_VERSION = '5.89.0';
11
+ const WEBPACK_CLI_VERSION = '5.1.4';
11
12
 
12
13
  const EXIFREADER_ROOT_DIR = path.join(__dirname, '..');
13
14
  process.chdir(EXIFREADER_ROOT_DIR);
14
15
 
15
16
  if (!process.argv.includes('--only-with-config') || checkConfig()) {
16
- execSync(`npx webpack@${WEBPACK_VERSION}`, {stdio: 'inherit'});
17
+ execSync(`npx -p webpack-cli@${WEBPACK_CLI_VERSION} -p webpack@${WEBPACK_VERSION} webpack`, {stdio: 'inherit'});
17
18
  }
18
19
 
19
20
  function checkConfig() {
20
21
  if (dependentHasExifReaderConfig()) {
21
- if (!areDependenciesInstalled()) {
22
- console.log('Installing ExifReader custom build dependencies...'); // eslint-disable-line no-console
23
- const packages = [
24
- '@babel/core@7.23.2',
25
- '@babel/preset-env@7.23.2',
26
- '@babel/register@7.22.15',
27
- 'babel-loader@8.2.5',
28
- 'cross-env@7.0.3',
29
- 'string-replace-loader@3.1.0',
30
- `webpack@${WEBPACK_VERSION}`,
31
- 'webpack-cli@5.1.4',
32
- 'terser-webpack-plugin@5.3.9'
33
- ];
34
- const tmpDir = path.join(EXIFREADER_ROOT_DIR, '__tmp');
35
- try {
36
- initTmpDir(tmpDir);
37
- execSync(`npm install --production --loglevel=error --no-optional --no-package-lock --no-save ${packages.join(' ')}`, {stdio: 'inherit'});
38
- console.log('Done.'); // eslint-disable-line no-console
39
- } catch (error) {
40
- console.error('Could not install requirements for a custom build:', error); // eslint-disable-line no-console
41
- } finally {
42
- cleanUpTmpDir(tmpDir);
43
- }
22
+ console.log('Installing ExifReader custom build dependencies...'); // eslint-disable-line no-console
23
+ const packages = [
24
+ '@babel/core@7.23.2',
25
+ '@babel/preset-env@7.23.2',
26
+ '@babel/register@7.22.15',
27
+ 'babel-loader@8.2.5',
28
+ 'cross-env@7.0.3',
29
+ 'string-replace-loader@3.1.0',
30
+ 'terser-webpack-plugin@5.3.9'
31
+ ];
32
+ const tmpDir = path.join(EXIFREADER_ROOT_DIR, '__tmp');
33
+ try {
34
+ initTmpDir(tmpDir);
35
+ execSync(`npm install --production --loglevel=error --no-optional --no-package-lock --no-save ${packages.join(' ')}`, {stdio: 'inherit'});
36
+ console.log('Done.'); // eslint-disable-line no-console
37
+ } catch (error) {
38
+ console.error('Could not install requirements for a custom build:', error); // eslint-disable-line no-console
39
+ } finally {
40
+ cleanUpTmpDir(tmpDir);
44
41
  }
45
42
  return true;
46
43
  }
47
44
  return false;
48
45
  }
49
46
 
50
- function areDependenciesInstalled() {
51
- try {
52
- execSync('npm ls webpack');
53
- return true;
54
- } catch (error) {
55
- return false;
56
- }
57
- }
58
-
59
47
  function initTmpDir(tmpDir) {
60
48
  const nodeModulesDir = path.join(EXIFREADER_ROOT_DIR, 'node_modules');
61
49
  fs.mkdirSync(tmpDir, {recursive: true});