@hebcal/leyning 8.2.9 → 9.0.1

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.
Files changed (49) hide show
  1. package/dist/bundle.js +1671 -2155
  2. package/dist/bundle.min.js +14 -2
  3. package/dist/esm/aliyot.json.js +4 -0
  4. package/dist/esm/calculateHaftarahNumVerses.d.ts +1 -0
  5. package/dist/esm/clone.d.ts +12 -0
  6. package/dist/esm/clone.js +32 -0
  7. package/dist/esm/common.d.ts +33 -0
  8. package/dist/esm/common.js +94 -0
  9. package/dist/esm/csv.d.ts +14 -0
  10. package/dist/esm/csv.js +153 -0
  11. package/dist/esm/festival.d.ts +9 -0
  12. package/dist/esm/festival.js +42 -0
  13. package/dist/esm/getLeyningForHoliday.d.ts +17 -0
  14. package/dist/esm/getLeyningForHoliday.js +106 -0
  15. package/dist/esm/getLeyningKeyForEvent.d.ts +9 -0
  16. package/dist/esm/getLeyningKeyForEvent.js +141 -0
  17. package/dist/esm/getLeyningOnDate.d.ts +21 -0
  18. package/dist/esm/getLeyningOnDate.js +134 -0
  19. package/dist/esm/he.po.d.ts +61 -0
  20. package/dist/esm/he.po.js +4 -0
  21. package/dist/esm/holiday-readings.json.js +4 -0
  22. package/dist/esm/index.d.ts +11 -0
  23. package/dist/esm/index.js +12 -0
  24. package/dist/esm/internalTypes.d.ts +20 -0
  25. package/dist/esm/leyning.d.ts +30 -0
  26. package/dist/esm/leyning.js +203 -0
  27. package/dist/esm/locale.d.ts +2 -0
  28. package/dist/esm/locale.js +17 -0
  29. package/dist/esm/numverses.json.js +4 -0
  30. package/dist/esm/specialReadings.d.ts +15 -0
  31. package/dist/esm/specialReadings.js +142 -0
  32. package/dist/esm/summary.d.ts +18 -0
  33. package/dist/esm/summary.js +83 -0
  34. package/dist/esm/types.d.ts +130 -0
  35. package/dist/getLeyningForHoliday.d.ts +1 -1
  36. package/dist/getLeyningKeyForEvent.d.ts +1 -1
  37. package/dist/getLeyningOnDate.d.ts +1 -1
  38. package/dist/index.d.ts +1 -2
  39. package/dist/leyning.d.ts +1 -1
  40. package/dist/locale.d.ts +2 -1
  41. package/dist/specialReadings.d.ts +1 -1
  42. package/package.json +23 -19
  43. package/bin/leyning-csv +0 -23
  44. package/dist/aliyot.json.d.ts +0 -1570
  45. package/dist/holiday-readings.json.d.ts +0 -2703
  46. package/dist/index.cjs +0 -3068
  47. package/dist/index.mjs +0 -3039
  48. package/dist/module.d.ts +0 -325
  49. package/dist/numverses.json.d.ts +0 -36
