jkbrzt / rrule

JavaScript library for working with recurrence rules for calendar dates as defined in the iCalendar RFC and more.
https://jkbrzt.github.io/rrule
Other
3.27k stars 506 forks source link

v 2.7.1 is not downloadable from npm #532

Closed KrakenTyio closed 2 years ago

KrakenTyio commented 2 years ago

Version 2.7.1 is not downloadable form npm and raise error

KrakenTyio commented 2 years ago

here is log from our ang app where we using rrule, same result is on node

./src/app/components/repeating/repeating.component.ts:328:22-27 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/app/components/repeating/repeating.component.ts:329:12-20 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/app/components/repeating/repeating.component.ts:341:19-27 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/app/components/repeating/repeating.component.ts:344:19-27 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/app/components/repeating/repeating.component.ts:347:19-27 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/app/components/repeating/repeating.component.ts:350:19-27 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/app/components/repeating/repeating.component.ts:353:19-27 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/app/components/repeating/repeating.component.ts:356:19-27 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/app/components/repeating/repeating.component.ts:359:19-27 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:14:13-18 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:15:10-21 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:17:10-18 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:24:13-18 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:25:10-22 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:27:10-18 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:34:13-18 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:35:10-23 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:37:10-18 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:44:13-18 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:45:10-22 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:47:10-18 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/constants.ts:54:13-18 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/functions.ts:12:9-26 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/functions.ts:36:13-21 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/functions.ts:39:13-21 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/functions.ts:42:13-21 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/functions.ts:45:13-21 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/functions.ts:48:13-21 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/functions.ts:51:13-21 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/functions.ts:54:13-21 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

./src/lib/repeating/functions.ts:76:15-20 - Error: export 'default' (imported as 'RRule') was not found in 'rrule' (possible exports: Frequency, RRule, RRuleSet, Weekday, rrulestr)

Error: src/app/components/repeating/repeating.component.ts:97:27 - error TS2351: This expression is not constructable.
  Type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")' has no construct signatures.

