@simon_he/pi 0.1.21 → 0.1.22

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/index.cjs CHANGED
@@ -41,9 +41,10 @@ node_fs = __toESM(node_fs);
41
41
  let node_os = require("node:os");
42
42
  node_os = __toESM(node_os);
43
43
  let node_module = require("node:module");
44
+ let node_url = require("node:url");
44
45
 
45
46
  //#region package.json
46
- var version = "0.1.21";
47
+ var version = "0.1.22";
47
48
 
48
49
  //#endregion
49
50
  //#region src/installDeps.ts
@@ -488,8 +489,7 @@ function pci(params, pkg) {
488
489
 
489
490
  //#endregion
490
491
  //#region src/require.ts
491
- const entry = node_process.default.argv[1];
492
- const base = entry ? node_path.default.resolve(entry) : node_path.default.join(node_process.default.cwd(), "index.js");
492
+ const base = (0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href);
493
493
  const localRequire = (0, node_module.createRequire)(base);
494
494
 
495
495
  //#endregion
package/dist/index.mjs CHANGED
@@ -8,9 +8,10 @@ import color from "picocolors";
8
8
  import { log } from "node:console";
9
9
  import fs from "node:fs";
10
10
  import os from "node:os";
11
+ import { fileURLToPath } from "node:url";
11
12
 
12
13
  //#region package.json
13
- var version = "0.1.21";
14
+ var version = "0.1.22";
14
15
 
15
16
  //#endregion
16
17
  //#region src/installDeps.ts
@@ -455,8 +456,7 @@ function pci(params, pkg) {
455
456
 
456
457
  //#endregion
457
458
  //#region src/require.ts
458
- const entry = process.argv[1];
459
- const base = entry ? path.resolve(entry) : path.join(process.cwd(), "index.js");
459
+ const base = fileURLToPath(import.meta.url);
460
460
  const localRequire = createRequire(base);
461
461
 
462
462
  //#endregion
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@simon_he/pi",
3
3
  "type": "module",
4
- "version": "0.1.21",
5
- "packageManager": "pnpm@10.28.2",
4
+ "version": "0.1.22",
6
5
  "description": "An intelligent cross-platform package manager and CLI tool that autodetects project environments (Node.mjs, Go, Rust, Python) with beautiful loading animations and smart command execution.",
7
6
  "author": {
8
7
  "name": "Simon He",
@@ -78,17 +77,6 @@
78
77
  "files": [
79
78
  "dist"
80
79
  ],
81
- "scripts": {
82
- "build": "tsdown ./src/index.ts --format cjs,esm --clean",
83
- "dev": "pnpm build --watch src",
84
- "format": "prettier --write --cache .",
85
- "lint": "eslint .",
86
- "lint:fix": "eslint . --fix",
87
- "prepublishOnly": "nr build",
88
- "release": "bumpp && npm publish",
89
- "start": "esno src/index.ts",
90
- "test": "vitest"
91
- },
92
80
  "dependencies": {
93
81
  "ccommand": "^1.0.88",
94
82
  "fast-glob": "^3.3.3",
@@ -111,5 +99,15 @@
111
99
  },
112
100
  "lint-staged": {
113
101
  "*.{vue,js,ts,jsx,tsx,md,json}": "eslint . --fix"
102
+ },
103
+ "scripts": {
104
+ "build": "tsdown ./src/index.ts --format cjs,esm --clean",
105
+ "dev": "pnpm build --watch src",
106
+ "format": "prettier --write --cache .",
107
+ "lint": "eslint .",
108
+ "lint:fix": "eslint . --fix",
109
+ "release": "bumpp && npm publish",
110
+ "start": "esno src/index.ts",
111
+ "test": "vitest"
114
112
  }
115
- }
113
+ }