Skip to content

Commit

Permalink
chore: add support for deno v1.0.0-rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed May 10, 2020
1 parent 03117ed commit acb84e1
Show file tree
Hide file tree
Showing 72 changed files with 119 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
deno_version: [ 'v0.42.0' ]
deno_version: [ 'v1.0.0-rc2' ]

steps:
- name: Configure git
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -4,7 +4,7 @@ A collection of modules for creating interactive command line tools.

![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/c4spar/deno-cliffy?logo=github) ![GitHub Release Date](https://img.shields.io/github/release-date/c4spar/deno-cliffy?logo=github)

![Build Status](https://github.com/c4spar/deno-cliffy/workflows/ci/badge.svg?branch=master) ![Deno version](https://img.shields.io/badge/deno-v0.42.0-green?logo=deno) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/c4spar/deno-cliffy?logo=github) ![GitHub issues](https://img.shields.io/github/issues/c4spar/deno-cliffy?logo=github) ![GitHub licence](https://img.shields.io/github/license/c4spar/deno-cliffy?logo=github)
![Build Status](https://github.com/c4spar/deno-cliffy/workflows/ci/badge.svg?branch=master) ![Deno version](https://img.shields.io/badge/deno-v1.0.0%20rc2-green?logo=deno) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/c4spar/deno-cliffy?logo=github) ![GitHub issues](https://img.shields.io/github/issues/c4spar/deno-cliffy?logo=github) ![GitHub licence](https://img.shields.io/github/license/c4spar/deno-cliffy?logo=github)

**Included modules:**

Expand Down
2 changes: 1 addition & 1 deletion examples/command/action-handler.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';
import { IFlags } from '../../packages/flags/lib/types.ts';
Expand Down
2 changes: 1 addition & 1 deletion examples/command/action-options.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/arguments-syntax-sub-command.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';
import { IFlags } from '../../packages/flags/lib/types.ts';
Expand Down
2 changes: 1 addition & 1 deletion examples/command/arguments-syntax.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/common-option-types.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/conflicting-options.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/creating-a-program.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/custom-option-processing.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/custom-option-type-class-completion.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command, StringType } from '../../command.ts';

Expand Down
6 changes: 3 additions & 3 deletions examples/command/custom-option-type-class.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command, Type } from '../../command.ts';
import { IFlagArgument, IFlagOptions } from '../../flags.ts';
Expand All @@ -7,15 +7,15 @@ class EmailType extends Type<string> {

protected emailRegex: RegExp = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;

parse( option: IFlagOptions, arg: IFlagArgument, value: string | false ): string | undefined {
parse( option: IFlagOptions, arg: IFlagArgument, value: string ): string {

if ( value ) {
if ( !this.emailRegex.test( value.toLowerCase() ) ) {
throw new Error( `Option --${ option.name } must be a valid email but got: ${ value }` );
}
}

return value || undefined;
return value;
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/command/custom-option-type-completion.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/custom-option-type.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';
import { IFlagArgument, IFlagOptions, ITypeHandler } from '../../packages/flags/lib/types.ts';
Expand Down
2 changes: 1 addition & 1 deletion examples/command/default-option-value.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/depending-options.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/environment-variables.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/examples.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { red } from 'https://deno.land/std/fmt/colors.ts';
import { Command } from '../../packages/command/lib/command.ts';
Expand Down
2 changes: 1 addition & 1 deletion examples/command/git-style-executables.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/help-option-and-command.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/list-option-type.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/negatable-options.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/override-exit-handling.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/required-options.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/standalone-options.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/sub-commands.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/variadic-options.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/command/version-options.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Command } from '../../packages/command/lib/command.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/prompt/prompt.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Checkbox, Confirm, Input, Number, Select, Separator } from '../../packages/prompt/mod.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/table/multiline-border-table.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Table } from '../../packages/table/lib/table.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/table/multiline-nested-border-table.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Table } from '../../packages/table/lib/table.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/table/multiline-nested-table.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Table } from '../../packages/table/lib/table.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/table/multiline-table.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Table } from '../../packages/table/lib/table.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/table/nested-tables.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Table } from '../../packages/table/lib/table.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/table/padding-indent.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Table } from '../../packages/table/lib/table.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/table/simple-border-table.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Table } from '../../packages/table/lib/table.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/table/simple-nested-border-table.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Table } from '../../packages/table/lib/table.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/table/simple-nested-table.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Table } from '../../packages/table/lib/table.ts';

Expand Down
2 changes: 1 addition & 1 deletion examples/table/simple-table.ts
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { Table } from '../../packages/table/lib/table.ts';

Expand Down
4 changes: 2 additions & 2 deletions packages/ansi-escape/README.md
Expand Up @@ -4,12 +4,12 @@ ANSI escape module for handling cli cursor, erase output and scroll window.

![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/c4spar/deno-cliffy?logo=github) ![GitHub Release Date](https://img.shields.io/github/release-date/c4spar/deno-cliffy?logo=github)

![Build Status](https://github.com/c4spar/deno-cliffy/workflows/ci/badge.svg?branch=master) ![Deno version](https://img.shields.io/badge/deno-v0.42.0-green?logo=deno) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/c4spar/deno-cliffy?logo=github) ![GitHub issues](https://img.shields.io/github/issues/c4spar/deno-cliffy?logo=github) ![GitHub licence](https://img.shields.io/github/license/c4spar/deno-cliffy?logo=github)
![Build Status](https://github.com/c4spar/deno-cliffy/workflows/ci/badge.svg?branch=master) ![Deno version](https://img.shields.io/badge/deno-v1.0.0%20rc2-green?logo=deno) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/c4spar/deno-cliffy?logo=github) ![GitHub issues](https://img.shields.io/github/issues/c4spar/deno-cliffy?logo=github) ![GitHub licence](https://img.shields.io/github/license/c4spar/deno-cliffy?logo=github)

## Usage

```typescript
#!/usr/bin/env -S deno
#!/usr/bin/env -S deno run

import { AnsiEscape } from 'https://deno.land/x/cliffy/ansi-escape.ts';

Expand Down
2 changes: 1 addition & 1 deletion packages/ansi-escape/lib/ansi-escape.ts
@@ -1,4 +1,4 @@
import { encode } from 'https://deno.land/std@v0.42.0/encoding/utf8.ts';
import { encode } from 'https://deno.land/std@v0.50.0/encoding/utf8.ts';
import { cursor, erase, image, ImageOptions, link, scroll } from './csi.ts';

export class AnsiEscape {
Expand Down

0 comments on commit acb84e1

Please sign in to comment.