Skip to content

Commit

Permalink
Merge pull request #46 from nats-io/version-checks
Browse files Browse the repository at this point in the history
added test to check that version match in all packages.
  • Loading branch information
aricart authored May 23, 2024
2 parents 2fa27bb + 0d8ba26 commit b48f8c3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/nuid",
"version": "2.0.0-2",
"version": "2.0.0",
"exports": {
".": "./src/nuid.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion lib/nuid.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"name": "nuid",
"version": "2.0.0-2",
"version": "2.0.0",
"description": "NUID - A highly performant unique identifier generator.",
"keywords": [
"unique",
"identifier",
"generator"
],
"files": [
"lib/",
"esm/",
"CODE-OF-CONDUCT.md",
"LICENSE",
"MAINTAINERS.md"
],
"exports": {
"types": "./lib/nuid.d.ts",
"require": "./lib/nuid.js",
Expand All @@ -33,7 +40,8 @@
"test": "npm run build && node --test test/basics.js && deno test",
"doc": "rm -Rf ./docs && node_modules/.bin/typedoc --out ./docs/ && touch ./docs/.nojekyll",
"prepack": "npm run build",
"lint": "deno lint --ignore=docs/,debug/,lib/"
"lint": "deno lint --ignore=docs/,debug/,lib/",
"fmt": "deno fmt src/ README.md MAINTAINERS.md CODE-OF-CONDUCT.md"
},
"engines": {
"node": ">= 18.x"
Expand Down
7 changes: 7 additions & 0 deletions test/basics_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,10 @@ Deno.test("reset should reset", () => {
Deno.test("constructor is exported", () => {
assertEquals(typeof Nuid, "function");
});

Deno.test("versions", async () => {
const pkg = await import("../package.json", {with: {type: "json"}});
const jsr = await import("../jsr.json", {with: {type: "json"}});
assertEquals(pkg.default.version, jsr.default.version);

})

0 comments on commit b48f8c3

Please sign in to comment.