chore: update dependencies

This commit is contained in:
grandeljay 2023-08-17 11:47:40 +02:00
parent 0f47bca189
commit 6d20c0b45a
3066 changed files with 359185 additions and 427821 deletions

View file

@ -0,0 +1,31 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Automated tests
on:
push:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- name: Checkout sourcecode
uses: actions/checkout@v3
- name: Setup node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Run npm ci and test
run: |
npm ci
npm test

View file

@ -1,5 +0,0 @@
language: node_js
node_js:
- "12"
- "14"
- "16"

View file

@ -1,3 +1,9 @@
## 2.5.7
### Changed
- Update dependencies
## 2.5.6
### Changed

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2021 rejas
Copyright (c) 2023 gulp-community
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -1,7 +1,7 @@
# gulp-json-editor
[![npm version](https://badge.fury.io/js/gulp-json-editor.svg)](https://www.npmjs.com/package/gulp-json-editor)
[![Build Status](https://secure.travis-ci.org/rejas/gulp-json-editor.png?branch=master)](https://travis-ci.org/rejas/gulp-json-editor)
[![Automated tests](https://github.com/gulp-community/gulp-json-editor/actions/workflows/run-tests.yml/badge.svg)](https://github.com/gulp-community/gulp-json-editor/actions/workflows/run-tests.yml)
gulp-json-editor is a [gulp](https://github.com/gulpjs/gulp) plugin to edit JSON objects.
@ -110,6 +110,6 @@ This object is passed to deepmerge as its [option](https://github.com/TehShrike/
## License
Copyright (c) 2021 rejas
Copyright (c) 2023 gulp-community
Licensed under the [MIT license](LICENSE).

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
Copyright (c) 2015, 2017-2018, 2022 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -6,7 +6,7 @@
# plugin-error
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]
Error handling for Vinyl plugins.
@ -16,12 +16,12 @@ Error handling for Vinyl plugins.
var PluginError = require('plugin-error');
var err = new PluginError('test', {
message: 'something broke'
message: 'something broke',
});
var err = new PluginError({
plugin: 'test',
message: 'something broke'
message: 'something broke',
});
var err = new PluginError('test', 'something broke');
@ -37,33 +37,30 @@ var err = new PluginError('test', existingError, { showStack: true });
### `new PluginError(pluginName, message[, options])`
Error constructor that takes:
* `pluginName` - a `String` that should be the module name of your plugin
* `message` - a `String` message or an existing `Error` object
* `options` - an `Object` of your options
- `pluginName` - a `String` that should be the module name of your plugin
- `message` - a `String` message or an existing `Error` object
- `options` - an `Object` of your options
**Behavior:**
* By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
* If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
* If you pass in a custom stack string you need to include the message along with that.
* Error properties will be included in `err.toString()`, but may be omitted by including `{ showProperties: false }` in the options.
- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
- If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
- If you pass in a custom stack string you need to include the message along with that.
- Error properties will be included in `err.toString()`, but may be omitted by including `{ showProperties: false }` in the options.
## License
MIT
[downloads-image]: http://img.shields.io/npm/dm/plugin-error.svg
<!-- prettier-ignore-start -->
[downloads-image]: https://img.shields.io/npm/dm/plugin-error.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/plugin-error
[npm-image]: http://img.shields.io/npm/v/plugin-error.svg
[npm-image]: https://img.shields.io/npm/v/plugin-error.svg?style=flat-square
[travis-url]: https://travis-ci.org/gulpjs/plugin-error
[travis-image]: http://img.shields.io/travis/gulpjs/plugin-error.svg?label=travis-ci
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/plugin-error
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/plugin-error.svg?label=appveyor
[ci-url]: https://github.com/gulpjs/plugin-error/actions?query=workflow:dev
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/plugin-error/dev?style=flat-square
[coveralls-url]: https://coveralls.io/r/gulpjs/plugin-error
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/plugin-error/master.svg
[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/plugin-error/master.svg?style=flat-square
<!-- prettier-ignore-end -->

View file

@ -5,25 +5,36 @@ declare namespace PluginError {
* @param error Base error
* @param options Error options
*/
new <E extends Error>(plugin: string, error: E, options?: Options): PluginError<E>;
new <E extends Error>(
plugin: string,
error: E,
options?: Options
): PluginError<E>;
/**
* @param plugin Plugin name
* @param error Base error or error message
* @param options Error options
*/
new <E extends Error = Error>(plugin: string, error: E | string, options: Options): PluginError<E | {[K in keyof E]: undefined}>;
new <E extends Error = Error>(
plugin: string,
error: E | string,
options: Options
): PluginError<E | { [K in keyof E]: undefined }>;
/**
* @param plugin Plugin name
* @param error Base error, error message, or options with message
*/
new <E extends Error = Error>(plugin: string, error: E | string | (Options & {message: string})): PluginError<E | {[K in keyof E]: undefined}>;
new <E extends Error = Error>(
plugin: string,
error: E | string | (Options & { message: string })
): PluginError<E | { [K in keyof E]: undefined }>;
/**
* @param options Options with plugin name and message
*/
new(options: Options & {plugin: string, message: string}): PluginError;
new (options: Options & { plugin: string; message: string }): PluginError;
}
interface Options {
@ -42,7 +53,6 @@ declare namespace PluginError {
*/
fileName?: string;
/**
* Line number where the error occurred
*/

View file

@ -1,16 +1,33 @@
var util = require('util');
var colors = require('ansi-colors');
var extend = require('extend-shallow');
var differ = require('arr-diff');
var union = require('arr-union');
var nonEnum = ['message', 'name', 'stack'];
var ignored = union(nonEnum, ['__safety', '_stack', 'plugin', 'showProperties', 'showStack']);
var props = ['fileName', 'lineNumber', 'message', 'name', 'plugin', 'showProperties', 'showStack', 'stack'];
var ignored = new Set(
nonEnum.concat([
'__safety',
'_stack',
'plugin',
'showProperties',
'showStack',
'domain',
'domainEmitter',
'domainThrown',
])
);
var props = [
'fileName',
'lineNumber',
'message',
'name',
'plugin',
'showProperties',
'showStack',
'stack',
];
function PluginError(plugin, message, options) {
if (!(this instanceof PluginError)) {
throw new Error('Call PluginError using new');
return new PluginError(plugin, message, options);
}
Error.call(this);
@ -19,27 +36,23 @@ function PluginError(plugin, message, options) {
// If opts has an error, get details from it
if (typeof opts.error === 'object') {
var keys = union(Object.keys(opts.error), nonEnum);
var keys = new Set(Object.keys(opts.error).concat(nonEnum));
// These properties are not enumerable, so we have to add them explicitly.
keys.forEach(function(prop) {
keys.forEach(function (prop) {
self[prop] = opts.error[prop];
});
}
// Opts object can override
props.forEach(function(prop) {
props.forEach(function (prop) {
if (prop in opts) {
this[prop] = opts[prop];
}
}, this);
// Defaults
if (!this.name) {
this.name = 'Error';
}
if (!this.stack) {
/**
* `Error.captureStackTrace` appends a stack property which
* relies on the toString method of the object it is applied to.
@ -50,7 +63,7 @@ function PluginError(plugin, message, options) {
*/
var safety = {};
safety.toString = function() {
safety.toString = function () {
return this._messageWithDetails() + '\nStack:';
}.bind(this);
@ -71,7 +84,7 @@ util.inherits(PluginError, Error);
* Output a formatted message with details
*/
PluginError.prototype._messageWithDetails = function() {
PluginError.prototype._messageWithDetails = function () {
var msg = 'Message:\n ' + this.message;
var details = this._messageDetails();
if (details !== '') {
@ -84,12 +97,14 @@ PluginError.prototype._messageWithDetails = function() {
* Output actual message details
*/
PluginError.prototype._messageDetails = function() {
PluginError.prototype._messageDetails = function () {
if (!this.showProperties) {
return '';
}
var props = differ(Object.keys(this), ignored);
var props = Object.keys(this).filter(function (key) {
return !ignored.has(key);
});
var len = props.length;
if (len === 0) {
@ -111,8 +126,8 @@ PluginError.prototype._messageDetails = function() {
* Override the `toString` method
*/
PluginError.prototype.toString = function() {
var detailsWithStack = function(stack) {
PluginError.prototype.toString = function () {
var detailsWithStack = function (stack) {
return this._messageWithDetails() + '\nStack:\n' + stack;
}.bind(this);
@ -121,10 +136,8 @@ PluginError.prototype.toString = function() {
// If there is no wrapped error, use the stack captured in the PluginError ctor
if (this.__safety) {
msg = this.__safety.stack;
} else if (this._stack) {
msg = detailsWithStack(this._stack);
} else {
// Stack from wrapped error
msg = detailsWithStack(this.stack);
@ -154,13 +167,12 @@ function setDefaults(plugin, message, opts) {
if (typeof plugin === 'object') {
return defaults(plugin);
}
opts = opts || {};
if (message instanceof Error) {
opts.error = message;
opts = Object.assign({}, opts, { error: message });
} else if (typeof message === 'object') {
opts = message;
opts = Object.assign({}, message);
} else {
opts.message = message;
opts = Object.assign({}, opts, { message: message });
}
opts.plugin = plugin;
return defaults(opts);
@ -177,10 +189,13 @@ function setDefaults(plugin, message, opts) {
*/
function defaults(opts) {
return extend({
showStack: false,
showProperties: true,
}, opts);
return Object.assign(
{
showStack: false,
showProperties: true,
},
opts
);
}
/**

View file

@ -1,8 +1,8 @@
{
"name": "plugin-error",
"version": "1.0.1",
"version": "2.0.1",
"description": "Error handling for Vinyl plugins.",
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
"author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
"contributors": [
"Jon Schlinkert <jon.schlinkert@sellside.com>",
"Blaine Bublitz <blaine.bublitz@gmail.com>"
@ -10,7 +10,7 @@
"repository": "gulpjs/plugin-error",
"license": "MIT",
"engines": {
"node": ">= 0.10"
"node": ">=10.13.0"
},
"main": "index.js",
"files": [
@ -19,29 +19,31 @@
"index.js"
],
"scripts": {
"lint": "eslint . && jscs index.js test/",
"lint": "eslint .",
"pretest": "npm run lint",
"test": "mocha --async-only && npm run test-types",
"test-types": "tsc -p test/types",
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
"test": "nyc mocha --async-only",
"test-types": "tsc -p test/types"
},
"dependencies": {
"ansi-colors": "^1.0.1",
"arr-diff": "^4.0.0",
"arr-union": "^3.1.0",
"extend-shallow": "^3.0.2"
"ansi-colors": "^1.0.1"
},
"devDependencies": {
"eslint": "^1.7.3",
"eslint-config-gulp": "^2.0.0",
"expect": "^1.20.2",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"jscs": "^2.3.5",
"jscs-preset-gulp": "^1.0.0",
"mocha": "^3.0.0",
"typescript": "^2.6.2"
"eslint": "^7.0.0",
"eslint-config-gulp": "^5.0.0",
"eslint-plugin-node": "^11.1.0",
"expect": "^27.0.0",
"mocha": "^8.0.0",
"nyc": "^15.0.0",
"typescript": "^4.7.4"
},
"nyc": {
"reporter": [
"lcov",
"text-summary"
]
},
"prettier": {
"singleQuote": true
},
"keywords": [
"error",

View file

@ -1,30 +1,30 @@
{
"name": "gulp-json-editor",
"version": "2.5.6",
"version": "2.5.7",
"description": "A gulp plugin to edit JSON objects",
"license": "MIT",
"main": "./index.js",
"homepage": "https://github.com/rejas/gulp-json-editor#readme",
"bugs": "https://github.com/rejas/gulp-json-editor/issues",
"repository": "https://github.com/rejas/gulp-json-editor.git",
"homepage": "https://github.com/gulp-community/gulp-json-editor#readme",
"bugs": "https://github.com/gulp-community/gulp-json-editor/issues",
"repository": "https://github.com/gulp-community/gulp-json-editor.git",
"author": {
"name": "rejas",
"url": "https://github.com/rejas"
"name": "gulp-community",
"url": "https://github.com/gulp-community"
},
"dependencies": {
"deepmerge": "^4.2.2",
"detect-indent": "^6.0.0",
"js-beautify": "^1.13.13",
"plugin-error": "^1.0.1",
"deepmerge": "^4.3.1",
"detect-indent": "^6.1.0",
"js-beautify": "^1.14.8",
"plugin-error": "^2.0.1",
"through2": "^4.0.2"
},
"devDependencies": {
"eslint": "^7.26.0",
"eslint": "^8.45.0",
"eslint-config-gulp": "^5.0.1",
"gulp": "^4.0.2",
"mocha": "^8.4.0",
"mocha": "^10.2.0",
"should": "^13.2.3",
"vinyl": "^2.2.1"
"vinyl": "^3.0.0"
},
"keywords": [
"gulpplugin",