@hebcal/leyning 4.15.0 → 4.15.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.
- package/dist/bundle.js +35 -11
- package/dist/bundle.min.js +2 -2
- package/dist/index.js +28 -8
- package/dist/index.mjs +29 -9
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/leyning v4.15.
|
|
1
|
+
/*! @hebcal/leyning v4.15.1 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -74,7 +74,9 @@ function clone(src) {
|
|
|
74
74
|
*/
|
|
75
75
|
|
|
76
76
|
function addSefariaLinksToLeyning(aliyot, showBook) {
|
|
77
|
-
|
|
77
|
+
var _aliyot$;
|
|
78
|
+
|
|
79
|
+
const book1 = (_aliyot$ = aliyot['1']) === null || _aliyot$ === void 0 ? void 0 : _aliyot$.k;
|
|
78
80
|
Object.keys(aliyot).forEach(num => {
|
|
79
81
|
const aliyah = aliyot[num];
|
|
80
82
|
aliyah.num = num == 'M' ? 'maf' : num;
|
|
@@ -457,7 +459,19 @@ function getLeyningKeyForEvent(e, il = false) {
|
|
|
457
459
|
return undefined;
|
|
458
460
|
}
|
|
459
461
|
|
|
460
|
-
if (
|
|
462
|
+
if (desc === 'Rosh Chodesh Tevet') {
|
|
463
|
+
if (isShabbat) {
|
|
464
|
+
return 'Shabbat Rosh Chodesh Chanukah';
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
if (day === 30 || core.HDate.shortKislev(hd.getFullYear())) {
|
|
468
|
+
return 'Chanukah Day 6'; // 30th of Kislev or 1st of Tevet
|
|
469
|
+
} else {
|
|
470
|
+
return 'Chanukah Day 7 (on Rosh Chodesh)'; // 1st of Tevet
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if (isRoshChodesh) {
|
|
461
475
|
return desc;
|
|
462
476
|
}
|
|
463
477
|
|
|
@@ -1418,7 +1432,7 @@ function getTriennialHaftara(parsha, yearNum) {
|
|
|
1418
1432
|
const idx = parsha.length === 1 || yearNum === 0 ? 0 : 1;
|
|
1419
1433
|
const name = parsha[idx];
|
|
1420
1434
|
const triHaft = triennialHaft[name];
|
|
1421
|
-
const triHaft2 = triHaft
|
|
1435
|
+
const triHaft2 = triHaft === null || triHaft === void 0 ? void 0 : triHaft[yearNum + 1];
|
|
1422
1436
|
|
|
1423
1437
|
if (typeof triHaft2 === 'object') {
|
|
1424
1438
|
const haft = cloneHaftara(triHaft2);
|
|
@@ -1496,12 +1510,13 @@ function getParshaDates(events) {
|
|
|
1496
1510
|
|
|
1497
1511
|
|
|
1498
1512
|
function writeFullKriyahCsv(stream, hyear, il) {
|
|
1499
|
-
const
|
|
1513
|
+
const events0 = core.HebrewCalendar.calendar({
|
|
1500
1514
|
year: hyear,
|
|
1501
1515
|
isHebrewYear: true,
|
|
1502
1516
|
sedrot: true,
|
|
1503
1517
|
il: il
|
|
1504
1518
|
});
|
|
1519
|
+
const events = events0.filter(ev => ev.getDesc() !== 'Rosh Chodesh Tevet');
|
|
1505
1520
|
const parshaDates = getParshaDates(events);
|
|
1506
1521
|
stream.write('"Date","Parashah","Aliyah","Reading","Verses"\r\n');
|
|
1507
1522
|
events.forEach(ev => {
|
|
@@ -1517,13 +1532,14 @@ function writeFullKriyahCsv(stream, hyear, il) {
|
|
|
1517
1532
|
*/
|
|
1518
1533
|
|
|
1519
1534
|
function writeTriennialCsv(stream, hyear) {
|
|
1520
|
-
const
|
|
1535
|
+
const events0 = core.HebrewCalendar.calendar({
|
|
1521
1536
|
year: hyear,
|
|
1522
1537
|
isHebrewYear: true,
|
|
1523
1538
|
numYears: 3,
|
|
1524
1539
|
sedrot: true,
|
|
1525
1540
|
il: false
|
|
1526
1541
|
});
|
|
1542
|
+
const events = events0.filter(ev => ev.getDesc() !== 'Rosh Chodesh Tevet');
|
|
1527
1543
|
const parshaDates = getParshaDates(events);
|
|
1528
1544
|
stream.write('"Date","Parashah","Aliyah","Triennial Reading","Verses"\r\n');
|
|
1529
1545
|
events.forEach(ev => {
|
|
@@ -1671,10 +1687,12 @@ function getFullKriyahLines(reading) {
|
|
|
1671
1687
|
const a = reading.fullkriyah[num];
|
|
1672
1688
|
|
|
1673
1689
|
if (typeof a !== 'undefined') {
|
|
1690
|
+
var _reading$reason;
|
|
1691
|
+
|
|
1674
1692
|
const k = num == 'M' ? 'maf' : num;
|
|
1675
1693
|
let aliyah = formatAliyahWithBook(a);
|
|
1676
1694
|
|
|
1677
|
-
if (reading.reason &&
|
|
1695
|
+
if ((_reading$reason = reading.reason) !== null && _reading$reason !== void 0 && _reading$reason[num]) {
|
|
1678
1696
|
aliyah += ' | ' + reading.reason[num];
|
|
1679
1697
|
}
|
|
1680
1698
|
|
|
@@ -1686,9 +1704,11 @@ function getFullKriyahLines(reading) {
|
|
|
1686
1704
|
let specialHaftara = false;
|
|
1687
1705
|
|
|
1688
1706
|
if (reading.haftara) {
|
|
1707
|
+
var _reading$reason2;
|
|
1708
|
+
|
|
1689
1709
|
let haftara = reading.haftara.replace(/,/g, ';');
|
|
1690
1710
|
|
|
1691
|
-
if (reading.reason &&
|
|
1711
|
+
if ((_reading$reason2 = reading.reason) !== null && _reading$reason2 !== void 0 && _reading$reason2.haftara) {
|
|
1692
1712
|
specialHaftara = true;
|
|
1693
1713
|
haftara += ' | ' + reading.reason.haftara;
|
|
1694
1714
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @hebcal/leyning v4.15.
|
|
2
|
-
import { parshiot, flags, months, Event, HebrewCalendar
|
|
1
|
+
/*! @hebcal/leyning v4.15.1 */
|
|
2
|
+
import { parshiot, flags, months, HDate, Event, HebrewCalendar } from '@hebcal/core';
|
|
3
3
|
|
|
4
4
|
const Genesis=[0,31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,54,33,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26];const Exodus=[0,22,25,22,31,23,30,29,28,35,29,10,51,22,31,27,36,16,27,25,26,37,30,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38];const Leviticus=[0,17,16,17,35,26,23,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34];const Numbers=[0,54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,35,28,32,22,29,35,41,30,25,19,65,23,31,39,17,54,42,56,29,34,13];const Deuteronomy=[0,46,37,29,49,33,25,26,20,29,22,32,31,19,29,23,22,20,22,21,20,23,29,26,22,19,19,26,69,28,20,30,52,29,12];const Joshua=[0,18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33];const Judges=[0,36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25];const Ruth=[0,22,23,18,22];const Isaiah=[0,31,22,26,6,30,13,25,23,20,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,11,25,24];const Jeremiah=[0,19,37,25,31,31,30,34,23,25,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34];const Lamentations=[0,22,22,66,22,22];const Baruch=[0,22,35,38,37,9,72];const Ezekiel=[0,28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,44,37,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35];const Daniel=[0,21,49,100,34,30,29,28,27,27,21,45,13,64,42];const Hosea=[0,9,25,5,19,15,11,16,14,17,15,11,15,15,10];const Joel=[0,20,27,5,21];const Amos=[0,15,16,15,13,27,14,17,14,15];const Obadiah=[0,21];const Jonah=[0,16,11,10,11];const Micah=[0,16,13,12,14,14,16,20];const Nachum=[0,14,14,19];const Habakkuk=[0,17,20,19];const Zephaniah=[0,18,15,20];const Haggai=[0,15,23];const Zechariah=[0,17,17,10,14,11,15,14,23,17,12,17,14,9,21];const Malachi=[0,14,17,24];var numverses = {Genesis:Genesis,Exodus:Exodus,Leviticus:Leviticus,Numbers:Numbers,Deuteronomy:Deuteronomy,Joshua:Joshua,Judges:Judges,Ruth:Ruth,"I Samuel":[0,28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,16,23,28,23,43,25,12,25,11,31,13],"II Samuel":[0,27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,32,44,26,22,51,39,25],"I Kings":[0,53,46,28,20,32,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,54],"II Kings":[0,18,25,27,44,27,33,20,29,37,36,20,22,25,29,38,20,41,37,37,21,26,20,37,20,30],Isaiah:Isaiah,Jeremiah:Jeremiah,Lamentations:Lamentations,Baruch:Baruch,Ezekiel:Ezekiel,Daniel:Daniel,Hosea:Hosea,Joel:Joel,Amos:Amos,Obadiah:Obadiah,Jonah:Jonah,Micah:Micah,Nachum:Nachum,Habakkuk:Habakkuk,Zephaniah:Zephaniah,Haggai:Haggai,Zechariah:Zechariah,Malachi:Malachi};
|
|
5
5
|
|
|
@@ -70,7 +70,9 @@ function clone(src) {
|
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
72
|
function addSefariaLinksToLeyning(aliyot, showBook) {
|
|
73
|
-
|
|
73
|
+
var _aliyot$;
|
|
74
|
+
|
|
75
|
+
const book1 = (_aliyot$ = aliyot['1']) === null || _aliyot$ === void 0 ? void 0 : _aliyot$.k;
|
|
74
76
|
Object.keys(aliyot).forEach(num => {
|
|
75
77
|
const aliyah = aliyot[num];
|
|
76
78
|
aliyah.num = num == 'M' ? 'maf' : num;
|
|
@@ -453,7 +455,19 @@ function getLeyningKeyForEvent(e, il = false) {
|
|
|
453
455
|
return undefined;
|
|
454
456
|
}
|
|
455
457
|
|
|
456
|
-
if (
|
|
458
|
+
if (desc === 'Rosh Chodesh Tevet') {
|
|
459
|
+
if (isShabbat) {
|
|
460
|
+
return 'Shabbat Rosh Chodesh Chanukah';
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
if (day === 30 || HDate.shortKislev(hd.getFullYear())) {
|
|
464
|
+
return 'Chanukah Day 6'; // 30th of Kislev or 1st of Tevet
|
|
465
|
+
} else {
|
|
466
|
+
return 'Chanukah Day 7 (on Rosh Chodesh)'; // 1st of Tevet
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (isRoshChodesh) {
|
|
457
471
|
return desc;
|
|
458
472
|
}
|
|
459
473
|
|
|
@@ -1414,7 +1428,7 @@ function getTriennialHaftara(parsha, yearNum) {
|
|
|
1414
1428
|
const idx = parsha.length === 1 || yearNum === 0 ? 0 : 1;
|
|
1415
1429
|
const name = parsha[idx];
|
|
1416
1430
|
const triHaft = triennialHaft[name];
|
|
1417
|
-
const triHaft2 = triHaft
|
|
1431
|
+
const triHaft2 = triHaft === null || triHaft === void 0 ? void 0 : triHaft[yearNum + 1];
|
|
1418
1432
|
|
|
1419
1433
|
if (typeof triHaft2 === 'object') {
|
|
1420
1434
|
const haft = cloneHaftara(triHaft2);
|
|
@@ -1492,12 +1506,13 @@ function getParshaDates(events) {
|
|
|
1492
1506
|
|
|
1493
1507
|
|
|
1494
1508
|
function writeFullKriyahCsv(stream, hyear, il) {
|
|
1495
|
-
const
|
|
1509
|
+
const events0 = HebrewCalendar.calendar({
|
|
1496
1510
|
year: hyear,
|
|
1497
1511
|
isHebrewYear: true,
|
|
1498
1512
|
sedrot: true,
|
|
1499
1513
|
il: il
|
|
1500
1514
|
});
|
|
1515
|
+
const events = events0.filter(ev => ev.getDesc() !== 'Rosh Chodesh Tevet');
|
|
1501
1516
|
const parshaDates = getParshaDates(events);
|
|
1502
1517
|
stream.write('"Date","Parashah","Aliyah","Reading","Verses"\r\n');
|
|
1503
1518
|
events.forEach(ev => {
|
|
@@ -1513,13 +1528,14 @@ function writeFullKriyahCsv(stream, hyear, il) {
|
|
|
1513
1528
|
*/
|
|
1514
1529
|
|
|
1515
1530
|
function writeTriennialCsv(stream, hyear) {
|
|
1516
|
-
const
|
|
1531
|
+
const events0 = HebrewCalendar.calendar({
|
|
1517
1532
|
year: hyear,
|
|
1518
1533
|
isHebrewYear: true,
|
|
1519
1534
|
numYears: 3,
|
|
1520
1535
|
sedrot: true,
|
|
1521
1536
|
il: false
|
|
1522
1537
|
});
|
|
1538
|
+
const events = events0.filter(ev => ev.getDesc() !== 'Rosh Chodesh Tevet');
|
|
1523
1539
|
const parshaDates = getParshaDates(events);
|
|
1524
1540
|
stream.write('"Date","Parashah","Aliyah","Triennial Reading","Verses"\r\n');
|
|
1525
1541
|
events.forEach(ev => {
|
|
@@ -1667,10 +1683,12 @@ function getFullKriyahLines(reading) {
|
|
|
1667
1683
|
const a = reading.fullkriyah[num];
|
|
1668
1684
|
|
|
1669
1685
|
if (typeof a !== 'undefined') {
|
|
1686
|
+
var _reading$reason;
|
|
1687
|
+
|
|
1670
1688
|
const k = num == 'M' ? 'maf' : num;
|
|
1671
1689
|
let aliyah = formatAliyahWithBook(a);
|
|
1672
1690
|
|
|
1673
|
-
if (reading.reason &&
|
|
1691
|
+
if ((_reading$reason = reading.reason) !== null && _reading$reason !== void 0 && _reading$reason[num]) {
|
|
1674
1692
|
aliyah += ' | ' + reading.reason[num];
|
|
1675
1693
|
}
|
|
1676
1694
|
|
|
@@ -1682,9 +1700,11 @@ function getFullKriyahLines(reading) {
|
|
|
1682
1700
|
let specialHaftara = false;
|
|
1683
1701
|
|
|
1684
1702
|
if (reading.haftara) {
|
|
1703
|
+
var _reading$reason2;
|
|
1704
|
+
|
|
1685
1705
|
let haftara = reading.haftara.replace(/,/g, ';');
|
|
1686
1706
|
|
|
1687
|
-
if (reading.reason &&
|
|
1707
|
+
if ((_reading$reason2 = reading.reason) !== null && _reading$reason2 !== void 0 && _reading$reason2.haftara) {
|
|
1688
1708
|
specialHaftara = true;
|
|
1689
1709
|
haftara += ' | ' + reading.reason.haftara;
|
|
1690
1710
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/leyning",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.1",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hebcal",
|
|
@@ -52,20 +52,20 @@
|
|
|
52
52
|
"verbose": true
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@babel/core": "^7.18.
|
|
56
|
-
"@babel/preset-env": "^7.18.
|
|
57
|
-
"@babel/register": "^7.18.
|
|
55
|
+
"@babel/core": "^7.18.9",
|
|
56
|
+
"@babel/preset-env": "^7.18.9",
|
|
57
|
+
"@babel/register": "^7.18.9",
|
|
58
58
|
"@rollup/plugin-babel": "^5.3.1",
|
|
59
59
|
"@rollup/plugin-commonjs": "^22.0.1",
|
|
60
60
|
"@rollup/plugin-json": "^4.1.0",
|
|
61
61
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
62
|
-
"ava": "^4.3.
|
|
63
|
-
"core-js": "^3.23.
|
|
64
|
-
"eslint": "^8.
|
|
62
|
+
"ava": "^4.3.1",
|
|
63
|
+
"core-js": "^3.23.5",
|
|
64
|
+
"eslint": "^8.20.0",
|
|
65
65
|
"eslint-config-google": "^0.14.0",
|
|
66
|
-
"jsdoc": "^3.6.
|
|
66
|
+
"jsdoc": "^3.6.11",
|
|
67
67
|
"jsdoc-to-markdown": "^7.1.1",
|
|
68
|
-
"rollup": "^2.
|
|
68
|
+
"rollup": "^2.77.0",
|
|
69
69
|
"rollup-plugin-terser": "^7.0.2"
|
|
70
70
|
}
|
|
71
71
|
}
|