@mizchi/bit 0.43.2 → 0.49.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/bin/bit.mjs CHANGED
@@ -1,11 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire } from "node:module";
3
- import { fileURLToPath } from "node:url";
4
- import { dirname, join } from "node:path";
5
-
6
- const require = createRequire(import.meta.url);
7
- const __dirname = dirname(fileURLToPath(import.meta.url));
8
- const bitCjs = join(__dirname, "..", "bit.cjs");
9
-
10
- // MoonBit CLI output assumes CommonJS even when the package itself is ESM.
11
- require(bitCjs);
2
+ // The MoonBit CLI payload is an ES module; importing it runs the CLI.
3
+ import "../bit.mjs";
package/bit.js CHANGED
@@ -1,8 +1,3 @@
1
- import { createRequire } from "node:module";
2
- import { dirname, join } from "node:path";
3
- import { fileURLToPath } from "node:url";
4
-
5
- const require = createRequire(import.meta.url);
6
- const __dirname = dirname(fileURLToPath(import.meta.url));
7
-
8
- export default require(join(__dirname, "bit.cjs"));
1
+ // The MoonBit CLI payload is an ES module (moonc emits `import` statements
2
+ // for its `#module("node:fs")` FFI bindings); importing it runs the CLI.
3
+ export * from "./bit.mjs";