Skip to content

Commit

Permalink
fix(examples): removed module versions (#131)
Browse files Browse the repository at this point in the history
[ci skip]

Signed-off-by: Alberto Ricart <[email protected]>
  • Loading branch information
aricart authored Nov 9, 2024
1 parent 68f2ea5 commit 0cc14f3
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions jetstream/examples/01_consumers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* limitations under the License.
*/

import { connect } from "jsr:@nats-io/transport-deno@3.0.0-7";
import { jetstream } from "jsr:@nats-io/jetstream@3.0.0-18";
import { connect } from "@nats-io/transport-deno";
import { jetstream } from "@nats-io/jetstream";
import { setupStreamAndConsumer } from "./util.ts";

// create a connection
Expand Down
4 changes: 2 additions & 2 deletions jetstream/examples/02_next.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* limitations under the License.
*/

import { connect } from "jsr:@nats-io/transport-deno@3.0.0-7";
import { jetstream } from "jsr:@nats-io/jetstream@3.0.0-18";
import { connect } from "@nats-io/transport-deno";
import { jetstream } from "@nats-io/jetstream";
import { setupStreamAndConsumer } from "./util.ts";

// create a connection
Expand Down
4 changes: 2 additions & 2 deletions jetstream/examples/03_batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* limitations under the License.
*/

import { connect } from "jsr:@nats-io/transport-deno@3.0.0-7";
import { jetstream } from "jsr:@nats-io/jetstream@3.0.0-18";
import { connect } from "@nats-io/transport-deno";
import { jetstream } from "@nats-io/jetstream";
import { setupStreamAndConsumer } from "./util.ts";

// create a connection
Expand Down
4 changes: 2 additions & 2 deletions jetstream/examples/04_consume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* limitations under the License.
*/

import { connect } from "jsr:@nats-io/transport-deno@3.0.0-7";
import { jetstream } from "jsr:@nats-io/jetstream@3.0.0-18";
import { connect } from "@nats-io/transport-deno";
import { jetstream } from "@nats-io/jetstream";
import { setupStreamAndConsumer } from "./util.ts";

// create a connection
Expand Down
4 changes: 2 additions & 2 deletions jetstream/examples/05_consume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* limitations under the License.
*/

import { connect } from "jsr:@nats-io/transport-deno@3.0.0-7";
import { jetstream } from "jsr:@nats-io/jetstream@3.0.0-18";
import { connect } from "@nats-io/transport-deno";
import { jetstream } from "@nats-io/jetstream";
import { setupStreamAndConsumer } from "./util.ts";

// create a connection
Expand Down
4 changes: 2 additions & 2 deletions jetstream/examples/06_heartbeats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* limitations under the License.
*/

import { connect } from "jsr:@nats-io/transport-deno@3.0.0-7";
import { ConsumerEvents, jetstream } from "jsr:@nats-io/jetstream@3.0.0-18";
import { connect } from "@nats-io/transport-deno";
import { ConsumerEvents, jetstream } from "@nats-io/jetstream";
import { setupStreamAndConsumer } from "./util.ts";

// create a connection
Expand Down
8 changes: 4 additions & 4 deletions jetstream/examples/07_consume_jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* limitations under the License.
*/

import { connect, delay } from "jsr:@nats-io/transport-deno@3.0.0-7";
import { SimpleMutex } from "jsr:@nats-io/nats-core@3.0.0-17/internal";
import { jetstream } from "jsr:@nats-io/jetstream@3.0.0-18";
import type { JsMsg } from "jsr:@nats-io/jetstream@3.0.0-18";
import { connect, delay } from "@nats-io/transport-deno";
import { SimpleMutex } from "@nats-io/nats-core/internal";
import { jetstream } from "@nats-io/jetstream";
import type { JsMsg } from "@nats-io/jetstream";
import { setupStreamAndConsumer } from "./util.ts";

// create a connection
Expand Down
4 changes: 2 additions & 2 deletions jetstream/examples/08_consume_process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* limitations under the License.
*/

import { connect } from "jsr:@nats-io/transport-deno@3.0.0-7";
import { connect } from "@nats-io/transport-deno";
import { setupStreamAndConsumer } from "./util.ts";
import { jetstream } from "jsr:@nats-io/jetstream@3.0.0-18";
import { jetstream } from "@nats-io/jetstream";

// create a connection
const nc = await connect();
Expand Down
4 changes: 2 additions & 2 deletions jetstream/examples/js_readme_publish_examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* limitations under the License.
*/

import { connect, Empty } from "jsr:@nats-io/transport-deno@3.0.0-7";
import { jetstream, jetstreamManager } from "jsr:@nats-io/jetstream@3.0.0-18";
import { connect, Empty } from "@nats-io/transport-deno";
import { jetstream, jetstreamManager } from "@nats-io/jetstream";
import type { PubAck } from "../src/mod.ts";

const nc = await connect();
Expand Down
6 changes: 3 additions & 3 deletions jetstream/examples/jsm_readme_jsm_example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* limitations under the License.
*/

import { connect, Empty } from "jsr:@nats-io/nats-transport-deno@3.0.0-5";
import { AckPolicy, jetstreamManager } from "jsr:@nats-io/jetstream@3.0.0-18";
import { connect, Empty } from "@nats-io/transport-deno";
import { AckPolicy, jetstreamManager } from "@nats-io/jetstream";

const nc = await connect();
const jsm = await jetstreamManager(nc);
Expand Down Expand Up @@ -48,7 +48,7 @@ await jsm.streams.update(name, si.config);
// get a particular stored message in the stream by sequence
// this is not associated with a consumer
const sm = await jsm.streams.getMessage("mystream", { seq: 1 });
console.log(sm.seq);
console.log(sm?.seq);

// delete the 5th message in the stream, securely erasing it
await jsm.streams.deleteMessage("mystream", 5);
Expand Down
4 changes: 2 additions & 2 deletions jetstream/examples/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/

import { createConsumer, fill, initStream } from "../tests/jstest_util.ts";
import type { NatsConnection } from "jsr:@nats-io/nats-core@3.0.0-31";
import { nuid } from "jsr:@nats-io/nats-core@3.0.0-31";
import type { NatsConnection } from "@nats-io/nats-core";
import { nuid } from "@nats-io/nats-core";

export async function setupStreamAndConsumer(
nc: NatsConnection,
Expand Down

0 comments on commit 0cc14f3

Please sign in to comment.