Skip to content

Feature/refactor build#110

Merged
khlr merged 10 commits into
mainfrom
feature/refactor-build
Jul 7, 2026
Merged

Feature/refactor build#110
khlr merged 10 commits into
mainfrom
feature/refactor-build

Conversation

@tvdijen

@tvdijen tvdijen commented Jul 4, 2026

Copy link
Copy Markdown
Member

Closes #109

@tvdijen tvdijen requested a review from khlr July 4, 2026 21:24
@tvdijen

tvdijen commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

See build: https://github.com/simplesamlphp/SAML-tracer/actions/runs/28720058215
This zip-file looks fine, right? AMO can now check the usual places like composer.json and package.json

@tvdijen tvdijen mentioned this pull request Jul 4, 2026
Comment thread LICENSE
Comment thread .gitattributes Outdated
Comment thread .github/workflows/build-release.yml Outdated

- name: Copy third-party dependencies to lib/ directory
run: |
cp vendor/fredericpetit/highlightjs-composer/assets/js/highlight.min.js lib/highlight.min.js

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

@tvdijen tvdijen Jul 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a way to do this without including the full version with all gramars.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/build-release.yml
@tvdijen tvdijen force-pushed the feature/refactor-build branch 2 times, most recently from 57b4250 to 75e1af7 Compare July 6, 2026 10:55
@tvdijen tvdijen force-pushed the feature/refactor-build branch from 75e1af7 to bf190e0 Compare July 6, 2026 11:00
@tvdijen tvdijen force-pushed the feature/refactor-build branch from bf190e0 to 0367552 Compare July 6, 2026 11:48
@tvdijen

tvdijen commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@khlr I think I was able to address all your comments. Both dependencies are now in package.json, which hopefully is acceptable to AMO.
If you agree with this, I think this should be merged and released as 1.9.4.
The step to completely remove pako can then move to a new minor release, unless you think it's an easy fix.

@khlr

khlr commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Sorry for the extra effort, @tvdijen.
But I'm pretty sure, they won't accept it with the nice but unverifiable custom hljs build:
#110 (comment)

@tvdijen

tvdijen commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

Sorry for the extra effort, @tvdijen. But I'm pretty sure, they won't accept it with the nice but unverifiable custom hljs build: #110 (comment)

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.
Just one or two sentences explaining this should do.

We should just try, I guess? If they don't, the extra step for building the custom min.js is easy to remove.
Why not try to upload this as 1.9.3, since that one doesn't exist yet for Firefox

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.

@khlr khlr merged commit 226a881 into main Jul 7, 2026
3 checks passed
@khlr

khlr commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Version 1.9.4 uploaded (couldn't edit 1.9.3).
Let's see what happens ;)

@tvdijen tvdijen deleted the feature/refactor-build branch July 7, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

strict_min_version

2 participants