@hebcal/core 5.4.4 → 5.4.5

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/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v5.4.4 */
1
+ /*! @hebcal/core v5.4.5 */
2
2
  /* eslint-disable @typescript-eslint/no-namespace, no-inner-declarations */
3
3
  /** @private */
4
4
  const lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
@@ -8682,13 +8682,6 @@ class OmerEvent extends Event {
8682
8682
  }
8683
8683
 
8684
8684
  class QuickLRU extends Map {
8685
- #size = 0;
8686
- #cache = new Map();
8687
- #oldCache = new Map();
8688
- #maxSize;
8689
- #maxAge;
8690
- #onEviction;
8691
-
8692
8685
  constructor(options = {}) {
8693
8686
  super();
8694
8687
 
@@ -8700,30 +8693,30 @@ class QuickLRU extends Map {
8700
8693
  throw new TypeError('`maxAge` must be a number greater than 0');
8701
8694
  }
8702
8695
 
8703
- this.#maxSize = options.maxSize;
8704
- this.#maxAge = options.maxAge || Number.POSITIVE_INFINITY;
8705
- this.#onEviction = options.onEviction;
8706
- }
8707
-
8708
- // For tests.
8709
- get __oldCache() {
8710
- return this.#oldCache;
8696
+ // TODO: Use private class fields when ESLint supports them.
8697
+ this.maxSize = options.maxSize;
8698
+ this.maxAge = options.maxAge || Number.POSITIVE_INFINITY;
8699
+ this.onEviction = options.onEviction;
8700
+ this.cache = new Map();
8701
+ this.oldCache = new Map();
8702
+ this._size = 0;
8711
8703
  }
8712
8704
 
8713
- #emitEvictions(cache) {
8714
- if (typeof this.#onEviction !== 'function') {
8705
+ // TODO: Use private class methods when targeting Node.js 16.
8706
+ _emitEvictions(cache) {
8707
+ if (typeof this.onEviction !== 'function') {
8715
8708
  return;
8716
8709
  }
8717
8710
 
8718
8711
  for (const [key, item] of cache) {
8719
- this.#onEviction(key, item.value);
8712
+ this.onEviction(key, item.value);
8720
8713
  }
8721
8714
  }
8722
8715
 
8723
- #deleteIfExpired(key, item) {
8716
+ _deleteIfExpired(key, item) {
8724
8717
  if (typeof item.expiry === 'number' && item.expiry <= Date.now()) {
8725
- if (typeof this.#onEviction === 'function') {
8726
- this.#onEviction(key, item.value);
8718
+ if (typeof this.onEviction === 'function') {
8719
+ this.onEviction(key, item.value);
8727
8720
  }
8728
8721
 
8729
8722
  return this.delete(key);
@@ -8732,54 +8725,54 @@ class QuickLRU extends Map {
8732
8725
  return false;
8733
8726
  }
8734
8727
 
8735
- #getOrDeleteIfExpired(key, item) {
8736
- const deleted = this.#deleteIfExpired(key, item);
8728
+ _getOrDeleteIfExpired(key, item) {
8729
+ const deleted = this._deleteIfExpired(key, item);
8737
8730
  if (deleted === false) {
8738
8731
  return item.value;
8739
8732
  }
8740
8733
  }
8741
8734
 
8742
- #getItemValue(key, item) {
8743
- return item.expiry ? this.#getOrDeleteIfExpired(key, item) : item.value;
8735
+ _getItemValue(key, item) {
8736
+ return item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value;
8744
8737
  }
8745
8738
 
8746
- #peek(key, cache) {
8739
+ _peek(key, cache) {
8747
8740
  const item = cache.get(key);
8748
8741
 
8749
- return this.#getItemValue(key, item);
8742
+ return this._getItemValue(key, item);
8750
8743
  }
8751
8744
 
8752
- #set(key, value) {
8753
- this.#cache.set(key, value);
8754
- this.#size++;
8745
+ _set(key, value) {
8746
+ this.cache.set(key, value);
8747
+ this._size++;
8755
8748
 
8756
- if (this.#size >= this.#maxSize) {
8757
- this.#size = 0;
8758
- this.#emitEvictions(this.#oldCache);
8759
- this.#oldCache = this.#cache;
8760
- this.#cache = new Map();
8749
+ if (this._size >= this.maxSize) {
8750
+ this._size = 0;
8751
+ this._emitEvictions(this.oldCache);
8752
+ this.oldCache = this.cache;
8753
+ this.cache = new Map();
8761
8754
  }
8762
8755
  }
8763
8756
 
8764
- #moveToRecent(key, item) {
8765
- this.#oldCache.delete(key);
8766
- this.#set(key, item);
8757
+ _moveToRecent(key, item) {
8758
+ this.oldCache.delete(key);
8759
+ this._set(key, item);
8767
8760
  }
8768
8761
 
8769
- * #entriesAscending() {
8770
- for (const item of this.#oldCache) {
8762
+ * _entriesAscending() {
8763
+ for (const item of this.oldCache) {
8771
8764
  const [key, value] = item;
8772
- if (!this.#cache.has(key)) {
8773
- const deleted = this.#deleteIfExpired(key, value);
8765
+ if (!this.cache.has(key)) {
8766
+ const deleted = this._deleteIfExpired(key, value);
8774
8767
  if (deleted === false) {
8775
8768
  yield item;
8776
8769
  }
8777
8770
  }
8778
8771
  }
8779
8772
 
8780
- for (const item of this.#cache) {
8773
+ for (const item of this.cache) {
8781
8774
  const [key, value] = item;
8782
- const deleted = this.#deleteIfExpired(key, value);
8775
+ const deleted = this._deleteIfExpired(key, value);
8783
8776
  if (deleted === false) {
8784
8777
  yield item;
8785
8778
  }
@@ -8787,72 +8780,73 @@ class QuickLRU extends Map {
8787
8780
  }
8788
8781
 
8789
8782
  get(key) {
8790
- if (this.#cache.has(key)) {
8791
- const item = this.#cache.get(key);
8792
- return this.#getItemValue(key, item);
8783
+ if (this.cache.has(key)) {
8784
+ const item = this.cache.get(key);
8785
+
8786
+ return this._getItemValue(key, item);
8793
8787
  }
8794
8788
 
8795
- if (this.#oldCache.has(key)) {
8796
- const item = this.#oldCache.get(key);
8797
- if (this.#deleteIfExpired(key, item) === false) {
8798
- this.#moveToRecent(key, item);
8789
+ if (this.oldCache.has(key)) {
8790
+ const item = this.oldCache.get(key);
8791
+ if (this._deleteIfExpired(key, item) === false) {
8792
+ this._moveToRecent(key, item);
8799
8793
  return item.value;
8800
8794
  }
8801
8795
  }
8802
8796
  }
8803
8797
 
8804
- set(key, value, {maxAge = this.#maxAge} = {}) {
8805
- const expiry = typeof maxAge === 'number' && maxAge !== Number.POSITIVE_INFINITY
8806
- ? (Date.now() + maxAge)
8807
- : undefined;
8808
-
8809
- if (this.#cache.has(key)) {
8810
- this.#cache.set(key, {
8798
+ set(key, value, {maxAge = this.maxAge} = {}) {
8799
+ const expiry =
8800
+ typeof maxAge === 'number' && maxAge !== Number.POSITIVE_INFINITY ?
8801
+ Date.now() + maxAge :
8802
+ undefined;
8803
+ if (this.cache.has(key)) {
8804
+ this.cache.set(key, {
8811
8805
  value,
8812
- expiry,
8806
+ expiry
8813
8807
  });
8814
8808
  } else {
8815
- this.#set(key, {value, expiry});
8809
+ this._set(key, {value, expiry});
8816
8810
  }
8817
8811
 
8818
8812
  return this;
8819
8813
  }
8820
8814
 
8821
8815
  has(key) {
8822
- if (this.#cache.has(key)) {
8823
- return !this.#deleteIfExpired(key, this.#cache.get(key));
8816
+ if (this.cache.has(key)) {
8817
+ return !this._deleteIfExpired(key, this.cache.get(key));
8824
8818
  }
8825
8819
 
8826
- if (this.#oldCache.has(key)) {
8827
- return !this.#deleteIfExpired(key, this.#oldCache.get(key));
8820
+ if (this.oldCache.has(key)) {
8821
+ return !this._deleteIfExpired(key, this.oldCache.get(key));
8828
8822
  }
8829
8823
 
8830
8824
  return false;
8831
8825
  }
8832
8826
 
8833
8827
  peek(key) {
8834
- if (this.#cache.has(key)) {
8835
- return this.#peek(key, this.#cache);
8828
+ if (this.cache.has(key)) {
8829
+ return this._peek(key, this.cache);
8836
8830
  }
8837
8831
 
8838
- if (this.#oldCache.has(key)) {
8839
- return this.#peek(key, this.#oldCache);
8832
+ if (this.oldCache.has(key)) {
8833
+ return this._peek(key, this.oldCache);
8840
8834
  }
8841
8835
  }
8842
8836
 
8843
8837
  delete(key) {
8844
- const deleted = this.#cache.delete(key);
8838
+ const deleted = this.cache.delete(key);
8845
8839
  if (deleted) {
8846
- this.#size--;
8840
+ this._size--;
8847
8841
  }
8848
8842
 
8849
- return this.#oldCache.delete(key) || deleted;
8843
+ return this.oldCache.delete(key) || deleted;
8850
8844
  }
8851
8845
 
8852
8846
  clear() {
8853
- this.#cache.clear();
8854
- this.#oldCache.clear();
8855
- this.#size = 0;
8847
+ this.cache.clear();
8848
+ this.oldCache.clear();
8849
+ this._size = 0;
8856
8850
  }
8857
8851
 
8858
8852
  resize(newSize) {
@@ -8860,23 +8854,23 @@ class QuickLRU extends Map {
8860
8854
  throw new TypeError('`maxSize` must be a number greater than 0');
8861
8855
  }
8862
8856
 
8863
- const items = [...this.#entriesAscending()];
8857
+ const items = [...this._entriesAscending()];
8864
8858
  const removeCount = items.length - newSize;
8865
8859
  if (removeCount < 0) {
8866
- this.#cache = new Map(items);
8867
- this.#oldCache = new Map();
8868
- this.#size = items.length;
8860
+ this.cache = new Map(items);
8861
+ this.oldCache = new Map();
8862
+ this._size = items.length;
8869
8863
  } else {
8870
8864
  if (removeCount > 0) {
8871
- this.#emitEvictions(items.slice(0, removeCount));
8865
+ this._emitEvictions(items.slice(0, removeCount));
8872
8866
  }
8873
8867
 
8874
- this.#oldCache = new Map(items.slice(removeCount));
8875
- this.#cache = new Map();
8876
- this.#size = 0;
8868
+ this.oldCache = new Map(items.slice(removeCount));
8869
+ this.cache = new Map();
8870
+ this._size = 0;
8877
8871
  }
8878
8872
 
8879
- this.#maxSize = newSize;
8873
+ this.maxSize = newSize;
8880
8874
  }
8881
8875
 
8882
8876
  * keys() {
@@ -8892,18 +8886,18 @@ class QuickLRU extends Map {
8892
8886
  }
8893
8887
 
8894
8888
  * [Symbol.iterator]() {
8895
- for (const item of this.#cache) {
8889
+ for (const item of this.cache) {
8896
8890
  const [key, value] = item;
8897
- const deleted = this.#deleteIfExpired(key, value);
8891
+ const deleted = this._deleteIfExpired(key, value);
8898
8892
  if (deleted === false) {
8899
8893
  yield [key, value.value];
8900
8894
  }
8901
8895
  }
8902
8896
 
8903
- for (const item of this.#oldCache) {
8897
+ for (const item of this.oldCache) {
8904
8898
  const [key, value] = item;
8905
- if (!this.#cache.has(key)) {
8906
- const deleted = this.#deleteIfExpired(key, value);
8899
+ if (!this.cache.has(key)) {
8900
+ const deleted = this._deleteIfExpired(key, value);
8907
8901
  if (deleted === false) {
8908
8902
  yield [key, value.value];
8909
8903
  }
@@ -8912,22 +8906,22 @@ class QuickLRU extends Map {
8912
8906
  }
8913
8907
 
8914
8908
  * entriesDescending() {
8915
- let items = [...this.#cache];
8909
+ let items = [...this.cache];
8916
8910
  for (let i = items.length - 1; i >= 0; --i) {
8917
8911
  const item = items[i];
8918
8912
  const [key, value] = item;
8919
- const deleted = this.#deleteIfExpired(key, value);
8913
+ const deleted = this._deleteIfExpired(key, value);
8920
8914
  if (deleted === false) {
8921
8915
  yield [key, value.value];
8922
8916
  }
8923
8917
  }
8924
8918
 
8925
- items = [...this.#oldCache];
8919
+ items = [...this.oldCache];
8926
8920
  for (let i = items.length - 1; i >= 0; --i) {
8927
8921
  const item = items[i];
8928
8922
  const [key, value] = item;
8929
- if (!this.#cache.has(key)) {
8930
- const deleted = this.#deleteIfExpired(key, value);
8923
+ if (!this.cache.has(key)) {
8924
+ const deleted = this._deleteIfExpired(key, value);
8931
8925
  if (deleted === false) {
8932
8926
  yield [key, value.value];
8933
8927
  }
@@ -8936,28 +8930,24 @@ class QuickLRU extends Map {
8936
8930
  }
8937
8931
 
8938
8932
  * entriesAscending() {
8939
- for (const [key, value] of this.#entriesAscending()) {
8933
+ for (const [key, value] of this._entriesAscending()) {
8940
8934
  yield [key, value.value];
8941
8935
  }
8942
8936
  }
8943
8937
 
8944
8938
  get size() {
8945
- if (!this.#size) {
8946
- return this.#oldCache.size;
8939
+ if (!this._size) {
8940
+ return this.oldCache.size;
8947
8941
  }
8948
8942
 
8949
8943
  let oldCacheSize = 0;
8950
- for (const key of this.#oldCache.keys()) {
8951
- if (!this.#cache.has(key)) {
8944
+ for (const key of this.oldCache.keys()) {
8945
+ if (!this.cache.has(key)) {
8952
8946
  oldCacheSize++;
8953
8947
  }
8954
8948
  }
8955
8949
 
8956
- return Math.min(this.#size + oldCacheSize, this.#maxSize);
8957
- }
8958
-
8959
- get maxSize() {
8960
- return this.#maxSize;
8950
+ return Math.min(this._size + oldCacheSize, this.maxSize);
8961
8951
  }
8962
8952
 
8963
8953
  entries() {
@@ -9009,6 +8999,19 @@ class QuickLRU extends Map {
9009
8999
  const INCOMPLETE = 0;
9010
9000
  const REGULAR = 1;
9011
9001
  const COMPLETE = 2;
9002
+ function yearType(hyear) {
9003
+ const longC = HDate.longCheshvan(hyear);
9004
+ const shortK = HDate.shortKislev(hyear);
9005
+ if (longC && !shortK) {
9006
+ return COMPLETE;
9007
+ }
9008
+ else if (!longC && shortK) {
9009
+ return INCOMPLETE;
9010
+ }
9011
+ else {
9012
+ return REGULAR;
9013
+ }
9014
+ }
9012
9015
  /**
9013
9016
  * Represents Parashah HaShavua for an entire Hebrew year
9014
9017
  */
@@ -9020,11 +9023,6 @@ class Sedra {
9020
9023
  */
9021
9024
  constructor(hyear, il) {
9022
9025
  hyear = +hyear;
9023
- const longC = HDate.longCheshvan(hyear);
9024
- const shortK = HDate.shortKislev(hyear);
9025
- const type = (longC && !shortK) ? COMPLETE :
9026
- (!longC && shortK) ? INCOMPLETE :
9027
- REGULAR;
9028
9026
  this.year = hyear;
9029
9027
  const rh0 = new HDate(1, months.TISHREI, hyear);
9030
9028
  const rh = rh0.abs();
@@ -9033,6 +9031,7 @@ class Sedra {
9033
9031
  this.firstSaturday = HDate.dayOnOrBefore(6, rh + 6);
9034
9032
  const leap = +HDate.isLeapYear(hyear);
9035
9033
  this.il = Boolean(il);
9034
+ const type = yearType(hyear);
9036
9035
  let key = `${leap}${rhDay}${type}`;
9037
9036
  if (types[key]) {
9038
9037
  this.theSedraArray = types[key];
@@ -9285,7 +9284,6 @@ const YK = 'Yom Kippur'; // 1
9285
9284
  const SUKKOT = 'Sukkot'; // 0
9286
9285
  const CHMSUKOT = 'Sukkot Shabbat Chol ha-Moed'; // 0
9287
9286
  const SHMINI = 'Shmini Atzeret'; // 0
9288
- const EOY = CHMSUKOT; // always Sukkot day 3, 5 or 6
9289
9287
  const PESACH = 'Pesach'; // 25
9290
9288
  const PESACH1 = 'Pesach I';
9291
9289
  const CHMPESACH = 'Pesach Shabbat Chol ha-Moed'; // 25
@@ -9302,75 +9300,81 @@ const SHAVUOT$1 = 'Shavuot'; // 33
9302
9300
  function range$1(start, stop) {
9303
9301
  return Array.from({ length: stop - start + 1 }, (v, k) => k + start);
9304
9302
  }
9305
- const empty = [];
9303
+ const yearStartVayeilech = [51, 52, CHMSUKOT];
9304
+ const yearStartHaazinu = [52, YK, CHMSUKOT];
9305
+ const yearStartRH = [RH, 52, SUKKOT, SHMINI];
9306
+ const r020 = range$1(0, 20);
9307
+ const r027 = range$1(0, 27);
9308
+ const r3340 = range$1(33, 40);
9309
+ const r4349 = range$1(43, 49);
9310
+ const r4350 = range$1(43, 50);
9306
9311
  /**
9307
9312
  * The ordinary year types (keviot)
9308
9313
  * names are leap/nonleap - day - incomplete/regular/complete - diaspora/Israel
9309
9314
  * @private
9310
9315
  * @readonly
9311
- * @type {Object.<string, NumberOrString[]>}
9312
9316
  */
9313
9317
  const types = {
9314
9318
  /* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
9315
9319
  * Kislev each have 29 days), and has Passover start on Tuesday. */
9316
9320
  // e.g. 5753
9317
- '020': empty.concat(51, 52, EOY, range$1(0, 20), D(21), 23, 24, PESACH, 25, D(26), D(28), 30, D(31), range$1(33, 40), D(41), range$1(43, 49), D(50)),
9321
+ '020': yearStartVayeilech.concat(r020, D(21), 23, 24, PESACH, 25, D(26), D(28), 30, D(31), r3340, D(41), r4349, D(50)),
9318
9322
  /* Hebrew year that starts on Monday, is `complete' (Heshvan and
9319
9323
  * Kislev each have 30 days), and has Passover start on Thursday. */
9320
9324
  // e.g. 5756
9321
- '0220': empty.concat(51, 52, EOY, range$1(0, 20), D(21), 23, 24, PESACH, 25, D(26), D(28), 30, D(31), 33, SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), range$1(43, 49), D(50)),
9325
+ '0220': yearStartVayeilech.concat(r020, D(21), 23, 24, PESACH, 25, D(26), D(28), 30, D(31), 33, SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
9322
9326
  /* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
9323
9327
  * days and Kislev has 30 days), and has Passover start on Saturday. */
9324
9328
  // e.g. 5701
9325
- '0510': empty.concat(52, YK, EOY, range$1(0, 20), D(21), 23, 24, PESACH1, PESACH8, 25, D(26), D(28), 30, D(31), range$1(33, 40), D(41), range$1(43, 50)),
9329
+ '0510': yearStartHaazinu.concat(r020, D(21), 23, 24, PESACH1, PESACH8, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
9326
9330
  /* Hebrew year that starts on Thursday, is `regular' (Heshvan has 29
9327
9331
  * days and Kislev has 30 days), and has Passover start on Saturday. */
9328
9332
  // e.g. 5745
9329
- '0511': empty.concat(52, YK, EOY, range$1(0, 20), D(21), 23, 24, PESACH, 25, D(26), D(28), range$1(30, 40), D(41), range$1(43, 50)),
9333
+ '0511': yearStartHaazinu.concat(r020, D(21), 23, 24, PESACH, 25, D(26), D(28), range$1(30, 40), D(41), r4350),
9330
9334
  /* Hebrew year that starts on Thursday, is `complete' (Heshvan and
9331
9335
  * Kislev each have 30 days), and has Passover start on Sunday. */
9332
9336
  // e.g. 5754
9333
- '052': empty.concat(52, YK, CHMSUKOT, range$1(0, 24), PESACH7, 25, D(26), D(28), 30, D(31), range$1(33, 40), D(41), range$1(43, 50)),
9337
+ '052': yearStartHaazinu.concat(range$1(0, 24), PESACH7, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
9334
9338
  /* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and Kislev
9335
9339
  * each have 29 days), and has Passover start on Sunday. */
9336
9340
  // e.g. 5761
9337
- '070': empty.concat(RH, 52, SUKKOT, SHMINI, range$1(0, 20), D(21), 23, 24, PESACH7, 25, D(26), D(28), 30, D(31), range$1(33, 40), D(41), range$1(43, 50)),
9341
+ '070': yearStartRH.concat(r020, D(21), 23, 24, PESACH7, 25, D(26), D(28), 30, D(31), r3340, D(41), r4350),
9338
9342
  /* Hebrew year that starts on Saturday, is `complete' (Heshvan and
9339
9343
  * Kislev each have 30 days), and has Passover start on Tuesday. */
9340
9344
  // e.g. 5716
9341
- '072': empty.concat(RH, 52, SUKKOT, SHMINI, range$1(0, 20), D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), range$1(33, 40), D(41), range$1(43, 49), D(50)),
9345
+ '072': yearStartRH.concat(r020, D(21), 23, 24, CHMPESACH, 25, D(26), D(28), 30, D(31), r3340, D(41), r4349, D(50)),
9342
9346
  /* -- The leap year types (keviot) -- */
9343
9347
  /* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
9344
9348
  * Kislev each have 29 days), and has Passover start on Thursday. */
9345
9349
  // e.g. 5746
9346
- '1200': empty.concat(51, 52, CHMSUKOT, range$1(0, 27), CHMPESACH, range$1(28, 33), SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), range$1(43, 49), D(50)),
9350
+ '1200': yearStartVayeilech.concat(r027, CHMPESACH, range$1(28, 33), SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
9347
9351
  /* Hebrew year that starts on Monday, is `incomplete' (Heshvan and
9348
9352
  * Kislev each have 29 days), and has Passover start on Thursday. */
9349
9353
  // e.g. 5746
9350
- '1201': empty.concat(51, 52, CHMSUKOT, range$1(0, 27), CHMPESACH, range$1(28, 40), D(41), range$1(43, 49), D(50)),
9354
+ '1201': yearStartVayeilech.concat(r027, CHMPESACH, range$1(28, 40), D(41), r4349, D(50)),
9351
9355
  /* Hebrew year that starts on Monday, is `complete' (Heshvan and
9352
9356
  * Kislev each have 30 days), and has Passover start on Saturday. */
9353
9357
  // e.g.5752
9354
- '1220': empty.concat(51, 52, CHMSUKOT, range$1(0, 27), PESACH1, PESACH8, range$1(28, 40), D(41), range$1(43, 50)),
9358
+ '1220': yearStartVayeilech.concat(r027, PESACH1, PESACH8, range$1(28, 40), D(41), r4350),
9355
9359
  /* Hebrew year that starts on Monday, is `complete' (Heshvan and
9356
9360
  * Kislev each have 30 days), and has Passover start on Saturday. */
9357
9361
  // e.g.5752
9358
- '1221': empty.concat(51, 52, CHMSUKOT, range$1(0, 27), PESACH, range$1(28, 50)),
9362
+ '1221': yearStartVayeilech.concat(r027, PESACH, range$1(28, 50)),
9359
9363
  /* Hebrew year that starts on Thursday, is `incomplete' (Heshvan and
9360
9364
  * Kislev both have 29 days), and has Passover start on Sunday. */
9361
9365
  // e.g. 5768
9362
- '150': empty.concat(52, YK, CHMSUKOT, range$1(0, 28), PESACH7, range$1(29, 50)),
9366
+ '150': yearStartHaazinu.concat(range$1(0, 28), PESACH7, range$1(29, 50)),
9363
9367
  /* Hebrew year that starts on Thursday, is `complete' (Heshvan and
9364
9368
  * Kislev both have 30 days), and has Passover start on Tuesday. */
9365
9369
  // eg. 5771
9366
- '152': empty.concat(52, YK, CHMSUKOT, range$1(0, 28), CHMPESACH, range$1(29, 49), D(50)),
9370
+ '152': yearStartHaazinu.concat(range$1(0, 28), CHMPESACH, range$1(29, 49), D(50)),
9367
9371
  /* Hebrew year that starts on Saturday, is `incomplete' (Heshvan and
9368
9372
  * Kislev each have 29 days), and has Passover start on Tuesday. */
9369
9373
  // e.g.5757
9370
- '170': empty.concat(RH, 52, SUKKOT, SHMINI, range$1(0, 27), CHMPESACH, range$1(28, 40), D(41), range$1(43, 49), D(50)),
9374
+ '170': yearStartRH.concat(r027, CHMPESACH, range$1(28, 40), D(41), r4349, D(50)),
9371
9375
  /* Hebrew year that starts on Saturday, is `complete' (Heshvan and
9372
9376
  * Kislev each have 30 days), and has Passover start on Thursday. */
9373
- '1720': empty.concat(RH, 52, SUKKOT, SHMINI, range$1(0, 27), CHMPESACH, range$1(28, 33), SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), range$1(43, 49), D(50)),
9377
+ '1720': yearStartRH.concat(r027, CHMPESACH, range$1(28, 33), SHAVUOT$1, range$1(34, 37), D(38), 40, D(41), r4349, D(50)),
9374
9378
  };
9375
9379
  /* Hebrew year that starts on Monday, is `complete' (Heshvan and
9376
9380
  * Kislev each have 30 days), and has Passover start on Thursday. */
@@ -9394,6 +9398,8 @@ types['1311'] = types['1221'];
9394
9398
  types['1721'] = types['170'];
9395
9399
  const sedraCache = new QuickLRU({ maxSize: 400 });
9396
9400
  /**
9401
+ * Convenience function to create an instance of `Sedra` or reuse a previously
9402
+ * created and cached instance.
9397
9403
  * @private
9398
9404
  * @param {number} hyear
9399
9405
  * @param {boolean} il
@@ -10058,7 +10064,7 @@ class DailyLearning {
10058
10064
  }
10059
10065
 
10060
10066
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
10061
- const version = '5.4.4';
10067
+ const version = '5.4.5';
10062
10068
 
10063
10069
  /* eslint-disable max-len */
10064
10070
  /**
@@ -1,2 +1,2 @@
1
1
  /** DO NOT EDIT THIS AUTO-GENERATED FILE! */
2
- export declare const version = "5.4.4";
2
+ export declare const version = "5.4.5";
package/dist/sedra.d.ts CHANGED
@@ -91,6 +91,8 @@ export declare class Sedra {
91
91
  export declare const parshiot: string[];
92
92
  type NumberOrString = number | string;
93
93
  /**
94
+ * Convenience function to create an instance of `Sedra` or reuse a previously
95
+ * created and cached instance.
94
96
  * @private
95
97
  * @param {number} hyear
96
98
  * @param {boolean} il
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/core",
3
- "version": "5.4.4",
3
+ "version": "5.4.5",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "contributors": [
6
6
  "Eyal Schachter (https://github.com/Scimonster)",
@@ -66,24 +66,24 @@
66
66
  "temporal-polyfill": "^0.2.4"
67
67
  },
68
68
  "devDependencies": {
69
- "@babel/core": "^7.24.6",
70
- "@babel/preset-env": "^7.24.6",
71
- "@babel/preset-typescript": "^7.24.6",
69
+ "@babel/core": "^7.24.7",
70
+ "@babel/preset-env": "^7.24.7",
71
+ "@babel/preset-typescript": "^7.24.7",
72
72
  "@babel/register": "^7.24.6",
73
73
  "@rollup/plugin-babel": "^6.0.4",
74
- "@rollup/plugin-commonjs": "^25.0.8",
74
+ "@rollup/plugin-commonjs": "^26.0.1",
75
75
  "@rollup/plugin-json": "^6.1.0",
76
76
  "@rollup/plugin-node-resolve": "^15.2.3",
77
77
  "@rollup/plugin-terser": "^0.4.4",
78
78
  "@rollup/plugin-typescript": "^11.1.6",
79
79
  "@types/jest": "^29.5.12",
80
80
  "core-js": "^3.37.1",
81
- "eslint": "^8.57.0",
81
+ "eslint": "<=8.57.0",
82
82
  "eslint-config-google": "^0.14.0",
83
83
  "jest": "^29.7.0",
84
84
  "jsdoc": "^4.0.3",
85
85
  "jsdoc-to-markdown": "^8.0.1",
86
- "quick-lru": "^7.0.0",
86
+ "quick-lru": "<=6.1.2",
87
87
  "rollup": "^4.18.0",
88
88
  "ttag-cli": "^1.10.12",
89
89
  "typescript": "^5.4.5"
@@ -91,6 +91,6 @@
91
91
  "dependencies": {
92
92
  "@hebcal/hdate": "^0.10.1",
93
93
  "@hebcal/noaa": "^0.8.14",
94
- "tslib": "^2.6.2"
94
+ "tslib": "^2.6.3"
95
95
  }
96
96
  }