-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from nats-io/cover
Update package structure and configurations
- Loading branch information
Showing
15 changed files
with
310 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: test esm | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
deno-version: [2.1.x] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout nuid | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: Use Deno Version ${{ matrix.deno-version }} | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{ matrix.deno-version }} | ||
- name: lint | ||
run: | | ||
deno fmt --check src/ test/ | ||
deno lint | ||
- name: test | ||
env: | ||
TMPDIR: ${{ runner.temp }} | ||
CI: true | ||
run: | | ||
deno task clean | ||
deno task test | ||
deno task cover | ||
- name: Upload coverage | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./coverage/out.lcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
name: NUID CI | ||
name: test cjs | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
- "*" | ||
branches: | ||
- '*' | ||
- "*" | ||
pull_request: | ||
branches: [main] | ||
|
||
|
@@ -14,7 +14,7 @@ jobs: | |
strategy: | ||
matrix: | ||
node-version: [22.x] | ||
deno-version: [1.43.5] | ||
deno-version: [2.1.x] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
|
@@ -31,17 +31,16 @@ jobs: | |
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{ matrix.deno-version }} | ||
- run: npm ci | ||
- run: npm run prepack | ||
- run: npm test | ||
- name: lint | ||
run: | | ||
deno fmt --check src/ test/ | ||
deno lint | ||
- name: test | ||
env: | ||
TMPDIR: ${{ runner.temp }} | ||
CI: true | ||
# - name: Gather coverage | ||
# if: matrix.node-version == '21.x' | ||
# run: npm run coveralls | ||
# - name: Upload coverage | ||
# uses: coverallsapp/[email protected] | ||
# if: matrix.node-version == '21.x' | ||
# with: | ||
# github-token: ${{ secrets.github_token }} | ||
# path-to-lcov: ./coverage/lcov.info | ||
run: | | ||
npm ci | ||
npm run prepack | ||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
esm/index.mjs | ||
lib/nuid.d.ts | ||
lib/nuid.js | ||
lib/ | ||
coverage/ | ||
|
||
# Dependency directories | ||
node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "@nats-io/nuid", | ||
"version": "2.0.1", | ||
"exports": { | ||
".": "./src/nuid.ts" | ||
}, | ||
"include": [ | ||
"src/nuid.ts", | ||
"LICENSE", | ||
"README.md", | ||
"MAINTAINERS.md", | ||
"CODE-OF-CONDUCT.md" | ||
], | ||
|
||
"tasks": { | ||
"clean": "rm -rf ./lib ./coverage", | ||
"test-cover": "deno task clean && deno task test && deno task cover && deno task view-cover", | ||
"test": "deno test -A --parallel --reload --coverage=coverage test/", | ||
"cover": "deno coverage ./coverage --lcov > ./coverage/out.lcov", | ||
"view-cover": "genhtml -o ./coverage/html ./coverage/out.lcov && open ./coverage/html/index.html" | ||
}, | ||
"fmt": { | ||
"exclude": ["lib/", "docs/"] | ||
}, | ||
"lint": { | ||
"exclude": ["lib/", "docs/"] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.