Changeset 79a0317 for imaps-frontend/node_modules/internal-slot
- Timestamp:
- 01/21/25 03:08:24 (3 days ago)
- Branches:
- main
- Parents:
- 0c6b92a
- Location:
- imaps-frontend/node_modules/internal-slot
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/internal-slot/CHANGELOG.md
r0c6b92a r79a0317 4 4 5 5 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). 6 7 #### [v1.1.0](https://github.com/ljharb/internal-slot/compare/v1.0.7...v1.1.0) 8 9 > 13 December 2024 10 11 - [New] add types [`295d25d`](https://github.com/ljharb/internal-slot/commit/295d25d55cfcb6ba1dd2520b36f4270c5a613c09) 12 - [actions] split out node 10-20, and 20+ [`9c9a2ab`](https://github.com/ljharb/internal-slot/commit/9c9a2ab345f0cb6d202cc92297060889e9ed5e06) 13 - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `object-inspect`, `tape` [`9c5621b`](https://github.com/ljharb/internal-slot/commit/9c5621bc88dd9fcf20e2347a7c26af7fdcd509a2) 14 - [Deps] update `hasown`, `side-channel` [`5281391`](https://github.com/ljharb/internal-slot/commit/52813911eb534cda56e414810b6e2bfe85fa340c) 15 - [Tests] replace `aud` with `npm audit` [`64ce191`](https://github.com/ljharb/internal-slot/commit/64ce191a0603f10017854cb7dc5629da2b5fca6b) 16 - [Dev Deps] add missing peer dep [`d500343`](https://github.com/ljharb/internal-slot/commit/d5003432d47d7d5dced1c5c5f3543a4f1b65bb1f) 6 17 7 18 #### [v1.0.7](https://github.com/ljharb/internal-slot/compare/v1.0.6...v1.0.7) -
imaps-frontend/node_modules/internal-slot/index.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 /** @typedef {`$${import('.').InternalSlot}`} SaltedInternalSlot */ 4 /** @typedef {{ [k in SaltedInternalSlot]?: unknown }} SlotsObject */ 5 3 6 var hasOwn = require('hasown'); 7 /** @type {import('side-channel').Channel<object, SlotsObject>} */ 4 8 var channel = require('side-channel')(); 5 9 6 10 var $TypeError = require('es-errors/type'); 7 11 12 /** @type {import('.')} */ 8 13 var SLOT = { 9 14 assert: function (O, slot) { … … 27 32 } 28 33 var slots = channel.get(O); 29 return slots && slots['$' + slot]; 34 // eslint-disable-next-line no-extra-parens 35 return slots && slots[/** @type {SaltedInternalSlot} */ ('$' + slot)]; 30 36 }, 31 37 has: function (O, slot) { … … 37 43 } 38 44 var slots = channel.get(O); 39 return !!slots && hasOwn(slots, '$' + slot); 45 // eslint-disable-next-line no-extra-parens 46 return !!slots && hasOwn(slots, /** @type {SaltedInternalSlot} */ ('$' + slot)); 40 47 }, 41 48 set: function (O, slot, V) { … … 51 58 channel.set(O, slots); 52 59 } 53 slots['$' + slot] = V; 60 // eslint-disable-next-line no-extra-parens 61 slots[/** @type {SaltedInternalSlot} */ ('$' + slot)] = V; 54 62 } 55 63 }; -
imaps-frontend/node_modules/internal-slot/package.json
r0c6b92a r79a0317 1 1 { 2 "name": "internal-slot", 3 "version": "1.0.7", 4 "description": "ES spec-like internal slots", 5 "main": "index.js", 6 "scripts": { 7 "prepack": "npmignore --auto --commentLines=autogenerated", 8 "prepublishOnly": "safe-publish-latest", 9 "prepublish": "not-in-publish || npm run prepublishOnly", 10 "version": "auto-changelog && git add CHANGELOG.md", 11 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", 12 "pretest": "npm run lint", 13 "lint": "eslint .", 14 "tests-only": "nyc tape 'test/**/*.js'", 15 "test": "npm run tests-only", 16 "posttest": "aud --production" 17 }, 18 "repository": { 19 "type": "git", 20 "url": "git+https://github.com/ljharb/internal-slot.git" 21 }, 22 "keywords": [ 23 "internal", 24 "slot", 25 "internal slot", 26 "ecmascript", 27 "es", 28 "spec", 29 "private", 30 "data", 31 "private data", 32 "weakmap" 33 ], 34 "author": "Jordan Harband <ljharb@gmail.com>", 35 "license": "MIT", 36 "bugs": { 37 "url": "https://github.com/ljharb/internal-slot/issues" 38 }, 39 "homepage": "https://github.com/ljharb/internal-slot#readme", 40 "engines": { 41 "node": ">= 0.4" 42 }, 43 "devDependencies": { 44 "@ljharb/eslint-config": "^21.1.0", 45 "aud": "^2.0.4", 46 "auto-changelog": "^2.4.0", 47 "eslint": "=8.8.0", 48 "for-each": "^0.3.3", 49 "npmignore": "^0.3.1", 50 "nyc": "^10.3.2", 51 "object-inspect": "^1.13.1", 52 "safe-publish-latest": "^2.0.0", 53 "tape": "^5.7.4" 54 }, 55 "dependencies": { 56 "es-errors": "^1.3.0", 57 "hasown": "^2.0.0", 58 "side-channel": "^1.0.4" 59 }, 60 "auto-changelog": { 61 "output": "CHANGELOG.md", 62 "unreleased": false, 63 "commitLimit": false, 64 "backfillLimit": false 65 }, 66 "publishConfig": { 67 "ignore": [ 68 ".github/workflows" 69 ] 70 } 2 "_from": "internal-slot@^1.1.0", 3 "_id": "internal-slot@1.1.0", 4 "_inBundle": false, 5 "_integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", 6 "_location": "/internal-slot", 7 "_phantomChildren": {}, 8 "_requested": { 9 "type": "range", 10 "registry": true, 11 "raw": "internal-slot@^1.1.0", 12 "name": "internal-slot", 13 "escapedName": "internal-slot", 14 "rawSpec": "^1.1.0", 15 "saveSpec": null, 16 "fetchSpec": "^1.1.0" 17 }, 18 "_requiredBy": [ 19 "/es-abstract", 20 "/es-iterator-helpers", 21 "/string.prototype.matchall" 22 ], 23 "_resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", 24 "_shasum": "1eac91762947d2f7056bc838d93e13b2e9604961", 25 "_spec": "internal-slot@^1.1.0", 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 "unreleased": false, 34 "commitLimit": false, 35 "backfillLimit": false 36 }, 37 "bugs": { 38 "url": "https://github.com/ljharb/internal-slot/issues" 39 }, 40 "bundleDependencies": false, 41 "dependencies": { 42 "es-errors": "^1.3.0", 43 "hasown": "^2.0.2", 44 "side-channel": "^1.1.0" 45 }, 46 "deprecated": false, 47 "description": "ES spec-like internal slots", 48 "devDependencies": { 49 "@arethetypeswrong/cli": "^0.17.1", 50 "@ljharb/eslint-config": "^21.1.1", 51 "@ljharb/tsconfig": "^0.2.2", 52 "@types/for-each": "^0.3.3", 53 "@types/object-inspect": "^1.13.0", 54 "@types/tape": "^5.6.5", 55 "auto-changelog": "^2.5.0", 56 "encoding": "^0.1.13", 57 "eslint": "=8.8.0", 58 "for-each": "^0.3.3", 59 "in-publish": "^2.0.1", 60 "npmignore": "^0.3.1", 61 "nyc": "^10.3.2", 62 "object-inspect": "^1.13.3", 63 "safe-publish-latest": "^2.0.0", 64 "tape": "^5.9.0", 65 "typescript": "next" 66 }, 67 "engines": { 68 "node": ">= 0.4" 69 }, 70 "homepage": "https://github.com/ljharb/internal-slot#readme", 71 "keywords": [ 72 "internal", 73 "slot", 74 "internal slot", 75 "ecmascript", 76 "es", 77 "spec", 78 "private", 79 "data", 80 "private data", 81 "weakmap" 82 ], 83 "license": "MIT", 84 "main": "index.js", 85 "name": "internal-slot", 86 "publishConfig": { 87 "ignore": [ 88 ".github/workflows" 89 ] 90 }, 91 "repository": { 92 "type": "git", 93 "url": "git+https://github.com/ljharb/internal-slot.git" 94 }, 95 "scripts": { 96 "lint": "eslint --ext=js,mjs .", 97 "postlint": "tsc && attw -P", 98 "posttest": "npx npm@'>= 10.2' audit --production", 99 "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", 100 "prepack": "npmignore --auto --commentLines=autogenerated", 101 "prepublish": "not-in-publish || npm run prepublishOnly", 102 "prepublishOnly": "safe-publish-latest", 103 "pretest": "npm run lint", 104 "test": "npm run tests-only", 105 "tests-only": "nyc tape 'test/**/*.js'", 106 "version": "auto-changelog && git add CHANGELOG.md" 107 }, 108 "version": "1.1.0" 71 109 } -
imaps-frontend/node_modules/internal-slot/test/index.js
r0c6b92a r79a0317 10 10 forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { 11 11 t['throws']( 12 // @ts-expect-error 12 13 function () { SLOT.assert(primitive, ''); }, 13 14 TypeError, … … 18 19 forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { 19 20 t['throws']( 21 // @ts-expect-error 20 22 function () { SLOT.assert({}, nonString); }, 21 23 TypeError, … … 25 27 26 28 t['throws']( 27 function () { SLOT.assert({}, ' whatever'); },29 function () { SLOT.assert({}, '[[whatever]]'); }, 28 30 TypeError, 29 31 'nonexistent slot throws' … … 41 43 forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { 42 44 t['throws']( 45 // @ts-expect-error 43 46 function () { SLOT.has(primitive, ''); }, 44 47 TypeError, … … 49 52 forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { 50 53 t['throws']( 54 // @ts-expect-error 51 55 function () { SLOT.has({}, nonString); }, 52 56 TypeError, … … 57 61 var o = {}; 58 62 59 t.equal(SLOT.has(o, ' nonexistent'), false, 'nonexistent slot yields false');63 t.equal(SLOT.has(o, '[[nonexistent]]'), false, 'nonexistent slot yields false'); 60 64 61 65 SLOT.set(o, 'foo'); … … 68 72 forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { 69 73 t['throws']( 74 // @ts-expect-error 70 75 function () { SLOT.get(primitive, ''); }, 71 76 TypeError, … … 76 81 forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { 77 82 t['throws']( 83 // @ts-expect-error 78 84 function () { SLOT.get({}, nonString); }, 79 85 TypeError, … … 95 101 forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) { 96 102 t['throws']( 103 // @ts-expect-error 97 104 function () { SLOT.set(primitive, ''); }, 98 105 TypeError, … … 103 110 forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) { 104 111 t['throws']( 112 // @ts-expect-error 105 113 function () { SLOT.set({}, nonString); }, 106 114 TypeError,
Note:
See TracChangeset
for help on using the changeset viewer.