cpp.js 1.0.0 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # cpp.js
2
2
 
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: include prebuilt/*/{config.general.name}/*.h in dependency header search paths
8
+
3
9
  ## 1.0.0
4
10
 
5
11
  ### Major Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cpp.js",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "license": "MIT",
5
5
  "homepage": "https://cpp.js.org",
6
6
  "repository": "https://github.com/bugra9/cpp.js.git",
@@ -8,6 +8,7 @@ export default function getDependFilePath(source, platform) {
8
8
  const dependPackage = state.config.allDependencies.find((d) => source.startsWith(d.package.name));
9
9
  if (dependPackage) {
10
10
  const depName = dependPackage.package.name;
11
+ const configName = dependPackage.general.name;
11
12
  const filePath = source.substring(depName.length + 1);
12
13
 
13
14
  let path;
@@ -19,7 +20,9 @@ export default function getDependFilePath(source, platform) {
19
20
  path = `${dependPackage.paths.output}/prebuilt/${platform}`;
20
21
  }
21
22
 
22
- if (fs.existsSync(`${path}/${depName}/${filePath}`)) {
23
+ if (fs.existsSync(`${path}/${configName}/${filePath}`)) {
24
+ path = `${path}/${configName}/${filePath}`;
25
+ } else if (fs.existsSync(`${path}/${depName}/${filePath}`)) {
23
26
  path = `${path}/${depName}/${filePath}`;
24
27
  } else if (fs.existsSync(`${path}/${filePath}`)) {
25
28
  path = `${path}/${filePath}`;