Changeset 79a0317 for imaps-frontend/node_modules/is-regex
- Timestamp:
- 01/21/25 03:08:24 (3 months ago)
- Branches:
- main
- Parents:
- 0c6b92a
- Location:
- imaps-frontend/node_modules/is-regex
- Files:
-
- 2 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/is-regex/.editorconfig
r0c6b92a r79a0317 8 8 trim_trailing_whitespace = true 9 9 insert_final_newline = true 10 max_line_length = 15010 max_line_length = 200 11 11 12 12 [CHANGELOG.md] … … 19 19 [Makefile] 20 20 max_line_length = off 21 22 [CHANGELOG.md] 23 max_line_length = off -
imaps-frontend/node_modules/is-regex/.eslintrc
r0c6b92a r79a0317 5 5 6 6 "rules": { 7 "func-style": 0, 7 8 "id-length": [1], 8 "operator-linebreak": [2, "before"],9 9 }, 10 11 "overrides": [12 {13 "files": ["test/**/*.js"],14 "globals": {15 "Proxy": false,16 },17 },18 ],19 10 } -
imaps-frontend/node_modules/is-regex/CHANGELOG.md
r0c6b92a r79a0317 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.2.1](https://github.com/inspect-js/is-regex/compare/v1.2.0...v1.2.1) - 2024-12-11 9 10 ### Commits 11 12 - [Refactor] use `call-bound` directly [`dbabfe3`](https://github.com/inspect-js/is-regex/commit/dbabfe369261f4940f8ca059e9d452fed01e6969) 13 - [Deps] update `call-bind`, `gopd` [`d5343a0`](https://github.com/inspect-js/is-regex/commit/d5343a0e05ac3c65243b29f740c7540480ad23e7) 14 - [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig` [`cc081eb`](https://github.com/inspect-js/is-regex/commit/cc081eb891b075440188c3f5240b2051090f1036) 15 16 ## [v1.2.0](https://github.com/inspect-js/is-regex/compare/v1.1.4...v1.2.0) - 2024-11-29 17 18 ### Fixed 19 20 - [Tests] allow tests to pass if zero traps are triggered [`#35`](https://github.com/inspect-js/is-regex/issues/35) 21 22 ### Commits 23 24 - [actions] reuse common workflows [`be7bf6a`](https://github.com/inspect-js/is-regex/commit/be7bf6af175271e9db74e092d636307f6cf5e848) 25 - [New] add types [`39066a4`](https://github.com/inspect-js/is-regex/commit/39066a426da0f0c597b888c3c839fb2efc2bf613) 26 - [meta] use `npmignore` to autogenerate an npmignore file [`8938588`](https://github.com/inspect-js/is-regex/commit/89385885c2da891644e07220b4407f760c3dd629) 27 - [Refactor] reorganize code [`2f76f26`](https://github.com/inspect-js/is-regex/commit/2f76f26e0008a01a2f9a849dc2687cf3e3146f3e) 28 - [actions] split out node 10-20, and 20+ [`8c9aedf`](https://github.com/inspect-js/is-regex/commit/8c9aedf2cd9b3fd4ee045d747580265de223b4b2) 29 - [meta] better `eccheck` command [`6b39408`](https://github.com/inspect-js/is-regex/commit/6b39408bc4cce49ac85de70fba4a843da4b78b84) 30 - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`e38cf3c`](https://github.com/inspect-js/is-regex/commit/e38cf3c4e5b234c9a0d64fcf75e45df9b2416557) 31 - [actions] update codecov uploader [`487c75d`](https://github.com/inspect-js/is-regex/commit/487c75da7bbc2d977c2aed68815e7a58d269011f) 32 - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `foreach`, `tape` [`0d7da87`](https://github.com/inspect-js/is-regex/commit/0d7da87be90b637c094abfd9e68568097d391e38) 33 - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js`, `tape` [`c1c1198`](https://github.com/inspect-js/is-regex/commit/c1c1198143feaadee0370b78f7fd878e64e57a58) 34 - [actions] update rebase action to use reusable workflow [`213646e`](https://github.com/inspect-js/is-regex/commit/213646e1e9b5211bf621ccaaaa29f03b706b139c) 35 - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `core-js`, `npmignore`, `tape` [`0a44e77`](https://github.com/inspect-js/is-regex/commit/0a44e77855db0ee8077f8b4351164fa500ba0d1f) 36 - [Refactor] use `hasown` [`d939332`](https://github.com/inspect-js/is-regex/commit/d939332c57cf46b95bc45e721fb66db64cf4743a) 37 - [Deps] update `call-bind`, `has-tostringtag` [`46bfdc9`](https://github.com/inspect-js/is-regex/commit/46bfdc9226df0495b5eb4e753e3f61e9a648cf44) 38 - [Tests] use `for-each` instead of `foreach` [`138b3f2`](https://github.com/inspect-js/is-regex/commit/138b3f2e6340eb4b6caf62981b0a1f59e960cbc9) 39 - [Tests] replace `aud` with `npm audit` [`37ed80a`](https://github.com/inspect-js/is-regex/commit/37ed80a3a5eeec2312f45956bc928fc7937480b8) 40 - [Deps] update `gopd` [`6fd4097`](https://github.com/inspect-js/is-regex/commit/6fd4097f23c3f031d0e659b29174216bed7b4f0f) 41 - [Dev Deps] update `core-js` [`97c1c60`](https://github.com/inspect-js/is-regex/commit/97c1c6044684f8a661055f4614ab2dd58fbfcc2b) 42 - [Dev Deps] add missing peer dep [`7329b8e`](https://github.com/inspect-js/is-regex/commit/7329b8edc9d9440439f190704f03740c853d15da) 7 43 8 44 ## [v1.1.4](https://github.com/inspect-js/is-regex/compare/v1.1.3...v1.1.4) - 2021-08-05 -
imaps-frontend/node_modules/is-regex/index.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var callBound = require('call-b ind/callBound');3 var callBound = require('call-bound'); 4 4 var hasToStringTag = require('has-tostringtag/shams')(); 5 var has; 6 var $exec; 7 var isRegexMarker; 8 var badStringifier; 5 var hasOwn = require('hasown'); 6 var gOPD = require('gopd'); 7 8 /** @type {import('.')} */ 9 var fn; 9 10 10 11 if (hasToStringTag) { 11 has = callBound('Object.prototype.hasOwnProperty'); 12 $exec = callBound('RegExp.prototype.exec'); 13 isRegexMarker = {}; 12 /** @type {(receiver: ThisParameterType<typeof RegExp.prototype.exec>, ...args: Parameters<typeof RegExp.prototype.exec>) => ReturnType<typeof RegExp.prototype.exec>} */ 13 var $exec = callBound('RegExp.prototype.exec'); 14 /** @type {object} */ 15 var isRegexMarker = {}; 14 16 15 17 var throwRegexMarker = function () { 16 18 throw isRegexMarker; 17 19 }; 18 badStringifier = { 20 /** @type {{ toString(): never, valueOf(): never, [Symbol.toPrimitive]?(): never }} */ 21 var badStringifier = { 19 22 toString: throwRegexMarker, 20 23 valueOf: throwRegexMarker … … 24 27 badStringifier[Symbol.toPrimitive] = throwRegexMarker; 25 28 } 26 }27 29 28 var $toString = callBound('Object.prototype.toString'); 29 var gOPD = Object.getOwnPropertyDescriptor; 30 var regexClass = '[object RegExp]'; 31 32 module.exports = hasToStringTag 30 /** @type {import('.')} */ 31 // @ts-expect-error TS can't figure out that the $exec call always throws 33 32 // eslint-disable-next-line consistent-return 34 ?function isRegex(value) {33 fn = function isRegex(value) { 35 34 if (!value || typeof value !== 'object') { 36 35 return false; 37 36 } 38 37 39 var descriptor = gOPD(value, 'lastIndex'); 40 var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); 38 // eslint-disable-next-line no-extra-parens 39 var descriptor = /** @type {NonNullable<typeof gOPD>} */ (gOPD)(/** @type {{ lastIndex?: unknown }} */ (value), 'lastIndex'); 40 var hasLastIndexDataProperty = descriptor && hasOwn(descriptor, 'value'); 41 41 if (!hasLastIndexDataProperty) { 42 42 return false; … … 44 44 45 45 try { 46 $exec(value, badStringifier); 46 // eslint-disable-next-line no-extra-parens 47 $exec(value, /** @type {string} */ (/** @type {unknown} */ (badStringifier))); 47 48 } catch (e) { 48 49 return e === isRegexMarker; 49 50 } 50 } 51 : function isRegex(value) { 51 }; 52 } else { 53 /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */ 54 var $toString = callBound('Object.prototype.toString'); 55 /** @const @type {'[object RegExp]'} */ 56 var regexClass = '[object RegExp]'; 57 58 /** @type {import('.')} */ 59 fn = function isRegex(value) { 52 60 // In older browsers, typeof regex incorrectly returns 'function' 53 61 if (!value || (typeof value !== 'object' && typeof value !== 'function')) { … … 57 65 return $toString(value) === regexClass; 58 66 }; 67 } 68 69 module.exports = fn; -
imaps-frontend/node_modules/is-regex/package.json
r0c6b92a r79a0317 1 1 { 2 "name": "is-regex", 3 "version": "1.1.4", 4 "description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", 5 "author": "Jordan Harband <ljharb@gmail.com>", 6 "funding": { 7 "url": "https://github.com/sponsors/ljharb" 8 }, 9 "license": "MIT", 10 "main": "index.js", 11 "scripts": { 12 "prepublishOnly": "safe-publish-latest", 13 "prepublish": "not-in-publish || npm run prepublishOnly", 14 "pretest": "npm run lint", 15 "test": "npm run tests-only && npm run test:harmony", 16 "tests-only": "nyc node test", 17 "test:harmony": "nyc node --harmony --es-staging test", 18 "test:corejs": "nyc tape test-corejs.js", 19 "posttest": "npx aud --production", 20 "lint": "eslint .", 21 "eccheck": "eclint check *.js **/*.js > /dev/null", 22 "version": "auto-changelog && git add CHANGELOG.md", 23 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" 24 }, 25 "repository": { 26 "type": "git", 27 "url": "git://github.com/inspect-js/is-regex.git" 28 }, 29 "bugs": { 30 "url": "https://github.com/inspect-js/is-regex/issues" 31 }, 32 "homepage": "https://github.com/inspect-js/is-regex", 33 "keywords": [ 34 "regex", 35 "regexp", 36 "is", 37 "regular expression", 38 "regular", 39 "expression" 40 ], 41 "dependencies": { 42 "call-bind": "^1.0.2", 43 "has-tostringtag": "^1.0.0" 44 }, 45 "devDependencies": { 46 "@ljharb/eslint-config": "^17.6.0", 47 "aud": "^1.1.5", 48 "auto-changelog": "^2.3.0", 49 "core-js": "^3.16.0", 50 "eclint": "^2.8.1", 51 "eslint": "^7.32.0", 52 "foreach": "^2.0.5", 53 "nyc": "^10.3.2", 54 "safe-publish-latest": "^1.1.4", 55 "tape": "^5.3.0" 56 }, 57 "testling": { 58 "files": "test/index.js", 59 "browsers": [ 60 "iexplore/6.0..latest", 61 "firefox/3.0..6.0", 62 "firefox/15.0..latest", 63 "firefox/nightly", 64 "chrome/4.0..10.0", 65 "chrome/20.0..latest", 66 "chrome/canary", 67 "opera/10.0..latest", 68 "opera/next", 69 "safari/4.0..latest", 70 "ipad/6.0..latest", 71 "iphone/6.0..latest", 72 "android-browser/4.2" 73 ] 74 }, 75 "engines": { 76 "node": ">= 0.4" 77 }, 78 "auto-changelog": { 79 "output": "CHANGELOG.md", 80 "template": "keepachangelog", 81 "unreleased": false, 82 "commitLimit": false, 83 "backfillLimit": false, 84 "hideCredit": true 85 } 2 "_from": "is-regex@^1.2.1", 3 "_id": "is-regex@1.2.1", 4 "_inBundle": false, 5 "_integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", 6 "_location": "/is-regex", 7 "_phantomChildren": {}, 8 "_requested": { 9 "type": "range", 10 "registry": true, 11 "raw": "is-regex@^1.2.1", 12 "name": "is-regex", 13 "escapedName": "is-regex", 14 "rawSpec": "^1.2.1", 15 "saveSpec": null, 16 "fetchSpec": "^1.2.1" 17 }, 18 "_requiredBy": [ 19 "/es-abstract", 20 "/safe-regex-test", 21 "/which-builtin-type" 22 ], 23 "_resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", 24 "_shasum": "76d70a3ed10ef9be48eb577887d74205bf0cad22", 25 "_spec": "is-regex@^1.2.1", 26 "_where": "/home/stevetosak/Proekt/IMaps/imaps-frontend/node_modules/es-abstract", 27 "author": { 28 "name": "Jordan Harband", 29 "email": "ljharb@gmail.com" 30 }, 31 "auto-changelog": { 32 "output": "CHANGELOG.md", 33 "template": "keepachangelog", 34 "unreleased": false, 35 "commitLimit": false, 36 "backfillLimit": false, 37 "hideCredit": true 38 }, 39 "bugs": { 40 "url": "https://github.com/inspect-js/is-regex/issues" 41 }, 42 "bundleDependencies": false, 43 "dependencies": { 44 "call-bound": "^1.0.2", 45 "gopd": "^1.2.0", 46 "has-tostringtag": "^1.0.2", 47 "hasown": "^2.0.2" 48 }, 49 "deprecated": false, 50 "description": "Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag", 51 "devDependencies": { 52 "@arethetypeswrong/cli": "^0.17.1", 53 "@ljharb/eslint-config": "^21.1.1", 54 "@ljharb/tsconfig": "^0.2.2", 55 "@types/core-js": "^2.5.8", 56 "@types/for-each": "^0.3.3", 57 "@types/tape": "^5.6.5", 58 "auto-changelog": "^2.5.0", 59 "core-js": "^3.39.0", 60 "eclint": "^2.8.1", 61 "encoding": "^0.1.13", 62 "eslint": "=8.8.0", 63 "for-each": "^0.3.3", 64 "in-publish": "^2.0.1", 65 "npmignore": "^0.3.1", 66 "nyc": "^10.3.2", 67 "safe-publish-latest": "^2.0.0", 68 "tape": "^5.9.0", 69 "typescript": "^5.8.0-dev.20241129" 70 }, 71 "engines": { 72 "node": ">= 0.4" 73 }, 74 "funding": { 75 "url": "https://github.com/sponsors/ljharb" 76 }, 77 "homepage": "https://github.com/inspect-js/is-regex", 78 "keywords": [ 79 "regex", 80 "regexp", 81 "is", 82 "regular expression", 83 "regular", 84 "expression" 85 ], 86 "license": "MIT", 87 "main": "index.js", 88 "name": "is-regex", 89 "publishConfig": { 90 "ignore": [ 91 ".github/workflows", 92 "test-corejs.js" 93 ] 94 }, 95 "repository": { 96 "type": "git", 97 "url": "git://github.com/inspect-js/is-regex.git" 98 }, 99 "scripts": { 100 "lint": "eslint --ext=js,mjs .", 101 "postlint": "tsc -p . && attw -P", 102 "posttest": "npx npm@'>=10.2' audit --production", 103 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", 104 "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')", 105 "prepack": "npmignore --auto --commentLines=autogenerated", 106 "prepublish": "not-in-publish || npm run prepublishOnly", 107 "prepublishOnly": "safe-publish-latest", 108 "pretest": "npm run lint", 109 "test": "npm run tests-only && npm run test:harmony", 110 "test:corejs": "nyc tape test-corejs.js", 111 "test:harmony": "nyc node --harmony --es-staging test", 112 "tests-only": "nyc node test", 113 "version": "auto-changelog && git add CHANGELOG.md" 114 }, 115 "testling": { 116 "files": "test/index.js", 117 "browsers": [ 118 "iexplore/6.0..latest", 119 "firefox/3.0..6.0", 120 "firefox/15.0..latest", 121 "firefox/nightly", 122 "chrome/4.0..10.0", 123 "chrome/20.0..latest", 124 "chrome/canary", 125 "opera/10.0..latest", 126 "opera/next", 127 "safari/4.0..latest", 128 "ipad/6.0..latest", 129 "iphone/6.0..latest", 130 "android-browser/4.2" 131 ] 132 }, 133 "version": "1.2.1" 86 134 } -
imaps-frontend/node_modules/is-regex/test/index.js
r0c6b92a r79a0317 2 2 3 3 var hasToStringTag = require('has-tostringtag/shams')(); 4 var forEach = require('for each');4 var forEach = require('for-each'); 5 5 var test = require('tape'); 6 6 var isRegex = require('..'); 7 7 8 8 test('not regexes', function (t) { 9 // @ts-expect-error 9 10 t.notOk(isRegex(), 'undefined is not regex'); 10 11 t.notOk(isRegex(null), 'null is not regex'); … … 21 22 test('@@toStringTag', { skip: !hasToStringTag }, function (t) { 22 23 var regex = /a/g; 24 /** @type {{ toString(): string, valueOf(): RegExp, [Symbol.toStringTag]?: string}} */ 23 25 var fakeRegex = { 24 26 toString: function () { return String(regex); }, … … 40 42 var regex = /a/; 41 43 var marker = {}; 44 // @ts-expect-error 42 45 regex.lastIndex = marker; 43 46 st.equal(regex.lastIndex, marker, 'lastIndex is the marker object'); … … 60 63 61 64 test('does not perform operations observable to Proxies', { skip: typeof Proxy !== 'function' }, function (t) { 62 var Handler = function () { 65 /** @constructor */ 66 function Handler() { 67 /** @type (keyof Reflect)[]} */ 63 68 this.trapCalls = []; 64 } ;69 } 65 70 66 forEach([ 71 // eslint-disable-next-line no-extra-parens 72 forEach(/** @const @type {(keyof Reflect)[]} */ ([ 67 73 'defineProperty', 68 74 'deleteProperty', … … 76 82 'set', 77 83 'setPrototypeOf' 78 ] , function (trapName) {84 ]), function (trapName) { 79 85 Handler.prototype[trapName] = function () { 80 86 this.trapCalls.push(trapName); 87 // @ts-expect-error TODO: not sure why this is erroring 81 88 return Reflect[trapName].apply(Reflect, arguments); 82 89 }; … … 85 92 t.test('proxy of object', function (st) { 86 93 var handler = new Handler(); 94 // @ts-expect-error Proxy handlers can be any object 87 95 var proxy = new Proxy({ lastIndex: 0 }, handler); 88 96 89 97 st.equal(isRegex(proxy), false, 'proxy of plain object is not regex'); 90 st.deepEqual(handler.trapCalls, ['getOwnPropertyDescriptor'], 'no unexpected proxy traps were triggered'); 98 st.deepEqual( 99 handler.trapCalls, 100 handler.trapCalls.length > 0 ? ['getOwnPropertyDescriptor'] : [], 101 'no unexpected proxy traps were triggered' 102 ); 91 103 st.end(); 92 104 }); … … 94 106 t.test('proxy of RegExp instance', function (st) { 95 107 var handler = new Handler(); 108 // @ts-expect-error Proxy handlers can be any object 96 109 var proxy = new Proxy(/a/, handler); 97 110 98 111 st.equal(isRegex(proxy), false, 'proxy of RegExp instance is not regex'); 99 st.deepEqual(handler.trapCalls, ['getOwnPropertyDescriptor'], 'no unexpected proxy traps were triggered'); 112 st.deepEqual( 113 handler.trapCalls, 114 handler.trapCalls.length > 0 ? ['getOwnPropertyDescriptor'] : [], 115 'no unexpected proxy traps were triggered' 116 ); 100 117 st.end(); 101 118 });
Note:
See TracChangeset
for help on using the changeset viewer.