Skip to content

Commit 5c89d00

Browse files
committed
chore: revert to npm
1 parent b9d7314 commit 5c89d00

File tree

14 files changed

+15307
-9534
lines changed

14 files changed

+15307
-9534
lines changed

.npmrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
registry=https://registry.npmjs.org
22
message=chore: release v%s
3-
engine-strict=true
4-
node-linker=hoisted
3+
lockfile-version=3

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ brew install --cask cyansalt/cask/commas
3232
You can clone or download the repository and build Commas locally.
3333
- Make sure you have the latest LTS version of Node.js installed on your device.
3434
- Download the source code and enter the directory through the command line.
35-
- Run `pnpm install` to install dependencies
36-
- Run `pnpm run build` to build this application for the current platform
35+
- Run `npm install` to install dependencies
36+
- Run `npm run build` to build this application for the current platform
3737

3838
## Features
3939

addons/ai/src/renderer/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default () => {
1414

1515
commas.ipcRenderer.handle('ai-quick-fix', (event, command) => {
1616
if (!terminal) return
17-
17+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
1818
terminal.addons?.shellIntegration?.addQuickFixAction(command)
1919
})
2020

@@ -26,7 +26,7 @@ export default () => {
2626
&& !command.actions?.length
2727
) {
2828
const recommendation = await ipcRenderer.invoke('ai-doctor', command.command, output)
29-
29+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
3030
if (recommendation && terminal?.addons?.shellIntegration) {
3131
terminal.addons.shellIntegration.addQuickFixAction(recommendation, command)
3232
}

addons/iterm2/src/renderer/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ export default () => {
2828

2929
commas.ipcRenderer.on('set-mark', () => {
3030
if (!currentTerminal) return
31-
31+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
3232
currentTerminal.addons?.iterm2?.setMark()
3333
})
3434

3535
commas.ipcRenderer.on('scroll-to-mark', (event, offset) => {
3636
if (!currentTerminal) return
37-
37+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
3838
currentTerminal.addons?.iterm2?.scrollToMark(offset)
3939
})
4040

build/pack.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { fileURLToPath } from 'node:url'
55
import util from 'node:util'
66
import { packager } from '@electron/packager'
77
import { rebuild } from '@electron/rebuild'
8-
import { findWorkspacePackages } from '@pnpm/workspace.find-packages'
98
import chalk from 'chalk'
109
import * as dotenv from 'dotenv'
1110
import png2icons from 'png2icons'
@@ -71,17 +70,18 @@ async function generateAppIcon(input, icon, suffix) {
7170
}
7271

7372
async function resolveWorkspacePackages() {
74-
const workspacePkgs = await findWorkspacePackages(path.dirname(pkgPath))
73+
const workspacePkgs = pkg.workspaces
74+
.map(dir => requireCommonJS(import.meta, path.join(path.dirname(pkgPath), dir, 'package.json')))
7575
const prunePkg = {
7676
...pkg,
7777
devDependencies: Object.assign(
7878
{},
79-
...workspacePkgs.map(workspace => workspace.manifest.devDependencies),
79+
...workspacePkgs.map(workspace => workspace.devDependencies),
8080
pkg.devDependencies,
8181
),
8282
dependencies: Object.assign(
8383
{},
84-
...workspacePkgs.map(workspace => workspace.manifest.dependencies),
84+
...workspacePkgs.map(workspace => workspace.dependencies),
8585
pkg.dependencies,
8686
),
8787
}

docs/README-zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ brew install --cask cyansalt/cask/commas
3232
你可以克隆或下载这个仓库,在本地完成 Commas 的构建。
3333
- 确保你的设备上安装了最新的 LTS 版本的 Node.js;
3434
- 下载源代码,通过命令行进入代码目录;
35-
- 运行 `pnpm install` 安装依赖;
36-
- 运行 `pnpm run build` 以生成适用于当前平台的此应用。
35+
- 运行 `npm install` 安装依赖;
36+
- 运行 `npm run build` 以生成适用于当前平台的此应用。
3737

3838
## 功能
3939

0 commit comments

Comments
 (0)