Skip to content

Commit

Permalink
all
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Nov 12, 2024
2 parents 1c454c4 + 21a4c61 commit 68cad9b
Show file tree
Hide file tree
Showing 167 changed files with 2,874 additions and 1,892 deletions.
1 change: 1 addition & 0 deletions .bun-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.x
1 change: 1 addition & 0 deletions .deno-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.x
42 changes: 36 additions & 6 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,54 @@ on:
- cron: 0 3 * * *
jobs:
canary:
name: Deno Canary
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
runtime:
- name: deno
deno-version: canary
- name: node
deno-version: canary
node-version: latest
# - name: bun
# deno-version: canary
# bun-version: canary
os: [macOS-latest, windows-latest, ubuntu-latest]
deno_version: [canary]
env:
RUST_BACKTRACE: full
DENO_FUTURE: 1
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno_version }}
deno-version: ${{ matrix.runtime.deno-version }}

- name: Create package.json
if: ${{ matrix.runtime.name == 'node' || matrix.runtime.name == 'bun' }}
run: deno task setup:${{ matrix.runtime.name }} --no-install

- name: Setup Node
if: matrix.runtime.name == 'node'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.runtime.node-version }}
check-latest: true

- name: Setup Bun
if: matrix.runtime.name == 'bun'
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.runtime.bun-version }}

- name: Setup pnpm
if: ${{ matrix.runtime.name == 'node' }}
uses: pnpm/action-setup@v4
with:
run_install: true