@@ -0,0 +1,142 @@
1
+ /*! @hebcal/leyning v9.0.1 */
2
+ import { months } from '@hebcal/hdate';
3
+ import { flags } from '@hebcal/core/dist/esm/event';
4
+ import { cloneHaftara, clone } from './clone.js';
5
+ import { parshaToString, calculateNumVerses } from './common.js';
6
+ import { lookupFestival } from './festival.js';
7
+ import { getLeyningKeyForEvent } from './getLeyningKeyForEvent.js';
8
+ import { getHolidaysOnDate } from '@hebcal/core/dist/esm/holidays';
9
+
10
+ function aliyotCombine67(aliyot) {
11
+ const a6 = clone(aliyot['6']);
12
+ const a7 = aliyot['7'];
13
+ if (a6.k !== a7.k) {
14
+ throw new Error('Impossible to combine aliyot 6 & 7: ' + JSON.stringify(aliyot));
15
+ }
16
+ delete aliyot['7'];
17
+ aliyot['6'] = {
18
+ k: a6.k,
19
+ b: a6.b,
20
+ e: a7.e,
21
+ };
22
+ if (a6.v && a7.v) {
23
+ aliyot['6'].v = a6.v + a7.v;
24
+ }
25
+ }
26
+ function mergeAliyotWithSpecial(aliyot, special) {
27
+ if (special['7']) {
28
+ aliyotCombine67(aliyot);
29
+ aliyot['7'] = clone(special['7']);
30
+ calculateNumVerses(aliyot['7']);
31
+ }
32
+ if (special['M']) {
33
+ aliyot['M'] = clone(special['M']);
34
+ calculateNumVerses(aliyot['M']);
35
+ }
36
+ }
37
+ /**
38
+ * Determines if the regular parashat haShavua coincides with an event that requires
39
+ * a special maftir or Haftara (for example Shabbat HaGadol, Shabbat Chanukah, Rosh
40
+ * Chodesh or Machar Chodesh, etc.).
41
+ *
42
+ * This function does not modify `aliyot`. Instead, it returns a deep copy
43
+ * with `aliyot['M']` replaced and sets `reason.M`
44
+ * (and in some cases the 6th and 7th aliyah, setting `reason['7']`).
45
+ *
46
+ * If a special Haftarah applies, the result will have a `haft` property
47
+ * pointing to Haftarah object and sets `reason.haftara`.
48
+ */
49
+ function specialReadings2(parsha, hd, il, aliyot) {
50
+ let haft;
51
+ let seph;
52
+ let specialHaft = false;
53
+ const reason = {};
54
+ function handleSpecial(key) {
55
+ const special = lookupFestival(key);
56
+ if (!special) {
57
+ return;
58
+ }
59
+ if (typeof special.il === 'boolean' && il !== special.il) {
60
+ return;
61
+ }
62
+ if (special.haft && !specialHaft) {
63
+ haft = cloneHaftara(special.haft);
64
+ reason.haftara = key;
65
+ specialHaft = true;
66
+ if (special.seph) {
67
+ seph = cloneHaftara(special.seph);
68
+ reason.sephardic = key;
69
+ }
70
+ }
71
+ if (special.fullkriyah) {
72
+ const aliyotMap = clone(aliyot);
73
+ mergeAliyotWithSpecial(aliyotMap, special.fullkriyah);
74
+ for (const num of Object.keys(special.fullkriyah)) {
75
+ reason[num] = key;
76
+ }
77
+ aliyot = aliyotMap;
78
+ }
79
+ }
80
+ const parshaName = parshaToString(parsha);
81
+ const events0 = getHolidaysOnDate(hd, il) || [];
82
+ const events = events0.filter(ev => !(ev.getFlags() & flags.ROSH_CHODESH));
83
+ for (const ev of events) {
84
+ if (ev.getDesc() === 'Shabbat Shuva') {
85
+ handleSpecial(`Shabbat Shuva (with ${parshaName})`);
86
+ }
87
+ else {
88
+ const key = getLeyningKeyForEvent(ev, il);
89
+ if (key) {
90
+ handleSpecial(key);
91
+ }
92
+ }
93
+ }
94
+ if (!haft) {
95
+ const day = hd.getDate();
96
+ if (parshaName === 'Pinchas' && day > 17) {
97
+ // Pinchas is always read in Tamuz (never another month)
98
+ // either on the 14, 16, 17 (in Israel), 19, 21, 23, 24
99
+ handleSpecial('Pinchas occurring after 17 Tammuz');
100
+ }
101
+ else if (day === 30 || day === 1) {
102
+ const key = parshaName === 'Masei' || parshaName === 'Matot-Masei'
103
+ ? `${parshaName} on Shabbat Rosh Chodesh`
104
+ : 'Shabbat Rosh Chodesh';
105
+ handleSpecial(key);
106
+ }
107
+ else if (parshaName === 'Ki Teitzei' && day === 14) {
108
+ // Ki Teitzei is always read in Elul on 9, 11, 13 or 14
109
+ // "Because Shabbat Re’eh was Rosh Ḥodesh, the usual 3rd haftarah of
110
+ // consolation was not read. Chant the haftarah of Ki tetse and then
111
+ // the haftarah of Re’eh as a single haftarah.
112
+ // In the book of Isaiah these two brief passages are adjacent."
113
+ // Source: Luaḥ Hashanah, Rabbi Miles B. Cohen and Leslie Rubin
114
+ handleSpecial('Ki Teitzei with 3rd Haftarah of Consolation');
115
+ }
116
+ else if (parshaName === 'Kedoshim' &&
117
+ (day === 26 || day === 28 || day === 6)) {
118
+ // Kedoshim is read separately from Achrei Mot in ~37% of years.
119
+ // When this happens, it is will be read on
120
+ // 26th or 28th of Nisan (Achrei Mot was Shabbat HaGadol, ~10%),
121
+ // or 1st of Iyyar (Rosh Chodesh, ~10%),
122
+ // or 6th of Iyyar (~10%, immediately after Shabbat Machar Chodesh)
123
+ // or 3rd of Iyyar (~6%, "the nominal situation — in which both parashiyyot
124
+ // are read separately and no overriding occasions coincide")
125
+ // http://www.scholar.davidesstein.name/Articles/HaftarotOfEtzHayim--Stein.pdf
126
+ // "The Haftarot of Etz Hayim," David E. S. Stein, Conservative Judaism 54/3 (Spring 2002)
127
+ handleSpecial('Kedoshim following Special Shabbat');
128
+ }
129
+ else if (hd.getMonth() !== months.AV) {
130
+ // Parashat Re'eh is always read in Av on 25, 27, 29 or 30.
131
+ // When it coincides with Erev Rosh Chodesh, the Haftarah is
132
+ // עניה סוערה (Isaiah 54:11-55:5) and not מחר חדש
133
+ const tommorow = hd.next().getDate();
134
+ if (tommorow === 30 || tommorow === 1) {
135
+ handleSpecial('Shabbat Machar Chodesh');
136
+ }
137
+ }
138
+ }
139
+ return { aliyot, reason, haft, seph };
140
+ }
141
+
142
+ export { specialReadings2 };
@@ -0,0 +1,18 @@
1
+ import { Aliyah, AliyotMap } from './types';
2
+ /**
3
+ * Summarizes an `AliyotMap` by collapsing all adjacent aliyot.
4
+ * Finds any non-overlapping parts (e.g. special 7th aliyah or maftir)
5
+ */
6
+ export declare function makeLeyningParts(aliyot: AliyotMap): Aliyah[];
7
+ /**
8
+ * Returns a string representation of the leyning parts.
9
+ * Separate verse ranges read from the same book are separated
10
+ * by commas, e.g. `Isaiah 6:1-7:6, 9:5-6`.
11
+ * Verse ranges from different books are separated by semicolons,
12
+ * e.g. `Genesis 21:1-34; Numbers 29:1-6`.
13
+ */
14
+ export declare function makeSummaryFromParts(parts: Aliyah | Aliyah[]): string;
15
+ /**
16
+ * Makes a summary of the leyning, like "Genesis 6:9-11:32"
17
+ */
18
+ export declare function makeLeyningSummary(aliyot: AliyotMap): string;
@@ -0,0 +1,83 @@
1
+ /*! @hebcal/leyning v9.0.1 */
2
+ import { formatAliyahShort } from './common.js';
3
+
4
+ /**
5
+ * @private
6
+ */
7
+ function isChapVerseBefore(a, b) {
8
+ const cv1 = a.split(':').map(x => +x);
9
+ const cv2 = b.split(':').map(x => +x);
10
+ return cv1[0] * 100 + cv1[1] < cv2[0] * 100 + cv2[1];
11
+ }
12
+ /**
13
+ * Summarizes an `AliyotMap` by collapsing all adjacent aliyot.
14
+ * Finds any non-overlapping parts (e.g. special 7th aliyah or maftir)
15
+ */
16
+ function makeLeyningParts(aliyot) {
17
+ const nums = Object.keys(aliyot).filter(x => {
18
+ if (x.length === 1) {
19
+ return true;
20
+ }
21
+ const code = x.charCodeAt(0);
22
+ return code >= 48 && code <= 57;
23
+ });
24
+ let start = aliyot[nums[0]];
25
+ let end = start;
26
+ const parts = [];
27
+ for (let i = 0; i < nums.length; i++) {
28
+ const num = nums[i];
29
+ const aliyah = aliyot[num];
30
+ if (i === nums.length - 1 && aliyah.k === end.k && aliyah.e === end.e) {
31
+ // short-circuit when final aliyah is within the previous (e.g. M inside of 7)
32
+ continue;
33
+ }
34
+ const prevEndChap = +end.e.split(':')[0];
35
+ const curStartChap = +aliyah.b.split(':')[0];
36
+ const sameOrNextChap = curStartChap === prevEndChap || curStartChap === prevEndChap + 1;
37
+ if (i !== 0 &&
38
+ (aliyah.k !== start.k ||
39
+ isChapVerseBefore(aliyah.b, start.e) ||
40
+ !sameOrNextChap)) {
41
+ parts.push({ k: start.k, b: start.b, e: end.e });
42
+ start = aliyah;
43
+ }
44
+ end = aliyah;
45
+ }
46
+ parts.push({ k: start.k, b: start.b, e: end.e });
47
+ return parts;
48
+ }
49
+ /**
50
+ * Returns a string representation of the leyning parts.
51
+ * Separate verse ranges read from the same book are separated
52
+ * by commas, e.g. `Isaiah 6:1-7:6, 9:5-6`.
53
+ * Verse ranges from different books are separated by semicolons,
54
+ * e.g. `Genesis 21:1-34; Numbers 29:1-6`.
55
+ */
56
+ function makeSummaryFromParts(parts) {
57
+ if (!Array.isArray(parts)) {
58
+ parts = [parts];
59
+ }
60
+ let prev = parts[0];
61
+ let summary = formatAliyahShort(prev, true);
62
+ for (let i = 1; i < parts.length; i++) {
63
+ const part = parts[i];
64
+ if (part.k === prev.k) {
65
+ summary += ', ';
66
+ }
67
+ else {
68
+ summary += `; ${part.k} `;
69
+ }
70
+ summary += formatAliyahShort(part, false);
71
+ prev = part;
72
+ }
73
+ return summary;
74
+ }
75
+ /**
76
+ * Makes a summary of the leyning, like "Genesis 6:9-11:32"
77
+ */
78
+ function makeLeyningSummary(aliyot) {
79
+ const parts = makeLeyningParts(aliyot);
80
+ return makeSummaryFromParts(parts);
81
+ }
82
+
83
+ export { makeLeyningParts, makeLeyningSummary, makeSummaryFromParts };
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Represents an aliyah
3
+ */
4
+ export type Aliyah = {
5
+ /** Book (e.g. "Numbers") */
6
+ k: string;
7
+ /** beginning verse (e.g. "28:9") */
8
+ b: string;
9
+ /** ending verse (e.g. "28:15") */
10
+ e: string;
11
+ /** number of verses */
12
+ v?: number;
13
+ /** parsha number (1=Bereshit, 54=Vezot HaBracha) */
14
+ p?: number;
15
+ reason?: string;
16
+ };
17
+ export type StringMap = {
18
+ [key: string]: string;
19
+ };
20
+ export type AliyotMap = {
21
+ [key: string]: Aliyah;
22
+ };
23
+ /** Name of the parsha hashavua or holiday */
24
+ export type LeyningNames = {
25
+ /** English */
26
+ en: string;
27
+ /** Hebrew (with nikud) */
28
+ he: string;
29
+ };
30
+ /**
31
+ * Parsha metadata (underlying JSON object)
32
+ */
33
+ export type ParshaMeta = {
34
+ /** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
35
+ num: number | number[];
36
+ /** parsha name in Hebrew with niqud */
37
+ hebrew: string;
38
+ /** 1 for Genesis, 2 for Exodus, 5 for Deuteronomy */
39
+ book: number;
40
+ /** Haftarah object(s) */
41
+ haft: Aliyah | Aliyah[];
42
+ /** Haftarah object(s) for Sephardim */
43
+ seph?: Aliyah | Aliyah[];
44
+ /** Map of Shabbat aliyot `1` through `7` plus `M` for maftir */
45
+ fullkriyah: {
46
+ [key: string]: string[];
47
+ };
48
+ /**
49
+ * Map of weekday Torah Readings
50
+ * aliyot `1` through `3` for Monday and Thursday
51
+ */
52
+ weekday?: {
53
+ [key: string]: string[];
54
+ };
55
+ combined?: boolean;
56
+ p1?: string;
57
+ p2?: string;
58
+ num1?: number;
59
+ num2?: number;
60
+ };
61
+ export type SpecialReading = {
62
+ /** Map of aliyot `1` through `7` plus `M` for maftir */
63
+ aliyot: AliyotMap;
64
+ /**
65
+ * Explanations for special readings,
66
+ * keyed by aliyah number, `M` for maftir or `haftara` for Haftarah
67
+ */
68
+ reason: StringMap;
69
+ /** Haftarah object(s) */
70
+ haft?: Aliyah | Aliyah[];
71
+ /** Haftarah object(s) for Sephardim */
72
+ seph?: Aliyah | Aliyah[];
73
+ };
74
+ /**
75
+ * Leyning base - weekday, parsha hashavua or holiday
76
+ */
77
+ export type LeyningBase = {
78
+ /** Name of the parsha hashavua or holiday */
79
+ name: LeyningNames;
80
+ /** Such as `Genesis 1:1 - 6:8` */
81
+ summary: string;
82
+ summaryParts?: Aliyah[];
83
+ note?: string;
84
+ };
85
+ /**
86
+ * Parashat haShavua - weekday or Shabbat
87
+ */
88
+ export type LeyningParshaHaShavua = LeyningBase & {
89
+ /** An array of either 1 (regular) or 2 (doubled parsha). `undefined` for holiday readings */
90
+ parsha?: string[];
91
+ /** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
92
+ parshaNum?: number | number[];
93
+ };
94
+ /**
95
+ * Parashat haShavua - weekday
96
+ */
97
+ export type LeyningWeekday = LeyningParshaHaShavua & {
98
+ /** Optional map of weekday Torah Readings aliyot `1` through `3` for Monday and Thursday */
99
+ weekday?: AliyotMap;
100
+ };
101
+ export type HaftarahProps = {
102
+ /** Haftarah object */
103
+ haft: Aliyah | Aliyah[];
104
+ /** Haftarah, such as `Isaiah 42:5 – 43:11` */
105
+ haftara: string;
106
+ /** Number of verses in the Haftarah */
107
+ haftaraNumV?: number;
108
+ };
109
+ /**
110
+ * Shabbat and holiday leyning always has full kriyah and haftarah
111
+ */
112
+ export type LeyningShabbatHoliday = LeyningBase & HaftarahProps & {
113
+ /** Map of aliyot `1` through `7` plus `M` for maftir */
114
+ fullkriyah: AliyotMap;
115
+ /** Haftarah object for Sephardim */
116
+ seph?: Aliyah | Aliyah[];
117
+ /** Haftarah for Sephardim, such as `Isaiah 42:5 - 42:21` */
118
+ sephardic?: string;
119
+ /** Number of verses in the Haftarah for Sephardim */
120
+ sephardicNumV?: number;
121
+ /** Explanations for special readings, keyed by aliyah number, `M` for maftir or `haftara` for Haftarah */
122
+ reason?: StringMap;
123
+ /** Song of Songs is read on the sabbath of Passover week, the Book of Ruth on Shavuot, Lamentations on Tisha be-Av, Ecclesiastes on the sabbath of the week of Sukkoth, and the Book of Esther on Purim */
124
+ megillah?: AliyotMap;
125
+ /** Triennial alternate Haftara */
126
+ triHaftara?: string;
127
+ /** Triennial alternate Haftara number of verses */
128
+ triHaftaraNumV?: number;
129
+ };
130
+ export type Leyning = LeyningBase & LeyningParshaHaShavua & LeyningShabbatHoliday & LeyningWeekday;
@@ -1,4 +1,4 @@
1
- import { Event } from '@hebcal/core';
1
+ import { Event } from '@hebcal/core/dist/esm/event';
2
2
  import { Leyning } from './types';
3
3
  /**
4
4
  * Looks up leyning for a given holiday key. Key should be an
@@ -1,4 +1,4 @@
1
- import { Event } from '@hebcal/core';
1
+ import { Event } from '@hebcal/core/dist/esm/event';
2
2
  export declare const HOLIDAY_IGNORE_MASK: number;
3
3
  /**
4
4
  * Based on the event date, type and title, finds the relevant leyning key
@@ -1,4 +1,4 @@
1
- import { HDate } from '@hebcal/core';
1
+ import { HDate } from '@hebcal/hdate';
2
2
  import { Leyning, LeyningWeekday } from './types';
3
3
  /**
4
4
  * Looks up leyning for a regular Shabbat, Monday/Thursday weekday or holiday.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './types';
2
- import './locale';
2
+ export * from './locale';
3
3
  export * from './common';
4
4
  export * from './summary';
5
5
  export * from './festival';
@@ -8,5 +8,4 @@ export * from './specialReadings';
8
8
  export * from './getLeyningForHoliday';
9
9
  export * from './leyning';
10
10
  export { getLeyningOnDate } from './getLeyningOnDate';
11
- export { writeFullKriyahCsv, writeCsvLines, writeHolidayMincha, StringToBoolMap, getParshaDates, } from './csv';
12
11
  export * from './clone';
package/dist/leyning.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Event } from '@hebcal/core';
1
+ import { Event } from '@hebcal/core/dist/esm/event';
2
2
  import { AliyotMap, Leyning, LeyningNames, ParshaMeta } from './types';
3
3
  /**
4
4
  * Transliterated English and Hebrew names of this parsha
package/dist/locale.d.ts CHANGED
@@ -1 +1,2 @@
1
- export {};
1
+ import { Locale } from '@hebcal/core/dist/esm/locale';
2
+ export { Locale };
@@ -1,4 +1,4 @@
1
- import { HDate } from '@hebcal/core';
1
+ import { HDate } from '@hebcal/hdate';
2
2
  import { AliyotMap, SpecialReading } from './types';
3
3
  /**
4
4
  * Determines if the regular parashat haShavua coincides with an event that requires
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/leyning",
3
- "version": "8.2.9",
3
+ "version": "9.0.1",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal",
@@ -16,13 +16,15 @@
16
16
  "parashah"
17
17
  ],
18
18
  "description": "Torah Reading API for Parashat HaShavua and holidays",
19
- "main": "./dist/index.cjs",
20
- "module": "./dist/index.mjs",
19
+ "module": "./dist/esm/index.js",
20
+ "typings": "dist/esm/index.d.ts",
21
21
  "type": "module",
22
22
  "exports": {
23
- "import": "./dist/index.mjs",
24
- "require": "./dist/index.cjs",
25
- "types": "./dist/module.d.ts"
23
+ ".": {
24
+ "import": "./dist/esm/index.js",
25
+ "types": "./dist/esm/index.d.ts"
26
+ },
27
+ "./dist/esm/*": "./dist/esm/*.js"
26
28
  },
27
29
  "repository": {
28
30
  "type": "git",
@@ -31,23 +33,23 @@
31
33
  "bugs": {
32
34
  "url": "https://github.com/hebcal/hebcal-leyning/issues"
33
35
  },
34
- "typings": "dist/module.d.ts",
35
36
  "files": [
36
- "dist",
37
- "bin"
37
+ "dist"
38
38
  ],
39
- "bin": {
40
- "leyning-csv": "bin/leyning-csv"
41
- },
39
+ "engines": {
40
+ "node": ">=18"
41
+ },
42
42
  "dependencies": {
43
- "@hebcal/core": "^5.6.1",
43
+ "@hebcal/core": "^5.7.7",
44
+ "@hebcal/hdate": "^0.12.0",
44
45
  "tslib": "^2.8.1"
45
46
  },
46
47
  "scripts": {
47
- "po2json": "node ./po2json.cjs po/*.po",
48
+ "po2json": "node ./po2json.cjs po/he.po",
49
+ "size-demo:rollup": "rollup -c size-demo/rollup.config.ts --configPlugin typescript",
50
+ "size-demo": "npm run build && npm run size-demo:rollup",
48
51
  "build:rollup": "rollup -c",
49
- "build:json2js": "for f in src/*.json; do echo 'export default' > $f.ts && cat $f >> $f.ts; done",
50
- "build": "npm run po2json && npm run build:json2js && npm run build:rollup",
52
+ "build": "npm run po2json && npm run build:rollup",
51
53
  "prepublish": "npm run build",
52
54
  "docs": "typedoc",
53
55
  "pretest": "npm run build",
@@ -72,11 +74,13 @@
72
74
  "@rollup/plugin-terser": "^0.4.4",
73
75
  "@rollup/plugin-typescript": "^12.1.1",
74
76
  "@types/jest": "^29.5.14",
75
- "@types/node": "^22.8.7",
77
+ "@types/node": "^22.9.0",
76
78
  "gts": "^5.3.1",
77
79
  "jest": "^29.7.0",
78
- "rollup": "^4.24.3",
79
- "rollup-plugin-dts": "^6.1.1",
80
+ "pretty-bytes": "^6.1.1",
81
+ "rollup": "^4.24.4",
82
+ "rollup-plugin-bundle-size": "^1.0.3",
83
+ "rollup-plugin-visualizer": "^5.12.0",
80
84
  "ts-jest": "^29.2.5",
81
85
  "ttag-cli": "^1.10.12",
82
86
  "typedoc": "^0.26.11",
package/bin/leyning-csv DELETED
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from 'fs';
4
- import {HDate} from '@hebcal/core';
5
- import {writeFullKriyahCsv} from '../dist/index.mjs';
6
-
7
- const today = new HDate();
8
- const hyear = today.getFullYear();
9
- const numYears = 13;
10
-
11
- for (let i = hyear - 1; i < hyear + numYears; i++) {
12
- let filename = `fullkriyah-${i}.csv`;
13
- console.log(`Creating ${filename}`);
14
- let stream = fs.createWriteStream(filename, {flags: 'w'});
15
- writeFullKriyahCsv(stream, i, false);
16
- stream.end();
17
-
18
- filename = `fullkriyah-il-${i}.csv`;
19
- console.log(`Creating ${filename}`);
20
- stream = fs.createWriteStream(filename, {flags: 'w'});
21
- writeFullKriyahCsv(stream, i, true);
22
- stream.end();
23
- }