Feature/refactor build#110
Conversation
|
See build: https://github.com/simplesamlphp/SAML-tracer/actions/runs/28720058215 |
|
|
||
| - name: Copy third-party dependencies to lib/ directory | ||
| run: | | ||
| cp vendor/fredericpetit/highlightjs-composer/assets/js/highlight.min.js lib/highlight.min.js |
There was a problem hiding this comment.
Formerly we had this in build.sh which, I think, leads to a much smaller result:
node tools/build.js xml properties http
This highlight.min.js has all grammars included which really boosts the file size. But I guess we'll just have to accept that...
There was a problem hiding this comment.
I found a way to do this without including the full version with all gramars.
There was a problem hiding this comment.
I’m sorry, I didn’t express myself clearly here:
What I wanted to say is - we won't get around using the much larger full min.js. Not for technical reasons, but to be compliant.
Why? Put yourself in the reviewer’s shoes: Well, there's this "highlight.js": "github:highlightjs/highlight.js" line in the package.json, but the resulting file's (node tools/build.js xml properties http) SHA-256 checksum is EDC54457F239E23A9FE14DA9C5ECF5B6B0F703DF385C072D669B8D9D140EA565.
If the reviewer doesn't build this same custom hljs version (what they probably won't do), then there'll never be the same file hash.
Consequently, from the reviewer’s perspective, it will appear as though we are saying we are using the official hljs, but what we are actually delivering is a minified, custom version of hljs, which they cannot really verify.
57b4250 to
75e1af7
Compare
75e1af7 to
bf190e0
Compare
bf190e0 to
0367552
Compare
|
@khlr I think I was able to address all your comments. Both dependencies are now in package.json, which hopefully is acceptable to AMO. |
|
Sorry for the extra effort, @tvdijen. |
Ah sure they can, if we point them in the right direction. We use the official source, and use their build-script to get the minimal required version. We should just try, I guess? If they don't, the extra step for building the custom min.js is easy to remove. I would do it if I knew how.. This change by itself is OK for now, right? (e.g. replacing the build-script with a npm-dependencies in package.json and building in the GH Action. |
|
Version 1.9.4 uploaded (couldn't edit 1.9.3). |
Closes #109