mirror of
https://github.com/sotashimozono/obsidian-remote-ssh.git
synced 2026-07-22 06:52:07 +00:00
* build(workspaces): root npm-workspaces so the validator resolves plugin types ObsidianReviewBot scans from the repo ROOT (getManifest reads cwd/manifest.json), installs at the root, and type-checks plugin/src via ./tsconfig.json with @typescript-eslint/no-unsafe-member-access. The plugin lives in plugin/ with deps in plugin/node_modules, so a root install resolved nothing -> @types/node + obsidian unresolved -> false "unsafe member access" warnings. #392 (typeRoots) couldn't help because plugin/node_modules doesn't exist in the validator's root-only install. Declare the root as an npm workspace ({ workspaces: ["plugin"] }). A root install now hoists the plugin's deps into root/node_modules; the root tsconfig's typeRoots picks them up. Verified by simulating the validator (rm plugin/node_modules; install at root only): @types/node + obsidian hoisted, eslint from cwd=root -> 0 unsafe-member-access. CI unaffected: cd plugin; npm ci still works (plugin/package-lock.json retained, 439 packages, 0 vuln) -- no workflow changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * build(deps): pin obsidian to ~1.12.3 so the validator type-checks deprecation-free With the workspace root now resolving types, a root install pulled obsidian "latest" = 1.13.0, which deprecates SettingTab.display() and ButtonComponent.setWarning(). The validator's @typescript-eslint/no-deprecated then flagged 9 errors in SettingsTab.ts that the plugin's own CI never saw (plugin lock pinned 1.12.3). "obsidian": "latest" is a non-reproducible anti-pattern regardless. Pin to ~1.12.3 (the last release before those APIs were deprecated). Verified by simulating the validator (root install -> obsidian 1.12.3; eslint from cwd=root): 0 no-deprecated, 0 unsafe-member-access, EXIT 0. The declarative getSettingDefinitions()/setDestructive() migration is deferred until we intentionally raise the obsidian floor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * build: plain root devDeps instead of workspaces (keeps CI green) The workspaces approach broke CI: npm hoists the plugin's deps into root/node_modules, but the plugin's CI invokes binaries by direct path (`node node_modules/typescript/bin/tsc`, `node node_modules/vitest/...`), which are then absent from plugin/node_modules. Hoisting is intrinsic to workspaces, so any workspaces setup would require workflow changes. Instead, make the root package.json a plain (non-workspace) manifest that declares only the deps the validator needs to type-check plugin/src from the repo root. A root `npm install` populates root/node_modules and the root tsconfig resolves types there. The plugin's own `cd plugin; npm ci` is untouched (no hoisting) -> CI stays green with zero workflow changes. Verified: move plugin/node_modules aside, eslint from cwd=root with root deps only -> 0 unsafe-member-access, 0 no-deprecated, 0 cannot-be-resolved. Trade-off: type-dep versions are duplicated between root and plugin and must be kept in sync (noted in the root package.json description). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
62 lines
2.4 KiB
JSON
62 lines
2.4 KiB
JSON
{
|
|
"name": "obsidian-remote-ssh",
|
|
"version": "1.1.2-beta.13",
|
|
"description": "VS Code Remote SSH-like experience for Obsidian",
|
|
"main": "main.js",
|
|
"scripts": {
|
|
"dev": "node esbuild.config.mjs",
|
|
"build": "node esbuild.config.mjs production",
|
|
"dev:install": "node scripts/dev-install.mjs",
|
|
"build:install": "node esbuild.config.mjs production && node scripts/dev-install.mjs",
|
|
"build:server": "node scripts/build-server.mjs",
|
|
"build:full": "node scripts/build-server.mjs && node esbuild.config.mjs production && node scripts/dev-install.mjs",
|
|
"cdp:tail": "node scripts/cdp-tail.mjs",
|
|
"test": "vitest run",
|
|
"test:coverage": "vitest run --coverage",
|
|
"test:replay": "node scripts/replay-prev-tests.mjs",
|
|
"test:integration": "vitest run --config vitest.integration.config.ts --exclude **/perf.sync.bench.test.ts",
|
|
"test:integration:bench": "vitest run --config vitest.integration.config.ts tests/integration/perf.sync.bench.test.ts",
|
|
"test:e2e": "playwright test --config e2e/playwright.config.ts",
|
|
"test:e2e:reflect": "playwright test --config e2e/playwright.config.ts e2e/reflect.spec.ts",
|
|
"sshd:start": "node scripts/start-test-sshd.mjs",
|
|
"sshd:stop": "node scripts/stop-test-sshd.mjs",
|
|
"lint": "eslint \"src/**/*.ts\"",
|
|
"bump:beta:start": "npm version prepatch --preid=beta --no-git-tag-version",
|
|
"bump:beta": "npm version prerelease --preid=beta --no-git-tag-version",
|
|
"bump:stable": "node scripts/bump-stable.mjs",
|
|
"version": "node scripts/bump-version.mjs && git add package.json package-lock.json manifest.json versions.json ../manifest.json ../manifest-beta.json ../versions.json"
|
|
},
|
|
"keywords": [
|
|
"obsidian",
|
|
"ssh",
|
|
"sftp",
|
|
"remote"
|
|
],
|
|
"author": "",
|
|
"license": "MIT",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"dependencies": {
|
|
"@xterm/addon-fit": "^0.11.0",
|
|
"@xterm/xterm": "^6.0.0",
|
|
"ssh2": "^1.17.0"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
|
|
"@playwright/test": "^1.60.0",
|
|
"@types/node": "^25.9.2",
|
|
"@types/ssh2": "^1.11.19",
|
|
"@typescript-eslint/eslint-plugin": "^8.60.1",
|
|
"@typescript-eslint/parser": "^8.59.2",
|
|
"@vitest/coverage-v8": "^4.1.8",
|
|
"esbuild": "^0.28.0",
|
|
"eslint": "^10.4.1",
|
|
"eslint-plugin-obsidianmd": "^0.3.0",
|
|
"fast-check": "^4.8.0",
|
|
"jsdom": "^29.1.1",
|
|
"obsidian": "~1.12.3",
|
|
"typescript": "^6.0.3",
|
|
"vitest": "^4.1.5"
|
|
}
|
|
}
|