🔧 npm update
This commit is contained in:
35
node_modules/object-inspect/CHANGELOG.md
generated
vendored
35
node_modules/object-inspect/CHANGELOG.md
generated
vendored
@@ -5,6 +5,41 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.13.4](https://github.com/inspect-js/object-inspect/compare/v1.13.3...v1.13.4) - 2025-02-04
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] avoid being fooled by a `Symbol.toStringTag` [`fa5870d`](https://github.com/inspect-js/object-inspect/commit/fa5870da468a525d2f20193700f70752f506cbf7)
|
||||
- [Tests] fix tests in node v6.0 - v6.4 [`2abfe1b`](https://github.com/inspect-js/object-inspect/commit/2abfe1bc3c69f9293c07c5cd65a9d7d87a628b84)
|
||||
- [Dev Deps] update `es-value-fixtures`, `for-each`, `has-symbols` [`3edfb01`](https://github.com/inspect-js/object-inspect/commit/3edfb01cc8cce220fba0dfdfe2dc8bc955758cdd)
|
||||
|
||||
## [v1.13.3](https://github.com/inspect-js/object-inspect/compare/v1.13.2...v1.13.3) - 2024-11-09
|
||||
|
||||
### Commits
|
||||
|
||||
- [actions] split out node 10-20, and 20+ [`44395a8`](https://github.com/inspect-js/object-inspect/commit/44395a8fc1deda6718a5e125e86b9ffcaa1c7580)
|
||||
- [Fix] `quoteStyle`: properly escape only the containing quotes [`5137f8f`](https://github.com/inspect-js/object-inspect/commit/5137f8f7bea69a7fc671bb683fd35f244f38fc52)
|
||||
- [Refactor] clean up `quoteStyle` code [`450680c`](https://github.com/inspect-js/object-inspect/commit/450680cd50de4e689ee3b8e1d6db3a1bcf3fc18c)
|
||||
- [Tests] add `quoteStyle` escaping tests [`e997c59`](https://github.com/inspect-js/object-inspect/commit/e997c595aeaea84fd98ca35d7e1c3b5ab3ae26e0)
|
||||
- [Dev Deps] update `auto-changelog`, `es-value-fixtures`, `tape` [`d5a469c`](https://github.com/inspect-js/object-inspect/commit/d5a469c99ec07ccaeafc36ac4b36a93285086d48)
|
||||
- [Tests] replace `aud` with `npm audit` [`fb7815f`](https://github.com/inspect-js/object-inspect/commit/fb7815f9b72cae277a04f65bbb0543f85b88be62)
|
||||
- [Dev Deps] update `mock-property` [`11c817b`](https://github.com/inspect-js/object-inspect/commit/11c817bf10392aa017755962ba6bc89d731359ee)
|
||||
|
||||
## [v1.13.2](https://github.com/inspect-js/object-inspect/compare/v1.13.1...v1.13.2) - 2024-06-21
|
||||
|
||||
### Commits
|
||||
|
||||
- [readme] update badges [`8a51e6b`](https://github.com/inspect-js/object-inspect/commit/8a51e6bedaf389ec40cc4659e9df53e8543d176e)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`ef05f58`](https://github.com/inspect-js/object-inspect/commit/ef05f58c9761a41416ab907299bf0fa79517014b)
|
||||
- [Dev Deps] update `error-cause`, `has-tostringtag`, `tape` [`c0c6c26`](https://github.com/inspect-js/object-inspect/commit/c0c6c26c44cee6671f7c5d43d2b91d27c5c00d90)
|
||||
- [Fix] Don't throw when `global` is not defined [`d4d0965`](https://github.com/inspect-js/object-inspect/commit/d4d096570f7dbd0e03266a96de11d05eb7b63e0f)
|
||||
- [meta] add missing `engines.node` [`17a352a`](https://github.com/inspect-js/object-inspect/commit/17a352af6fe1ba6b70a19081674231eb1a50c940)
|
||||
- [Dev Deps] update `globalthis` [`9c08884`](https://github.com/inspect-js/object-inspect/commit/9c08884aa662a149e2f11403f413927736b97da7)
|
||||
- [Dev Deps] update `error-cause` [`6af352d`](https://github.com/inspect-js/object-inspect/commit/6af352d7c3929a4cc4c55768c27bf547a5e900f4)
|
||||
- [Dev Deps] update `npmignore` [`94e617d`](https://github.com/inspect-js/object-inspect/commit/94e617d38831722562fa73dff4c895746861d267)
|
||||
- [Dev Deps] update `mock-property` [`2ac24d7`](https://github.com/inspect-js/object-inspect/commit/2ac24d7e58cd388ad093c33249e413e05bbfd6c3)
|
||||
- [Dev Deps] update `tape` [`46125e5`](https://github.com/inspect-js/object-inspect/commit/46125e58f1d1dcfb170ed3d1ea69da550ea8d77b)
|
||||
|
||||
## [v1.13.1](https://github.com/inspect-js/object-inspect/compare/v1.13.0...v1.13.1) - 2023-10-19
|
||||
|
||||
### Commits
|
||||
|
||||
42
node_modules/object-inspect/index.js
generated
vendored
42
node_modules/object-inspect/index.js
generated
vendored
@@ -69,10 +69,21 @@ var utilInspect = require('./util.inspect');
|
||||
var inspectCustom = utilInspect.custom;
|
||||
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
||||
|
||||
var quotes = {
|
||||
__proto__: null,
|
||||
'double': '"',
|
||||
single: "'"
|
||||
};
|
||||
var quoteREs = {
|
||||
__proto__: null,
|
||||
'double': /(["\\])/g,
|
||||
single: /(['\\])/g
|
||||
};
|
||||
|
||||
module.exports = function inspect_(obj, options, depth, seen) {
|
||||
var opts = options || {};
|
||||
|
||||
if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
|
||||
if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) {
|
||||
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
||||
}
|
||||
if (
|
||||
@@ -244,7 +255,10 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
||||
if (typeof window !== 'undefined' && obj === window) {
|
||||
return '{ [object Window] }';
|
||||
}
|
||||
if (obj === global) {
|
||||
if (
|
||||
(typeof globalThis !== 'undefined' && obj === globalThis)
|
||||
|| (typeof global !== 'undefined' && obj === global)
|
||||
) {
|
||||
return '{ [object globalThis] }';
|
||||
}
|
||||
if (!isDate(obj) && !isRegExp(obj)) {
|
||||
@@ -264,7 +278,8 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
||||
};
|
||||
|
||||
function wrapQuotes(s, defaultStyle, opts) {
|
||||
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
|
||||
var style = opts.quoteStyle || defaultStyle;
|
||||
var quoteChar = quotes[style];
|
||||
return quoteChar + s + quoteChar;
|
||||
}
|
||||
|
||||
@@ -272,13 +287,16 @@ function quote(s) {
|
||||
return $replace.call(String(s), /"/g, '"');
|
||||
}
|
||||
|
||||
function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
||||
function canTrustToString(obj) {
|
||||
return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined'));
|
||||
}
|
||||
function isArray(obj) { return toStr(obj) === '[object Array]' && canTrustToString(obj); }
|
||||
function isDate(obj) { return toStr(obj) === '[object Date]' && canTrustToString(obj); }
|
||||
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && canTrustToString(obj); }
|
||||
function isError(obj) { return toStr(obj) === '[object Error]' && canTrustToString(obj); }
|
||||
function isString(obj) { return toStr(obj) === '[object String]' && canTrustToString(obj); }
|
||||
function isNumber(obj) { return toStr(obj) === '[object Number]' && canTrustToString(obj); }
|
||||
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && canTrustToString(obj); }
|
||||
|
||||
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
||||
function isSymbol(obj) {
|
||||
@@ -422,8 +440,10 @@ function inspectString(str, opts) {
|
||||
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
||||
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
||||
}
|
||||
var quoteRE = quoteREs[opts.quoteStyle || 'single'];
|
||||
quoteRE.lastIndex = 0;
|
||||
// eslint-disable-next-line no-control-regex
|
||||
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
||||
var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
||||
return wrapQuotes(s, 'single', opts);
|
||||
}
|
||||
|
||||
|
||||
32
node_modules/object-inspect/package.json
generated
vendored
32
node_modules/object-inspect/package.json
generated
vendored
@@ -1,31 +1,34 @@
|
||||
{
|
||||
"name": "object-inspect",
|
||||
"version": "1.13.1",
|
||||
"version": "1.13.4",
|
||||
"description": "string representations of objects in node and the browser",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.1.0",
|
||||
"@ljharb/eslint-config": "^21.1.1",
|
||||
"@pkgjs/support": "^0.0.6",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"auto-changelog": "^2.5.0",
|
||||
"core-js": "^2.6.12",
|
||||
"error-cause": "^1.0.6",
|
||||
"es-value-fixtures": "^1.4.2",
|
||||
"error-cause": "^1.0.8",
|
||||
"es-value-fixtures": "^1.7.1",
|
||||
"eslint": "=8.8.0",
|
||||
"for-each": "^0.3.3",
|
||||
"for-each": "^0.3.4",
|
||||
"functions-have-names": "^1.2.3",
|
||||
"glob": "=10.3.7",
|
||||
"globalthis": "^1.0.3",
|
||||
"has-tostringtag": "^1.0.0",
|
||||
"globalthis": "^1.0.4",
|
||||
"has-symbols": "^1.1.0",
|
||||
"has-tostringtag": "^1.0.2",
|
||||
"in-publish": "^2.0.1",
|
||||
"jackspeak": "=2.1.1",
|
||||
"make-arrow-function": "^1.2.0",
|
||||
"mock-property": "^1.0.2",
|
||||
"npmignore": "^0.3.0",
|
||||
"mock-property": "^1.1.0",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"safer-buffer": "^2.1.2",
|
||||
"semver": "^6.3.1",
|
||||
"string.prototype.repeat": "^1.0.0",
|
||||
"tape": "^5.7.1"
|
||||
"tape": "^5.9.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
@@ -37,7 +40,7 @@
|
||||
"test": "npm run tests-only && npm run test:corejs",
|
||||
"tests-only": "nyc tape 'test/*.js'",
|
||||
"test:corejs": "nyc tape test-core-js.js 'test/*.js'",
|
||||
"posttest": "npx aud --production",
|
||||
"posttest": "npx npm@'>=10.2' audit --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
@@ -95,5 +98,8 @@
|
||||
"./test-core-js.js"
|
||||
]
|
||||
},
|
||||
"support": true
|
||||
"support": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
}
|
||||
|
||||
20
node_modules/object-inspect/readme.markdown
generated
vendored
20
node_modules/object-inspect/readme.markdown
generated
vendored
@@ -1,15 +1,13 @@
|
||||
# object-inspect <sup>[![Version Badge][2]][1]</sup>
|
||||
# object-inspect <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
string representations of objects in node and the browser
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![dependency status][5]][6]
|
||||
[![dev dependency status][7]][8]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][11]][1]
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
# example
|
||||
|
||||
@@ -69,13 +67,13 @@ npm install object-inspect
|
||||
|
||||
MIT
|
||||
|
||||
[1]: https://npmjs.org/package/object-inspect
|
||||
[2]: https://versionbadg.es/inspect-js/object-inspect.svg
|
||||
[5]: https://david-dm.org/inspect-js/object-inspect.svg
|
||||
[6]: https://david-dm.org/inspect-js/object-inspect
|
||||
[7]: https://david-dm.org/inspect-js/object-inspect/dev-status.svg
|
||||
[8]: https://david-dm.org/inspect-js/object-inspect#info=devDependencies
|
||||
[11]: https://nodei.co/npm/object-inspect.png?downloads=true&stars=true
|
||||
[package-url]: https://npmjs.org/package/object-inspect
|
||||
[npm-version-svg]: https://versionbadg.es/inspect-js/object-inspect.svg
|
||||
[deps-svg]: https://david-dm.org/inspect-js/object-inspect.svg
|
||||
[deps-url]: https://david-dm.org/inspect-js/object-inspect
|
||||
[dev-deps-svg]: https://david-dm.org/inspect-js/object-inspect/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/inspect-js/object-inspect#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/object-inspect.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/object-inspect.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/object-inspect.svg
|
||||
|
||||
9
node_modules/object-inspect/test/quoteStyle.js
generated
vendored
9
node_modules/object-inspect/test/quoteStyle.js
generated
vendored
@@ -13,5 +13,14 @@ test('quoteStyle option', function (t) {
|
||||
t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value');
|
||||
t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value');
|
||||
|
||||
t.equal(inspect('"', { quoteStyle: 'single' }), '\'"\'', 'double quote, quoteStyle: "single"');
|
||||
t.equal(inspect('"', { quoteStyle: 'double' }), '"\\""', 'double quote, quoteStyle: "double"');
|
||||
|
||||
t.equal(inspect('\'', { quoteStyle: 'single' }), '\'\\\'\'', 'single quote, quoteStyle: "single"');
|
||||
t.equal(inspect('\'', { quoteStyle: 'double' }), '"\'"', 'single quote, quoteStyle: "double"');
|
||||
|
||||
t.equal(inspect('`', { quoteStyle: 'single' }), '\'`\'', 'backtick, quoteStyle: "single"');
|
||||
t.equal(inspect('`', { quoteStyle: 'double' }), '"`"', 'backtick, quoteStyle: "double"');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
50
node_modules/object-inspect/test/values.js
generated
vendored
50
node_modules/object-inspect/test/values.js
generated
vendored
@@ -5,6 +5,8 @@ var test = require('tape');
|
||||
var mockProperty = require('mock-property');
|
||||
var hasSymbols = require('has-symbols/shams')();
|
||||
var hasToStringTag = require('has-tostringtag/shams')();
|
||||
var forEach = require('for-each');
|
||||
var semver = require('semver');
|
||||
|
||||
test('values', function (t) {
|
||||
t.plan(1);
|
||||
@@ -209,3 +211,51 @@ test('RegExps', function (t) {
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Proxies', { skip: typeof Proxy !== 'function' || !hasToStringTag }, function (t) {
|
||||
var target = { proxy: true };
|
||||
var fake = new Proxy(target, { has: function () { return false; } });
|
||||
|
||||
// needed to work around a weird difference in node v6.0 - v6.4 where non-present properties are not logged
|
||||
var isNode60 = semver.satisfies(process.version, '6.0 - 6.4');
|
||||
|
||||
forEach([
|
||||
'Boolean',
|
||||
'Number',
|
||||
'String',
|
||||
'Symbol',
|
||||
'Date'
|
||||
], function (tag) {
|
||||
target[Symbol.toStringTag] = tag;
|
||||
|
||||
t.equal(
|
||||
inspect(fake),
|
||||
'{ ' + (isNode60 ? '' : 'proxy: true, ') + '[Symbol(Symbol.toStringTag)]: \'' + tag + '\' }',
|
||||
'Proxy for + ' + tag + ' shows as the target, which has no slots'
|
||||
);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('fakers', { skip: !hasToStringTag }, function (t) {
|
||||
var target = { proxy: false };
|
||||
|
||||
forEach([
|
||||
'Boolean',
|
||||
'Number',
|
||||
'String',
|
||||
'Symbol',
|
||||
'Date'
|
||||
], function (tag) {
|
||||
target[Symbol.toStringTag] = tag;
|
||||
|
||||
t.equal(
|
||||
inspect(target),
|
||||
'{ proxy: false, [Symbol(Symbol.toStringTag)]: \'' + tag + '\' }',
|
||||
'Object pretending to be ' + tag + ' does not trick us'
|
||||
);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user