From 0b804bd97d32f4d2657b27dd430442a2315dacc6 Mon Sep 17 00:00:00 2001 From: John Lindquist Date: Thu, 5 Sep 2024 08:12:54 -0600 Subject: [PATCH] fix(pnpm): use PATH pnpm --- package-lock.json | 53 +++++++++++++----------- package.json | 9 +++-- pnpm-lock.yaml | 100 ++++++++++++++++++++++++---------------------- src/api/pro.ts | 21 ---------- 4 files changed, 87 insertions(+), 96 deletions(-) diff --git a/package-lock.json b/package-lock.json index a85897ec..fb6d8735 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "body-parser": "^1.20.2", "bottleneck": "^2.19.5", "chrome-trace-event": "^1.0.4", + "color-name": "2.0.0", "dotenv": "^16.4.5", "esbuild": "0.23.1", "express": "^4.19.2", @@ -35,15 +36,16 @@ "globby": "^14.0.2", "highlight.js": "^11.10.0", "isomorphic-git": "1.27.1", + "jsonfile": "6.1.0", "keyv": "^5.0.1", "keyv-file": "^5.0.0", - "pnpm": "9.9.0", "quick-score": "^0.2.0", "rimraf": "6.0.1", "safe-stable-stringify": "^2.5.0", "shelljs": "0.8.5", "slugify": "1.6.6", "suggestion": "2.1.2", + "untildify": "5.0.0", "vite": "5.4.2", "zx": "^8.1.5" }, @@ -3412,11 +3414,21 @@ "color-name": "1.1.3" } }, - "node_modules/color-name": { + "node_modules/color-convert/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/color-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.0.0.tgz", + "integrity": "sha512-SbtvAMWvASO5TE2QP07jHBMXKafgdZz8Vrsrn96fiL+O92/FN/PLARzUW5sKt013fjAprK2d2iCn2hk2Xb5oow==", + "license": "MIT", + "engines": { + "node": ">=12.20" + } }, "node_modules/color-support": { "version": "1.1.3", @@ -7286,6 +7298,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -11195,6 +11208,15 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/open/node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -11777,22 +11799,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pnpm": { - "version": "9.9.0", - "resolved": "https://registry.npmjs.org/pnpm/-/pnpm-9.9.0.tgz", - "integrity": "sha512-YMGKzROL/2ldM5vmrRP36TbupnRWYNTMSndtUkfFQNDt7hpWNpXBg6ZuuRfviPK0/rH8JfMqetytx6rzQ46ZwQ==", - "license": "MIT", - "bin": { - "pnpm": "bin/pnpm.cjs", - "pnpx": "bin/pnpx.cjs" - }, - "engines": { - "node": ">=18.12" - }, - "funding": { - "url": "https://opencollective.com/pnpm" - } - }, "node_modules/possible-typed-array-names": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", @@ -14523,11 +14529,12 @@ } }, "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-5.0.0.tgz", + "integrity": "sha512-bOgQLUnd2G5rhzaTvh1VCI9Fo6bC5cLTpH17T5aFfamyXFYDbbdzN6IXdeoc3jBS7T9hNTmJtYUzJCJ2Xlc9gA==", + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=16" } }, "node_modules/unzipper": { diff --git a/package.json b/package.json index 20b70ff3..db2b462f 100644 --- a/package.json +++ b/package.json @@ -84,13 +84,14 @@ "dotenv": "^16.4.5", "esbuild": "0.23.1", "express": "^4.19.2", - "filesize": "10.1.4", + "filesize": "10.1.6", "fs-extra": "^11.2.0", "globby": "^14.0.2", "highlight.js": "^11.10.0", "isomorphic-git": "1.27.1", + "jsonfile": "6.1.0", "keyv": "^5.0.1", - "keyv-file": "^5.0.0", + "keyv-file": "^5.0.3", "quick-score": "^0.2.0", "rimraf": "6.0.1", "safe-stable-stringify": "^2.5.0", @@ -98,14 +99,14 @@ "slugify": "1.6.6", "suggestion": "2.1.2", "untildify": "5.0.0", - "vite": "5.4.2", + "vite": "5.4.3", "zx": "^8.1.5" }, "devDependencies": { "@types/debug": "4.1.12", "@types/express": "4.17.21", "@types/express-ws": "3.0.5", - "@types/node": "^22.5.1", + "@types/node": "^22.5.4", "@types/node-ipc": "9.2.3", "ava": "^6.1.3", "cross-env": "^7.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3d55c156..ce94aa9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,8 +72,8 @@ importers: specifier: ^4.19.2 version: 4.19.2 filesize: - specifier: 10.1.4 - version: 10.1.4 + specifier: 10.1.6 + version: 10.1.6 fs-extra: specifier: ^11.2.0 version: 11.2.0 @@ -86,12 +86,15 @@ importers: isomorphic-git: specifier: 1.27.1 version: 1.27.1 + jsonfile: + specifier: 6.1.0 + version: 6.1.0 keyv: specifier: ^5.0.1 version: 5.0.1 keyv-file: - specifier: ^5.0.0 - version: 5.0.2 + specifier: ^5.0.3 + version: 5.0.3 quick-score: specifier: ^0.2.0 version: 0.2.0 @@ -114,8 +117,8 @@ importers: specifier: 5.0.0 version: 5.0.0 vite: - specifier: 5.4.2 - version: 5.4.2(@types/node@22.5.1) + specifier: 5.4.3 + version: 5.4.3(@types/node@22.5.4) zx: specifier: ^8.1.5 version: 8.1.5 @@ -137,8 +140,8 @@ importers: specifier: 3.0.5 version: 3.0.5 '@types/node': - specifier: ^22.5.1 - version: 22.5.1 + specifier: ^22.5.4 + version: 22.5.4 '@types/node-ipc': specifier: 9.2.3 version: 9.2.3 @@ -150,7 +153,7 @@ importers: version: 7.0.3 cz-conventional-changelog: specifier: ^3.3.0 - version: 3.3.0(@types/node@22.5.1)(typescript@5.5.4) + version: 3.3.0(@types/node@22.5.4)(typescript@5.5.4) debug: specifier: 4.3.6 version: 4.3.6 @@ -793,8 +796,8 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@22.5.1': - resolution: {integrity: sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw==} + '@types/node@22.5.4': + resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1799,8 +1802,8 @@ packages: file-uri-to-path@1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - filesize@10.1.4: - resolution: {integrity: sha512-ryBwPIIeErmxgPnm6cbESAzXjuEFubs+yKYLBZvg3CaiNcmkJChoOGcBSrZ6IwkMwPABwPpVXE6IlNdGJJrvEg==} + filesize@10.1.6: + resolution: {integrity: sha512-sJslQKU2uM33qH5nqewAwVB2QgR6w1aMNsYUp3aN5rMRyXEwJGmZvaWzeJFNTOXWlHQyBFCWrdj3fV/fsTOX8w==} engines: {node: '>= 10.4.0'} fill-range@7.1.1: @@ -2397,8 +2400,8 @@ packages: resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==} engines: {node: '>=0.6.0'} - keyv-file@5.0.2: - resolution: {integrity: sha512-iuXUp++YA5oa+Sw9eyX93FWmvSKl/CbuC+8F3rEuovRCaaCI0NLtcJ6EEPW3cNv7xv6+EngT9VwLwy5mHSgI2g==} + keyv-file@5.0.3: + resolution: {integrity: sha512-VoX/Y+sMGM9O/d0PFNfuqQDt1cJaBDKgHDuauQeLfhd3S8LKZgqSsJRDoYBbMW8qvuv/1/TJhfAq4k/AXpWxYw==} keyv@5.0.1: resolution: {integrity: sha512-NH+3ditq1O5uTSQiiHrGOTkwUniRox/lZ8tHARdsu5Skyv0AhZca0OCycWfR1fTECvSRftMQnXqx7cBpxo8G1g==} @@ -3017,8 +3020,8 @@ packages: resolution: {integrity: sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - postcss@8.4.42: - resolution: {integrity: sha512-hywKUQB9Ra4dR1mGhldy5Aj1X3MWDSIA1cEi+Uy0CjheLvP6Ual5RlwMCh8i/X121yEDLDIKBsrCQ8ba3FDMfQ==} + postcss@8.4.45: + resolution: {integrity: sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==} engines: {node: ^10 || ^12 || >=14} pretty-ms@9.1.0: @@ -3751,8 +3754,8 @@ packages: resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} engines: {'0': node >=0.6.0} - vite@5.4.2: - resolution: {integrity: sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==} + vite@5.4.3: + resolution: {integrity: sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -3900,7 +3903,7 @@ snapshots: '@commitlint/execute-rule@19.0.0': optional: true - '@commitlint/load@19.4.0(@types/node@22.5.1)(typescript@5.5.4)': + '@commitlint/load@19.4.0(@types/node@22.5.4)(typescript@5.5.4)': dependencies: '@commitlint/config-validator': 19.0.3 '@commitlint/execute-rule': 19.0.0 @@ -3908,7 +3911,7 @@ snapshots: '@commitlint/types': 19.0.3 chalk: 5.3.0 cosmiconfig: 9.0.0(typescript@5.5.4) - cosmiconfig-typescript-loader: 5.0.0(@types/node@22.5.1)(cosmiconfig@9.0.0(typescript@5.5.4))(typescript@5.5.4) + cosmiconfig-typescript-loader: 5.0.0(@types/node@22.5.4)(cosmiconfig@9.0.0(typescript@5.5.4))(typescript@5.5.4) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -4361,15 +4364,15 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 22.5.1 + '@types/node': 22.5.4 '@types/connect@3.4.38': dependencies: - '@types/node': 22.5.1 + '@types/node': 22.5.4 '@types/conventional-commits-parser@5.0.0': dependencies: - '@types/node': 22.5.1 + '@types/node': 22.5.4 optional: true '@types/debug@4.1.12': @@ -4380,7 +4383,7 @@ snapshots: '@types/express-serve-static-core@4.19.5': dependencies: - '@types/node': 22.5.1 + '@types/node': 22.5.4 '@types/qs': 6.9.15 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -4401,19 +4404,19 @@ snapshots: '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.5.1 + '@types/node': 22.5.4 optional: true '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 22.5.1 + '@types/node': 22.5.4 '@types/http-errors@2.0.4': {} '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.5.1 + '@types/node': 22.5.4 optional: true '@types/mime@1.3.5': {} @@ -4424,12 +4427,12 @@ snapshots: '@types/node-ipc@9.2.3': dependencies: - '@types/node': 22.5.1 + '@types/node': 22.5.4 '@types/node@12.20.55': optional: true - '@types/node@22.5.1': + '@types/node@22.5.4': dependencies: undici-types: 6.19.8 @@ -4444,22 +4447,22 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.5.1 + '@types/node': 22.5.4 '@types/serve-static@1.15.7': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 22.5.1 + '@types/node': 22.5.4 '@types/send': 0.17.4 '@types/shelljs@0.8.15': dependencies: '@types/glob': 7.2.0 - '@types/node': 22.5.1 + '@types/node': 22.5.4 '@types/ws@8.5.12': dependencies: - '@types/node': 22.5.1 + '@types/node': 22.5.4 '@vercel/nft@0.26.5': dependencies: @@ -5054,10 +5057,10 @@ snapshots: dependencies: delayed-stream: 1.0.0 - commitizen@4.3.0(@types/node@22.5.1)(typescript@5.5.4): + commitizen@4.3.0(@types/node@22.5.4)(typescript@5.5.4): dependencies: cachedir: 2.3.0 - cz-conventional-changelog: 3.3.0(@types/node@22.5.1)(typescript@5.5.4) + cz-conventional-changelog: 3.3.0(@types/node@22.5.4)(typescript@5.5.4) dedent: 0.7.0 detect-indent: 6.1.0 find-node-modules: 2.1.3 @@ -5158,9 +5161,9 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@5.0.0(@types/node@22.5.1)(cosmiconfig@9.0.0(typescript@5.5.4))(typescript@5.5.4): + cosmiconfig-typescript-loader@5.0.0(@types/node@22.5.4)(cosmiconfig@9.0.0(typescript@5.5.4))(typescript@5.5.4): dependencies: - '@types/node': 22.5.1 + '@types/node': 22.5.4 cosmiconfig: 9.0.0(typescript@5.5.4) jiti: 1.21.6 typescript: 5.5.4 @@ -5231,16 +5234,16 @@ snapshots: dependencies: array-find-index: 1.0.2 - cz-conventional-changelog@3.3.0(@types/node@22.5.1)(typescript@5.5.4): + cz-conventional-changelog@3.3.0(@types/node@22.5.4)(typescript@5.5.4): dependencies: chalk: 2.4.2 - commitizen: 4.3.0(@types/node@22.5.1)(typescript@5.5.4) + commitizen: 4.3.0(@types/node@22.5.4)(typescript@5.5.4) conventional-commit-types: 3.0.0 lodash.map: 4.6.0 longest: 2.0.1 word-wrap: 1.2.5 optionalDependencies: - '@commitlint/load': 19.4.0(@types/node@22.5.1)(typescript@5.5.4) + '@commitlint/load': 19.4.0(@types/node@22.5.4)(typescript@5.5.4) transitivePeerDependencies: - '@types/node' - typescript @@ -5682,7 +5685,7 @@ snapshots: file-uri-to-path@1.0.0: {} - filesize@10.1.4: {} + filesize@10.1.6: {} fill-range@7.1.1: dependencies: @@ -6303,8 +6306,9 @@ snapshots: json-schema: 0.4.0 verror: 1.10.0 - keyv-file@5.0.2: + keyv-file@5.0.3: dependencies: + '@keyv/serialize': 1.0.1 fs-extra: 4.0.3 tslib: 1.14.1 @@ -6786,7 +6790,7 @@ snapshots: dependencies: irregular-plurals: 3.5.0 - postcss@8.4.42: + postcss@8.4.45: dependencies: nanoid: 3.3.7 picocolors: 1.0.1 @@ -7614,13 +7618,13 @@ snapshots: core-util-is: 1.0.2 extsprintf: 1.3.0 - vite@5.4.2(@types/node@22.5.1): + vite@5.4.3(@types/node@22.5.4): dependencies: esbuild: 0.21.5 - postcss: 8.4.42 + postcss: 8.4.45 rollup: 4.21.2 optionalDependencies: - '@types/node': 22.5.1 + '@types/node': 22.5.4 fsevents: 2.3.3 vm-browserify@0.0.4: @@ -7714,4 +7718,4 @@ snapshots: zx@8.1.5: optionalDependencies: '@types/fs-extra': 11.0.4 - '@types/node': 22.5.1 + '@types/node': 22.5.4 diff --git a/src/api/pro.ts b/src/api/pro.ts index c4fd7c7b..06e2cbfd 100644 --- a/src/api/pro.ts +++ b/src/api/pro.ts @@ -467,27 +467,6 @@ global.term = async ( }) } - function arePathsEqual(path1: string | undefined, path2: string | undefined) { - return path1 && path2 && path.resolve(path1) === path.resolve(path2) - } - - let isCwdKenv = arePathsEqual(config.cwd, kenvPath()) - if (config.command.startsWith("pnpm ") && isCwdKenv) { - const isWindows = process.platform === "win32" - config.command = config.command.replace( - /^pnpm/, - isWindows ? "..\\.kit\\pnpm" : "../.kit/pnpm" - ) - } - - if (config.command.startsWith("npm ") && isCwdKenv) { - const isWindows = process.platform === "win32" - config.command = config.command.replace( - /^npm/, - isWindows ? "..\\.kit\\pnpm" : "../.kit/pnpm" - ) - } - return await global.kitPrompt({ input: config.command, ui: UI.term,