Files
it-tools/src
SebastianandClaude Opus 5 d39255ac20 fix(deps): move the two remaining deprecated direct dependencies onto supported versions (#559)
* fix(deps): move @xmldom/xmldom off the versions upstream flagged as critical

Upstream deprecated 0.8.13 and 0.9.10 with 'this version has critical issues,
please update to the latest version'. 0.8.14 and 0.9.11 are the patched
releases of those same lines.

The direct dependency moves to ^0.8.14, which also lifts xml-crypto and
xml-encryption since both accept the whole 0.8 line. @boxyhq/saml20 pins
0.9.10 exactly, so a version scoped override takes it to 0.9.11.

epubjs asks for ^0.7.5 and the 0.7 line has no release that is not deprecated,
so 0.7.13 stays until epubjs moves; overriding it across two minors of an xml
parser is not something to do blind.

Also refreshes the stale minimumReleaseAgeExclude entry, which still named
0.8.12 and 0.8.13. The policy is not currently switched on, but 0.8.14 was
published three days ago and the list is where this repo records that.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq

* test(crontab-generator): pin the cron dialect detection and the execution times

getLastExecutionTimes was only asserted to return five items, and getCronType
only covered four expressions. Neither is enough to move a cron library under.

Adds a classification table spanning the standard and aws dialects, including
the six field expressions where they overlap, and freezes the clock so the
returned execution times can be pinned exactly, timezone offsets included.

No behaviour change: this is the reference the cron-parser v5 upgrade has to
reproduce.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq

* fix(deps): upgrade cron-parser to v5, keeping the aws dialect detected

Upstream deprecated v4 with 'v4 is no longer maintained, upgrade to v5'. The
rename is mechanical (parseExpression -> CronExpressionParser.parse) but the
upgrade is not, because v5 accepts the six field aws dialect that v4 rejected.

getCronType relied on that rejection: it tried the standard parser first and
treated a throw as the signal to fall through to event-cron-parser. Under v5
'0 11-22 ? * MON-FRI *' parses as standard, so aws expressions would have been
classified as standard, given the wrong next execution times and reported as
invalid whenever the aws dialect was requested.

Detection now keys off the '?' marker, which AWS EventBridge requires in one of
the two day fields and which standard cron gives no meaning to. Checked against
v4 over a 32 expression corpus spanning both dialects: identical classification
everywhere, including '* * * * * *', which is valid in both and stays standard.

getLastExecutionTimes keeps returning string[]: v5 types toJSON() as nullable
and the caller joins the array, so a hole would have silently rendered as a
blank line.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq

* fix(build): stub bare fs/promises, which cron-parser v5 reaches for

cron-parser v5 adds CronFileParser, exported from the package entry, and it
does require('fs/promises') to read crontab files. The browser build has no
business loading that, and the alias list only stubbed 'node:fs/promises'.

Vite matches aliases by prefix, so the bare 'fs' entry rewrote 'fs/promises'
into '_empty.ts/promises' and the build failed with UNLOADABLE_DEPENDENCY:
'Not a directory'. The new entry has to sit before 'fs' for that reason.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq

* refactor(crontab-generator): run each cron parser at most once per classification

From review feedback. getCronType could evaluate the standard branch twice for
an expression that is neither dialect, and getLastExecutionTimes asked for the
type twice, which repeated the whole classification. The '?' marker now selects
which dialect to try first and each parser runs once; the caller keeps the type
in a local.

Behaviour is unchanged, the 30 assertions of the untouched test file still pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-16 17:26:26 +02:00
..
2025-07-14 21:59:07 +02:00