Socket
Socket
Sign inDemoInstall

@hebcal/icalendar

Package Overview
Dependencies
20
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.21.0 to 4.22.0

62

dist/index.js

@@ -1,2 +0,2 @@

/*! @hebcal/icalendar v4.21.0 */
/*! @hebcal/icalendar v4.22.0 */
'use strict';

@@ -9,3 +9,3 @@

const version="4.21.0";
const version="4.22.0";

@@ -47,3 +47,3 @@ const VTIMEZONE = {};

* @param {string} url
* @param {HebrewCalendar.Options} options
* @param {CalOptions} options
* @return {string}

@@ -70,3 +70,3 @@ */

* @param {Event} ev
* @param {HebrewCalendar.Options} options
* @param {CalOptions} options
*/

@@ -96,3 +96,3 @@ constructor(ev, options = {}) {

this.locationName = core.Locale.gettext('Mishna Yomi');
} else if (timed && options.location && options.location.name) {
} else if (timed && options.location?.name) {
const comma = options.location.name.indexOf(',');

@@ -112,3 +112,3 @@ this.locationName = comma == -1 ? options.location.name : options.location.name.substring(0, comma);

this.endDate = this.startDate;
if (options.location && options.location.tzid) {
if (options.location?.tzid) {
this.dtargs = `;TZID=${options.location.tzid}`;

@@ -325,3 +325,3 @@ }

* @param {Event} ev
* @param {HebrewCalendar.Options} options
* @param {CalOptions} options
* @return {string} multi-line result, delimited by \r\n

@@ -363,14 +363,14 @@ */

* @param {Event} e
* @param {HebrewCalendar.Options} options
* @param {CalOptions} options
* @return {string}
*/
function createMemo(e, options) {
let memo = e.memo;
if (typeof memo === 'string' && memo.length && memo.indexOf('\n') !== -1) {
memo = memo.replace(/\n/g, '\\n');
}
const desc = e.getDesc();
const candles = desc === 'Havdalah' || desc === 'Candle lighting';
if (typeof e.memo === 'string' && e.memo.length && e.memo.indexOf('\n') !== -1) {
e.memo = e.memo.replace(/\n/g, '\\n');
if (desc === 'Havdalah' || desc === 'Candle lighting') {
return memo || '';
}
if (candles) {
return e.memo || '';
}
const mask = e.getFlags();

@@ -383,20 +383,22 @@ if (mask & core.flags.OMER_COUNT) {

const torahMemo = makeTorahMemo(e, options.il);
if (mask & core.flags.PARSHA_HASHAVUA) {
return torahMemo + '\\n\\n' + url;
} else {
let memo = e.memo || restApi.getHolidayDescription(e);
if (!memo && typeof e.linkedEvent !== 'undefined') {
if (!memo) {
if (typeof e.linkedEvent !== 'undefined') {
memo = e.linkedEvent.render(options.locale);
} else {
memo = restApi.getHolidayDescription(e);
}
if (torahMemo) {
memo += '\\n\\n' + torahMemo;
}
if (torahMemo) {
if (memo.length) {
memo += '\\n\\n';
}
if (url) {
if (memo.length) {
memo += '\\n\\n';
}
memo += url;
memo += torahMemo;
}
if (url) {
if (memo.length) {
memo += '\\n\\n';
}
return memo;
memo += url;
}
return memo;
}

@@ -407,3 +409,3 @@

* @param {Event[]} events
* @param {HebrewCalendar.Options} options
* @param {CalOptions} options
* @return {Promise<string>}

@@ -426,3 +428,3 @@ */

* @param {IcalEvent[]} icals
* @param {HebrewCalendar.Options} options
* @param {CalOptions} options
* @return {Promise<string>}

@@ -457,3 +459,3 @@ */

const location = opts.location;
if (location && location.tzid) {
if (location?.tzid) {
const tzid = location.tzid;

@@ -460,0 +462,0 @@ stream.push(`X-WR-TIMEZONE;VALUE=TEXT:${tzid}\r\n`);

{
"name": "@hebcal/icalendar",
"version": "4.21.0",
"version": "4.22.0",
"author": "Michael J. Radwin (https://github.com/mjradwin)",

@@ -14,6 +14,2 @@ "keywords": [

"module": "dist/index.mjs",
"exports": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"typings": "icalendar.d.ts",

@@ -32,4 +28,4 @@ "files": [

"dependencies": {
"@hebcal/core": "^4.1.1",
"@hebcal/rest-api": "^4.5.1",
"@hebcal/core": "^4.4.1",
"@hebcal/rest-api": "^4.5.7",
"murmurhash3": "^0.5.0"

@@ -51,16 +47,16 @@ },

"devDependencies": {
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/register": "^7.22.5",
"@hebcal/learning": "^1.4.0",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^25.0.2",
"@rollup/plugin-json": "^6.0.0",
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/register": "^7.22.15",
"@hebcal/learning": "^1.5.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"ava": "^5.3.1",
"eslint": "^8.44.0",
"eslint": "^8.51.0",
"eslint-config-google": "^0.14.0",
"jsdoc": "^4.0.2",
"jsdoc-to-markdown": "^8.0.0",
"rollup": "^3.26.0"
"rollup": "^4.1.4"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc