rrule-rust 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,7 @@ export enum Weekday {
39
39
  Saturday = 5,
40
40
  Sunday = 6
41
41
  }
42
- export class RRule {
42
+ export declare class RRule {
43
43
  constructor(frequency: Frequency, interval?: number | undefined | null, count?: number | undefined | null, weekstart?: Weekday | undefined | null, until?: number | undefined | null, byWeekday?: (readonly (NWeekday | Weekday)[]) | undefined | null, byHour?: (readonly number[]) | undefined | null, byMinute?: (readonly number[]) | undefined | null, bySecond?: (readonly number[]) | undefined | null, byMonthday?: (readonly number[]) | undefined | null, bySetpos?: (readonly number[]) | undefined | null, byMonth?: (readonly number[]) | undefined | null, byWeekno?: (readonly number[]) | undefined | null, byYearday?: (readonly number[]) | undefined | null)
44
44
  static parse(str: string): RRule
45
45
  get frequency(): Frequency
@@ -58,7 +58,7 @@ export class RRule {
58
58
  get until(): number | null
59
59
  toString(): string
60
60
  }
61
- export class RRuleSet {
61
+ export declare class RRuleSet {
62
62
  constructor(dtstart: number, tzid?: string | undefined | null, rrules?: (readonly RRule[]) | undefined | null, exrules?: (readonly RRule[]) | undefined | null, exdates?: (readonly number[]) | undefined | null, rdates?: (readonly number[]) | undefined | null)
63
63
  get tzid(): string | null
64
64
  get dtstart(): number
@@ -73,9 +73,6 @@ export class RRuleSet {
73
73
  toString(): string
74
74
  iterator(): RRuleSetIterator
75
75
  }
76
- export class RRuleSetIterator {
77
- iterator(): RRuleSetIteratorIterable
78
- }
79
- export class RRuleSetIteratorIterable {
80
- [Symbol.iterator](): Iterator<number, void, void>
76
+ export declare class RRuleSetIterator {
77
+ next(): number | null
81
78
  }
package/dist/lib/index.js CHANGED
@@ -310,12 +310,11 @@ if (!nativeBinding) {
310
310
  throw new Error(`Failed to load native binding`)
311
311
  }
312
312
 
313
- const { Frequency, Month, RRule, RRuleSet, RRuleSetIterator, RRuleSetIteratorIterable, Weekday } = nativeBinding
313
+ const { Frequency, Month, RRule, RRuleSet, RRuleSetIterator, Weekday } = nativeBinding
314
314
 
315
315
  module.exports.Frequency = Frequency
316
316
  module.exports.Month = Month
317
317
  module.exports.RRule = RRule
318
318
  module.exports.RRuleSet = RRuleSet
319
319
  module.exports.RRuleSetIterator = RRuleSetIterator
320
- module.exports.RRuleSetIteratorIterable = RRuleSetIteratorIterable
321
320
  module.exports.Weekday = Weekday
@@ -57,7 +57,10 @@ export declare class RRuleSet implements Iterable<DateTime> {
57
57
  */
58
58
  toObject(): RRuleSetLike;
59
59
  [Symbol.iterator](): {
60
- next: () => IteratorReturnResult<void> | {
60
+ next: () => {
61
+ done: true;
62
+ value: undefined;
63
+ } | {
61
64
  done: boolean;
62
65
  value: DateTime;
63
66
  };
package/dist/rrule-set.js CHANGED
@@ -170,16 +170,19 @@ class RRuleSet {
170
170
  };
171
171
  }
172
172
  [Symbol.iterator]() {
173
- const iter = this.toRust().iterator().iterator()[Symbol.iterator]();
173
+ const iter = this.toRust().iterator();
174
174
  return {
175
175
  next: () => {
176
176
  const result = iter.next();
177
- if (result.done) {
178
- return result;
177
+ if (result === null) {
178
+ return {
179
+ done: true,
180
+ value: undefined,
181
+ };
179
182
  }
180
183
  return {
181
184
  done: false,
182
- value: datetime_1.DateTime.fromNumeric(result.value),
185
+ value: datetime_1.DateTime.fromNumeric(result),
183
186
  };
184
187
  },
185
188
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrule-rust",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "keywords": [
@@ -47,7 +47,7 @@
47
47
  "@semantic-release/git": "^10.0.1",
48
48
  "@types/jest": "^29.5.0",
49
49
  "@types/luxon": "^3.4.2",
50
- "@types/node": "^20.12.8",
50
+ "@types/node": "^22.1.0",
51
51
  "@typescript-eslint/eslint-plugin": "^7.12.0",
52
52
  "@typescript-eslint/parser": "^7.12.0",
53
53
  "benny": "^3.7.1",
@@ -64,7 +64,7 @@
64
64
  "luxon": "^3.4.4",
65
65
  "mkdirp": "^3.0.1",
66
66
  "prettier": "^2.8.3",
67
- "rimraf": "^5.0.5",
67
+ "rimraf": "^6.0.1",
68
68
  "rrule": "^2.7.2",
69
69
  "semantic-release": "^23.0.8",
70
70
  "ts-jest": "^29.0.5",
@@ -93,21 +93,21 @@
93
93
  "prepare": "husky && npm run build"
94
94
  },
95
95
  "optionalDependencies": {
96
- "@rrule-rust/lib-win32-x64-msvc": "2.0.1",
97
- "@rrule-rust/lib-darwin-x64": "2.0.1",
98
- "@rrule-rust/lib-linux-x64-gnu": "2.0.1",
99
- "@rrule-rust/lib-darwin-arm64": "2.0.1",
100
- "@rrule-rust/lib-android-arm64": "2.0.1",
101
- "@rrule-rust/lib-linux-arm64-gnu": "2.0.1",
102
- "@rrule-rust/lib-linux-arm64-musl": "2.0.1",
103
- "@rrule-rust/lib-win32-arm64-msvc": "2.0.1",
104
- "@rrule-rust/lib-linux-arm-gnueabihf": "2.0.1",
105
- "@rrule-rust/lib-linux-arm-musleabihf": "2.0.1",
106
- "@rrule-rust/lib-linux-x64-musl": "2.0.1",
107
- "@rrule-rust/lib-freebsd-x64": "2.0.1",
108
- "@rrule-rust/lib-win32-ia32-msvc": "2.0.1",
109
- "@rrule-rust/lib-android-arm-eabi": "2.0.1",
110
- "@rrule-rust/lib-darwin-universal": "2.0.1",
111
- "@rrule-rust/lib-linux-riscv64-gnu": "2.0.1"
96
+ "@rrule-rust/lib-win32-x64-msvc": "2.0.2",
97
+ "@rrule-rust/lib-darwin-x64": "2.0.2",
98
+ "@rrule-rust/lib-linux-x64-gnu": "2.0.2",
99
+ "@rrule-rust/lib-darwin-arm64": "2.0.2",
100
+ "@rrule-rust/lib-android-arm64": "2.0.2",
101
+ "@rrule-rust/lib-linux-arm64-gnu": "2.0.2",
102
+ "@rrule-rust/lib-linux-arm64-musl": "2.0.2",
103
+ "@rrule-rust/lib-win32-arm64-msvc": "2.0.2",
104
+ "@rrule-rust/lib-linux-arm-gnueabihf": "2.0.2",
105
+ "@rrule-rust/lib-linux-arm-musleabihf": "2.0.2",
106
+ "@rrule-rust/lib-linux-x64-musl": "2.0.2",
107
+ "@rrule-rust/lib-freebsd-x64": "2.0.2",
108
+ "@rrule-rust/lib-win32-ia32-msvc": "2.0.2",
109
+ "@rrule-rust/lib-android-arm-eabi": "2.0.2",
110
+ "@rrule-rust/lib-darwin-universal": "2.0.2",
111
+ "@rrule-rust/lib-linux-riscv64-gnu": "2.0.2"
112
112
  }
113
113
  }