Repository navigation
chore: restructure - #4
Merged
Merged
Conversation
There was a problem hiding this comment.
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,DateWithZonemerged intosrc/date.ts) and relocates helper guards (isDate/isValidDate) intosrc/helpers.ts. - Reorganizes parsing and iteration modules into subfolders (
src/parse/*,src/iter/*,src/iterinfo/*) and updates call sites. - Moves
CallbackIterResultintosrc/iterresult.tsand 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.
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.
Restructured:
API remains unchanged.