is-shared-array-buffer
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -8,2 +8,19 @@ # Changelog | ||
## [v1.0.3](https://github.com/inspect-js/is-shared-array-buffer/compare/v1.0.2...v1.0.3) - 2024-02-20 | ||
### Commits | ||
- [meta] use `npmignore` to autogenerate an npmignore file [`c4131f5`](https://github.com/inspect-js/is-shared-array-buffer/commit/c4131f568b1828c1b5d068871332712f475e6c96) | ||
- add types [`41cb419`](https://github.com/inspect-js/is-shared-array-buffer/commit/41cb41918c2cf423938c767ffc67fd352130f6d1) | ||
- [actions] skip ls check on node < 10; remove redundant finisher [`2655b01`](https://github.com/inspect-js/is-shared-array-buffer/commit/2655b0142c06220a2f7912dc10caab31a465e9bc) | ||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `available-typed-arrays`, `npmignore`, `object-inspect`, `tape` [`5917f9a`](https://github.com/inspect-js/is-shared-array-buffer/commit/5917f9ac45800df43d53fb77b1506c6d08e58370) | ||
- [Tests] add tests that TypedArrays are not SABs [`823dd7a`](https://github.com/inspect-js/is-shared-array-buffer/commit/823dd7a0c933efa3abdb2e9ae5c903fe15d6b2fe) | ||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-value-fixtures`, `object-inspect`, `tape` [`6701ad4`](https://github.com/inspect-js/is-shared-array-buffer/commit/6701ad425da15c6557d01744bfe68eaf56fd9ab3) | ||
- [actions] update rebase action to use reusable workflow [`b5119f0`](https://github.com/inspect-js/is-shared-array-buffer/commit/b5119f05ececf1f0f516a38d7f444e3a7174bd43) | ||
- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`38a6d72`](https://github.com/inspect-js/is-shared-array-buffer/commit/38a6d721588e6e4db83fd24e63b8a19fd4398123) | ||
- [meta] add missing `engines.node` [`aac97e1`](https://github.com/inspect-js/is-shared-array-buffer/commit/aac97e1839f671dbba07941c6d7c4f153918548f) | ||
- [readme] remove dead badges [`07c452d`](https://github.com/inspect-js/is-shared-array-buffer/commit/07c452daa96c1cfe49a428b11da692facb72eb08) | ||
- [Deps] update `call-bind` [`b8576fe`](https://github.com/inspect-js/is-shared-array-buffer/commit/b8576feb56508f3bf43905f5d23f7178c9e1af39) | ||
- [meta] add `sideEffects` flag [`3e6730e`](https://github.com/inspect-js/is-shared-array-buffer/commit/3e6730e0ee3a47cb6d7c2ee8bc34bd61dd8f2455) | ||
## [v1.0.2](https://github.com/inspect-js/is-shared-array-buffer/compare/v1.0.1...v1.0.2) - 2022-04-01 | ||
@@ -10,0 +27,0 @@ |
@@ -7,2 +7,3 @@ 'use strict'; | ||
/** @type {import('.')} */ | ||
module.exports = $byteLength | ||
@@ -9,0 +10,0 @@ ? function isSharedArrayBuffer(obj) { |
{ | ||
"name": "is-shared-array-buffer", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": { | ||
@@ -19,6 +19,9 @@ "name": "Jordan Harband", | ||
}, | ||
"sideEffects": false, | ||
"scripts": { | ||
"prepack": "npmignore --auto --commentLines=autogenerated", | ||
"prepublishOnly": "safe-publish-latest", | ||
"prepublish": "not-in-publish || npm run prepublishOnly", | ||
"lint": "eslint --ext=.js,.mjs .", | ||
"postlint": "tsc -p .", | ||
"pretest": "npm run lint", | ||
@@ -49,12 +52,22 @@ "tests-only": "nyc tape 'test/**/*.js'", | ||
"devDependencies": { | ||
"@ljharb/eslint-config": "^20.2.3", | ||
"aud": "^2.0.0", | ||
"@ljharb/eslint-config": "^21.1.0", | ||
"@types/call-bind": "^1.0.5", | ||
"@types/es-value-fixtures": "^1.4.4", | ||
"@types/for-each": "^0.3.3", | ||
"@types/node": "^20.11.19", | ||
"@types/object-inspect": "^1.8.4", | ||
"@types/tape": "^5.6.4", | ||
"aud": "^2.0.4", | ||
"auto-changelog": "^2.4.0", | ||
"es-value-fixtures": "^1.2.1", | ||
"available-typed-arrays": "^1.0.7", | ||
"es-value-fixtures": "^1.4.2", | ||
"eslint": "=8.8.0", | ||
"for-each": "^0.3.3", | ||
"in-publish": "^2.0.1", | ||
"npmignore": "^0.3.1", | ||
"nyc": "^10.3.2", | ||
"object-inspect": "^1.12.0", | ||
"object-inspect": "^1.13.1", | ||
"safe-publish-latest": "^2.0.0", | ||
"tape": "^5.5.2" | ||
"tape": "^5.7.5", | ||
"typescript": "next" | ||
}, | ||
@@ -70,4 +83,12 @@ "auto-changelog": { | ||
"dependencies": { | ||
"call-bind": "^1.0.2" | ||
"call-bind": "^1.0.7" | ||
}, | ||
"publishConfig": { | ||
"ignore": [ | ||
".github/workflows" | ||
] | ||
}, | ||
"engines": { | ||
"node": ">= 0.4" | ||
} | ||
} |
@@ -5,4 +5,2 @@ # is-shared-array-buffer <sup>[![Version Badge][npm-version-svg]][package-url]</sup> | ||
[![coverage][codecov-image]][codecov-url] | ||
[![dependency status][deps-svg]][deps-url] | ||
[![dev dependency status][dev-deps-svg]][dev-deps-url] | ||
[![License][license-image]][license-url] | ||
@@ -9,0 +7,0 @@ [![Downloads][downloads-image]][downloads-url] |
@@ -7,2 +7,3 @@ 'use strict'; | ||
var v = require('es-value-fixtures'); | ||
var availableTypedArrays = require('available-typed-arrays')(); | ||
@@ -14,3 +15,4 @@ var isSharedArrayBuffer = require('..'); | ||
var nonSABs = v.primitives.concat(v.objects); | ||
// @ts-expect-error TS sucks with concat | ||
var nonSABs = [].concat(v.primitives, v.objects); | ||
forEach(nonSABs, function (nonSAB) { | ||
@@ -21,3 +23,3 @@ t.equal(isSharedArrayBuffer(nonSAB), false, inspect(nonSAB) + ' is not a SharedArrayBuffer'); | ||
t.test('actual SharedArrayBuffer instances', { skip: typeof SharedArrayBuffer === 'undefined' }, function (st) { | ||
var sab = new SharedArrayBuffer(); | ||
var sab = new SharedArrayBuffer(0); | ||
@@ -29,3 +31,13 @@ st.equal(isSharedArrayBuffer(sab), true, inspect(sab) + ' is a SharedArrayBuffer'); | ||
t.test('Typed Arrays', { skip: availableTypedArrays.length === 0 }, function (st) { | ||
forEach(availableTypedArrays, function (TypedArray) { | ||
var ta = new global[TypedArray](0); | ||
st.equal(isSharedArrayBuffer(ta.buffer), false, inspect(ta.buffer) + ', the TA\'s buffer, is not a SharedArrayBuffer'); | ||
st.equal(isSharedArrayBuffer(ta), false, inspect(ta) + ' is not a SharedArrayBuffer'); | ||
}); | ||
st.end(); | ||
}); | ||
t.end(); | ||
}); |
18711
11
90
20
57
Updatedcall-bind@^1.0.7