Skip to content

Commit

Permalink
change(core): the JSONCodec and StringCodec utilities have been remov…
Browse files Browse the repository at this point in the history
…ed - Msg payloads can be read as string or JSON by using `string/json()` methods. For publishing, simply supply JSON.stringify() results as the payload.

Signed-off-by: Alberto Ricart <[email protected]>
  • Loading branch information
aricart committed Oct 18, 2024
1 parent c6f75c1 commit aa17cd3
Show file tree
Hide file tree
Showing 20 changed files with 41 additions and 51 deletions.
2 changes: 1 addition & 1 deletion core/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/nats-core",
"version": "3.0.0-29",
"version": "3.0.0-30",
"exports": {
".": "./src/mod.ts",
"./internal": "./src/internal_mod.ts"
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/nats-core",
"version": "3.0.0-29",
"version": "3.0.0-30",
"files": [
"lib/",
"LICENSE",
Expand Down
2 changes: 1 addition & 1 deletion core/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// This file is generated - do not edit
export const version = "3.0.0-29";
export const version = "3.0.0-30";
4 changes: 2 additions & 2 deletions jetstream/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/jetstream",
"version": "3.0.0-14",
"version": "3.0.0-15",
"exports": {
".": "./src/mod.ts",
"./internal": "./src/internal_mod.ts"
Expand Down Expand Up @@ -33,6 +33,6 @@
"test": "deno test -A --parallel --reload --trace-leaks --quiet tests/ --import-map=import_map.json"
},
"imports": {
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-29"
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-30"
}
}
4 changes: 2 additions & 2 deletions jetstream/import_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"imports": {
"@nats-io/nkeys": "jsr:@nats-io/[email protected]",
"@nats-io/nuid": "jsr:@nats-io/[email protected]",
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-29",
"@nats-io/nats-core/internal": "jsr:@nats-io/nats-core@~3.0.0-29/internal",
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-30",
"@nats-io/nats-core/internal": "jsr:@nats-io/nats-core@~3.0.0-30/internal",
"test_helpers": "../test_helpers/mod.ts",
"@std/io": "jsr:@std/[email protected]"
}
Expand Down
4 changes: 2 additions & 2 deletions jetstream/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/jetstream",
"version": "3.0.0-14",
"version": "3.0.0-15",
"files": [
"lib/",
"LICENSE",
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"description": "jetstream library - this library implements all the base functionality for NATS JetStream for javascript clients",
"dependencies": {
"@nats-io/nats-core": "~3.0.0-29"
"@nats-io/nats-core": "~3.0.0-30"
},
"devDependencies": {
"@types/node": "^22.7.6",
Expand Down
6 changes: 3 additions & 3 deletions kv/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/kv",
"version": "3.0.0-11",
"version": "3.0.0-12",
"exports": {
".": "./src/mod.ts",
"./internal": "./src/internal_mod.ts"
Expand Down Expand Up @@ -33,7 +33,7 @@
"test": "deno test -A --parallel --reload --quiet tests/ --import-map=import_map.json"
},
"imports": {
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-29",
"@nats-io/jetstream": "jsr:@nats-io/jetstream@~3.0.0-14"
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-30",
"@nats-io/jetstream": "jsr:@nats-io/jetstream@~3.0.0-15"
}
}
8 changes: 4 additions & 4 deletions kv/import_map.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"imports": {
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-29",
"@nats-io/nats-core/internal": "jsr:@nats-io/nats-core@~3.0.0-29/internal",
"@nats-io/jetstream": "jsr:@nats-io/jetstream@~3.0.0-14",
"@nats-io/jetstream/internal": "jsr:@nats-io/jetstream@~3.0.0-14/internal",
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-30",
"@nats-io/nats-core/internal": "jsr:@nats-io/nats-core@~3.0.0-30/internal",
"@nats-io/jetstream": "jsr:@nats-io/jetstream@~3.0.0-15",
"@nats-io/jetstream/internal": "jsr:@nats-io/jetstream@~3.0.0-15/internal",
"test_helpers": "../test_helpers/mod.ts",
"@nats-io/nkeys": "jsr:@nats-io/[email protected]",
"@nats-io/nuid": "jsr:@nats-io/[email protected]",
Expand Down
6 changes: 3 additions & 3 deletions kv/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/kv",
"version": "3.0.0-11",
"version": "3.0.0-12",
"files": [
"lib/",
"LICENSE",
Expand Down Expand Up @@ -34,8 +34,8 @@
},
"description": "kv library - this library implements all the base functionality for NATS KV javascript clients",
"dependencies": {
"@nats-io/jetstream": "~3.0.0-14",
"@nats-io/nats-core": "~3.0.0-29"
"@nats-io/jetstream": "~3.0.0-15",
"@nats-io/nats-core": "~3.0.0-30"
},
"devDependencies": {
"@types/node": "^22.7.6",
Expand Down
6 changes: 3 additions & 3 deletions obj/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/obj",
"version": "3.0.0-11",
"version": "3.0.0-12",
"exports": {
".": "./src/mod.ts",
"./internal": "./src/internal_mod.ts"
Expand Down Expand Up @@ -33,7 +33,7 @@
"test": "deno test -A --parallel --reload --quiet tests/ --import-map=import_map.json"
},
"imports": {
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-29",
"@nats-io/jetstream": "jsr:@nats-io/jetstream@~3.0.0-14"
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-30",
"@nats-io/jetstream": "jsr:@nats-io/jetstream@~3.0.0-15"
}
}
8 changes: 4 additions & 4 deletions obj/import_map.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"imports": {
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-29",
"@nats-io/nats-core/internal": "jsr:@nats-io/nats-core@~3.0.0-29/internal",
"@nats-io/jetstream": "jsr:@nats-io/jetstream@~3.0.0-14",
"@nats-io/jetstream/internal": "jsr:@nats-io/jetstream@~3.0.0-14/internal",
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-30",
"@nats-io/nats-core/internal": "jsr:@nats-io/nats-core@~3.0.0-30/internal",
"@nats-io/jetstream": "jsr:@nats-io/jetstream@~3.0.0-15",
"@nats-io/jetstream/internal": "jsr:@nats-io/jetstream@~3.0.0-15/internal",
"test_helpers": "../test_helpers/mod.ts",
"@nats-io/nkeys": "jsr:@nats-io/[email protected]",
"@nats-io/nuid": "jsr:@nats-io/[email protected]",
Expand Down
6 changes: 3 additions & 3 deletions obj/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/obj",
"version": "3.0.0-11",
"version": "3.0.0-12",
"files": [
"lib/",
"LICENSE",
Expand Down Expand Up @@ -34,8 +34,8 @@
},
"description": "obj library - this library implements all the base functionality for NATS objectstore for javascript clients",
"dependencies": {
"@nats-io/jetstream": "~3.0.0-14",
"@nats-io/nats-core": "~3.0.0-29"
"@nats-io/jetstream": "~3.0.0-15",
"@nats-io/nats-core": "~3.0.0-30"
},
"devDependencies": {
"@types/node": "^22.7.6",
Expand Down
10 changes: 0 additions & 10 deletions package.json

This file was deleted.

4 changes: 2 additions & 2 deletions services/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/services",
"version": "3.0.0-8",
"version": "3.0.0-9",
"exports": {
".": "./src/mod.ts",
"./internal": "./src/internal_mod.ts"
Expand Down Expand Up @@ -33,6 +33,6 @@
"test": "deno test -A --parallel --reload --quiet tests/ --import-map=import_map.json"
},
"imports": {
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-29"
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-30"
}
}
4 changes: 2 additions & 2 deletions services/import_map.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"imports": {
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-29",
"@nats-io/nats-core/internal": "jsr:@nats-io/nats-core@~3.0.0-29/internal",
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-30",
"@nats-io/nats-core/internal": "jsr:@nats-io/nats-core@~3.0.0-30/internal",
"test_helpers": "../test_helpers/mod.ts",
"@nats-io/nkeys": "jsr:@nats-io/[email protected]",
"@nats-io/nuid": "jsr:@nats-io/[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions services/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/services",
"version": "3.0.0-8",
"version": "3.0.0-9",
"files": [
"lib/",
"LICENSE",
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"description": "services library - this library implements all the base functionality for NATS services for javascript clients",
"dependencies": {
"@nats-io/nats-core": "~3.0.0-29"
"@nats-io/nats-core": "~3.0.0-30"
},
"devDependencies": {
"@types/node": "^22.7.6",
Expand Down
2 changes: 1 addition & 1 deletion transport-deno/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"imports": {
"@std/io": "jsr:@std/[email protected]",
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-29",
"@nats-io/nats-core": "jsr:@nats-io/nats-core@~3.0.0-30",
"@nats-io/nkeys": "jsr:@nats-io/[email protected]",
"@nats-io/nuid": "jsr:@nats-io/[email protected]"
}
Expand Down
4 changes: 2 additions & 2 deletions transport-node/package-lock.json

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

4 changes: 2 additions & 2 deletions transport-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nats-io/transport-node",
"version": "3.0.0-14",
"version": "3.0.0-15",
"description": "Node.js client for NATS, a lightweight, high-performance cloud native messaging system",
"keywords": [
"nats",
Expand Down Expand Up @@ -54,7 +54,7 @@
"node": ">= 18.0.0"
},
"dependencies": {
"@nats-io/nats-core": "~3.0.0-29",
"@nats-io/nats-core": "~3.0.0-30",
"@nats-io/nkeys": "~1.2.0-7",
"@nats-io/nuid": "^2.0.1-2"
},
Expand Down
2 changes: 1 addition & 1 deletion transport-node/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// This file is generated - do not edit
export const version = "3.0.0-14";
export const version = "3.0.0-15";

0 comments on commit aa17cd3

Please sign in to comment.