Skip to content

fix(core): strict YYYY-MM-DD date parsing with consistent UTC semantics - #5

Merged
EmanueleMinotto merged 3 commits into
mainfrom
claude/fix-issue-2-integrations-fbIGg
Apr 9, 2026
Merged

EmanueleMinotto merged 3 commits into
mainfrom
claude/fix-issue-2-integrations-fbIGg

Conversation

@EmanueleMinotto

Copy link
Copy Markdown
Member

Fixes #2.

  • Replace new Date(raw) with a strict /^\d{4}-\d{2}-\d{2}$/ regex check;
    non-padded formats like "2026-4-1" (rejected by Safari) now throw a descriptive
    error with the row number instead of silently producing an invalid date.
  • Parse dates as midnight UTC of the next day so "disabled until 2026-04-01"
    keeps the test disabled through the entire calendar day in UTC and re-enables
    exactly at 2026-04-02T00:00:00Z, regardless of the runner's local timezone.
  • Update affected tests: invalid-format cases now expect a throw; date equality
    assertions updated to the new next-day-UTC values.

All 122 tests pass across all framework integrations (jest, playwright,
cypress, vitest, nightwatch).

https://claude.ai/code/session_01HTX5hH2i32tQn5kTzaNmWq

claude and others added 3 commits April 8, 2026 20:01
Fixes #2.

- Replace `new Date(raw)` with a strict `/^\d{4}-\d{2}-\d{2}$/` regex check;
  non-padded formats like "2026-4-1" (rejected by Safari) now throw a descriptive
  error with the row number instead of silently producing an invalid date.
- Parse dates as midnight UTC of the *next* day so "disabled until 2026-04-01"
  keeps the test disabled through the entire calendar day in UTC and re-enables
  exactly at 2026-04-02T00:00:00Z, regardless of the runner's local timezone.
- Update affected tests: invalid-format cases now expect a throw; date equality
  assertions updated to the new next-day-UTC values.

All 122 tests pass across all framework integrations (jest, playwright,
cypress, vitest, nightwatch).

https://claude.ai/code/session_01HTX5hH2i32tQn5kTzaNmWq
- Add argsIgnorePattern '^_' to no-unused-vars so _result params pass lint
- Replace empty {} destructuring with _ in playwright fixture (no-empty-pattern)
Cypress 13 does not bring @types/node transitively (unlike jest/playwright/vitest),
causing tsc to fail on node built-ins (fs, os, path, process, __dirname).

CI also ran typecheck before building core, so @get-skipper/core had no dist/
and type declarations were missing for all dependent packages.
@EmanueleMinotto
EmanueleMinotto merged commit 55b293b into main Apr 9, 2026
1 check passed
@EmanueleMinotto
EmanueleMinotto deleted the claude/fix-issue-2-integrations-fbIGg branch April 9, 2026 06:18
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.

fix: strict date parsing — eliminate timezone ghost and invalid date crashes

2 participants