diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index f7f1b600..2dd94a1f 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -11,11 +11,9 @@ jobs: runtime: - name: deno deno-version: canary - - name: deno - deno-version: rc - name: node deno-version: canary - node-version: nightly + node-version: latest # - name: bun # deno-version: canary # bun-version: canary @@ -28,7 +26,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Deno - uses: denoland/setup-deno@v1 + uses: denoland/setup-deno@v2 with: deno-version: ${{ matrix.runtime.deno-version }} @@ -41,6 +39,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.runtime.node-version }} + check-latest: true - name: Setup Bun if: matrix.runtime.name == 'bun' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3fc175e7..e006ddaf 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - deno_version: [v1.x, rc] + deno_version: [v1.x, v2.x] env: RUST_BACKTRACE: full DENO_FUTURE: 1 @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Deno - uses: denoland/setup-deno@v1 + uses: denoland/setup-deno@v2 with: deno-version: ${{ matrix.deno_version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b72ed2e4..8c068d60 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Deno - uses: denoland/setup-deno@v1 + uses: denoland/setup-deno@v2 - name: Publish (dry run) if: github.event_name != 'release' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 155a8c95..199468e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: - name: deno deno-version: v1.x - name: deno - deno-version: rc + deno-version: v2.x - name: node # - name: bun os: [macOS-latest, windows-latest, ubuntu-latest] @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Deno - uses: denoland/setup-deno@v1 + uses: denoland/setup-deno@v2 with: deno-version: ${{ matrix.runtime.deno-version }} # deno-version-file: ".deno-version" diff --git a/command/upgrade/get_runtime.ts b/command/upgrade/get_runtime.ts index 31cd925b..5fa1d250 100644 --- a/command/upgrade/get_runtime.ts +++ b/command/upgrade/get_runtime.ts @@ -9,7 +9,7 @@ export interface GetRuntimeResult { /** Get runtime handler for current runtime. */ export async function getRuntime(): Promise { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; if (Deno?.version?.deno) { diff --git a/command/upgrade/runtime/bun_runtime.ts b/command/upgrade/runtime/bun_runtime.ts index 3160476b..66969b08 100644 --- a/command/upgrade/runtime/bun_runtime.ts +++ b/command/upgrade/runtime/bun_runtime.ts @@ -8,9 +8,9 @@ export class BunRuntime extends NodeRuntime { isJsr: boolean, logger?: Logger, ): Promise { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const Bun = (globalThis as any).Bun; - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const process = (globalThis as any).process; cmdArgs = isJsr diff --git a/command/upgrade/spinner.ts b/command/upgrade/spinner.ts index a80aa928..5f7a773d 100644 --- a/command/upgrade/spinner.ts +++ b/command/upgrade/spinner.ts @@ -197,7 +197,7 @@ export class Spinner { * ``` */ start() { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any if (this.#active || (globalThis as any).Deno?.stdout.writable.locked) { return; } diff --git a/internal/runtime/delete_env.ts b/internal/runtime/delete_env.ts index b5165154..7d1deb0f 100644 --- a/internal/runtime/delete_env.ts +++ b/internal/runtime/delete_env.ts @@ -5,7 +5,7 @@ * @param name The name of the environment variable. */ export function deleteEnv(name: string): string | undefined { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; if (Deno) { diff --git a/internal/runtime/exit.ts b/internal/runtime/exit.ts index ed5e8579..fb34258f 100644 --- a/internal/runtime/exit.ts +++ b/internal/runtime/exit.ts @@ -5,7 +5,7 @@ * @param code The exit code. */ export function exit(code: number): never { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; const exit: (code: number) => never = Deno?.exit ?? process?.exit; diff --git a/internal/runtime/get_args.ts b/internal/runtime/get_args.ts index 6f81d7ab..460df100 100644 --- a/internal/runtime/get_args.ts +++ b/internal/runtime/get_args.ts @@ -4,7 +4,7 @@ * @internal */ export function getArgs(): Array { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; return Deno?.args ?? process?.argv.slice(2) ?? []; diff --git a/internal/runtime/get_columns.ts b/internal/runtime/get_columns.ts index ad9c15f6..0dd48b4c 100644 --- a/internal/runtime/get_columns.ts +++ b/internal/runtime/get_columns.ts @@ -5,7 +5,7 @@ */ export function getColumns(): number | null { try { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; // Catch error in none tty mode: Inappropriate ioctl for device (os error 25) diff --git a/internal/runtime/get_env.ts b/internal/runtime/get_env.ts index 03af34e1..53dbc3f4 100644 --- a/internal/runtime/get_env.ts +++ b/internal/runtime/get_env.ts @@ -5,7 +5,7 @@ * @param name The name of the environment variable. */ export function getEnv(name: string): string | undefined { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; if (Deno) { diff --git a/internal/runtime/get_os.ts b/internal/runtime/get_os.ts index d2481fbf..1d6676ee 100644 --- a/internal/runtime/get_os.ts +++ b/internal/runtime/get_os.ts @@ -16,7 +16,7 @@ export function getOs(): | "openbsd" | "sunos" | "win32" { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; if (Deno) { diff --git a/internal/runtime/inspect.ts b/internal/runtime/inspect.ts index ea9996d7..8db8659a 100644 --- a/internal/runtime/inspect.ts +++ b/internal/runtime/inspect.ts @@ -4,7 +4,7 @@ * @internal */ export function inspect(value: unknown, colors: boolean): string { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno } = globalThis as any; return Deno?.inspect( diff --git a/internal/runtime/is_terminal.ts b/internal/runtime/is_terminal.ts index db4981be..176e3eac 100644 --- a/internal/runtime/is_terminal.ts +++ b/internal/runtime/is_terminal.ts @@ -4,7 +4,7 @@ * @internal */ export function isTerminal(): boolean { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; if (Deno) { diff --git a/internal/runtime/no_color.ts b/internal/runtime/no_color.ts index bb860138..7f0fb2a7 100644 --- a/internal/runtime/no_color.ts +++ b/internal/runtime/no_color.ts @@ -4,7 +4,7 @@ * @internal */ export function getNoColor(): boolean { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; if (Deno) { diff --git a/internal/runtime/read.ts b/internal/runtime/read.ts index 14bd4b15..c4e61ef9 100644 --- a/internal/runtime/read.ts +++ b/internal/runtime/read.ts @@ -5,7 +5,7 @@ * @param data Uint8Array to store the data. */ export async function read(data: Uint8Array): Promise { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, Bun, process } = globalThis as any; if (Deno) { diff --git a/internal/runtime/read_dir.ts b/internal/runtime/read_dir.ts index bb00cf29..059d8b19 100644 --- a/internal/runtime/read_dir.ts +++ b/internal/runtime/read_dir.ts @@ -5,7 +5,7 @@ * @param path Path to the directory. */ export async function readDir(path: string): Promise> { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno } = globalThis as any; path ||= "."; diff --git a/internal/runtime/read_sync.ts b/internal/runtime/read_sync.ts index 82aeb92f..24c5bfd7 100644 --- a/internal/runtime/read_sync.ts +++ b/internal/runtime/read_sync.ts @@ -1,4 +1,4 @@ -// deno-lint-ignore no-explicit-any +// dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process, Buffer } = globalThis as any; const { readSync: readSyncNode } = process ? await import("node:fs") diff --git a/internal/runtime/set_env.ts b/internal/runtime/set_env.ts index 1b672aad..6e264b92 100644 --- a/internal/runtime/set_env.ts +++ b/internal/runtime/set_env.ts @@ -6,7 +6,7 @@ * @param value The value of the environment variable. */ export function setEnv(name: string, value: string): void { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; if (Deno) { diff --git a/internal/runtime/set_raw.ts b/internal/runtime/set_raw.ts index ffd48ffb..0c7da31e 100644 --- a/internal/runtime/set_raw.ts +++ b/internal/runtime/set_raw.ts @@ -9,7 +9,7 @@ export function setRaw( mode: boolean, { cbreak }: { cbreak?: boolean } = {}, ): void { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; if (Deno) { diff --git a/internal/runtime/stat.ts b/internal/runtime/stat.ts index 2fa60f34..5e6fedd8 100644 --- a/internal/runtime/stat.ts +++ b/internal/runtime/stat.ts @@ -5,7 +5,7 @@ * @param input Path to the file. */ export async function stat(input: string): Promise<{ isDirectory: boolean }> { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno } = globalThis as any; if (Deno) { diff --git a/internal/runtime/write_sync.ts b/internal/runtime/write_sync.ts index 1b5623cd..25e320a8 100644 --- a/internal/runtime/write_sync.ts +++ b/internal/runtime/write_sync.ts @@ -5,7 +5,7 @@ * @param data Data to write to stdout. */ export function writeSync(data: Uint8Array): number { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any const { Deno, process } = globalThis as any; if (Deno) { diff --git a/prompt/_generic_suggestions.ts b/prompt/_generic_suggestions.ts index b3dae0f9..8baf54c8 100644 --- a/prompt/_generic_suggestions.ts +++ b/prompt/_generic_suggestions.ts @@ -136,7 +136,7 @@ export abstract class GenericSuggestions // Keep support for deno < 1.10. if (this.settings.id && "localStorage" in window) { try { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore deno-lint-ignore no-explicit-any return (window as any).localStorage; } catch (_) { // Ignore error if --location is not set. @@ -171,7 +171,7 @@ export abstract class GenericSuggestions protected override async render(): Promise { if (this.settings.files && this.#hasReadPermissions === undefined) { - // deno-lint-ignore no-explicit-any + // dnt-shim-ignore dnt-shim-ignore deno-lint-ignore no-explicit-any const status = await (globalThis as any).Deno?.permissions.request({ name: "read", });