OSC/ondemand

dependency update workflow broken

johrstrom opened this issue · 1 comments

The workflow for updating dependencies is broken. For 2 reasons. One is that ood_core needs to be released after locking the ffi dependency.

The other is around javascript errors seen in the files app. This ticket is to fix both of these so that we can run that workflow again.

After issuing yarn upgrade and recompiling the assets, we run into this issue:

Rails defines $ which esbuild recompiled into $2. Only Preact apparently also defined $ which esbuild recompiled into $2 which conflict. Through dependencies, we're using the minified version of Preact, so whatever function name it was in the source, we're using the minified version called $ (the orginal source for this function is constructNewChildrenArray, but again, we're using the minified version which is $).

You see here, Rails is trying to call the $ it defined, only to use the version that Preact has defined and so we have an error

image

As indicated above, the issue is that the preact dependency is actually on the minified javascript, not the source code. After compiling the source code instead, we ran into another issue:

image

Looks like someone's redefining $ again, and sure enough some minified dependency has $ defined which esbuild translated into $2 after compiling.

Again, using the source code instead of the minified code fixed the issue.