exifreader 4.41.0 → 4.41.1

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/babel.config.json CHANGED
@@ -1,12 +1,5 @@
1
1
  {
2
2
  "presets": [
3
3
  "@babel/env"
4
- ],
5
- "env": {
6
- "test": {
7
- "plugins": [
8
- "rewire"
9
- ]
10
- }
11
- }
4
+ ]
12
5
  }
package/bin/build.js CHANGED
@@ -33,8 +33,8 @@ function runBuild(options) {
33
33
  process.chdir(EXIFREADER_ROOT_DIR);
34
34
 
35
35
  // Pin the build env regardless of the caller's shell: NODE_ENV=production
36
- // keeps webpack in production mode, and BABEL_ENV is only belt-and-suspenders
37
- // against a stray BABEL_ENV=test adding the test-only rewire plugin.
36
+ // keeps webpack in production mode, and BABEL_ENV is belt-and-suspenders
37
+ // against a stray value selecting an env block in a babel config.
38
38
  const env = {...process.env, BABEL_ENV: 'production', NODE_ENV: 'production'};
39
39
  if (options.config) {
40
40
  env.EXIFREADER_CUSTOM_BUILD = JSON.stringify(options.config);
@@ -77,7 +77,6 @@ function installCustomBuildDependencies(tmpDir) {
77
77
  const packages = [
78
78
  '@babel/core',
79
79
  '@babel/preset-env',
80
- '@babel/register',
81
80
  'babel-loader',
82
81
  'cross-env',
83
82
  'string-replace-loader',
package/bin/profile.js CHANGED
@@ -317,7 +317,7 @@ async function runBenchmark(ExifReader, files, options) {
317
317
  for (let i = 0; i < options.warmup; i++) {
318
318
  try {
319
319
  await parseFile(ExifReader, result, options);
320
- } catch (_warmupError) { // eslint-disable-line no-unused-vars
320
+ } catch (_warmupError) {
321
321
  // Warmup errors are discarded; the real run will surface them below.
322
322
  }
323
323
  }
@@ -397,7 +397,7 @@ async function runProbeBytes(ExifReader, files, results, options, libraryHash) {
397
397
  const buffer = result.buffer || fs.readFileSync(result.file.path);
398
398
  try {
399
399
  result.minBytes = await bisectMinBytes(ExifReader, buffer, options.probeEquality);
400
- } catch (_probeError) { // eslint-disable-line no-unused-vars
400
+ } catch (_probeError) {
401
401
  result.minBytes = null;
402
402
  }
403
403
  cache[cacheKey] = result.minBytes;
@@ -446,7 +446,7 @@ async function parseQuietly(ExifReader, buffer) {
446
446
  try {
447
447
  const out = ExifReader.load(buffer);
448
448
  return isThenable(out) ? await out : out;
449
- } catch (_error) { // eslint-disable-line no-unused-vars
449
+ } catch (_error) {
450
450
  return null;
451
451
  }
452
452
  }
@@ -488,7 +488,7 @@ function loadCache() {
488
488
  if (fs.existsSync(CACHE_FILE)) {
489
489
  return JSON.parse(fs.readFileSync(CACHE_FILE, 'utf8'));
490
490
  }
491
- } catch (_error) { // eslint-disable-line no-unused-vars
491
+ } catch (_error) {
492
492
  // Corrupt cache: ignore and rebuild.
493
493
  }
494
494
  return {};