diff --git a/biome.json b/biome.json index c512a37..fe2e571 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json", "vcs": { "enabled": true, "clientKind": "git", @@ -7,7 +7,14 @@ }, "files": { "ignoreUnknown": false, - "ignore": ["node_modules", "dist", "coverage", "src/lexicon/**", "lexicons/**"] + "includes": [ + "**", + "!**/node_modules", + "!**/dist", + "!**/coverage", + "!**/src/lexicon", + "!**/lexicons" + ] }, "formatter": { "enabled": true, @@ -35,7 +42,5 @@ "semicolons": "always" } }, - "organizeImports": { - "enabled": true - } + "assist": { "actions": { "source": { "organizeImports": "on" } } } } diff --git a/package-lock.json b/package-lock.json index 2d01c7c..4da3075 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@atproto/lex-cli": "^0.9.8", - "@biomejs/biome": "^1.9.4", + "@biomejs/biome": "^2.3.14", "@types/node": "^22.10.2", "tsx": "^4.21.0", "typescript": "^5.7.2", @@ -219,11 +219,10 @@ } }, "node_modules/@biomejs/biome": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.9.4.tgz", - "integrity": "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==", + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.14.tgz", + "integrity": "sha512-QMT6QviX0WqXJCaiqVMiBUCr5WRQ1iFSjvOLoTk6auKukJMvnMzWucXpwZB0e8F00/1/BsS9DzcKgWH+CLqVuA==", "dev": true, - "hasInstallScript": true, "license": "MIT OR Apache-2.0", "bin": { "biome": "bin/biome" @@ -236,20 +235,20 @@ "url": "https://opencollective.com/biome" }, "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "1.9.4", - "@biomejs/cli-darwin-x64": "1.9.4", - "@biomejs/cli-linux-arm64": "1.9.4", - "@biomejs/cli-linux-arm64-musl": "1.9.4", - "@biomejs/cli-linux-x64": "1.9.4", - "@biomejs/cli-linux-x64-musl": "1.9.4", - "@biomejs/cli-win32-arm64": "1.9.4", - "@biomejs/cli-win32-x64": "1.9.4" + "@biomejs/cli-darwin-arm64": "2.3.14", + "@biomejs/cli-darwin-x64": "2.3.14", + "@biomejs/cli-linux-arm64": "2.3.14", + "@biomejs/cli-linux-arm64-musl": "2.3.14", + "@biomejs/cli-linux-x64": "2.3.14", + "@biomejs/cli-linux-x64-musl": "2.3.14", + "@biomejs/cli-win32-arm64": "2.3.14", + "@biomejs/cli-win32-x64": "2.3.14" } }, "node_modules/@biomejs/cli-darwin-arm64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.9.4.tgz", - "integrity": "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==", + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.14.tgz", + "integrity": "sha512-UJGPpvWJMkLxSRtpCAKfKh41Q4JJXisvxZL8ChN1eNW3m/WlPFJ6EFDCE7YfUb4XS8ZFi3C1dFpxUJ0Ety5n+A==", "cpu": [ "arm64" ], @@ -264,9 +263,9 @@ } }, "node_modules/@biomejs/cli-darwin-x64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.9.4.tgz", - "integrity": "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==", + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.14.tgz", + "integrity": "sha512-PNkLNQG6RLo8lG7QoWe/hhnMxJIt1tEimoXpGQjwS/dkdNiKBLPv4RpeQl8o3s1OKI3ZOR5XPiYtmbGGHAOnLA==", "cpu": [ "x64" ], @@ -281,9 +280,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.9.4.tgz", - "integrity": "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==", + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.14.tgz", + "integrity": "sha512-KT67FKfzIw6DNnUNdYlBg+eU24Go3n75GWK6NwU4+yJmDYFe9i/MjiI+U/iEzKvo0g7G7MZqoyrhIYuND2w8QQ==", "cpu": [ "arm64" ], @@ -298,9 +297,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.9.4.tgz", - "integrity": "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==", + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.14.tgz", + "integrity": "sha512-LInRbXhYujtL3sH2TMCH/UBwJZsoGwfQjBrMfl84CD4hL/41C/EU5mldqf1yoFpsI0iPWuU83U+nB2TUUypWeg==", "cpu": [ "arm64" ], @@ -315,9 +314,9 @@ } }, "node_modules/@biomejs/cli-linux-x64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.9.4.tgz", - "integrity": "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==", + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.14.tgz", + "integrity": "sha512-ZsZzQsl9U+wxFrGGS4f6UxREUlgHwmEfu1IrXlgNFrNnd5Th6lIJr8KmSzu/+meSa9f4rzFrbEW9LBBA6ScoMA==", "cpu": [ "x64" ], @@ -332,9 +331,9 @@ } }, "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.9.4.tgz", - "integrity": "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==", + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.14.tgz", + "integrity": "sha512-KQU7EkbBBuHPW3/rAcoiVmhlPtDSGOGRPv9js7qJVpYTzjQmVR+C9Rfcz+ti8YCH+zT1J52tuBybtP4IodjxZQ==", "cpu": [ "x64" ], @@ -349,9 +348,9 @@ } }, "node_modules/@biomejs/cli-win32-arm64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.9.4.tgz", - "integrity": "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==", + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.14.tgz", + "integrity": "sha512-+IKYkj/pUBbnRf1G1+RlyA3LWiDgra1xpS7H2g4BuOzzRbRB+hmlw0yFsLprHhbbt7jUzbzAbAjK/Pn0FDnh1A==", "cpu": [ "arm64" ], @@ -366,9 +365,9 @@ } }, "node_modules/@biomejs/cli-win32-x64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.4.tgz", - "integrity": "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==", + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.14.tgz", + "integrity": "sha512-oizCjdyQ3WJEswpb3Chdngeat56rIdSYK12JI3iI11Mt5T5EXcZ7WLuowzEaFPNJ3zmOQFliMN8QY1Pi+qsfdQ==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index e10b811..381bacc 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,13 @@ "type": "git", "url": "git@tangled.org:markbennett.ca/tangled-cli" }, - "keywords": ["git", "tangled", "pds", "atproto", "cli"], + "keywords": [ + "git", + "tangled", + "pds", + "atproto", + "cli" + ], "author": "Mark Bennett", "license": "MIT", "dependencies": { @@ -44,7 +50,7 @@ }, "devDependencies": { "@atproto/lex-cli": "^0.9.8", - "@biomejs/biome": "^1.9.4", + "@biomejs/biome": "^2.3.14", "@types/node": "^22.10.2", "tsx": "^4.21.0", "typescript": "^5.7.2", diff --git a/scripts/fix-lexicon-imports.js b/scripts/fix-lexicon-imports.js index 8d4ac42..80406e0 100755 --- a/scripts/fix-lexicon-imports.js +++ b/scripts/fix-lexicon-imports.js @@ -8,7 +8,7 @@ * 3. Ensures proper TypeScript compatibility with NodeNext module resolution */ -import { readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs'; +import { readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; // Recursively find all .ts files in a directory @@ -52,7 +52,7 @@ for (const file of files) { // Match: from '../../something' or from "../something" // But don't match if it already has an extension const relativeImportRegex = /from\s+['"](\.\.[^'"]*?)(? { + modified = modified.replace(relativeImportRegex, (_match, path) => { fileChanges++; return `from '${path}.js'`; }); diff --git a/src/commands/config.ts b/src/commands/config.ts index 2fb68dc..5bde345 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -3,7 +3,7 @@ import { homedir } from 'node:os'; import { dirname, join } from 'node:path'; import { Command } from 'commander'; import { simpleGit } from 'simple-git'; -import { type TangledConfig, loadConfig } from '../lib/config.js'; +import { loadConfig, type TangledConfig } from '../lib/config.js'; /** * Get Git root directory diff --git a/src/commands/issue.ts b/src/commands/issue.ts index 6851e02..fa92138 100644 --- a/src/commands/issue.ts +++ b/src/commands/issue.ts @@ -1,8 +1,9 @@ import { confirm } from '@inquirer/prompts'; import { Command } from 'commander'; -import { createApiClient } from '../lib/api-client.js'; import type { TangledApiClient } from '../lib/api-client.js'; +import { createApiClient } from '../lib/api-client.js'; import { getCurrentRepoContext } from '../lib/context.js'; +import type { IssueData } from '../lib/issues-api.js'; import { closeIssue, createIssue, @@ -14,7 +15,6 @@ import { resolveSequentialNumber, updateIssue, } from '../lib/issues-api.js'; -import type { IssueData } from '../lib/issues-api.js'; import { buildRepoAtUri } from '../utils/at-uri.js'; import { ensureAuthenticated, requireAuth } from '../utils/auth-helpers.js'; import { readBodyInput } from '../utils/body-input.js'; diff --git a/src/lib/api-client.ts b/src/lib/api-client.ts index a53ea67..8eb8355 100644 --- a/src/lib/api-client.ts +++ b/src/lib/api-client.ts @@ -1,10 +1,10 @@ -import { AtpAgent } from '@atproto/api'; import type { AtpSessionData } from '@atproto/api'; +import { AtpAgent } from '@atproto/api'; import { - KeychainAccessError, clearCurrentSessionMetadata, deleteSession, getCurrentSessionMetadata, + KeychainAccessError, loadSession, saveCurrentSessionMetadata, saveSession, diff --git a/src/lib/context.ts b/src/lib/context.ts index 1a10acf..688695e 100644 --- a/src/lib/context.ts +++ b/src/lib/context.ts @@ -61,7 +61,7 @@ export async function getTangledRemotes(cwd: string = process.cwd()): Promise { return { AtpAgent: vi.fn().mockImplementation(() => { - let currentSession: AtpSessionData | undefined = undefined; + let currentSession: AtpSessionData | undefined; return { service: { toString: () => 'https://bsky.social' }, diff --git a/tests/lib/config.test.ts b/tests/lib/config.test.ts index 9b9803a..0c3a7b9 100644 --- a/tests/lib/config.test.ts +++ b/tests/lib/config.test.ts @@ -26,7 +26,6 @@ describe('Config Management', () => { beforeEach(() => { vi.clearAllMocks(); originalEnv = process.env.TANGLED_REMOTE; - // biome-ignore lint/performance/noDelete: Need to actually delete env var, not set to undefined delete process.env.TANGLED_REMOTE; }); @@ -34,7 +33,6 @@ describe('Config Management', () => { if (originalEnv !== undefined) { process.env.TANGLED_REMOTE = originalEnv; } else { - // biome-ignore lint/performance/noDelete: Need to actually delete env var, not set to undefined delete process.env.TANGLED_REMOTE; } });