Commit 81e73777 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

Merge branch 'MLAB-677' into 'testing'

MLAB-677: re-update node_modules

See merge request !166
parents f83b6c2a d2022f73
Pipeline #6894 passed with stage
in 6 seconds
......@@ -40,8 +40,8 @@ exports["default"] = /*istanbul ignore end*/function (start, minLine, maxLine) {
return iterator();
}
// We tried to fit hunk before text beginning and beyond text length, then
// We tried to fit hunk before text beginning and beyond text lenght, then
// hunk can't fit on the text. Return undefined
};
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2Rpc3RhbmNlLWl0ZXJhdG9yLmpzIl0sIm5hbWVzIjpbInN0YXJ0IiwibWluTGluZSIsIm1heExpbmUiLCJ3YW50Rm9yd2FyZCIsImJhY2t3YXJkRXhoYXVzdGVkIiwiZm9yd2FyZEV4aGF1c3RlZCIsImxvY2FsT2Zmc2V0IiwiaXRlcmF0b3IiXSwibWFwcGluZ3MiOiI7Ozs7NENBR2UsVUFBU0EsS0FBVCxFQUFnQkMsT0FBaEIsRUFBeUJDLE9BQXpCLEVBQWtDO0FBQy9DLE1BQUlDLGNBQWMsSUFBbEI7QUFBQSxNQUNJQyxvQkFBb0IsS0FEeEI7QUFBQSxNQUVJQyxtQkFBbUIsS0FGdkI7QUFBQSxNQUdJQyxjQUFjLENBSGxCOztBQUtBLFNBQU8sU0FBU0MsUUFBVCxHQUFvQjtBQUN6QixRQUFJSixlQUFlLENBQUNFLGdCQUFwQixFQUFzQztBQUNwQyxVQUFJRCxpQkFBSixFQUF1QjtBQUNyQkU7QUFDRCxPQUZELE1BRU87QUFDTEgsc0JBQWMsS0FBZDtBQUNEOztBQUVEO0FBQ0E7QUFDQSxVQUFJSCxRQUFRTSxXQUFSLElBQXVCSixPQUEzQixFQUFvQztBQUNsQyxlQUFPSSxXQUFQO0FBQ0Q7O0FBRURELHlCQUFtQixJQUFuQjtBQUNEOztBQU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mb3J3YXJkRXhoYXVzdGVkKSB7XG4gICAgICAgIHdhbnRGb3J3YXJkID0gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgLy8gQ2hlY2sgaWYgdHJ5aW5nIHRvIGZpdCBiZWZvcmUgdGV4dCBiZWdpbm5pbmcsIGFuZCBpZiBub3QsIGNoZWNrIGl0IGZpdHNcbiAgICAgIC8vIGJlZm9yZSBvZmZzZXQgbG9jYXRpb25cbiAgICAgIGlmIChtaW5MaW5lIDw9IHN0YXJ0IC0gbG9jYWxPZmZzZXQpIHtcbiAgICAgICAgcmV0dXJuIC1sb2NhbE9mZnNldCsrO1xuICAgICAgfVxuXG4gICAgICBiYWNrd2FyZEV4aGF1c3RlZCA9IHRydWU7XG4gICAgICByZXR1cm4gaXRlcmF0b3IoKTtcbiAgICB9XG5cbiAgICAvLyBXZSB0cmllZCB0byBmaXQgaHVuayBiZWZvcmUgdGV4dCBiZWdpbm5pbmcgYW5kIGJleW9uZCB0ZXh0IGxlbmdodCwgdGhlblxuICAgIC8vIGh1bmsgY2FuJ3QgZml0IG9uIHRoZSB0ZXh0LiBSZXR1cm4gdW5kZWZpbmVkXG4gIH07XG59XG4iXX0=
......@@ -15,4 +15,4 @@ function generateOptions(options, defaults) {
}
return defaults;
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL3BhcmFtcy5qcyJdLCJuYW1lcyI6WyJnZW5lcmF0ZU9wdGlvbnMiLCJvcHRpb25zIiwiZGVmYXVsdHMiLCJjYWxsYmFjayIsIm5hbWUiLCJoYXNPd25Qcm9wZXJ0eSJdLCJtYXBwaW5ncyI6Ijs7O2dDQUFnQkEsZSxHQUFBQSxlO0FBQVQsU0FBU0EsZUFBVCxDQUF5QkMsT0FBekIsRUFBa0NDLFFBQWxDLEVBQTRDO0FBQ2pELE1BQUksT0FBT0QsT0FBUCxLQUFtQixVQUF2QixFQUFtQztBQUN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FQLEtBQW1CLFVBQXZCLEVBQW1DO0FBQ2pDLGFBQVMsUUFBVCxHQUFvQixPQUFwQjtBQUNELEdBRkQsTUFFTyxJQUFJLE9BQUosRUFBYTtBQUNsQixTQUFLLElBQUksSUFBVCxJQUFpQixPQUFqQixFQUEwQjs7QUFFeEIsVUFBSSxRQUFRLGNBQVIsQ0FBdUIsSUFBdkIsQ0FBSixFQUFrQztBQUNoQyxpQkFBUyxJQUFULElBQWlCLFFBQVEsSUFBUixDQUFqQjtBQUNEO0FBQ0Y7QUFDRjtBQUNELFNBQU8sUUFBUDtBQUNEIiwiZmlsZSI6InBhcmFtcy5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBnZW5lcmF0ZU9wdGlvbnMob3B0aW9ucywgZGVmYXVsdHMpIHtcbiAgaWYgKHR5cGVvZiBvcHRpb25zID09PSAnZnVuY3Rpb24nKSB7XG4gICAgZGVmYXVsdHMuY2FsbGJhY2sgPSBvcHRpb25zO1xuICB9IGVsc2UgaWYgKG9wdGlvbnMpIHtcbiAgICBmb3IgKGxldCBuYW1lIGluIG9wdGlvbnMpIHtcbiAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICBpZiAob3B0aW9ucy5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xuICAgICAgICBkZWZhdWx0c1tuYW1lXSA9IG9wdGlvbnNbbmFtZV07XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHJldHVybiBkZWZhdWx0cztcbn1cbiJdfQ==
{
"name": "diff",
"version": "3.5.0",
"version": "3.2.0",
"description": "A javascript text diff implementation.",
"keywords": [
"diff",
......@@ -22,7 +22,6 @@
"node": ">=0.3.1"
},
"main": "./lib",
"browser": "./dist/diff.js",
"scripts": {
"test": "grunt"
},
......@@ -63,5 +62,14 @@
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.0"
},
"optionalDependencies": {}
"optionalDependencies": {},
"babel": {
"sourceMaps": "inline",
"presets": [
"es3",
"es2015-mod"
],
"auxiliaryCommentBefore": "istanbul ignore start",
"auxiliaryCommentAfter": "istanbul ignore end"
}
}
......@@ -2,58 +2,7 @@
## Development
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.5.0...master)
## v3.5.0 - March 4th, 2018
- Omit redundant slice in join method of diffArrays - 1023590
- Support patches with empty lines - fb0f208
- Accept a custom JSON replacer function for JSON diffing - 69c7f0a
- Optimize parch header parser - 2aec429
- Fix typos - e89c832
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.5.0...v3.5.0)
## v3.5.0 - March 4th, 2018
- Omit redundant slice in join method of diffArrays - 1023590
- Support patches with empty lines - fb0f208
- Accept a custom JSON replacer function for JSON diffing - 69c7f0a
- Optimize parch header parser - 2aec429
- Fix typos - e89c832
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.4.0...v3.5.0)
## v3.4.0 - October 7th, 2017
- [#183](https://github.com/kpdecker/jsdiff/issues/183) - Feature request: ability to specify a custom equality checker for `diffArrays`
- [#173](https://github.com/kpdecker/jsdiff/issues/173) - Bug: diffArrays gives wrong result on array of booleans
- [#158](https://github.com/kpdecker/jsdiff/issues/158) - diffArrays will not compare the empty string in array?
- comparator for custom equality checks - 30e141e
- count oldLines and newLines when there are conflicts - 53bf384
- Fix: diffArrays can compare falsey items - 9e24284
- Docs: Replace grunt with npm test - 00e2f94
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.1...v3.4.0)
## v3.3.1 - September 3rd, 2017
- [#141](https://github.com/kpdecker/jsdiff/issues/141) - Cannot apply patch because my file delimiter is "/r/n" instead of "/n"
- [#192](https://github.com/kpdecker/jsdiff/pull/192) - Fix: Bad merge when adding new files (#189)
- correct spelling mistake - 21fa478
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.0...v3.3.1)
## v3.3.0 - July 5th, 2017
- [#114](https://github.com/kpdecker/jsdiff/issues/114) - /patch/merge not exported
- Gracefully accept invalid newStart in hunks, same as patch(1) does. - d8a3635
- Use regex rather than starts/ends with for parsePatch - 6cab62c
- Add browser flag - e64f674
- refactor: simplified code a bit more - 8f8e0f2
- refactor: simplified code a bit - b094a6f
- fix: some corrections re ignoreCase option - 3c78fd0
- ignoreCase option - 3cbfbb5
- Sanitize filename while parsing patches - 2fe8129
- Added better installation methods - aced50b
- Simple export of functionality - 8690f31
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.2.0...v3.3.0)
[Commits](https://github.com/kpdecker/jsdiff/compare/v3.2.0...master)
## v3.2.0 - December 26th, 2016
- [#156](https://github.com/kpdecker/jsdiff/pull/156) - Add `undefinedReplacement` option to `diffJson` ([@ewnd9](https://api.github.com/users/ewnd9))
......@@ -137,7 +86,7 @@ Compatibility notes:
- [#69](https://github.com/kpdecker/jsdiff/issues/69) - Missing count ([@wfalkwallace](https://api.github.com/users/wfalkwallace))
- [#68](https://github.com/kpdecker/jsdiff/issues/68) - diffLines seems broken ([@wfalkwallace](https://api.github.com/users/wfalkwallace))
- [#60](https://github.com/kpdecker/jsdiff/issues/60) - Support multiple diff hunks ([@piranna](https://api.github.com/users/piranna))
- [#54](https://github.com/kpdecker/jsdiff/issues/54) - Feature Request: 3-way merge ([@mog422](https://api.github.com/users/mog422))
- [#54](https://github.com/kpdecker/jsdiff/issues/54) - Feature Reuqest: 3-way merge ([@mog422](https://api.github.com/users/mog422))
- [#42](https://github.com/kpdecker/jsdiff/issues/42) - Fuzz factor for applyPatch ([@stuartpb](https://api.github.com/users/stuartpb))
- Move whitespace ignore out of equals method - 542063c
- Include source maps in babel output - 7f7ab21
......@@ -170,7 +119,7 @@ Compatibility notes:
- [#29](https://github.com/kpdecker/jsdiff/issues/29) - word tokenizer works only for 7 bit ascii ([@plasmagunman](https://api.github.com/users/plasmagunman))
Compatibility notes:
- `this.removeEmpty` is now called automatically for all instances. If this is not desired, this may be overridden on a per instance basis.
- `this.removeEmpty` is now called automatically for all instances. If this is not desired, this may be overriden on a per instance basis.
- The library has been refactored to use some ES6 features. The external APIs should remain the same, but bower projects that directly referenced the repository will now have to point to the [components/jsdiff](https://github.com/components/jsdiff) repository.
[Commits](https://github.com/kpdecker/jsdiff/compare/v1.4.0...v2.0.0)
......
This diff is collapsed.
{
"extends": ["airbnb-base", "eslint:recommended", "plugin:node/recommended"],
"plugins": [
"import",
"node"
],
"rules": {
"no-console": ["error", { "allow": ["warn", "error"] }]
},
"env": {
"node": true,
"es6": true
}
}
This diff is collapsed.
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.8 //
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^let cmd;$/;" variable line:15
which /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function which(name) {$/;" function line:17
loc /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let loc;$/;" variable line:19
len /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ for (let i = 0, len = paths.length; i < len; i += 1) {$/;" variable line:21
loc /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ loc = path.join(paths[i], name);$/;" variable line:22
setupCmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function setupCmd() {$/;" function line:28
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:32
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:32
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-NotificationCenter',$/;" string line:33
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-NotificationCenter',$/;" variable line:33
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'terminal-notifier',$/;" string line:34
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'terminal-notifier',$/;" variable line:34
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-message',$/;" string line:35
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-message',$/;" variable line:35
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" string line:36
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" variable line:36
subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" string line:37
subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" variable line:37
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-appIcon',$/;" string line:38
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-appIcon',$/;" variable line:38
sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sound: '-sound',$/;" string line:39
sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sound: '-sound',$/;" variable line:39
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '-open',$/;" string line:40
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '-open',$/;" variable line:40
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:41
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:41
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-execute',$/;" string line:42
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-execute',$/;" variable line:42
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" array line:43
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" variable line:43
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:47
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:47
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-Growl',$/;" string line:48
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Darwin-Growl',$/;" variable line:48
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" string line:49
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" variable line:49
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" string line:50
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" variable line:50
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '--sticky',$/;" string line:51
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '--sticky',$/;" variable line:51
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '--url',$/;" string line:52
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '--url',$/;" variable line:52
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:53
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:53
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '--priority',$/;" string line:54
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '--priority',$/;" variable line:54
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:55
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:55
0 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 0,$/;" variable line:58
1 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 1,$/;" variable line:59
2 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 2,$/;" variable line:60
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:70
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:73
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:73
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux-Growl',$/;" string line:74
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux-Growl',$/;" variable line:74
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growl',$/;" string line:75
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growl',$/;" variable line:75
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" string line:76
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '-m',$/;" variable line:76
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" string line:77
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '-title',$/;" variable line:77
subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" string line:78
subtitle /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ subtitle: '-subtitle',$/;" variable line:78
host /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ host: {$/;" object line:79
host /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ host: {$/;" variable line:79
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-H',$/;" string line:80
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-H',$/;" variable line:80
hostname /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ hostname: '192.168.33.1',$/;" string line:81
hostname /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ hostname: '192.168.33.1',$/;" variable line:81
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:85
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:85
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux',$/;" string line:86
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Linux',$/;" variable line:86
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'notify-send',$/;" string line:87
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'notify-send',$/;" variable line:87
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" string line:88
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" variable line:88
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '-t 0',$/;" string line:89
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '-t 0',$/;" variable line:89
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-i',$/;" string line:90
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '-i',$/;" variable line:90
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:91
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:91
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-u',$/;" string line:92
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '-u',$/;" variable line:92
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:93
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:93
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:101
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:103
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:103
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Windows',$/;" string line:104
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Windows',$/;" variable line:104
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" string line:105
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: 'growlnotify',$/;" variable line:105
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" string line:106
msg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ msg: '',$/;" variable line:106
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '\/s:true',$/;" string line:107
sticky /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ sticky: '\/s:true',$/;" variable line:107
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '\/t:',$/;" string line:108
title /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ title: '\/t:',$/;" variable line:108
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '\/i:',$/;" string line:109
icon /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ icon: '\/i:',$/;" variable line:109
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '\/cu:',$/;" string line:110
url /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ url: '\/cu:',$/;" variable line:110
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" object line:111
priority /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ priority: {$/;" variable line:111
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '\/p:',$/;" string line:112
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd: '\/p:',$/;" variable line:112
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" array line:113
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [$/;" variable line:113
0 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 0,$/;" variable line:116
1 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 1,$/;" variable line:117
2 /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ 2,$/;" variable line:118
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:122
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:124
sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ * growl('5 new emails', { title: 'Thunderbird', sound: 'Purr' })$/;" string line:151
sound /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ * growl('5 new emails', { title: 'Thunderbird', sound: 'Purr' })$/;" variable line:151
opts /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function growl(msg, opts, callback) {$/;" variable line:162
growl /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^function growl(msg, opts, callback) {$/;" function line:162
image /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let image;$/;" variable line:163
noop /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ const fn = callback || function noop() {};$/;" function line:165
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" object line:170
cmd /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ cmd = {$/;" variable line:170
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Custom',$/;" string line:171
type /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ type: 'Custom',$/;" variable line:171
pkg /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ pkg: options.exec,$/;" variable line:172
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" array line:173
range /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ range: [],$/;" variable line:173
return /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ return;$/;" variable line:180
image /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ image = options.image;$/;" variable line:186
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let flag;$/;" variable line:189
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = ext === 'icns' && 'iconpath';$/;" variable line:191
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (\/^[A-Z]\/.test(image) && 'appIcon');$/;" variable line:192
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (\/^png|gif|jpe?g$\/.test(ext) && 'image');$/;" variable line:193
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || (ext && (image = ext) && 'icon');$/;" variable line:194
flag /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ flag = flag || 'icon';$/;" variable line:195
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:197
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:201
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:206
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:209
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:211
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:246
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:264
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:273
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:282
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:287
command /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let command = customCmd.replace(\/(^|[^%])%s\/g, `$1${message}`);$/;" variable line:293
command /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ command = splitCmd.shift();$/;" variable line:296
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:303
break /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ break;$/;" variable line:306
stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stdout = '';$/;" string line:311
stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stdout = '';$/;" variable line:311
stderr /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stderr = '';$/;" string line:312
stderr /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let stderr = '';$/;" variable line:312
error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ let error;$/;" variable line:313
error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ error = err;$/;" variable line:317
error /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ error = error || code === 0 ? null : code;$/;" variable line:329
stdout /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^ fn(error, stdout, stderr);$/;" variable line:331
exports /Users/timosand/Dropbox/Documents/Projects/node-growl/lib/growl.js /^module.exports = growl;$/;" variable line:341
language: node_js
dist: trusty
os:
- linux
- osx
node_js:
- '4'
- '5'
- '6'
- '7'
- 'node'
before_install:
- npm i -g npm@latest
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libnotify-bin; fi
jobs:
include:
- stage: lint
script: npm run lint
- stage: test
script: npm test
1.9.3 / 2016-09-05
==================
* fixed command injection vulnerability
1.7.0 / 2012-12-30
==================
......
'use strict';
// Growl - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
/**
* Module dependencies.
*/
const spawn = require('child_process').spawn;
const fs = require('fs');
const path = require('path');
const os = require('os');
const exists = fs.existsSync || path.existsSync;
let cmd;
var exec = require('child_process').exec
, fs = require('fs')
, path = require('path')
, exists = fs.existsSync || path.existsSync
, os = require('os')
, quote = JSON.stringify
, cmd;
function which(name) {
const paths = process.env.PATH.split(':');
let loc;
var paths = process.env.PATH.split(':');
var loc;
for (let i = 0, len = paths.length; i < len; i += 1) {
for (var i = 0, len = paths.length; i < len; ++i) {
loc = path.join(paths[i], name);
if (exists(loc)) return loc;
}
return false;
}
function setupCmd() {
switch (os.type()) {
case 'Darwin':
if (which('terminal-notifier')) {
cmd = {
type: 'Darwin-NotificationCenter',
pkg: 'terminal-notifier',
msg: '-message',
title: '-title',
subtitle: '-subtitle',
icon: '-appIcon',
sound: '-sound',
url: '-open',
priority: {
cmd: '-execute',
range: [],
},
};
} else {
cmd = {
type: 'Darwin-Growl',
pkg: 'growlnotify',
msg: '-m',
sticky: '--sticky',
url: '--url',
priority: {
cmd: '--priority',
range: [
-2,
-1,
0,
1,
2,
'Very Low',
'Moderate',
'Normal',
'High',
'Emergency',
],
},
};
}
break;
case 'Linux':
if (which('growl')) {
cmd = {
type: 'Linux-Growl',
pkg: 'growl',
msg: '-m',
title: '-title',
subtitle: '-subtitle',
host: {
cmd: '-H',
hostname: '192.168.33.1',
},
};
} else {
cmd = {
type: 'Linux',
pkg: 'notify-send',
msg: '',
sticky: '-t 0',
icon: '-i',
priority: {
cmd: '-u',
range: [
'low',
'normal',
'critical',
],
},
};
}
break;
case 'Windows_NT':
switch(os.type()) {
case 'Darwin':
if (which('terminal-notifier')) {
cmd = {
type: 'Windows',
pkg: 'growlnotify',
msg: '',
sticky: '/s:true',
title: '/t:',
icon: '/i:',
url: '/cu:',
priority: {
cmd: '/p:',
range: [
-2,
-1,
0,
1,
2,
],
},
type: "Darwin-NotificationCenter"
, pkg: "terminal-notifier"
, msg: '-message'
, title: '-title'
, subtitle: '-subtitle'
, icon: '-appIcon'
, sound: '-sound'
, url: '-open'
, priority: {
cmd: '-execute'
, range: []
}
};
break;
default:
break;
}
} else {
cmd = {
type: "Darwin-Growl"
, pkg: "growlnotify"
, msg: '-m'
, sticky: '--sticky'
, priority: {
cmd: '--priority'
, range: [
-2
, -1
, 0
, 1
, 2
, "Very Low"
, "Moderate"
, "Normal"
, "High"
, "Emergency"
]
}
};
}
break;
case 'Linux':
if (which('growl')) {
cmd = {
type: "Linux-Growl"
, pkg: "growl"
, msg: '-m'
, title: '-title'
, subtitle: '-subtitle'
, host: {
cmd: '-H'
, hostname: '192.168.33.1'
}
};
} else {
cmd = {
type: "Linux"
, pkg: "notify-send"
, msg: ''
, sticky: '-t 0'
, icon: '-i'
, priority: {
cmd: '-u'
, range: [
"low"
, "normal"
, "critical"
]
}
};
}
break;
case 'Windows_NT':
cmd = {
type: "Windows"
, pkg: "growlnotify"
, msg: ''
, sticky: '/s:true'
, title: '/t:'
, icon: '/i:'
, url: '/cu:'
, priority: {
cmd: '/p:'
, range: [
-2
, -1
, 0
, 1
, 2
]
}
};
break;
}
/**
* Expose `growl`.
*/
exports = module.exports = growl;
/**
* Node-growl version.
*/
exports.version = '1.4.1'
/**
* Send growl notification _msg_ with _options_.
......@@ -135,8 +138,7 @@ function setupCmd() {
* - sticky Make the notification stick (defaults to false)
* - priority Specify an int or named key (default is 0)
* - name Application name (defaults to growlnotify)
* - sound Sound efect ( in OSx defined in preferences -> sound -> effects)
* works only in OSX > 10.8x
* - sound Sound efect ( in OSx defined in preferences -> sound -> effects) * works only in OSX > 10.8x
* - image
* - path to an icon sets --iconpath
* - path to an image sets --image
......@@ -154,60 +156,51 @@ function setupCmd() {
* })
*
* @param {string} msg
* @param {object} opts
* @param {function} callback
* @param {object} options
* @param {function} fn
* @api public
*/
function growl(msg, opts, callback) {
let image;
const options = opts || {};
const fn = callback || function noop() {};
setupCmd();
function growl(msg, options, fn) {
var image
, args
, options = options || {}
, fn = fn || function(){};
if (options.exec) {
cmd = {
type: 'Custom',
pkg: options.exec,
range: [],
type: "Custom"
, pkg: options.exec
, range: []
};
}
// noop
if (!cmd) {
fn(new Error('growl not supported on this platform'));
return;
}
const args = [cmd.pkg];
if (!cmd) return fn(new Error('growl not supported on this platform'));
args = [cmd.pkg];
// image
if (image || options.image) {
image = options.image;
switch (cmd.type) {
case 'Darwin-Growl': {
let flag;
const ext = path.extname(image).substr(1);
flag = ext === 'icns' && 'iconpath';
flag = flag || (/^[A-Z]/.test(image) && 'appIcon');
flag = flag || (/^png|gif|jpe?g$/.test(ext) && 'image');
flag = flag || (ext && (image = ext) && 'icon');
flag = flag || 'icon';
args.push(`--${flag}`, image);
if (image = options.image) {
switch(cmd.type) {
case 'Darwin-Growl':
var flag, ext = path.extname(image).substr(1)
flag = flag || ext == 'icns' && 'iconpath'
flag = flag || /^[A-Z]/.test(image) && 'appIcon'
flag = flag || /^png|gif|jpe?g$/.test(ext) && 'image'
flag = flag || ext && (image = ext) && 'icon'
flag = flag || 'icon'
args.push('--' + flag, quote(image))
break;
}
case 'Darwin-NotificationCenter':
args.push(cmd.icon, image);
args.push(cmd.icon, quote(image));
break;
case 'Linux':
args.push(cmd.icon, image);
args.push(cmd.icon, quote(image));
// libnotify defaults to sticky, set a hint for transient notifications
if (!options.sticky) args.push('--hint=int:transient:1');
break;
case 'Windows':
args.push(cmd.icon + image);
break;
default:
args.push(cmd.icon + quote(image));
break;
}
}
......@@ -217,125 +210,81 @@ function growl(msg, opts, callback) {
// priority
if (options.priority) {
const priority = `${options.priority}`;
const checkindexOf = cmd.priority.range.indexOf(priority);
if (checkindexOf > -1) {
var priority = options.priority + '';
var checkindexOf = cmd.priority.range.indexOf(priority);
if (~cmd.priority.range.indexOf(priority)) {
args.push(cmd.priority, options.priority);
}
}
// sound
if (options.sound && cmd.type === 'Darwin-NotificationCenter') {
args.push(cmd.sound, options.sound);
//sound
if(options.sound && cmd.type === 'Darwin-NotificationCenter'){
args.push(cmd.sound, options.sound)
}
// name
if (options.name && cmd.type === 'Darwin-Growl') {
if (options.name && cmd.type === "Darwin-Growl") {
args.push('--name', options.name);
}
switch (cmd.type) {
switch(cmd.type) {
case 'Darwin-Growl':
args.push(cmd.msg);
args.push(msg.replace(/\\n/g, '\n'));
if (options.title) args.push(options.title);
if (options.url) {
args.push(cmd.url);
args.push(options.url);
}
args.push(quote(msg).replace(/\\n/g, '\n'));
if (options.title) args.push(quote(options.title));
break;
case 'Darwin-NotificationCenter': {
case 'Darwin-NotificationCenter':
args.push(cmd.msg);
const stringifiedMsg = msg;
const escapedMsg = stringifiedMsg.replace(/\\n/g, '\n');
var stringifiedMsg = quote(msg);
var escapedMsg = stringifiedMsg.replace(/\\n/g, '\n');
args.push(escapedMsg);
if (options.title) {
args.push(cmd.title);
args.push(options.title);
args.push(quote(options.title));
}
if (options.subtitle) {
args.push(cmd.subtitle);
args.push(options.subtitle);
args.push(quote(options.subtitle));
}
if (options.url) {
args.push(cmd.url);
args.push(options.url);
args.push(quote(options.url));
}
break;
}
case 'Linux-Growl':
args.push(cmd.msg);
args.push(msg.replace(/\\n/g, '\n'));
if (options.title) args.push(options.title);
args.push(quote(msg).replace(/\\n/g, '\n'));
if (options.title) args.push(quote(options.title));
if (cmd.host) {
args.push(cmd.host.cmd, cmd.host.hostname);
args.push(cmd.host.cmd, cmd.host.hostname)
}
break;
case 'Linux':
if (options.title) {
args.push(options.title);
args.push(quote(options.title));
args.push(cmd.msg);
args.push(msg.replace(/\\n/g, '\n'));
args.push(quote(msg).replace(/\\n/g, '\n'));
} else {
args.push(msg.replace(/\\n/g, '\n'));
args.push(quote(msg).replace(/\\n/g, '\n'));
}
break;
case 'Windows':
args.push(msg.replace(/\\n/g, '\n'));
if (options.title) args.push(cmd.title + options.title);
if (options.url) args.push(cmd.url + options.url);
args.push(quote(msg).replace(/\\n/g, '\n'));
if (options.title) args.push(cmd.title + quote(options.title));
if (options.url) args.push(cmd.url + quote(options.url));
break;
case 'Custom': {
const customCmd = args[0];
const message = options.title
? `${options.title}: ${msg}`
: msg;
let command = customCmd.replace(/(^|[^%])%s/g, `$1${message}`);
const splitCmd = command.split(' ');
if (splitCmd.length > 1) {
command = splitCmd.shift();
Array.prototype.push.apply(args, splitCmd);
}
if (customCmd.indexOf('%s') < 0) {
args.push(message);
}
args[0] = command;
break;
}
default:
case 'Custom':
args[0] = (function(origCommand) {
var message = options.title
? options.title + ': ' + msg
: msg;
var command = origCommand.replace(/(^|[^%])%s/g, '$1' + quote(message));
if (command === origCommand) args.push(quote(message));
return command;
})(args[0]);
break;
}
const cmdToExec = args.shift();
const child = spawn(cmdToExec, args);
let stdout = '';
let stderr = '';
let error;
child.on('error', (err) => {
console.error('An error occured.', err);
error = err;
});
child.stdout.on('data', (data) => {
stdout += data;
});
child.stderr.on('data', (data) => {
stderr += data;
});
child.on('close', (code) => {
error = error || code === 0 ? null : code;
if (typeof fn === 'function') {
fn(error, stdout, stderr);
}
});
}
/**
* Expose `growl`.
*/
module.exports = growl;
// execute
exec(args.join(' '), fn);
};
{
"name": "growl",
"version": "1.10.2",
"version": "1.9.2",
"description": "Growl unobtrusive notifications",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"maintainers": [
"Joshua Boy Nicolai Appelman <joshua@jbnicolai.nl>",
"Timo Sand <timo.sand@iki.fi>"
"Joshua Boy Nicolai Appelman <joshua@jbnicolai.nl>"
],
"repository": {
"type": "git",
"url": "git://github.com/tj/node-growl.git"
},
"main": "./lib/growl.js",
"license": "MIT",
"devDependencies": {
"eslint": "^4.2.0",
"eslint-config-airbnb-base": "^11.2.0",
"eslint-plugin-import": "^2.7.0"
},
"scripts": {
"test": "node test.js",
"lint": "eslint --ext js lib "
},
"engines": {
"node": ">=4.x"
},
"dependencies": {
"eslint-plugin-node": "^5.1.0"
}
"license": "MIT"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment