@hebcal/leyning 8.2.2 → 8.2.4
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.
- package/README.md +1 -511
- package/dist/bundle.js +21 -19
- package/dist/bundle.min.js +2 -2
- package/dist/clone.d.ts +1 -2
- package/dist/getLeyningForHoliday.d.ts +3 -3
- package/dist/getLeyningKeyForEvent.d.ts +3 -3
- package/dist/holiday-readings.json.d.ts +1 -0
- package/dist/index.cjs +21 -19
- package/dist/index.mjs +21 -19
- package/dist/leyning.d.ts +4 -5
- package/dist/types.d.ts +8 -6
- package/package.json +19 -17
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/leyning v8.2.
|
|
1
|
+
/*! @hebcal/leyning v8.2.4 */
|
|
2
2
|
import { flags, months, HDate, HebrewCalendar, Locale, ParshaEvent, HolidayEvent, Event } from '@hebcal/core';
|
|
3
3
|
|
|
4
4
|
var numverses = {
|
|
@@ -459,7 +459,10 @@ var festivals0 = { "Pesach I": {
|
|
|
459
459
|
"M": { "p": 41, "k": 4, "b": "29:1", "e": "29:6" } }
|
|
460
460
|
},
|
|
461
461
|
"Rosh Hashana II": {
|
|
462
|
-
"haft": {
|
|
462
|
+
"haft": {
|
|
463
|
+
"k": "Jeremiah", "b": "31:2", "e": "31:20",
|
|
464
|
+
"note": "labeled 31:1–19 in some books"
|
|
465
|
+
},
|
|
463
466
|
"fullkriyah": { "1": { "p": 4, "k": 1, "b": "22:1", "e": "22:3" },
|
|
464
467
|
"2": { "p": 4, "k": 1, "b": "22:4", "e": "22:8" },
|
|
465
468
|
"3": { "p": 4, "k": 1, "b": "22:9", "e": "22:14" },
|
|
@@ -882,9 +885,9 @@ const HOLIDAY_IGNORE_MASK = flags.DAF_YOMI | flags.OMER_COUNT | flags.SHABBAT_ME
|
|
|
882
885
|
flags.MODERN_HOLIDAY | flags.YERUSHALMI_YOMI;
|
|
883
886
|
/**
|
|
884
887
|
* Based on the event date, type and title, finds the relevant leyning key
|
|
885
|
-
* @param
|
|
886
|
-
* @param
|
|
887
|
-
* @
|
|
888
|
+
* @param ev event
|
|
889
|
+
* @param [il] true if Israel holiday scheme
|
|
890
|
+
* @returns key to look up in holiday-reading.json
|
|
888
891
|
*/
|
|
889
892
|
function getLeyningKeyForEvent(ev, il = false) {
|
|
890
893
|
if (typeof ev.eventTime !== 'undefined') {
|
|
@@ -1203,9 +1206,9 @@ function getLeyningForHolidayKey(key, cholHaMoedDay, il) {
|
|
|
1203
1206
|
/**
|
|
1204
1207
|
* Looks up leyning for a given holiday. Returns some
|
|
1205
1208
|
* of full kriyah aliyot, special Maftir, special Haftarah
|
|
1206
|
-
* @param
|
|
1207
|
-
* @param
|
|
1208
|
-
* @
|
|
1209
|
+
* @param ev the Hebcal event associated with this leyning
|
|
1210
|
+
* @param [il] true if Israel holiday scheme
|
|
1211
|
+
* @returns map of aliyot
|
|
1209
1212
|
*/
|
|
1210
1213
|
function getLeyningForHoliday(ev, il = false) {
|
|
1211
1214
|
if (typeof ev !== 'object' || typeof ev.getFlags !== 'function') {
|
|
@@ -2516,8 +2519,6 @@ const parshiyotObj = parshiyotObj0;
|
|
|
2516
2519
|
* on doubled parshiot, read only the second Haftarah
|
|
2517
2520
|
* except for Nitzavim-Vayelech and Achrei Mot-Kedoshim
|
|
2518
2521
|
* @private
|
|
2519
|
-
* @param {string[]} parsha
|
|
2520
|
-
* @return {string}
|
|
2521
2522
|
*/
|
|
2522
2523
|
function getHaftaraKey(parsha) {
|
|
2523
2524
|
const first = parsha[0];
|
|
@@ -2545,8 +2546,8 @@ function makeLeyningNames(parsha) {
|
|
|
2545
2546
|
/**
|
|
2546
2547
|
* Looks up regular leyning for a weekly parsha with no special readings
|
|
2547
2548
|
* @private
|
|
2548
|
-
* @param
|
|
2549
|
-
* @
|
|
2549
|
+
* @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
|
|
2550
|
+
* @returns map of aliyot
|
|
2550
2551
|
*/
|
|
2551
2552
|
function getLeyningForParshaShabbatOnly(parsha) {
|
|
2552
2553
|
const raw = lookupParsha(parsha);
|
|
@@ -2561,7 +2562,6 @@ function getLeyningForParshaShabbatOnly(parsha) {
|
|
|
2561
2562
|
const parshaNameArray = raw.combined ? [raw.p1, raw.p2] : [name];
|
|
2562
2563
|
const parts = makeLeyningParts(fullkriyah);
|
|
2563
2564
|
const summary = makeSummaryFromParts(parts);
|
|
2564
|
-
/** @type {Leyning} */
|
|
2565
2565
|
const result = {
|
|
2566
2566
|
name: makeLeyningNames(parshaNameArray),
|
|
2567
2567
|
parsha: parshaNameArray,
|
|
@@ -2623,9 +2623,9 @@ function getLeyningForParsha(parsha) {
|
|
|
2623
2623
|
/**
|
|
2624
2624
|
* Looks up leyning for a regular Shabbat parsha, including any special
|
|
2625
2625
|
* maftir or Haftara.
|
|
2626
|
-
* @param
|
|
2627
|
-
* @param
|
|
2628
|
-
* @
|
|
2626
|
+
* @param ev the Hebcal event associated with this leyning
|
|
2627
|
+
* @param [il] in Israel
|
|
2628
|
+
* @returns map of aliyot
|
|
2629
2629
|
*/
|
|
2630
2630
|
function getLeyningForParshaHaShavua(ev, il = false) {
|
|
2631
2631
|
if (typeof ev !== 'object' || typeof ev.getFlags !== 'function') {
|
|
@@ -2685,8 +2685,7 @@ function getLeyningForParshaHaShavua(ev, il = false) {
|
|
|
2685
2685
|
}
|
|
2686
2686
|
/**
|
|
2687
2687
|
* Returns the parsha metadata
|
|
2688
|
-
* @param
|
|
2689
|
-
* @return {ParshaMeta}
|
|
2688
|
+
* @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
|
|
2690
2689
|
*/
|
|
2691
2690
|
function lookupParsha(parsha) {
|
|
2692
2691
|
const name = parshaToString(parsha);
|
|
@@ -2715,10 +2714,13 @@ function findParshaHaShavua(saturday, il) {
|
|
|
2715
2714
|
return parsha;
|
|
2716
2715
|
}
|
|
2717
2716
|
// Special case between YK and Simchat Torah
|
|
2717
|
+
// If Vayeilech or Ha'azinu occurs between RH and YK, the following block for
|
|
2718
|
+
// Monday/Thursday weekday isn't executed because the above sedra.lookup()
|
|
2719
|
+
// would have already found the regular Saturday parsha.
|
|
2718
2720
|
if (saturday.getMonth() === months.TISHREI) {
|
|
2719
2721
|
const dd = saturday.getDate();
|
|
2720
2722
|
const simchatTorah = il ? 22 : 23;
|
|
2721
|
-
if (dd >
|
|
2723
|
+
if (dd > 2 && dd <= simchatTorah) {
|
|
2722
2724
|
return {
|
|
2723
2725
|
parsha: ['Vezot Haberakhah'],
|
|
2724
2726
|
chag: false,
|
package/dist/leyning.d.ts
CHANGED
|
@@ -18,14 +18,13 @@ export declare function getLeyningForParsha(parsha: string | string[]): Leyning;
|
|
|
18
18
|
/**
|
|
19
19
|
* Looks up leyning for a regular Shabbat parsha, including any special
|
|
20
20
|
* maftir or Haftara.
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @
|
|
21
|
+
* @param ev the Hebcal event associated with this leyning
|
|
22
|
+
* @param [il] in Israel
|
|
23
|
+
* @returns map of aliyot
|
|
24
24
|
*/
|
|
25
25
|
export declare function getLeyningForParshaHaShavua(ev: Event, il?: boolean): Leyning;
|
|
26
26
|
/**
|
|
27
27
|
* Returns the parsha metadata
|
|
28
|
-
* @param
|
|
29
|
-
* @return {ParshaMeta}
|
|
28
|
+
* @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
|
|
30
29
|
*/
|
|
31
30
|
export declare function lookupParsha(parsha: string | string[]): ParshaMeta;
|
package/dist/types.d.ts
CHANGED
|
@@ -98,18 +98,20 @@ export type LeyningWeekday = LeyningParshaHaShavua & {
|
|
|
98
98
|
/** Optional map of weekday Torah Readings aliyot `1` through `3` for Monday and Thursday */
|
|
99
99
|
weekday?: AliyotMap;
|
|
100
100
|
};
|
|
101
|
-
|
|
102
|
-
* Shabbat and holiday leyning always has full kriyah and haftarah
|
|
103
|
-
*/
|
|
104
|
-
export type LeyningShabbatHoliday = LeyningBase & {
|
|
105
|
-
/** Map of aliyot `1` through `7` plus `M` for maftir */
|
|
106
|
-
fullkriyah: AliyotMap;
|
|
101
|
+
export type HaftarahProps = {
|
|
107
102
|
/** Haftarah object */
|
|
108
103
|
haft: Aliyah | Aliyah[];
|
|
109
104
|
/** Haftarah, such as `Isaiah 42:5 – 43:11` */
|
|
110
105
|
haftara: string;
|
|
111
106
|
/** Number of verses in the Haftarah */
|
|
112
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;
|
|
113
115
|
/** Haftarah object for Sephardim */
|
|
114
116
|
seph?: Aliyah | Aliyah[];
|
|
115
117
|
/** Haftarah for Sephardim, such as `Isaiah 42:5 - 42:21` */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/leyning",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.4",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hebcal",
|
|
@@ -40,36 +40,38 @@
|
|
|
40
40
|
"leyning-csv": "bin/leyning-csv"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@hebcal/core": "^5.
|
|
44
|
-
"tslib": "^2.
|
|
43
|
+
"@hebcal/core": "^5.5.0",
|
|
44
|
+
"tslib": "^2.7.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build:rollup": "rollup -c",
|
|
48
48
|
"build:json2js": "for f in src/*.json; do echo 'export default' > $f.ts && cat $f >> $f.ts; done",
|
|
49
49
|
"build": "npm run build:json2js && npm run build:rollup",
|
|
50
50
|
"prepublish": "npm run build",
|
|
51
|
-
"
|
|
51
|
+
"docs": "typedoc",
|
|
52
52
|
"pretest": "npm run build",
|
|
53
|
-
"
|
|
53
|
+
"lint": "gts lint",
|
|
54
|
+
"coverage": "jest --coverage",
|
|
55
|
+
"test": "jest",
|
|
56
|
+
"clean": "gts clean",
|
|
57
|
+
"fix": "gts fix"
|
|
54
58
|
},
|
|
55
59
|
"license": "BSD-2-Clause",
|
|
56
60
|
"devDependencies": {
|
|
57
|
-
"@babel/preset-env": "^7.
|
|
61
|
+
"@babel/preset-env": "^7.25.4",
|
|
58
62
|
"@babel/preset-typescript": "^7.24.7",
|
|
59
|
-
"@rollup/plugin-commonjs": "^
|
|
63
|
+
"@rollup/plugin-commonjs": "^28.0.0",
|
|
60
64
|
"@rollup/plugin-json": "^6.1.0",
|
|
61
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
65
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
62
66
|
"@rollup/plugin-terser": "^0.4.4",
|
|
63
|
-
"@rollup/plugin-typescript": "^
|
|
64
|
-
"@types/jest": "^29.5.
|
|
65
|
-
"
|
|
66
|
-
"eslint-config-google": "^0.14.0",
|
|
67
|
+
"@rollup/plugin-typescript": "^12.1.0",
|
|
68
|
+
"@types/jest": "^29.5.13",
|
|
69
|
+
"@types/node": "^22.7.3",
|
|
67
70
|
"gts": "^5.3.1",
|
|
68
71
|
"jest": "^29.7.0",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"typescript": "^5.5.2"
|
|
72
|
+
"rollup": "^4.22.5",
|
|
73
|
+
"ts-jest": "^29.2.5",
|
|
74
|
+
"typedoc": "^0.26.7",
|
|
75
|
+
"typescript": "^5.6.2"
|
|
74
76
|
}
|
|
75
77
|
}
|