Changeset 0c6b92a for imaps-frontend/node_modules/object-inspect
- Timestamp:
- 12/12/24 17:06:06 (5 weeks ago)
- Branches:
- main
- Parents:
- d565449
- Location:
- imaps-frontend/node_modules/object-inspect
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/object-inspect/CHANGELOG.md
rd565449 r0c6b92a 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## [v1.13.3](https://github.com/inspect-js/object-inspect/compare/v1.13.2...v1.13.3) - 2024-11-09 9 10 ### Commits 11 12 - [actions] split out node 10-20, and 20+ [`44395a8`](https://github.com/inspect-js/object-inspect/commit/44395a8fc1deda6718a5e125e86b9ffcaa1c7580) 13 - [Fix] `quoteStyle`: properly escape only the containing quotes [`5137f8f`](https://github.com/inspect-js/object-inspect/commit/5137f8f7bea69a7fc671bb683fd35f244f38fc52) 14 - [Refactor] clean up `quoteStyle` code [`450680c`](https://github.com/inspect-js/object-inspect/commit/450680cd50de4e689ee3b8e1d6db3a1bcf3fc18c) 15 - [Tests] add `quoteStyle` escaping tests [`e997c59`](https://github.com/inspect-js/object-inspect/commit/e997c595aeaea84fd98ca35d7e1c3b5ab3ae26e0) 16 - [Dev Deps] update `auto-changelog`, `es-value-fixtures`, `tape` [`d5a469c`](https://github.com/inspect-js/object-inspect/commit/d5a469c99ec07ccaeafc36ac4b36a93285086d48) 17 - [Tests] replace `aud` with `npm audit` [`fb7815f`](https://github.com/inspect-js/object-inspect/commit/fb7815f9b72cae277a04f65bbb0543f85b88be62) 18 - [Dev Deps] update `mock-property` [`11c817b`](https://github.com/inspect-js/object-inspect/commit/11c817bf10392aa017755962ba6bc89d731359ee) 7 19 8 20 ## [v1.13.2](https://github.com/inspect-js/object-inspect/compare/v1.13.1...v1.13.2) - 2024-06-21 -
imaps-frontend/node_modules/object-inspect/index.js
rd565449 r0c6b92a 70 70 var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; 71 71 72 var quotes = { 73 __proto__: null, 74 'double': '"', 75 single: "'" 76 }; 77 var quoteREs = { 78 __proto__: null, 79 'double': /(["\\])/g, 80 single: /(['\\])/g 81 }; 82 72 83 module.exports = function inspect_(obj, options, depth, seen) { 73 84 var opts = options || {}; 74 85 75 if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {86 if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) { 76 87 throw new TypeError('option "quoteStyle" must be "single" or "double"'); 77 88 } … … 268 279 269 280 function wrapQuotes(s, defaultStyle, opts) { 270 var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; 281 var style = opts.quoteStyle || defaultStyle; 282 var quoteChar = quotes[style]; 271 283 return quoteChar + s + quoteChar; 272 284 } … … 426 438 return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; 427 439 } 440 var quoteRE = quoteREs[opts.quoteStyle || 'single']; 441 quoteRE.lastIndex = 0; 428 442 // eslint-disable-next-line no-control-regex 429 var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);443 var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte); 430 444 return wrapQuotes(s, 'single', opts); 431 445 } -
imaps-frontend/node_modules/object-inspect/package.json
rd565449 r0c6b92a 1 1 { 2 2 "name": "object-inspect", 3 "version": "1.13. 2",3 "version": "1.13.3", 4 4 "description": "string representations of objects in node and the browser", 5 5 "main": "index.js", … … 8 8 "@ljharb/eslint-config": "^21.1.1", 9 9 "@pkgjs/support": "^0.0.6", 10 "auto-changelog": "^2. 4.0",10 "auto-changelog": "^2.5.0", 11 11 "core-js": "^2.6.12", 12 12 "error-cause": "^1.0.8", 13 "es-value-fixtures": "^1. 4.2",13 "es-value-fixtures": "^1.5.0", 14 14 "eslint": "=8.8.0", 15 15 "for-each": "^0.3.3", … … 22 22 "jackspeak": "=2.1.1", 23 23 "make-arrow-function": "^1.2.0", 24 "mock-property": "^1. 0.3",24 "mock-property": "^1.1.0", 25 25 "npmignore": "^0.3.1", 26 26 "nyc": "^10.3.2", … … 28 28 "safer-buffer": "^2.1.2", 29 29 "string.prototype.repeat": "^1.0.0", 30 "tape": "^5. 8.1"30 "tape": "^5.9.0" 31 31 }, 32 32 "scripts": { … … 40 40 "tests-only": "nyc tape 'test/*.js'", 41 41 "test:corejs": "nyc tape test-core-js.js 'test/*.js'", 42 "posttest": "npx aud--production",42 "posttest": "npx npm@'>=10.2' audit --production", 43 43 "version": "auto-changelog && git add CHANGELOG.md", 44 44 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" -
imaps-frontend/node_modules/object-inspect/test/quoteStyle.js
rd565449 r0c6b92a 14 14 t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value'); 15 15 16 t.equal(inspect('"', { quoteStyle: 'single' }), '\'"\'', 'double quote, quoteStyle: "single"'); 17 t.equal(inspect('"', { quoteStyle: 'double' }), '"\\""', 'double quote, quoteStyle: "double"'); 18 19 t.equal(inspect('\'', { quoteStyle: 'single' }), '\'\\\'\'', 'single quote, quoteStyle: "single"'); 20 t.equal(inspect('\'', { quoteStyle: 'double' }), '"\'"', 'single quote, quoteStyle: "double"'); 21 22 t.equal(inspect('`', { quoteStyle: 'single' }), '\'`\'', 'backtick, quoteStyle: "single"'); 23 t.equal(inspect('`', { quoteStyle: 'double' }), '"`"', 'backtick, quoteStyle: "double"'); 24 16 25 t.end(); 17 26 });
Note:
See TracChangeset
for help on using the changeset viewer.