Skip to content

Commit c5d65a3

Browse files
committed
fix: pnpm workspace packages
1 parent d0c96a3 commit c5d65a3

File tree

9 files changed

+40
-51
lines changed

9 files changed

+40
-51
lines changed

package.json

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
"@atlaskit/pragmatic-drag-and-drop": "^1.3.0",
3939
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.4.0",
4040
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
41-
"@commas/api": "file:src/api",
42-
"@commas/electron-ipc": "file:src/electron-ipc",
43-
"@commas/types": "file:src/types",
41+
"@commas/api": "workspace:*",
42+
"@commas/electron-ipc": "workspace:*",
43+
"@commas/types": "workspace:*",
4444
"@cyansalt/eslint-config": "^4.2.1",
4545
"@cyansalt/stylelint-config": "^4.0.5",
4646
"@cyansalt/tsconfig": "^2.2.1",
@@ -100,25 +100,6 @@
100100
"vue": "^3.4.3",
101101
"yaml": "^2.5.0"
102102
},
103-
"workspaces": [
104-
"addons/addon-manager",
105-
"addons/ai",
106-
"addons/cleaner",
107-
"addons/cli",
108-
"addons/clippy",
109-
"addons/editor",
110-
"addons/git",
111-
"addons/iterm2",
112-
"addons/l10n-ext",
113-
"addons/launcher",
114-
"addons/power-mode",
115-
"addons/preference",
116-
"addons/proxy",
117-
"addons/settings",
118-
"addons/sync",
119-
"addons/theme",
120-
"addons/updater"
121-
],
122103
"commas:i18n": {
123104
"zh-CN": {
124105
"description": "一款可定制终端和命令执行工具"

pnpm-lock.yaml

Lines changed: 12 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
packages:
22
- 'addons/*'
3+
- 'src/api'
4+
- 'src/electron-ipc'
5+
- 'src/types'

src/api/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "@commas/api",
3+
"private": true,
4+
"version": "0.1.0",
5+
"author": "commas",
6+
"license": "ISC"
7+
}

src/main/lib/menu.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import type { MenuItemConstructorOptions, PopupOptions } from 'electron'
2+
import { app, BrowserWindow, globalShortcut, Menu, nativeImage, TouchBar } from 'electron'
13
import { ipcMain } from '@commas/electron-ipc'
24
import type { TranslationVariables } from '@commas/types/i18n'
35
import type { KeyBinding, MenuItem } from '@commas/types/menu'
4-
import type { MenuItemConstructorOptions, PopupOptions } from 'electron'
5-
import { app, BrowserWindow, globalShortcut, Menu, nativeImage, TouchBar } from 'electron'
66
import { globalHandler } from '../../shared/handler'
77
import { provideIPC, useYAMLFile } from '../utils/compositions'
88
import { resourceFile, userFile } from '../utils/directory'

src/renderer/compositions/shell.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ipcRenderer } from '@commas/electron-ipc'
21
import { shell } from 'electron'
2+
import { ipcRenderer } from '@commas/electron-ipc'
33
import { globalHandler } from '../../shared/handler'
44
import { translate } from '../utils/i18n'
55

src/renderer/compositions/terminal.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import * as os from 'node:os'
22
import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge'
3-
import { ipcRenderer } from '@commas/electron-ipc'
4-
import type { KeyBindingCommand, MenuItem } from '@commas/types/menu'
5-
import type { ReadonlyTerminalTabAddons, TerminalContext, TerminalTab, TerminalTabCharacter, TerminalTabCharacterCommand } from '@commas/types/terminal'
63
import { CanvasAddon } from '@xterm/addon-canvas'
74
import { FitAddon } from '@xterm/addon-fit'
85
import { ImageAddon } from '@xterm/addon-image'
@@ -19,6 +16,9 @@ import { toKeyEvent } from 'keyboardevent-from-electron-accelerator'
1916
import { isMatch, trim } from 'lodash'
2017
import type { MaybeRefOrGetter } from 'vue'
2118
import { effectScope, markRaw, nextTick, reactive, shallowReactive, toRaw, toValue, watch, watchEffect } from 'vue'
19+
import { ipcRenderer } from '@commas/electron-ipc'
20+
import type { KeyBindingCommand, MenuItem } from '@commas/types/menu'
21+
import type { ReadonlyTerminalTabAddons, TerminalContext, TerminalTab, TerminalTabCharacter, TerminalTabCharacterCommand } from '@commas/types/terminal'
2222
import * as commas from '../../api/core-renderer'
2323
import { createIDGenerator } from '../../shared/helper'
2424
import { openContextMenu } from '../utils/frame'

src/renderer/utils/compositions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { IpcRefValue, Refs } from '@commas/electron-ipc'
2-
import { ipcRenderer } from '@commas/electron-ipc'
31
import { cloneDeep } from 'lodash'
42
import { customRef, watchEffect } from 'vue'
3+
import type { IpcRefValue, Refs } from '@commas/electron-ipc'
4+
import { ipcRenderer } from '@commas/electron-ipc'
55

66
export function injectIPC<
77
K extends keyof Refs,

src/types/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "@commas/types",
3+
"private": true,
4+
"version": "0.1.0",
5+
"author": "commas",
6+
"license": "ISC"
7+
}

0 commit comments

Comments
 (0)