Skip to content

Commit

Permalink
Updated all dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Akumzy committed Jun 7, 2019
1 parent 4e01750 commit 5a2dd08
Show file tree
Hide file tree
Showing 8 changed files with 4,011 additions and 1,728 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["env"]
"presets": ["@babel/env"]
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
.DS_Store
write-event.js
output.ics
dist/
dist/
package-lock.json
5,680 changes: 3,982 additions & 1,698 deletions package-lock.json

Large diffs are not rendered by default.

29 changes: 13 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "iCal (ics) file generator",
"main": "index.js",
"scripts": {
"start": "mocha --compilers js:babel-core/register --watch --recursive",
"test": "mocha --compilers js:babel-core/register --recursive",
"start": "mocha --require @babel/register --watch --recursive",
"test": "mocha --require @babel/register --recursive",
"build": "rm -r dist; gulp build"
},
"repository": {
Expand All @@ -28,24 +28,21 @@
"bugs": {
"url": "https://github.com/adamgibbons/ics/issues"
},
"babel": {
"presets": [
"es2015"
]
},
"homepage": "https://github.com/adamgibbons/ics",
"devDependencies": {
"babel-preset-env": "^1.6.0",
"chai": "^4.1.1",
"gulp": "^3.0.0",
"gulp-babel": "^6.1.2",
"mocha": "^5.2.0"
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@babel/register": "^7.4.4",
"chai": "^4.2.0",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0-beta.2",
"mocha": "^6.1.4"
},
"dependencies": {
"joi": "^14.0.1",
"lodash": "^4.17.4",
"moment": "^2.18.1",
"uuid": "^3.1.0"
"@hapi/joi": "^15.0.3",
"lodash": "^4.17.11",
"moment": "^2.24.0",
"uuid": "^3.3.2"
},
"files": [
"dist/"
Expand Down
15 changes: 8 additions & 7 deletions src/pipeline/build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import _ from 'lodash'
import defaultAttributes from '../defaults'
import pickBy from "lodash/pickBy";
import identity from "lodash/identity";
import defaultAttributes from "../defaults";

export default function buildEvent (attributes = {}) {
export default function buildEvent(attributes = {}) {
const {
title,
productId,
Expand All @@ -22,13 +23,13 @@ export default function buildEvent (attributes = {}) {
attendees,
alarms,
recurrenceRule
} = attributes
} = attributes;

// fill in default values where necessary
const output = Object.assign({}, defaultAttributes, attributes)
const output = Object.assign({}, defaultAttributes, attributes);

// remove falsey values
const cleanOutput = _.pickBy(output, _.identity)
const cleanOutput = pickBy(output, identity);

return cleanOutput
return cleanOutput;
}
4 changes: 2 additions & 2 deletions src/pipeline/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
formatDuration,
foldLine
} from '../utils'
import _ from 'lodash'
import isEqual from 'lodash/isEqual'

export default function formatEvent(attributes = {}) {
const {
Expand Down Expand Up @@ -51,7 +51,7 @@ export default function formatEvent(attributes = {}) {
icsFormat += `DTSTART${start && start.length == 3 ? ";VALUE=DATE" : ""}:${setDate(start, startType)}\r\n`

// End is not required for all day events on single days (like anniversaries)
if (!(_.isEqual(start, end) && end && end.length == 3)) {
if (!(isEqual(start, end) && end && end.length == 3)) {
if (end && end.length == 3) {
icsFormat += `DTEND;VALUE=DATE:${setDate(end, startType)}\r\n`;
} else if (end) {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Joi from 'joi'
import Joi from '@hapi/joi'

const dateTimeSchema = Joi.array().min(3).max(7).ordered(
Joi.number().integer(),
Expand Down
4 changes: 2 additions & 2 deletions src/utils/set-alarm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import setDate from './set-date'
import foldLine from './fold-line'
import _ from 'lodash'
import isArray from 'lodash/isArray'

function setDuration ({
weeks,
Expand All @@ -22,7 +22,7 @@ function setDuration ({

function setTrigger (trigger) {
let formattedString = ''
if(_.isArray(trigger)){
if(isArray(trigger)){
formattedString = `TRIGGER;VALUE=DATE-TIME:${setDate(trigger)}\r\n`
}else{
let alert = trigger.before ? '-' : ''
Expand Down

0 comments on commit 5a2dd08

Please sign in to comment.