peggyjs / peggy

Peggy: Parser generator for JavaScript
https://peggyjs.org/
MIT License
906 stars 64 forks source link

Make test build deterministic #438

Closed markw65 closed 8 months ago

markw65 commented 11 months ago

Every time I build, I get a new version of docs/js/test-bundle-min.js. It seems to be caused by @rollup/plugin-multi-entry finding finding its inputs non-deterministically.

Instead of supplying a glob pattern for input, explicitly run glob and provide a sorted array. docs/js/test-bundle-min.js no longer changes unless the source code changes.

I'm not quite sure how to test this - I ran npm run build:notidy then npm run test:web and it seemed to work the same as before.

hildjj commented 8 months ago

Not sure why I didn't reply to this when you posted it, this is a great change. Please add a CHANGELOG.md entry, and I'll merge.

hildjj commented 8 months ago

Quick rebase of CHANGELOG here, please, then ready to go.