cljs-dev

dnolen 2026-06-27T18:06:59.302749Z

@borkdude link so I can read about this?

borkdude 2026-06-27T18:17:02.965009Z

https://nodejs.org/api/esm.html#node-imports

borkdude 2026-06-27T18:17:48.600119Z

how it connects to deno: deno requires you to load built-in modules like this, if you want code to work both in deno and node.js (which I'm doing in nbb for example, and this works with shadow-cljs, not with vanilla CLJS)

dnolen 2026-06-27T18:31:04.554029Z

this looks like a hardcoded special case or do you have documentation stating otherwise?

borkdude 2026-06-27T18:33:27.538959Z

how is this special cases?

node: URLs are supported as an alternative means to load Node.js builtin modules.
Special case as in: for Node.js? Yes, that's correct. Special fase for "fs" from node? No

dnolen 2026-06-27T18:50:55.734099Z

meaning node is a magic url, this isn't going to work for some random library

borkdude 2026-06-27T18:52:11.943489Z

"node:" is a specific url to target built-in libraries and deno supports it too. what do you mean with "random library"?

dnolen 2026-06-27T18:52:38.771769Z

I mean this is not a real url protocol, it's just some ad-hoc thing in Node.js

borkdude 2026-06-27T18:53:07.186549Z

yes. CLJS supports Node.js right?

dnolen 2026-06-27T18:53:27.988039Z

we're not talking about CLJS, I just have no idea about this and just collecting information

borkdude 2026-06-27T18:54:10.538249Z

ok. yes, it's a magic url that node invented so make it easier to recognize that you're targeting a built-in. let me see if I can find more docs about it

borkdude 2026-06-27T18:55:33.099369Z

here's the Deno side of things. https://docs.deno.com/runtime/fundamentals/node/ Deno mimics Node modules in their runtime when you load them with node:...

borkdude 2026-06-27T18:55:53.558009Z

so it's kind of ad-hoc but it is required if you want to write code that runs in both Node.js and Deno

dnolen 2026-06-27T18:57:01.271709Z

god slop in that documentation

dnolen 2026-06-27T18:57:08.880859Z

JavaScript the trashfire that never keeps giving

borkdude 2026-06-27T18:58:01.057659Z

why do you think it's slop, because of the ;?

dnolen 2026-06-27T18:58:07.624129Z

anyways - ok - I think the problem is at the node indexing level, we probably try to resolve this is as a real module

dnolen 2026-06-27T18:58:21.515369Z

As of Deno 2.8, over 75% of Node's own test suite passes in Deno, covering nearly every node: module. Most pure-JavaScript npm packages work without changes. The honest caveats: some APIs are partial, packages with native addons need a local node_modules directory, and a few tools assume npm's exact on-disk layout. The sections below cover each of those cases.

dnolen 2026-06-27T18:58:35.907239Z

"The honest caveats:" ... what???

❤️ 1
borkdude 2026-06-27T18:58:47.677519Z

haha oh yes

dnolen 2026-06-27T19:01:22.776109Z

https://clojure.atlassian.net/browse/CLJS-3482

🙏 1
dnolen 2026-06-27T18:07:44.057029Z

I don't really under stand the connection to deno, so need context about too

dnolen 2026-06-27T22:40:30.623989Z

focusing on the Closure Library documentation problem. It seems that JSDoc 4 can be made to do what I want - static files for all the namespaces. The other thing I'm examining is getting rid of goog.module entirely since I can't see any benefit really - that's a bigger project, but we could probably start at the leaf namespaces and work backwards, and possible this could be mostly automated - many namespaces especially old ones don't really have any interesting changes to speak of that we need to keep post goog.module change.

dnolen 2026-06-27T22:42:02.446319Z

related to that would be some place to keep ClojureScript examples, hopefully in such a way that it's easy to contribute. It would nice if these could be presented alongside or linked to from the docs.

dnolen 2026-06-27T22:42:32.018229Z

again JSDoc 4 seems sufficiently flexible to allow this and to automate it.