From dd5b87f00f249494067000faecfab36c6ed2b6ef Mon Sep 17 00:00:00 2001 From: "Michael J. Radwin" Date: Sun, 5 Nov 2023 08:50:32 -0800 Subject: [PATCH] Fix definition of const enum flags in .d.ts (#357) --- hebcal.d.ts | 77 +++++++++++++++++++--------- package-lock.json | 128 +++++++++++++++++++++++----------------------- package.json | 6 +-- 3 files changed, 119 insertions(+), 92 deletions(-) diff --git a/hebcal.d.ts b/hebcal.d.ts index fb00848..d54f4b6 100644 --- a/hebcal.d.ts +++ b/hebcal.d.ts @@ -41,31 +41,58 @@ declare module '@hebcal/core' { * Holiday flags for Event */ export const enum flags { - CHAG, - LIGHT_CANDLES, - YOM_TOV_ENDS, - CHUL_ONLY, - IL_ONLY, - LIGHT_CANDLES_TZEIS, - CHANUKAH_CANDLES, - ROSH_CHODESH, - MINOR_FAST, - SPECIAL_SHABBAT, - PARSHA_HASHAVUA, - DAF_YOMI, - OMER_COUNT, - MODERN_HOLIDAY, - MAJOR_FAST, - SHABBAT_MEVARCHIM, - MOLAD, - USER_EVENT, - HEBREW_DATE, - MINOR_HOLIDAY, - EREV, - CHOL_HAMOED, - MISHNA_YOMI, - YERUSHALMI_YOMI, - NACH_YOMI, + /** Chag, yontiff, yom tov */ + CHAG = 0x000001, + /** Light candles 18 minutes before sundown */ + LIGHT_CANDLES = 0x000002, + /** End of holiday (end of Yom Tov) */ + YOM_TOV_ENDS = 0x000004, + /** Observed only in the Diaspora (chutz l'aretz) */ + CHUL_ONLY = 0x000008, + /** Observed only in Israel */ + IL_ONLY = 0x000010, + /** Light candles in the evening at Tzeit time (3 small stars) */ + LIGHT_CANDLES_TZEIS = 0x000020, + /** Candle-lighting for Chanukah */ + CHANUKAH_CANDLES = 0x000040, + /** Rosh Chodesh, beginning of a new Hebrew month */ + ROSH_CHODESH = 0x000080, + /** Minor fasts like Tzom Tammuz, Ta'anit Esther, ... */ + MINOR_FAST = 0x000100, + /** Shabbat Shekalim, Zachor, ... */ + SPECIAL_SHABBAT = 0x000200, + /** Weekly sedrot on Saturdays */ + PARSHA_HASHAVUA = 0x000400, + /** Daily page of Talmud (Bavli) */ + DAF_YOMI = 0x000800, + /** Days of the Omer */ + OMER_COUNT = 0x001000, + /** Yom HaShoah, Yom HaAtzma'ut, ... */ + MODERN_HOLIDAY = 0x002000, + /** Yom Kippur and Tish'a B'Av */ + MAJOR_FAST = 0x004000, + /** On the Saturday before Rosh Chodesh */ + SHABBAT_MEVARCHIM = 0x008000, + /** Molad */ + MOLAD = 0x010000, + /** Yahrzeit or Hebrew Anniversary */ + USER_EVENT = 0x020000, + /** Daily Hebrew date ("11th of Sivan, 5780") */ + HEBREW_DATE = 0x040000, + /** A holiday that's not major, modern, rosh chodesh, or a fast day */ + MINOR_HOLIDAY = 0x080000, + /** Evening before a major or minor holiday */ + EREV = 0x100000, + /** Chol haMoed, intermediate days of Pesach or Sukkot */ + CHOL_HAMOED = 0x200000, + /** Mishna Yomi */ + MISHNA_YOMI = 0x400000, + /** Yom Kippur Katan, minor day of atonement on the day preceeding each Rosh Chodesh */ + YOM_KIPPUR_KATAN = 0x800000, + /** Daily page of Jerusalem Talmud (Yerushalmi) */ + YERUSHALMI_YOMI = 0x1000000, + /** Nach Yomi */ + NACH_YOMI = 0x2000000, } export type UnitTypeShort = 'd' | 'w' | 'M' | 'y'; diff --git a/package-lock.json b/package-lock.json index 9b7fa63..9872f9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,12 +20,12 @@ "@rollup/plugin-terser": "^0.4.4", "ava": "^5.3.1", "core-js": "^3.33.2", - "eslint": "^8.52.0", + "eslint": "^8.53.0", "eslint-config-google": "^0.14.0", "jsdoc": "^4.0.2", "jsdoc-to-markdown": "^8.0.0", "nyc": "^15.1.0", - "rollup": "^4.2.0", + "rollup": "^4.3.0", "ttag-cli": "^1.10.6" }, "engines": { @@ -2063,9 +2063,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -2113,9 +2113,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", - "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", + "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2514,9 +2514,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.2.0.tgz", - "integrity": "sha512-8PlggAxGxavr+pkCNeV1TM2wTb2o+cUWDg9M1cm9nR27Dsn287uZtSLYXoQqQcmq+sYfF7lHfd3sWJJinH9GmA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.3.0.tgz", + "integrity": "sha512-/4pns6BYi8MXdwnXM44yoGAcFYVHL/BYlB2q1HXZ6AzH++LaiEVWFpBWQ/glXhbMbv3E3o09igrHFbP/snhAvA==", "cpu": [ "arm" ], @@ -2527,9 +2527,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.2.0.tgz", - "integrity": "sha512-+71T85hbMFrJI+zKQULNmSYBeIhru55PYoF/u75MyeN2FcxE4HSPw20319b+FcZ4lWx2Nx/Ql9tN+hoaD3GH/A==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.3.0.tgz", + "integrity": "sha512-nLO/JsL9idr416vzi3lHm3Xm+QZh4qHij8k3Er13kZr5YhL7/+kBAx84kDmPc7HMexLmwisjDCeDIKNFp8mDlQ==", "cpu": [ "arm64" ], @@ -2540,9 +2540,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.2.0.tgz", - "integrity": "sha512-IIIQLuG43QIElT1JZqUP/zqIdiJl4t9U/boa0GZnQTw9m1X0k3mlBuysbgYXeloLT1RozdL7bgw4lpSaI8GOXw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.3.0.tgz", + "integrity": "sha512-dGhVBlllt4iHwTGy21IEoMOTN5wZoid19zEIxsdY29xcEiOEHqzDa7Sqrkh5OE7LKCowL61eFJXxYe/+pYa7ZQ==", "cpu": [ "arm64" ], @@ -2553,9 +2553,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.2.0.tgz", - "integrity": "sha512-BXcXvnLaea1Xz900omrGJhxHFJfH9jZ0CpJuVsbjjhpniJ6qiLXz3xA8Lekaa4MuhFcJd4f0r+Ky1G4VFbYhWw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.3.0.tgz", + "integrity": "sha512-h8wRfHeLEbU3NzaP1Oku7BYXCJQiTRr+8U0lklyOQXxXiEpHLL8tk1hFl+tezoRKLcPJD7joKaK74ASsqt3Ekg==", "cpu": [ "x64" ], @@ -2566,9 +2566,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.2.0.tgz", - "integrity": "sha512-f4K3MKw9Y4AKi4ANGnmPIglr+S+8tO858YrGVuqAHXxJdVghBmz9CPU9kDpOnGvT4g4vg5uNyIFpOOFvffXyMA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.3.0.tgz", + "integrity": "sha512-wP4VgR/gfV18sylTuym3sxRTkAgUR2vh6YLeX/GEznk5jCYcYSlx585XlcUcl0c8UffIZlRJ09raWSX3JDb4GA==", "cpu": [ "arm" ], @@ -2579,9 +2579,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.2.0.tgz", - "integrity": "sha512-bNsTYQBgp4H7w6cT7FZhesxpcUPahsSIy4NgdZjH1ZwEoZHxi4XKglj+CsSEkhsKi+x6toVvMylhjRKhEMYfnA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.3.0.tgz", + "integrity": "sha512-v/14JCYVkqRSJeQbxFx4oUkwVQQw6lFMN7bd4vuARBc3X2lmomkxBsc+BFiIDL/BK+CTx5AOh/k9XmqDnKWRVg==", "cpu": [ "arm64" ], @@ -2592,9 +2592,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.2.0.tgz", - "integrity": "sha512-Jp1NxBJpGLuxRU2ihrQk4IZ+ia5nffobG6sOFUPW5PMYkF0kQtxEbeDuCa69Xif211vUOcxlOnf5IOEIpTEySA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.3.0.tgz", + "integrity": "sha512-tNhfYqFH5OxtRzfkTOKdgFYlPSZnlDLNW4+leNEvQZhwTJxoTwsZAAhR97l3qVry/kkLyJPBK+Q8EAJLPinDIg==", "cpu": [ "arm64" ], @@ -2605,9 +2605,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.2.0.tgz", - "integrity": "sha512-3p3iRtQmv2aXw+vtKNyZMLOQ+LSRsqArXjKAh2Oj9cqwfIRe7OXvdkOzWfZOIp1F/x5KJzVAxGxnniF4cMbnsQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.3.0.tgz", + "integrity": "sha512-pw77m8QywdsoFdFOgmc8roF1inBI0rciqzO8ffRUgLoq7+ee9o5eFqtEcS6hHOOplgifAUUisP8cAnwl9nUYPw==", "cpu": [ "x64" ], @@ -2618,9 +2618,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.2.0.tgz", - "integrity": "sha512-atih7IF/reUZe4LBLC5Izd44hth2tfDIG8LaPp4/cQXdHh9jabcZEvIeRPrpDq0i/Uu487Qu5gl5KwyAnWajnw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.3.0.tgz", + "integrity": "sha512-tJs7v2MnV2F8w6X1UpPHl/43OfxjUy9SuJ2ZPoxn79v9vYteChVYO/ueLHCpRMmyTUIVML3N9z4azl9ENH8Xxg==", "cpu": [ "x64" ], @@ -2631,9 +2631,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.2.0.tgz", - "integrity": "sha512-vYxF3tKJeUE4ceYzpNe2p84RXk/fGK30I8frpRfv/MyPStej/mRlojztkN7Jtd1014HHVeq/tYaMBz/3IxkxZw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.3.0.tgz", + "integrity": "sha512-OKGxp6kATQdTyI2DF+e9s+hB3/QZB45b6e+dzcfW1SUqiF6CviWyevhmT4USsMEdP3mlpC9zxLz3Oh+WaTMOSw==", "cpu": [ "arm64" ], @@ -2644,9 +2644,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.2.0.tgz", - "integrity": "sha512-1LZJ6zpl93SaPQvas618bMFarVwufWTaczH4ESAbFcwiC4OtznA6Ym+hFPyIGaJaGEB8uMWWac0uXGPXOg5FGA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.3.0.tgz", + "integrity": "sha512-DDZ5AH68JJ2ClQFEA1aNnfA7Ybqyeh0644rGbrLOdNehTmzfICHiWSn0OprzYi9HAshTPQvlwrM+bi2kuaIOjQ==", "cpu": [ "ia32" ], @@ -2657,9 +2657,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.2.0.tgz", - "integrity": "sha512-dgQfFdHCNg08nM5zBmqxqc9vrm0DVzhWotpavbPa0j4//MAOKZEB75yGAfzQE9fUJ+4pvM1239Y4IhL8f6sSog==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.3.0.tgz", + "integrity": "sha512-dMvGV8p92GQ8jhNlGIKpyhVZPzJlT258pPrM5q2F8lKcc9Iv9BbfdnhX1OfinYWnb9ms5zLw6MlaMnqLfUkKnQ==", "cpu": [ "x64" ], @@ -4332,15 +4332,15 @@ } }, "node_modules/eslint": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", - "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", + "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.52.0", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.53.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -8160,9 +8160,9 @@ } }, "node_modules/rollup": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.2.0.tgz", - "integrity": "sha512-deaMa9Z+jPVeBD2dKXv+h7EbdKte9++V2potc/ADqvVgEr6DEJ3ia9u0joarjC2lX/ubaCRYz3QVx0TzuVqAJA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.3.0.tgz", + "integrity": "sha512-scIi1NrKLDIYSPK66jjECtII7vIgdAMFmFo8h6qm++I6nN9qDSV35Ku6erzGVqYjx+lj+j5wkusRMr++8SyDZg==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -8172,18 +8172,18 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.2.0", - "@rollup/rollup-android-arm64": "4.2.0", - "@rollup/rollup-darwin-arm64": "4.2.0", - "@rollup/rollup-darwin-x64": "4.2.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.2.0", - "@rollup/rollup-linux-arm64-gnu": "4.2.0", - "@rollup/rollup-linux-arm64-musl": "4.2.0", - "@rollup/rollup-linux-x64-gnu": "4.2.0", - "@rollup/rollup-linux-x64-musl": "4.2.0", - "@rollup/rollup-win32-arm64-msvc": "4.2.0", - "@rollup/rollup-win32-ia32-msvc": "4.2.0", - "@rollup/rollup-win32-x64-msvc": "4.2.0", + "@rollup/rollup-android-arm-eabi": "4.3.0", + "@rollup/rollup-android-arm64": "4.3.0", + "@rollup/rollup-darwin-arm64": "4.3.0", + "@rollup/rollup-darwin-x64": "4.3.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.3.0", + "@rollup/rollup-linux-arm64-gnu": "4.3.0", + "@rollup/rollup-linux-arm64-musl": "4.3.0", + "@rollup/rollup-linux-x64-gnu": "4.3.0", + "@rollup/rollup-linux-x64-musl": "4.3.0", + "@rollup/rollup-win32-arm64-msvc": "4.3.0", + "@rollup/rollup-win32-ia32-msvc": "4.3.0", + "@rollup/rollup-win32-x64-msvc": "4.3.0", "fsevents": "~2.3.2" } }, diff --git a/package.json b/package.json index 358c0d6..44f3ad7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hebcal/core", - "version": "4.5.0", + "version": "4.5.1", "author": "Michael J. Radwin (https://github.com/mjradwin)", "contributors": [ "Eyal Schachter (https://github.com/Scimonster)", @@ -71,12 +71,12 @@ "@rollup/plugin-terser": "^0.4.4", "ava": "^5.3.1", "core-js": "^3.33.2", - "eslint": "^8.52.0", + "eslint": "^8.53.0", "eslint-config-google": "^0.14.0", "jsdoc": "^4.0.2", "jsdoc-to-markdown": "^8.0.0", "nyc": "^15.1.0", - "rollup": "^4.2.0", + "rollup": "^4.3.0", "ttag-cli": "^1.10.6" } }