shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
2021-01-18T15:56:39.084Z

On a sample project I used :target :npm-module without :entries because that was not mandatory at the time. This is used to compile test files to be ran by jest. What should I put on :entries to have the same behavior as before? That is related to @ps question as he is using the project as a reference to run tests using jest.

2021-01-18T15:57:42.084700Z

I mean something more practical than enumerate every test namespace 😅 as this is clearly an option.

davidw 2021-01-18T16:30:59.085400Z

when using watch, is it possible to get shadow to watch extra files other than a cljc/cljs files? I'm working on some tests for firebase firestore security rules (using {:target node-test :autorun true ...}) and I'd like to have the tests automatically re-run when I update the firebase.rules file.

thheller 2021-01-18T16:37:28.086Z

@davidw no not currently but you could just not use :autorun true and instead run the tests triggered by another watch util

thheller 2021-01-18T16:38:00.086400Z

eg use https://github.com/paulmillr/chokidar#cli and have it watch the test output file and firebase.rules

davidw 2021-01-18T16:39:21.087200Z

ok, thanks, I'll do something like that.

thheller 2021-01-18T16:42:50.088200Z

@mynomoto open a github issue please so I don't forget. I can add that functionality back I guess.

👍 1
2021-01-18T18:04:10.090200Z

hi everybody! I'm getting a error when compiling a app that uses "http://kepler.gl" npm lib. I'm getting [2021-01-18 15:02:00.526 - INFO] :shadow.build.npm/js-invalid-requires - {:resource-name "node_modules/kepler_DOT_gl/dist/localization/index.js", :requires [{:line 44, :column 192}]}. What looks wrong is that path "node_modules/kepler_DOT_gl/..." when it should be "node_modules/kepler.gl/..." any ideas of what can be causing this?

thheller 2021-01-18T18:23:02.090700Z

thats just the resource naming. the actual file is in <http://kepler.gl|kepler.gl> and the name has nothing to do with the problem

thheller 2021-01-18T18:23:24.091200Z

its likely the lib does some kind of dynamic require require(somethingNotAString) or so

2021-01-18T18:34:49.091700Z

oh you are right

2021-01-18T18:35:38.092200Z

it is doing require("./".concat(key))["default"]

thheller 2021-01-18T18:36:09.092400Z

yeah thats not supported

2021-01-18T18:36:55.093100Z

oh ok, any workarounds? or this library can't be used in a shadow-cljs project?

thheller 2021-01-18T18:37:55.093400Z

unlikely that will be supported by any bundler

thheller 2021-01-18T18:38:12.093900Z

maybe the lib requires a webpack plugin or so and requires webpack in turn

thheller 2021-01-18T18:38:46.094200Z

can't say. don't know the lib.

2021-01-18T18:39:37.094500Z

yeah probably, thanks a lot @thheller

2021-01-18T18:49:11.095Z

Thank you!