[ ] π Documentation (updates to the documentation, readme, or JSdoc annotations)
[ ] π Bug fix (a non-breaking change that fixes an issue)
[x] π Enhancement (improving an existing functionality like performance)
[ ] β¨ New feature (a non-breaking change that adds functionality)
[ ] π§Ή Chore (updates to the build process or auxiliary tools and libraries)
[ ] β οΈ Breaking change (fix or feature that would cause existing functionality to change)
π Description
If environment variable SOURCE_DATE_EPOCH is set (number seconds since the Unix epoch) use this timestamp instead of new Date() and mtime. See linked issue for more context.
Resolves #2645
π Checklist
[x] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.
TODO
[ ] Documentation (is a change to the docs for this feature desired?)
[ ] Preferred code formatting/style (please advice on how you would like this code to be formatted)
[ ] Investigate if there are additional new Date() or mtime calls to patch
[ ] Investigate if fixed mtime can introduce bugs at runtime
[ ] e2e test (atm I only tested this using pnpm patch)
[ ] merge to v3 (or would you prefer to create this pr against main, then backport?)
π Linked issue
2645
β Type of change
π Description
If environment variable
SOURCE_DATE_EPOCH
is set (number seconds since the Unix epoch) use this timestamp instead ofnew Date()
andmtime
. See linked issue for more context.Resolves #2645
π Checklist
TODO
new Date()
ormtime
calls to patchmtime
can introduce bugs at runtimepnpm patch
)v3
(or would you prefer to create this pr againstmain
, then backport?)