Skip to content

Commit f52facc

Browse files
docs: add incremental PR plan for test and parser refactor
1 parent 274713a commit f52facc

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

PR_PLAN.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Incremental PR Plan for Remaining Improvements
2+
3+
This document outlines remaining improvements to be implemented in small, reviewable Pull Requests.
4+
5+
---
6+
7+
## v1.0.0 Candidates
8+
9+
### PR3: parseICS/parseICSAsync API Split
10+
11+
**Branch:** `async`
12+
13+
**Context:** Issue #144 (uncatchable errors in async mode) was fixed in #462 via proper try-catch
14+
placement. What remains is the cleaner API split itself — see [#476](https://github.com/jens-maus/node-ical/issues/476) for the full motivation.
15+
16+
**Step 1 — non-breaking (do now):**
17+
- Add `parseICSAsync(str)` as a dedicated async function
18+
- Keep `parseICS(str, cb)` working but emit a deprecation warning when called with a callback
19+
- Update `node-ical.js` internal callers to use `parseICSAsync` where appropriate
20+
- Update TypeScript definitions
21+
22+
**Step 2 — breaking (v1.0.0):**
23+
- Remove the callback path from `parseICS` entirely
24+
- `parseICS(str)` becomes sync-only
25+
- Callers using `ical.parseICS(data, callback)` must migrate to `parseICSAsync`
26+
27+
**Breaking Changes:** Step 1: none. Step 2: yes.
28+
29+
---
30+
31+
### PR4: RFC-Compliant DTEND Handling
32+
33+
**Context:** The parser auto-calculates `end` when `DTEND` is absent, which deviates from RFC 5545.
34+
35+
**Scope:**
36+
- v1.0.0: Change default behavior to RFC-compliant (`end` is `undefined` when absent)
37+
- Provide `options.legacyDtend` flag to restore old behavior during migration
38+
- Add tests for both presence/absence of `DTEND`
39+
40+
---
41+
42+
### PR5: Full ESM Migration with CJS Compatibility
43+
44+
**Scope:**
45+
- Convert to ESM with dual `exports` field (`import` + `require`)
46+
- Update TypeScript definitions for both module systems
47+
- README: ESM-first examples, CJS as legacy
48+
49+
**Breaking Changes:** None for users (dual export). Contributors need ESM knowledge.
50+
51+
---
52+
53+
## Notes
54+
55+
- Keep each PR atomic and independently mergeable
56+
- Near-term PRs must be fully backward compatible
57+
- Run full test suite and linter before each PR

0 commit comments

Comments
 (0)