fix(core): strict YYYY-MM-DD date parsing with consistent UTC semantics - #5
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2.
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.
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.
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