next-bun-compile 0.5.1 → 0.5.2

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/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  compile,
4
4
  generateEntryPoint
5
- } from "./index-81394x5f.js";
5
+ } from "./index-k6q8xg22.js";
6
6
 
7
7
  // src/cli.ts
8
8
  import { existsSync } from "node:fs";
@@ -36,13 +36,15 @@ function findPackageDirs(nodeModulesDir, pkg) {
36
36
  const direct = join(nodeModulesDir, pkg);
37
37
  if (existsSync(direct))
38
38
  dirs.push(direct);
39
- const bunDir = join(nodeModulesDir, ".bun");
40
- if (existsSync(bunDir)) {
41
- const scope = pkg.startsWith("@") ? pkg.split("/")[0] + "+" + pkg.split("/")[1] : pkg;
42
- for (const entry of readdirSync(bunDir)) {
43
- if (!entry.startsWith(scope + "@"))
39
+ const prefix = pkg.startsWith("@") ? pkg.split("/")[0] + "+" + pkg.split("/")[1] : pkg;
40
+ for (const store of [".bun", ".pnpm"]) {
41
+ const storeDir = join(nodeModulesDir, store);
42
+ if (!existsSync(storeDir))
43
+ continue;
44
+ for (const entry of readdirSync(storeDir)) {
45
+ if (!entry.startsWith(prefix + "@"))
44
46
  continue;
45
- const hoisted = join(bunDir, entry, "node_modules", pkg);
47
+ const hoisted = join(storeDir, entry, "node_modules", pkg);
46
48
  if (existsSync(hoisted))
47
49
  dirs.push(hoisted);
48
50
  }
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  __require,
3
3
  compile,
4
4
  generateEntryPoint
5
- } from "./index-81394x5f.js";
5
+ } from "./index-k6q8xg22.js";
6
6
 
7
7
  // src/index.ts
8
8
  import { join } from "node:path";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-bun-compile",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Next.js Build Adapter that compiles your app into a Bun single-file executable",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",