Skip to content

Commit

Permalink
refactor(configs): Remove Vitest configurations and update dependencies
Browse files Browse the repository at this point in the history
Removed unused Vitest configurations file and updated import paths in test files accordingly. Also, several devDependencies in pnpm-lock.yaml have been added and removed.
  • Loading branch information
hckhanh committed Feb 28, 2024
1 parent 6b9edf4 commit 2decca7
Show file tree
Hide file tree
Showing 12 changed files with 379 additions and 47 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,7 @@ jobs:
VERSION=$(node -p "require('./package.json').version")
jq --arg version "$VERSION" '.version = $version' deno.json > deno.json.tmp
mv deno.json.tmp deno.json
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Publish package to JSR
if: env.VERSION != '0.0.0-development'
run: deno publish
59 changes: 58 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,64 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Run unit tests
run: pnpm test
run: pnpm test -- --environment=node
edge:
name: Edge Runtime
needs: lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run unit tests
run: pnpm test -- --environment=edge-runtime
jsdom:
name: jsdom
needs: lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run unit tests
run: pnpm test -- --environment=jsdom
happy-dom:
name: Happy DOM
needs: lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run unit tests
run: pnpm test -- --environment=happy-dom
deno:
name: Deno
needs: lints
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A bunch of utility functions that work with number in Vietnamese language
## Features

- [Zero dependency](https://jsr.io/@hckhanh/vn-number/dependencies)
- Edge runtime built-in support
- Edge runtime built-in support [![Publish](https://github.com/hckhanh/vn-number/actions/workflows/publish.yml/badge.svg)](https://github.com/hckhanh/vn-number/actions/workflows/publish.yml)

## Functions

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@
"helper-script"
],
"devDependencies": {
"@edge-runtime/vm": "3.2.0",
"happy-dom": "13.6.2",
"jsdom": "24.0.0",
"prettier": "3.2.5",
"vite-tsconfig-paths": "4.3.1",
"vitest": "1.3.1"
}
}
Loading

0 comments on commit 2decca7

Please sign in to comment.