Skip to content

Commit

Permalink
bump std and fix isTTY & actions deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
greg6775 committed Feb 3, 2024
1 parent 372be75 commit eb108b6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deno-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Use Deno ${{ matrix.deno-version }}
uses: denoland/setup-deno@v1
Expand All @@ -33,7 +33,7 @@ jobs:
# "https" cache: code from the Internet
# External sources won't change much so we use less precise keys
- name: Cache https://
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/deno/deps/https
key: deno-https/v1-${{ github.sha }}
Expand All @@ -57,7 +57,7 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Use Deno ${{ matrix.deno-version }}
uses: denoland/setup-deno@v1
Expand All @@ -67,7 +67,7 @@ jobs:
# "https" cache: code from the Internet
# External sources won't change much so we use less precise keys
- name: Cache https://
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/deno/deps/https
key: deno-https/v1-${{ github.sha }}
Expand Down
7 changes: 3 additions & 4 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export { join as joinPath } from "https://deno.land/std@0.202.0/path/mod.ts";
export { join as joinPath } from "https://deno.land/std@0.214.0/path/mod.ts";

export { parse as parseYaml } from "https://deno.land/std@0.202.0/yaml/mod.ts";
export { parse as parseYaml } from "https://deno.land/std@0.214.0/yaml/mod.ts";

export { TextLineStream } from "https://deno.land/[email protected]/streams/text_line_stream.ts";
export { readableStreamFromReader } from "https://deno.land/[email protected]/streams/readable_stream_from_reader.ts";
export { TextLineStream } from "https://deno.land/[email protected]/streams/text_line_stream.ts";
2 changes: 1 addition & 1 deletion lib/kubeconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class KubeConfigContext {
const execConfig = this.user['exec'];
if (!execConfig) throw new Error(`BUG: execConfig disappeared`);

const isTTY = Deno.isatty(Deno.stdin.rid);
const isTTY = Deno.stdin.isTerminal();
const stdinPolicy = execConfig.interactiveMode ?? 'IfAvailable';
if (stdinPolicy == 'Always' && !isTTY) {
throw new Error(`KubeConfig exec plugin wants a TTY, but stdin is not a TTY`);
Expand Down
2 changes: 1 addition & 1 deletion lib/stream-transformers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { JSONObject, WatchEvent } from './contract.ts';

function parseJsonLine(line: string, controller: TransformStreamDefaultController<JSONObject>) {
if (!line.startsWith('{')) {
throw new Error(`JSON line doesn't start with {: `+line.slice(0, 256));
throw new Error(`JSON line doesn't start with {: ${line.slice(0, 256)}`);
}
controller.enqueue(JSON.parse(line));
}
Expand Down
2 changes: 1 addition & 1 deletion transports/via-kubeconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class KubeConfigRestClient implements RestClient {
await KubeConfig.getInClusterConfig());
}

static async forKubectlProxy(): Promise<RestClient> {
static forKubectlProxy(): Promise<RestClient> {
return this.forKubeConfig(
KubeConfig.getSimpleUrlConfig({
baseUrl: 'http://localhost:8001',
Expand Down
2 changes: 1 addition & 1 deletion transports/via-kubectl-raw.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readableStreamFromReader, TextLineStream } from '../deps.ts';
import { TextLineStream } from '../deps.ts';
import { RestClient, RequestOptions, JSONValue, KubernetesTunnel } from '../lib/contract.ts';
import { JsonParsingTransformer } from '../lib/stream-transformers.ts';

Expand Down

0 comments on commit eb108b6

Please sign in to comment.