-
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.
Update package structure and configurations
Consolidated code files and updated module types to align more closely with modern JavaScript standards. Changed file imports, adjusted TypeScript configurations, and updated the package versioning to maintain consistency across all modules. Additionally, revised the build and test scripts, enhancing cleaning processes and incorporating coverage testing functionalities. Signed-off-by: Alberto Ricart <alberto@synadia.com>
- 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
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-2", | ||
"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.