8000 Update: Replace object-assign with extend-shallow · gulpjs/plugin-error@f06666c · GitHub
[go: up one dir, main page]

Skip to content

Commit f06666c

Browse files
jonschlinkertphated
authored andcommitted
Update: Replace object-assign with extend-shallow
1 parent 5e20e34 commit f06666c

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# plugin-error [![NPM version](https://badge.fury.io/js/plugin-error.svg)](http://badge.fury.io/js/plugin-error) [![Build Status](https://travis-ci.org/jonschlinkert/plugin-error.svg)](https://travis-ci.org/jonschlinkert/plugin-error)
1+
# plugin-error [![NPM version](https://badge.fury.io/js/plugin-error.svg)](http://badge.fury.io/js/plugin-error) [![Build Status](https://travis-ci.org/jonschlinkert/plugin-error.svg)](https://travis-ci.org/jonschlinkert/plugin-error)
22

33
> Error handling for vinyl plugins. Just an abstraction of what's in gulp-util with minor changes.
44
@@ -18,16 +18,16 @@ var PluginError = require('plugin-error');
1818

1919
**Params**
2020

21-
- `pluginName` should be the module name of your plugin
22-
- `message` **{String|Object}**: may be a string or an existing error object
23-
- `options` **{Object}**
21+
* `pluginName` should be the module name of your plugin
22+
* `message` **{String|Object}**: may be a string or an existing error object
23+
* `options` **{Object}**
2424

2525
**Behavior:**
2626

27-
- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
28-
- If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
29-
- If you pass in a custom stack string you need to include the message along with that.
30-
- Error properties will be included in `err.toString()`, but may be omitted by including `{showProperties: false}` in the options.
27+
* By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
28+
* If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
29+
* If you pass in a custom stack string you need to include the message along with that.
30+
* Error properties will be included in `err.toString()`, but may be omitted by including `{showProperties: false}` in the options.
3131

3232
**Examples**
3333

@@ -53,11 +53,11 @@ var err = new PluginError('test', existingError, {showStack: true});
5353

5454
## Related projects
5555

56-
* [assemble](http://assemble.io): Static site generator for Grunt.js, Yeoman and Node.js. Used by… [more](http://assemble.io)
57-
* [generate](https://github.com/generate/generate): Project generator, for node.js.
56+
* [assemble](http://assemble.io): Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… [more](http://assemble.io)
5857
* [gulp-util](https://github.com/wearefractal/gulp-util): Utility functions for gulp plugins
5958
* [gulp](http://gulpjs.com): The streaming build system
60-
* [verb](https://github.com/assemble/verb): Documentation generator for GitHub projects. Extremely powerful, easy to use,… [more](https://github.com/assemble/verb)
59+
* [generate](https://github.com/generate/generate): Project generator, for node.js.
60+
* [verb](https://github.com/assemble/verb): Documentation generator for GitHub projects. Extremely powerful, easy to use, can generate anything from API… [more](https://github.com/assemble/verb)
6161

6262
## Running tests
6363

@@ -85,10 +85,6 @@ Released under the MIT license.
8585

8686
***
8787

88-
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 26, 2015._
88+
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 01, 2015._
8989

9090
<!-- reflinks generated by verb-reflinks plugin -->
91-
92-
[verb]: https://github.com/assemble/verb
93-
[template]: https://github.com/jonschlinkert/template
94-
[assemble]: http://assemble.io

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
var util = require('util');
99
var chalk = require('chalk');
10-
var assign = require('object-assign');
10+
var extend = require('extend-shallow');
1111
var differ = require('arr-diff');
1212
var union = require('arr-union');
1313

@@ -174,7 +174,7 @@ function setDefaults(plugin, message, opts) {
174174
*/
175175

176176
function defaults(opts) {
177-
return assign({showStack: false, showProperties: true}, opts);
177+
return extend({showStack: false, showProperties: true}, opts);
178178
}
179179

180180
/**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"arr-diff": "^1.0.1",
3333
"arr-union": "^2.0.1",
3434
"chalk": "^1.0.0",
35-
"object-assign": "^2.0.0"
35+
"extend-shallow": "^1.1.2"
3636
},
3737
"devDependencies": {
3838
"mocha": "*",

0 commit comments

Comments
 (0)
0