- name: Run tests
run: deno task test
run: deno task test:${{ matrix.runtime.name }}
21 changes: 15 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@ on:
pull_request:
jobs:
lint:
name: Lint source
name: Lint source deno-${{ matrix.deno_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
deno_version: [v1.x, v2.x]
env:
RUST_BACKTRACE: full
DENO_FUTURE: 1
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: ${{ matrix.deno_version }}

- name: Setup shellcheck
run: >
Expand All @@ -37,5 +41,10 @@ jobs:
- name: Run zsh check
run: ./shellcheck --shell bash <(deno run -r ./examples/command/shell-completions.ts completions zsh)

- name: Type-check examples
run: deno task check:examples
- name: Type-check
if: matrix.deno_version == 'rc'
run: deno task check

- name: Type-check
if: matrix.deno_version == 'v1.x'
run: deno task check:deno-v1
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
64 changes: 52 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,74 @@ on:
pull_request:
jobs:
test:
name: ${{ matrix.module }} ${{ matrix.os }} deno-${{ matrix.deno }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
module: [ansi, command, flags, keycode, keypress, prompt, table, testing]
runtime:
- name: deno
deno-version: v1.x
- name: deno
deno-version: v2.x
- name: node
# - name: bun
os: [macOS-latest, windows-latest, ubuntu-latest]
deno: [v1.x]
env:
RUST_BACKTRACE: full
DENO_FUTURE: 1
CLIFFY_SNAPSHOT_DELAY: 2000
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno }}
deno-version: ${{ matrix.runtime.deno-version }}
# deno-version-file: ".deno-version"

- name: Test ${{ matrix.module }}
run: deno task coverage:${{ matrix.module }}
- name: Create package.json
if: ${{ matrix.runtime.name == 'node' || matrix.runtime.name == 'bun' }}
run: deno task setup:${{ matrix.runtime.name }} --no-install

- name: Upload ${{ matrix.module }} coverage
- name: Setup Node
if: ${{ matrix.runtime.name == 'node' }}
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"

- name: Setup Bun
if: ${{ matrix.runtime.name == 'bun' }}
uses: oven-sh/setup-bun@v2
with:
bun-version-file: ".bun-version"

- name: Setup pnpm
if: ${{ matrix.runtime.name == 'node' }}
uses: pnpm/action-setup@v4
with:
run_install: true

- name: Run tests
if: matrix.runtime.name == 'deno' && matrix.runtime.deno-version == 'v1.x'
shell: bash
run: deno task coverage:deno-v1

- name: Run tests
if: matrix.runtime.name == 'deno' && matrix.runtime.deno-version == 'rc'
shell: bash
run: deno task coverage:deno-v2

- name: Run tests
if: matrix.runtime != 'deno'
shell: bash
run: deno task coverage:${{ matrix.runtime.name }}

- name: Upload coverage
uses: codecov/codecov-action@v4
with:
name: ${{ matrix.module }}-${{ matrix.os }}-${{ matrix.deno }}
files: dist/coverage/${{ matrix.module }}/cov.lcov
flags: ${{ matrix.module }}
fail_ci_if_error: true
name: ${{ matrix.runtime.name }}-${{ matrix.os }}
files: dist/coverage/${{ matrix.runtime.name }}/cov.lcov
flags: ${{ matrix.runtime.name }}
token: ${{ secrets.CODECOV_TOKEN }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ dist
testing/__snapshots__/snapshot_test_fixture.ts.snap
testing/__snapshots__/snapshot_test_fixture_2.ts.snap
__snapshots_test__

# Node files
node_modules
.npmrc
bun.lockb
package.json
pnpm-lock.yaml
tsconfig.json
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22.x
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
# [v1.0.0-rc.7](https://github.com/c4spar/deno-cliffy/compare/v1.0.0-rc.6...v1.0.0-rc.7) (Sep 28, 2024)

No changes, i only forgot that deno needs an annoying version number in
deno.json.

# [v1.0.0-rc.6](https://github.com/c4spar/deno-cliffy/compare/v1.0.0-rc.5...v1.0.0-rc.6) (Sep 28, 2024)

### Features

- add support for deno v2 ( #745)
([64fff28](https://github.com/c4spar/deno-cliffy/commit/64fff28))
- **command:** add support for disabling spinner in upgrade command ( #749)
([62fa792](https://github.com/c4spar/deno-cliffy/commit/62fa792))
- **command:** add support for npm package without scope to npm provider ( #748)
([f882fa0](https://github.com/c4spar/deno-cliffy/commit/f882fa0))

### Bug Fixes

- **command:** directly print example text w/o capitalization ( #741)
([b0f1942](https://github.com/c4spar/deno-cliffy/commit/b0f1942))
- **command:** new version info is displayed if no stable version is available (
#726) ([3295c7a](https://github.com/c4spar/deno-cliffy/commit/3295c7a))
- **internal:** resolve null instead of returning null ( #752)
([779cf08](https://github.com/c4spar/deno-cliffy/commit/779cf08))
- **internal:** fix readSync method ( #747)
([2d8aa19](https://github.com/c4spar/deno-cliffy/commit/2d8aa19))
- **prompt:** increase buffer size of input prompts for nodejs to allow paste of
more than 8 chars ( #739)
([dd9aab0](https://github.com/c4spar/deno-cliffy/commit/dd9aab0))

### Code Refactoring

- **command:** remove unused files ( #751)
([ced45fc](https://github.com/c4spar/deno-cliffy/commit/ced45fc))
- **prompt:** set list index to 0 instead of 1 when selecting a group option (
#727) ([09c8c7a](https://github.com/c4spar/deno-cliffy/commit/09c8c7a))

### Chore

- setup tests for node ( #729)
([a036cac](https://github.com/c4spar/deno-cliffy/commit/a036cac))
- use workspace property and fix some type and lint errors ( #725)
([e9dae18](https://github.com/c4spar/deno-cliffy/commit/e9dae18))
- **deno:** add test:all, node and bun task ( #750)
([1bee870](https://github.com/c4spar/deno-cliffy/commit/1bee870))
- **deps:** upgrade @std to latest version ( #746)
([2a32a37](https://github.com/c4spar/deno-cliffy/commit/2a32a37))

### Documentation Updates

- **examples:** use workspace specifier for imports ( #728)
([33b01f8](https://github.com/c4spar/deno-cliffy/commit/33b01f8))

# [v1.0.0-rc.5](https://github.com/c4spar/deno-cliffy/compare/v1.0.0-rc.4...v1.0.0-rc.5) (Jul 1, 2024)

### Features
Expand Down
Loading

0 comments on commit 68cad9b

Please sign in to comment.