99 */
1010import * as flags from 'https://deno.land/std@0.208.0/flags/mod.ts'
1111import { exists } from 'https://deno.land/std@0.208.0/fs/mod.ts'
12- import { $ , CommandBuilder } from 'https://deno.land/x/dax@0.35.0 /mod.ts'
12+ import { $ } from 'https://deno.land/x/dax@0.39.1 /mod.ts'
1313
1414const HELP = `
1515Display changes to API client caused by a given Omicron PR. Works by downloading
@@ -36,18 +36,6 @@ function printHelpAndExit() {
3636 Deno . exit ( )
3737}
3838
39- // inspired by: https://github.com/dsherret/dax/issues/137#issuecomment-1603848769
40- declare module 'https://deno.land/x/dax@0.35.0/mod.ts' {
41- interface CommandBuilder {
42- pipe ( next : CommandBuilder ) : CommandBuilder
43- }
44- }
45-
46- CommandBuilder . prototype . pipe = function ( next : CommandBuilder ) : CommandBuilder {
47- const p = this . stdout ( 'piped' ) . spawn ( )
48- return next . stdin ( p . stdout ( ) )
49- }
50-
5139// have to do this this way because I couldn't figure out how to get
5240// my stupid bash function to show up here. I'm sure it's possible
5341async function pickPr ( ) {
@@ -65,8 +53,10 @@ async function pickPr() {
6553 return prNum
6654}
6755
68- async function getCommitRange ( arg : string ) : Promise < { base : string ; head : string } > {
69- if ( ! arg || / ^ \d + $ / . test ( arg ) ) {
56+ async function getCommitRange (
57+ arg : string | number | undefined
58+ ) : Promise < { base : string ; head : string } > {
59+ if ( ! arg || typeof arg === 'number' ) {
7060 const prNum = arg || ( await pickPr ( ) )
7161 const query = `{
7262 repository(owner: "oxidecomputer", name: "omicron") {
0 commit comments