Fork me on GitHub
#clojurescript
<
2022-11-28
>
zimablue14:11:16

Just clojurescript core (and shadow-cljs) flagged as a trojan this when shipping an app for first time to a user, anyone seen anything like this?

p-himik14:11:25

Not entirely related to your question, but seems like you're shipping a development build to your client. I would try shipping a release one instead.

zimablue14:11:48

don't think it's a dev build, I'm just checking, it might have some dev dependencies though, but the first file flagged looks like the actual runtime so not removable

zimablue14:11:27

do you think it's a dev build because it has shadow.js?

p-himik14:11:05

Because of cljs-runtime.

p-himik14:11:32

A prod build should have as many JS files as it has modules. In most cases, just one.

zimablue14:11:36

oh I stand corrected

zimablue14:11:02

is that dependent on build tool? webpack et at bundle into a single file right but shadow-cljs release I didn't know bundled by default

zimablue14:11:40

reading, it definitely bundles to the browser but doesn't specify for node-library target

p-himik14:11:58

Ah, no clue about libraries. You might want to ask in #C6N245JGG.

zimablue14:11:12

I think you're right, even with node-lib I think it's targetting a single file, i just also have some cruft from development in there

thheller14:11:56

lol wtf is this 😛

thheller14:11:30

the ethe entire cljs-runtime dir is purely for dev builds. not related to release builds and should be deleted before shipping

thheller14:11:52

still not a clue what would make it flag as trojan 😛

thheller14:11:01

maybe because it uses eval?

zimablue14:11:47

I should have wiped my public folder between builds lol

winsome17:11:09

I have an async function that inserts a timestamp into a map. I would like to override the timestamping function during testing so that it becomes deterministic. with-redefs doesn't work in a go block, is there an alternative I can use?

winsome17:11:19

Moving the with-redefs inside of the test's go block seems to work 👍