Skip to content

Commit

Permalink
chore(ci): update node and deno version (c4spar#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar authored and rubenfiszel committed Nov 12, 2024
1 parent e575ca0 commit 02ea9de
Show file tree
Hide file tree
Showing 24 changed files with 30 additions and 31 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

Expand All @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion command/upgrade/get_runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface GetRuntimeResult {

/** Get runtime handler for current runtime. */
export async function getRuntime(): Promise<GetRuntimeResult> {
// 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) {
Expand Down
4 changes: 2 additions & 2 deletions command/upgrade/runtime/bun_runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export class BunRuntime extends NodeRuntime {
isJsr: boolean,
logger?: Logger,
): Promise<void> {
// 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
Expand Down
2 changes: 1 addition & 1 deletion command/upgrade/spinner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/delete_env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/exit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/get_args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @internal
*/
export function getArgs(): Array<string> {
// 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) ?? [];
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/get_columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/get_env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/get_os.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/is_terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/no_color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @param data Uint8Array to store the data.
*/
export async function read(data: Uint8Array): Promise<number | null> {
// deno-lint-ignore no-explicit-any
// dnt-shim-ignore deno-lint-ignore no-explicit-any
const { Deno, Bun, process } = globalThis as any;

if (Deno) {
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/read_dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @param path Path to the directory.
*/
export async function readDir(path: string): Promise<Array<{ name: string }>> {
// deno-lint-ignore no-explicit-any
// dnt-shim-ignore deno-lint-ignore no-explicit-any
const { Deno } = globalThis as any;
path ||= ".";

Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/read_sync.ts
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/set_env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/set_raw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/stat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/runtime/write_sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions prompt/_generic_suggestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export abstract class GenericSuggestions<TValue, TRawValue>
// 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.
Expand Down Expand Up @@ -171,7 +171,7 @@ export abstract class GenericSuggestions<TValue, TRawValue>

protected override async render(): Promise<void> {
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",
});
Expand Down

0 comments on commit 02ea9de

Please sign in to comment.