GithubHelp home page GithubHelp logo

nats.js's Issues

No wsconnect in nats-core

Observed behavior

Readme states:

The core module also offers a for W3C Websocket transport (aka browser, Deno, and Node v22) via the exported wsconnect function.

However, @nats-io/nats-core does not export wsconnect (or any other function that is relevant to connections for that matter.)

@nats-io/nats-core comes from npm. I discovered it while trying to walk around #48 as it's impossible to download any JSR modules for Deno (including transport-deno one.) The source code seems to export wsconnect but in the final build it's not available.

Expected behavior

wsconnect is exported

Server and client version

@nats-io/[email protected] from npm

Host environment

No response

Steps to reproduce

No response

npm and jsr packages are not even

Observed behavior

For nats-core, on jsr latest version is 3.0.0-25 whereas npm is at 3.0.0-17. Same for kv (-3 vs -7).

Expected behavior

jsr and npm versions are even

Server and client version

(Should it really be a required field?)

Host environment

No response

Steps to reproduce

No response

ts(2371) compile error when importing library into angular 17 project

Observed behavior

  1. install application using this command because i needed websockets: npx jsr add @nats-io/nats-core
  2. module import wasn't resolving: import * as Nats from "@nats-io/nats-core";
  3. changed: "moduleResolution": "node" to "moduleResolution": "bundler",
  4. everything seemed to resolved.
  5. compiled application and received this error:
    Error: node_modules/@nats-io/nats-core/_dist/src/headers.d.ts:25:21 - error TS2371: A parameter initializer is only allowed in a function or constructor implementation.

25 delete(k: string, match = Match.Exact): void;

Expected behavior

N/A

Server and client version

latest

Host environment

linux

Steps to reproduce

N/A

deno error: jsr:@nats-io/obj was not found.

Observed behavior

Downloading module via JSR does not work (this command was taken from Readme file)

$ deno add @nats-io/obj
error: jsr:@nats-io/obj was not found.

Also, visiting jsr.io page shows:

This package has not published a stable release yet.

Some misconfiguration maybe?

Expected behavior

It works.

Server and client version

$ deno -v
deno 1.45.5

Host environment

No response

Steps to reproduce

No response

[@nats-io/nats-core] [DEBUG] Indirect calls to "require" will not be bundled [indirect-require]

Observed behavior

esbuild dev bundle

[DEBUG] Indirect calls to "require" will not be bundled [indirect-require]

../../node_modules/tweetnacl/nacl-fast.js:2378:20:
      2378 │   } else if (typeof require !== 'undefined') {
           ╵                     ~~~~~~~

Expected behavior

nacl-fast.js as ESM module

Server and client version

"@nats-io/nats-core": "^3.0.0-25"

"esbuild": "^0.23.1"

Host environment

No response

Steps to reproduce

No response

Use strict semantic versioning

Proposed change

Use strict MAJOR.MINOR.PATCH semantic versioning. Currently a -N suffix is added to a version.

Use case

I'm not sure what's use of the suffix for this library but it causes problems in Deno when downloading most recent version of the library:

> import * as mod from "jsr:@nats-io/nats-transport-deno"
Uncaught TypeError:
    Could not find version of '@nats-io/nats-transport-deno' that matches specified version constraint '*'

I think it would be beneficial for everyone to adhere to commonly used naming conventions to ensure compatibility across diverse JS ecosystem.

Contribution

No response

Export StorageType from `@nats-io/obj`

Proposed change

Export StorageType found in @nats-io/jetstream in @nats-io/obj

Use case

Creating a bucket with custom storage uses (objm.create("myobj", { storage: StorageType.File })) enum from jetstream requiring user to individually add both obj and jetstream packages to pkg manager.

Contribution

With pleasure. Is this a change core contributors would be interested in reviwing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.