97         const rrule = new RRule({
                             ~~~~~

Error: src/app/components/repeating/repeating.component.ts:98:25 - error TS2339: Property 'MO' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

98             wkst: RRule.MO,
                           ~~

Error: src/app/components/repeating/repeating.component.ts:110:38 - error TS2339: Property 'MO' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

110                         return RRule.MO;
                                         ~~

Error: src/app/components/repeating/repeating.component.ts:112:38 - error TS2339: Property 'TU' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

112                         return RRule.TU;
                                         ~~

Error: src/app/components/repeating/repeating.component.ts:114:38 - error TS2339: Property 'WE' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

114                         return RRule.WE;
                                         ~~

Error: src/app/components/repeating/repeating.component.ts:116:38 - error TS2339: Property 'TH' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

116                         return RRule.TH;
                                         ~~

Error: src/app/components/repeating/repeating.component.ts:118:38 - error TS2339: Property 'FR' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

118                         return RRule.FR;
                                         ~~

Error: src/app/components/repeating/repeating.component.ts:120:38 - error TS2339: Property 'SA' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

120                         return RRule.SA;
                                         ~~

Error: src/app/components/repeating/repeating.component.ts:122:38 - error TS2339: Property 'SU' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

122                         return RRule.SU;
                                         ~~

Error: src/lib/diary/grid/event/service.ts:22:1 - error TS6133: 'RRule' is declared but its value is never read.

22 import RRule from 'rrule';
   ~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: src/lib/diary/grid/event/service.ts:443:36 - error TS2709: Cannot use namespace 'RRule' as a type.

443     patchRepeating(item: T, rule?: RRule) {
                                       ~~~~~

Error: src/lib/repeating/constants.ts:17:16 - error TS2351: This expression is not constructable.
  Type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")' has no construct signatures.

17     rrule: new RRule({ freq: RRule.DAILY, interval: 1, wkst: RRule.MO }),
                  ~~~~~

Error: src/lib/repeating/constants.ts:17:36 - error TS2339: Property 'DAILY' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

17     rrule: new RRule({ freq: RRule.DAILY, interval: 1, wkst: RRule.MO }),
                                      ~~~~~

Error: src/lib/repeating/constants.ts:17:68 - error TS2339: Property 'MO' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

17     rrule: new RRule({ freq: RRule.DAILY, interval: 1, wkst: RRule.MO }),
                                                                      ~~

Error: src/lib/repeating/constants.ts:24:16 - error TS2351: This expression is not constructable.
  Type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")' has no construct signatures.

24     rrule: new RRule({ freq: RRule.WEEKLY, interval: 1, wkst: RRule.MO }),
                  ~~~~~

Error: src/lib/repeating/constants.ts:24:36 - error TS2339: Property 'WEEKLY' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

24     rrule: new RRule({ freq: RRule.WEEKLY, interval: 1, wkst: RRule.MO }),
                                      ~~~~~~

Error: src/lib/repeating/constants.ts:24:69 - error TS2339: Property 'MO' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

24     rrule: new RRule({ freq: RRule.WEEKLY, interval: 1, wkst: RRule.MO }),
                                                                       ~~

Error: src/lib/repeating/constants.ts:31:16 - error TS2351: This expression is not constructable.
  Type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")' has no construct signatures.

31     rrule: new RRule({ freq: RRule.MONTHLY, interval: 1, wkst: RRule.MO }),
                  ~~~~~

Error: src/lib/repeating/constants.ts:31:36 - error TS2339: Property 'MONTHLY' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

31     rrule: new RRule({ freq: RRule.MONTHLY, interval: 1, wkst: RRule.MO }),
                                      ~~~~~~~

Error: src/lib/repeating/constants.ts:31:70 - error TS2339: Property 'MO' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

31     rrule: new RRule({ freq: RRule.MONTHLY, interval: 1, wkst: RRule.MO }),
                                                                        ~~

Error: src/lib/repeating/constants.ts:38:16 - error TS2351: This expression is not constructable.
  Type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")' has no construct signatures.

38     rrule: new RRule({ freq: RRule.YEARLY, interval: 1, wkst: RRule.MO }),
                  ~~~~~

Error: src/lib/repeating/constants.ts:38:36 - error TS2339: Property 'YEARLY' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

38     rrule: new RRule({ freq: RRule.YEARLY, interval: 1, wkst: RRule.MO }),
                                      ~~~~~~

Error: src/lib/repeating/constants.ts:38:69 - error TS2339: Property 'MO' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

38     rrule: new RRule({ freq: RRule.YEARLY, interval: 1, wkst: RRule.MO }),
                                                                       ~~

Error: src/lib/repeating/constants.ts:45:16 - error TS2351: This expression is not constructable.
  Type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")' has no construct signatures.

45     rrule: new RRule(),
                  ~~~~~

Error: src/lib/repeating/functions.ts:10:36 - error TS2709: Cannot use namespace 'RRule' as a type.

10 export function rruleString(rrule: RRule) {
                                      ~~~~~

Error: src/lib/repeating/functions.ts:15:18 - error TS2339: Property 'parseString' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

15     return RRule.parseString(rrule);
                    ~~~~~~~~~~~

Error: src/lib/repeating/functions.ts:44:28 - error TS2339: Property 'MO' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

44                 case RRule.MO:
                              ~~

Error: src/lib/repeating/functions.ts:46:28 - error TS2339: Property 'TU' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

46                 case RRule.TU:
                              ~~

Error: src/lib/repeating/functions.ts:48:28 - error TS2339: Property 'WE' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

48                 case RRule.WE:
                              ~~

Error: src/lib/repeating/functions.ts:50:28 - error TS2339: Property 'TH' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

50                 case RRule.TH:
                              ~~

Error: src/lib/repeating/functions.ts:52:28 - error TS2339: Property 'FR' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

52                 case RRule.FR:
                              ~~

Error: src/lib/repeating/functions.ts:54:28 - error TS2339: Property 'SA' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

54                 case RRule.SA:
                              ~~

Error: src/lib/repeating/functions.ts:56:28 - error TS2339: Property 'SU' does not exist on type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")'.

56                 case RRule.SU:
                              ~~

Error: src/lib/repeating/functions.ts:76:20 - error TS2351: This expression is not constructable.
  Type 'typeof import("/home/stano/node_modules/rrule/dist/esm/index")' has no construct signatures.

76         rrule: new RRule(rrule),
                      ~~~~~

Error: src/lib/repeating/interfaces.ts:1:8 - error TS6133: 'RRule' is declared but its value is never read.

1 import RRule, { Frequency } from 'rrule';
         ~~~~~

Error: src/lib/repeating/interfaces.ts:8:12 - error TS2709: Cannot use namespace 'RRule' as a type.

8     rrule: RRule;
davidgoli commented 2 years ago

I see no evidence in your errors that you're not able to download rrule, but note this breaking change in 2.7.0:

BREAKING CHANGE Removes default export in favor of named exports

It looks like your code is still importing via the default export. You'll need to change import RRule from 'rrule' to import { RRule } from 'rrule' in your codebase. This is why this was a minor version release.

KrakenTyio commented 2 years ago

Weird, locking version on 2.7.0 working well

davidgoli commented 2 years ago

As I mentioned, removing the default exports is how you'll get 2.7.1 working in your codebase. Feel free to pin to an earlier version until you can take this on.