Comparing version 2.0.3 to 2.0.4
@@ -8,2 +8,17 @@ # Changelog | ||
## [v2.0.4](https://github.com/inspect-js/is-weakset/compare/v2.0.3...v2.0.4) - 2024-12-16 | ||
### Commits | ||
- [types] use shared config [`5fe9848`](https://github.com/inspect-js/is-weakset/commit/5fe98485c31c8269b90fe93b6f0d002259510786) | ||
- [actions] split out node 10-20, and 20+ [`bd400b9`](https://github.com/inspect-js/is-weakset/commit/bd400b94a77eddeea29f940a2e18708f760deaab) | ||
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@types/object-inspect`, `auto-changelog`, `object-inspect`, `tape` [`8b290fc`](https://github.com/inspect-js/is-weakset/commit/8b290fc32cdd37e4464a2f3df192e71bf77a4636) | ||
- [Refactor] use `call-bound` directly [`265971b`](https://github.com/inspect-js/is-weakset/commit/265971b6c1cf9d01b4c48b7182e13b4d46e4825a) | ||
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape` [`f39dc78`](https://github.com/inspect-js/is-weakset/commit/f39dc787ab85cd24f62013f1dd416e2f3bf2197a) | ||
- [Dev Deps] update `@arethetypeswrong/cli`, `@types/get-intrinsic`, `object-inspect` [`ce6c6a9`](https://github.com/inspect-js/is-weakset/commit/ce6c6a936bbd40743021b6b96835d328dd924e1b) | ||
- [Deps] update `call-bind`, `get-intrinsic` [`ebd5d82`](https://github.com/inspect-js/is-weakset/commit/ebd5d822ca3b8479ebebc99d8f268a7c2a264f8e) | ||
- [Tests] replace `aud` with `npm audit` [`3eb16c8`](https://github.com/inspect-js/is-weakset/commit/3eb16c8b9e9b368f1e2a342867e10972e81b194b) | ||
- [Dev Deps] update `@arethetypeswrong/cli` [`9fe99f3`](https://github.com/inspect-js/is-weakset/commit/9fe99f3ebc084129576e4f467df8eef834b2f25f) | ||
- [Dev Deps] add missing peer dep [`a2fc30e`](https://github.com/inspect-js/is-weakset/commit/a2fc30ed83a6592c6ac56b425ebadc311dc96102) | ||
## [v2.0.3](https://github.com/inspect-js/is-weakset/compare/v2.0.2...v2.0.3) - 2024-03-08 | ||
@@ -10,0 +25,0 @@ |
10
index.js
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var callBound = require('call-bind/callBound'); | ||
var callBound = require('call-bound'); | ||
var $WeakSet = GetIntrinsic('%WeakSet%', true); | ||
/** @type {undefined | (<V>(thisArg: Set<V>, value: V) => boolean)} */ | ||
var $setHas = callBound('WeakSet.prototype.has', true); | ||
if ($setHas) { | ||
/** @type {undefined | (<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean)} */ | ||
var $mapHas = callBound('WeakMap.prototype.has', true); | ||
@@ -19,5 +21,7 @@ | ||
try { | ||
// @ts-expect-error TS can't figure out that $setHas is always truthy here | ||
$setHas(x, $setHas); | ||
if ($mapHas) { | ||
try { | ||
// @ts-expect-error this indeed might not be a weak collection | ||
$mapHas(x, $mapHas); | ||
@@ -35,4 +39,4 @@ } catch (e) { | ||
/** @type {import('.')} */ | ||
// eslint-disable-next-line no-unused-vars | ||
module.exports = function isWeakSet(x) { | ||
// @ts-expect-error | ||
module.exports = function isWeakSet(x) { // eslint-disable-line no-unused-vars | ||
// `WeakSet` does not exist, or does not have a `has` method | ||
@@ -39,0 +43,0 @@ return false; |
{ | ||
"name": "is-weakset", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Is this value a JS WeakSet? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", | ||
@@ -20,3 +20,3 @@ "main": "index.js", | ||
"test": "npm run tests-only && npm run tests:shims && npm run tests:corejs", | ||
"posttest": "aud --production" | ||
"posttest": "npx npm@'>=10.2' audit --production" | ||
}, | ||
@@ -46,16 +46,16 @@ "repository": { | ||
"dependencies": { | ||
"call-bind": "^1.0.7", | ||
"get-intrinsic": "^1.2.4" | ||
"call-bound": "^1.0.3", | ||
"get-intrinsic": "^1.2.6" | ||
}, | ||
"devDependencies": { | ||
"@arethetypeswrong/cli": "^0.15.0", | ||
"@ljharb/eslint-config": "^21.1.0", | ||
"@types/call-bind": "^1.0.5", | ||
"@arethetypeswrong/cli": "^0.17.1", | ||
"@ljharb/eslint-config": "^21.1.1", | ||
"@ljharb/tsconfig": "^0.2.2", | ||
"@types/for-each": "^0.3.3", | ||
"@types/get-intrinsic": "^1.2.2", | ||
"@types/object-inspect": "^1.8.4", | ||
"@types/tape": "^5.6.4", | ||
"aud": "^2.0.4", | ||
"auto-changelog": "^2.4.0", | ||
"@types/get-intrinsic": "^1.2.3", | ||
"@types/object-inspect": "^1.13.0", | ||
"@types/tape": "^5.7.0", | ||
"auto-changelog": "^2.5.0", | ||
"core-js": "^2.6.12", | ||
"encoding": "^0.1.13", | ||
"es5-shim": "^4.6.7", | ||
@@ -68,5 +68,5 @@ "es6-shim": "^0.35.8", | ||
"nyc": "^10.3.2", | ||
"object-inspect": "^1.13.1", | ||
"object-inspect": "^1.13.3", | ||
"safe-publish-latest": "^2.0.0", | ||
"tape": "^5.7.5", | ||
"tape": "^5.9.0", | ||
"typescript": "next" | ||
@@ -73,0 +73,0 @@ }, |
{ | ||
"compilerOptions": { | ||
/* Visit https://aka.ms/tsconfig to read more about this file */ | ||
/* Projects */ | ||
/* Language and Environment */ | ||
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ | ||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ | ||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ | ||
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ | ||
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ | ||
/* Modules */ | ||
"module": "commonjs", /* Specify what module code is generated. */ | ||
// "rootDir": "./", /* Specify the root folder within your source files. */ | ||
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ | ||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ | ||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ | ||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ | ||
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ | ||
"resolveJsonModule": true, /* Enable importing .json files. */ | ||
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ | ||
/* JavaScript Support */ | ||
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ | ||
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ | ||
"maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ | ||
/* Emit */ | ||
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ | ||
"declarationMap": true, /* Create sourcemaps for d.ts files. */ | ||
"noEmit": true, /* Disable emitting files from a compilation. */ | ||
/* Interop Constraints */ | ||
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ | ||
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ | ||
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ | ||
/* Type Checking */ | ||
"strict": true, /* Enable all strict type-checking options. */ | ||
/* Completeness */ | ||
//"skipLibCheck": true /* Skip type checking all .d.ts files. */ | ||
}, | ||
"exclude": [ | ||
"coverage" | ||
] | ||
"extends": "@ljharb/tsconfig", | ||
"compilerOptions": { | ||
"target": "ES2021", | ||
}, | ||
"exclude": [ | ||
"coverage", | ||
], | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19794
95
+ Addedcall-bound@^1.0.3
+ Addedcall-bound@1.0.3(transitive)
- Removedcall-bind@^1.0.7
- Removedcall-bind@1.0.8(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedset-function-length@1.2.2(transitive)
Updatedget-intrinsic@^1.2.6