node-av 3.1.2 → 3.1.3

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.
Files changed (2) hide show
  1. package/install/check.js +18 -7
  2. package/package.json +9 -9
package/install/check.js CHANGED
@@ -19,30 +19,41 @@ const tryLoadPrebuilt = () => {
19
19
  if (useMingW) {
20
20
  try {
21
21
  const packageName = `@seydx/node-av-${platform}-${arch}-mingw`;
22
- return require(`${packageName}/node-av.node`);
22
+ // Check if the package is installed (don't check for .node file yet - it may be extracted by postinstall)
23
+ const packageJsonPath = require.resolve(`${packageName}/package.json`);
24
+ if (existsSync(packageJsonPath)) {
25
+ log(`Using prebuilt binary from ${packageName}`);
26
+ return true;
27
+ }
23
28
  } catch {
24
- // Package not installed or file not found
29
+ // Package not installed
25
30
  }
26
31
  }
27
32
 
28
33
  // Fallback to MSVC
29
34
  try {
30
35
  const packageName = `@seydx/node-av-${platform}-${arch}-msvc`;
31
- return require(`${packageName}/node-av.node`);
36
+ // Check if the package is installed (don't check for .node file yet - it may be extracted by postinstall)
37
+ const packageJsonPath = require.resolve(`${packageName}/package.json`);
38
+ if (existsSync(packageJsonPath)) {
39
+ log(`Using prebuilt binary from ${packageName}`);
40
+ return true;
41
+ }
32
42
  } catch {
33
- // Package not installed or file not found
43
+ // Package not installed
34
44
  }
35
45
  } else {
36
46
  const packageName = `@seydx/node-av-${platform}-${arch}`;
37
47
 
38
48
  try {
39
- const packagePath = require.resolve(`${packageName}/node-av.node`);
40
- if (existsSync(packagePath)) {
49
+ // Check if the package is installed (don't check for .node file yet - it may be extracted by postinstall)
50
+ const packageJsonPath = require.resolve(`${packageName}/package.json`);
51
+ if (existsSync(packageJsonPath)) {
41
52
  log(`Using prebuilt binary from ${packageName}`);
42
53
  return true;
43
54
  }
44
55
  } catch {
45
- // Package not installed or file not found
56
+ // Package not installed
46
57
  }
47
58
  }
48
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-av",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "FFmpeg bindings for Node.js",
5
5
  "author": "seydx (https://github.com/seydx/av)",
6
6
  "type": "module",
@@ -67,14 +67,14 @@
67
67
  "werift": "^0.22.2"
68
68
  },
69
69
  "optionalDependencies": {
70
- "@seydx/node-av-darwin-arm64": "^3.1.2",
71
- "@seydx/node-av-darwin-x64": "^3.1.2",
72
- "@seydx/node-av-linux-arm64": "^3.1.2",
73
- "@seydx/node-av-linux-x64": "^3.1.2",
74
- "@seydx/node-av-win32-arm64-mingw": "^3.1.2",
75
- "@seydx/node-av-win32-arm64-msvc": "^3.1.2",
76
- "@seydx/node-av-win32-x64-mingw": "^3.1.2",
77
- "@seydx/node-av-win32-x64-msvc": "^3.1.2"
70
+ "@seydx/node-av-darwin-arm64": "^3.1.3",
71
+ "@seydx/node-av-darwin-x64": "^3.1.3",
72
+ "@seydx/node-av-linux-arm64": "^3.1.3",
73
+ "@seydx/node-av-linux-x64": "^3.1.3",
74
+ "@seydx/node-av-win32-arm64-mingw": "^3.1.3",
75
+ "@seydx/node-av-win32-arm64-msvc": "^3.1.3",
76
+ "@seydx/node-av-win32-x64-mingw": "^3.1.3",
77
+ "@seydx/node-av-win32-x64-msvc": "^3.1.3"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@stylistic/eslint-plugin": "^5.5.0",