Skip to content

chore: restructure - #4

Merged
shavonn merged 5 commits into
mainfrom
refactor/org
Feb 21, 2026
Merged

shavonn merged 5 commits into
mainfrom
refactor/org

Conversation

@shavonn

@shavonn shavonn commented Feb 21, 2026

Copy link
Copy Markdown

Restructured:

  • Merged callbackiterresult.ts into iterresult.ts (deleted file)
  • Merged datewithzone.ts into dateutil.ts (deleted file)
  • Moved isDate/isValidDate from dateutil.ts to helpers.ts
  • dateutil.ts → date.ts (updated 15 source + 3 test imports)
  • test/dateutil.test.ts → test/date.test.ts
  • parseoptions.ts → parse/options.ts
  • parsestring.ts → parse/string.ts
  • optionstostring.ts → parse/stringify.ts
  • rrulestr.ts → parse/rrulestr.ts
  • iterset.ts → iter/set.ts
  • Moved from parse/options.ts to iterinfo/index.ts (where it semantically belongs)
  • Removed FIXMEs, TODOs, dead commented-out code, and stale eslint directives across 7 files

API remains unchanged.

Copilot AI review requested due to automatic review settings February 21, 2026 04:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures the internal module layout (date utilities, parsing, iteration helpers) and updates imports across source and tests while aiming to keep the public API unchanged.

Changes:

  • Consolidates date/time utilities (e.g., dateutil → date, DateWithZone merged into src/date.ts) and relocates helper guards (isDate/isValidDate) into src/helpers.ts.
  • Reorganizes parsing and iteration modules into subfolders (src/parse/*, src/iter/*, src/iterinfo/*) and updates call sites.
  • Moves CallbackIterResult into src/iterresult.ts and updates imports accordingly; updates formatting and Biome config (lineWidth: 120).

Reviewed changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/rrulestr.test.ts Updates imports (incl. parseInput path) and reformats assertions/arrays.
test/rruleset.test.ts Reformats imports/expectations; no functional behavior change intended.
test/rrule.test.ts Broad formatting updates to expectations; preserves test semantics.
test/parsestring.test.ts Updates parseString import to new src/parse/string location.
test/parseoptions.test.ts Updates parseOptions import to src/parse/options.
test/optionstostring.test.ts Updates optionsToString import to src/parse/stringify.
test/nlp.test.ts Updates optionsToString import path and reformats expectations.
test/lib/utils.ts Switches date util imports to src/date and reformats helper functions.
test/helpers.test.ts Reformats helper imports.
test/datewithzone.test.ts Updates DateWithZone import to src/date and reformats expectations.
test/date.test.ts Updates untilStringToDate/datetime import to src/date.
src/weekday.ts Minor formatting (compresses ALL_WEEKDAYS).
src/types.ts Type alias formatting and narrows multi-line conditional types to single line.
src/rruleset.ts Updates imports to new module locations (date, iter/set, parse/stringify) and minor formatting.
src/rrulebase.ts Switches isValidDate source and imports CallbackIterResult from iterresult.
src/rrule.ts Updates parsing/stringify imports to src/parse/* and minor signature formatting.
src/parse/stringify.ts Moves stringify into src/parse/ and updates relative imports to ../*.
src/parse/string.ts Moves parse-string logic into src/parse/ and updates imports to ../*.
src/parse/rrulestr.ts Moves rrulestr implementation under src/parse/ and updates imports/formatting.
src/parse/options.ts Moves parse-options under src/parse/, uses helper guards from helpers, and relocates buildTimeset out.
src/nlp/totext.ts Formatting changes and replaces lint-disable block with a clarifying @ts-expect-error comment.
src/nlp/parsetext.ts Removes stale TODO/FIXME comments and applies formatting simplifications.
src/nlp/index.ts Updates header comment URLs and reformats small helpers/constants.
src/nlp/i18n.ts Formatting (compresses dayNames).
src/masks.ts Exports consolidated into a single-line export list.
src/iterresult.ts Inlines CallbackIterResult class into this module and keeps IterResult logic intact.
src/iterinfo/yearinfo.ts Updates imports to src/date and removes stale comment.
src/iterinfo/index.ts Updates imports and adds buildTimeset here (moved from options parsing).
src/iter/set.ts Moves to src/iter/ subfolder and updates imports accordingly.
src/iter/poslist.ts Updates imports to src/date and removes dead comments.
src/iter/index.ts Updates imports and changes buildTimeset source to iterinfo.
src/index.ts Updates exported entry points (e.g., rrulestr from parse/rrulestr) and header comment URLs.
src/helpers.ts Adds isDate/isValidDate and reformats a few helper utilities.
src/datetime.ts Updates imports to src/date and applies formatting-only changes.
src/date.ts Renames/merges date utilities into this module and embeds DateWithZone.
src/cache.ts Updates imports from dateutil to date and reformats some helper logic.
src/datewithzone.ts Deleted after merging DateWithZone into src/date.ts.
src/callbackiterresult.ts Deleted after moving CallbackIterResult into src/iterresult.ts.
biome.json Adds formatter.lineWidth: 120.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/nlp/index.ts
Comment thread src/index.ts Outdated
@shavonn
shavonn merged commit d808134 into main Feb 21, 2026
3 checks passed
@shavonn
shavonn deleted the refactor/org branch February 21, 2026 04:59
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.

2 participants