Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:

permissions: {}

env:
MISE_IDIOMATIC_VERSION_FILE_ENABLE_TOOLS: node,pnpm

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -15,10 +18,6 @@ jobs:
with:
persist-credentials: false
- uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1
with:
mise_toml: |
[settings]
idiomatic_version_file_enable_tools = ["node", "pnpm"]
- run: pnpm install --frozen-lockfile
- run: pnpm lint

Expand All @@ -29,10 +28,6 @@ jobs:
with:
persist-credentials: false
- uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1
with:
mise_toml: |
[settings]
idiomatic_version_file_enable_tools = ["node", "pnpm"]
- run: pnpm install --frozen-lockfile
- run: pnpm format:check

Expand All @@ -43,9 +38,5 @@ jobs:
with:
persist-credentials: false
- uses: jdx/mise-action@dad1bfd3df957f44999b559dd69dc1671cb4e9ea # v4.2.1
with:
mise_toml: |
[settings]
idiomatic_version_file_enable_tools = ["node", "pnpm"]
- run: pnpm install --frozen-lockfile
- run: pnpm test
4 changes: 2 additions & 2 deletions experiments/ghostwright/src/assertions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
} from '../types.ts';
import { Locator } from '../terminal/session.ts';
import type { TerminalSession } from '../terminal/session.ts';
// oxlint-disable-next-line max-params -- diagnostic needs all four params for failure reporting
// oxlint-disable-next-line bombshell-dev/max-params -- diagnostic needs all four params for failure reporting
function diagnostic(
session: TerminalSession,
expected: string,
Expand Down Expand Up @@ -37,7 +37,7 @@ function diagnostic(
.join(', ') || 'none'
}\n\n ${tens}\n ${ones}\n${rows}`;
}
// oxlint-disable-next-line max-params -- wait needs all four params for polling logic
// oxlint-disable-next-line bombshell-dev/max-params -- wait needs all four params for polling logic
async function wait(
session: TerminalSession,
test: () => boolean,
Expand Down
2 changes: 1 addition & 1 deletion experiments/ghostwright/src/effection/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class EffectionTerminal implements OperationTerminal {
up: (p: Point, o?: MouseOptions) => op(() => this.inner.mouse.up(p, o)),
click: (p: Point, o?: MouseOptions) => op(() => this.inner.mouse.click(p, o)),
doubleClick: (p: Point, o?: MouseOptions) => op(() => this.inner.mouse.doubleClick(p, o)),
// oxlint-disable-next-line max-params -- wraps mouse.drag(start, end, options) API
// oxlint-disable-next-line bombshell-dev/max-params -- wraps mouse.drag(start, end, options) API
drag: (a: Point, b: Point, o?: MouseOptions) => op(() => this.inner.mouse.drag(a, b, o)),
wheel: (o: WheelOptions) => op(() => this.inner.mouse.wheel(o)),
};
Expand Down
2 changes: 1 addition & 1 deletion experiments/ghostwright/src/pty/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class SidecarClient {
this.#emit('fatal', error);
this.#child.kill('SIGKILL');
}
// oxlint-disable-next-line max-params -- request needs kind, value, raw flag, and timeout
// oxlint-disable-next-line bombshell-dev/max-params -- request needs kind, value, raw flag, and timeout
request<T = unknown>(
kind: FrameKind,
value?: unknown,
Expand Down
12 changes: 6 additions & 6 deletions experiments/ghostwright/src/terminal/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export class TerminalSession implements AsyncTerminal {
#ensure(op: string): void {
if (this.#closed) throw new SessionClosedError(`Cannot ${op}: terminal session is closed`);
}
// oxlint-disable-next-line max-params -- internal method
// oxlint-disable-next-line bombshell-dev/max-params -- internal method
async #send(
kind: FrameKind,
value: unknown,
Expand Down Expand Up @@ -387,7 +387,7 @@ export class TerminalSession implements AsyncTerminal {
});
return receipt as ActionReceipt;
}
// oxlint-disable-next-line max-params -- internal method
// oxlint-disable-next-line bombshell-dev/max-params -- internal method
async #write(
data: Uint8Array,
delivered = data.length > 0,
Expand Down Expand Up @@ -447,7 +447,7 @@ export class TerminalSession implements AsyncTerminal {
`Coordinate (${p.column},${p.row}) is outside ${this.#viewport.columns}x${this.#viewport.rows}`,
);
}
// oxlint-disable-next-line max-params -- internal method
// oxlint-disable-next-line bombshell-dev/max-params -- internal method
#mouse(action: 'move' | 'down' | 'up', p: Point, o: MouseOptions = {}): Promise<ActionReceipt> {
this.#point(p);
const wasDown = this.#mouseDown;
Expand All @@ -473,7 +473,7 @@ export class TerminalSession implements AsyncTerminal {
await this.mouse.click(p, o);
return this.mouse.click(p, o);
},
// oxlint-disable-next-line max-params -- wraps mouse API
// oxlint-disable-next-line bombshell-dev/max-params -- wraps mouse API
drag: async (a: Point, b: Point, o?: MouseOptions) => {
await this.#mouse('down', a, o);
await this.#mouse('move', b, o);
Expand Down Expand Up @@ -615,7 +615,7 @@ export class TerminalSession implements AsyncTerminal {
}, timeout);
});
}
// oxlint-disable-next-line max-params -- internal method
// oxlint-disable-next-line bombshell-dev/max-params -- internal method
async #timeout<T>(p: Promise<T>, ms: number, error: () => Error): Promise<T> {
return new Promise<T>((r, j) => {
const t = setTimeout(() => j(error()), ms);
Expand Down Expand Up @@ -904,7 +904,7 @@ export class TerminalSession implements AsyncTerminal {
}
/** Text locator that finds matching strings in the terminal viewport. */
export class Locator implements AsyncLocator {
// oxlint-disable-next-line max-params -- public API
// oxlint-disable-next-line bombshell-dev/max-params -- public API
constructor(
readonly session: TerminalSession,
readonly query: string,
Expand Down
14 changes: 7 additions & 7 deletions experiments/ghostwright/src/terminal/wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export class GhosttyWasmTerminal {
});
this.#configureMouseSize();
}
// oxlint-disable-next-line max-params -- installCallback wraps ghostty_terminal_set callback API
// oxlint-disable-next-line bombshell-dev/max-params -- installCallback wraps ghostty_terminal_set callback API
#installCallback(
option: number,
parameterCount: number,
Expand All @@ -338,7 +338,7 @@ export class GhosttyWasmTerminal {
throw new AssetIntegrityError(`Unable to configure Ghostty terminal effect ${option}`);
}
#configureEffects() {
// oxlint-disable-next-line max-params -- ghostty write-pty callback API
// oxlint-disable-next-line bombshell-dev/max-params -- ghostty write-pty callback API
this.#installCallback(1, 4, (_terminal, _userdata, data, length) => {
this.#effects.push({ type: 'write-pty', data: this.#bytes().slice(data, data + length) });
});
Expand All @@ -362,7 +362,7 @@ export class GhosttyWasmTerminal {
this.#installCallback(
6,
3,
// oxlint-disable-next-line max-params -- ghostty size report callback API
// oxlint-disable-next-line bombshell-dev/max-params -- ghostty size report callback API
(_terminal, _userdata, output) => {
const layout = this.#layouts.GhosttySizeReportSize,
field = (name: string) => layout.fields[name].offset,
Expand All @@ -378,7 +378,7 @@ export class GhosttyWasmTerminal {
this.#installCallback(
7,
3,
// oxlint-disable-next-line max-params -- ghostty terminal mode query callback API
// oxlint-disable-next-line bombshell-dev/max-params -- ghostty terminal mode query callback API
(_terminal, _userdata, _output) => {
return 1;
},
Expand All @@ -387,7 +387,7 @@ export class GhosttyWasmTerminal {
this.#installCallback(
8,
3,
// oxlint-disable-next-line max-params -- ghostty device attributes callback API
// oxlint-disable-next-line bombshell-dev/max-params -- ghostty device attributes callback API
(_terminal, _userdata, output) => {
const all = this.#layouts.GhosttyDeviceAttributes,
primary = this.#layouts.GhosttyDeviceAttributesPrimary,
Expand All @@ -411,7 +411,7 @@ export class GhosttyWasmTerminal {
this.#installCallback(
26,
3,
// oxlint-disable-next-line max-params -- ghostty clipboard write callback API
// oxlint-disable-next-line bombshell-dev/max-params -- ghostty clipboard write callback API
(_terminal, _userdata, write) => {
const writeLayout = this.#layouts.GhosttyClipboardWrite,
contentLayout = this.#layouts.GhosttyClipboardContent,
Expand Down Expand Up @@ -1284,7 +1284,7 @@ export class GhosttyWasmTerminal {
this.#release(length, 4);
}
}
// oxlint-disable-next-line max-params -- encodeMouse wraps ghostty mouse encoder API
// oxlint-disable-next-line bombshell-dev/max-params -- encodeMouse wraps ghostty mouse encoder API
encodeMouse(
action: 'move' | 'down' | 'up',
point: Point,
Expand Down
4 changes: 2 additions & 2 deletions experiments/ghostwright/src/tracing/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class SessionTrace {
raw: { offset, length: bytes.length, direction: 'from-pty' },
});
}
// oxlint-disable-next-line max-params -- input needs bytes, action sequence, and redaction flag
// oxlint-disable-next-line bombshell-dev/max-params -- input needs bytes, action sequence, and redaction flag
input(bytes: Uint8Array, actionSequence: number, redacted = false): void {
if (this.policy === 'off') return;
if (redacted) {
Expand All @@ -71,7 +71,7 @@ export class SessionTrace {
raw: { offset, length: bytes.length, direction: 'to-pty' },
});
}
// oxlint-disable-next-line max-params -- persist needs error, snapshot, and status for artifact writing
// oxlint-disable-next-line bombshell-dev/max-params -- persist needs error, snapshot, and status for artifact writing
async persist(
error: unknown,
snapshot: ScreenSnapshot,
Expand Down
1 change: 1 addition & 0 deletions oxfmt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './node_modules/@bomb.sh/tools/oxfmtrc.json' with { type: 'json' };
6 changes: 6 additions & 0 deletions oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import config from './node_modules/@bomb.sh/tools/oxlintrc.json' with { type: 'json' };

export default {
...config,
jsPlugins: ['./node_modules/@bomb.sh/tools/rules/plugin.js'],
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"devDependencies": {
"@bomb.sh/args": "catalog:",
"@bomb.sh/tools": "^0.5.5",
"@bomb.sh/tools": "^0.6.1",
"@clack/prompts": "catalog:",
"@types/node": "^22"
},
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ catalog:
'@bomb.sh/args': '^0.3.1'
'@clack/ui': 'https://pkg.pr.new/bombshell-dev/ui/@clack/ui@a60ac12'
'@clack/prompts': '^1.7.0'

publicHoistPattern:
- oxlint
- oxfmt