Skip to content

Conversation

commiterate
Copy link

@commiterate commiterate commented Jul 31, 2024

Description

Mirroring a similar contribution to shadow-cljs.

See the shadow-cljs issue for a more detailed "why".

This also adds support for node_modules indexing with the Bun runtime.

Testing

I've avoided adding additional tests in src/test/clojure/cljs/foreign/node_test.clj for the time being since I'm not sure how the ClojureScript CI environment is configured (not sure if Bun and pnpm are available).

Instead, I created a test repository with a barebones CLJS project using the fork (sourced in deps.edn with the git procurer).

https://github.com/commiterate/test-clojurescript-bun

This repository uses Emmy to create a Node.js application that just prints 21 (using Emmy's exp2 function) to stdout.

A reproducible shell is provided with Nix for additional testing by the ClojureScript team and others.


There's notes in the test repository's readme detailing some sharp edges with:

  • Using the ClojureScript compiler build API with tools.build (classpath issues breaking deps.cljs searches).
  • Using the ClojureScript compiler CLI.

These might be of interest to the ClojureScript team for future improvements.

@commiterate commiterate changed the title Add support for the Bun and pnpm package managers Add support for the Bun and pnpm package managers. Jul 31, 2024
@commiterate commiterate force-pushed the deps-cmd-add-bun-pnpm branch 3 times, most recently from 418d878 to d713463 Compare August 14, 2024 18:45
@commiterate commiterate force-pushed the deps-cmd-add-bun-pnpm branch from d713463 to 45cabc0 Compare August 30, 2024 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant