Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2024-09-16 17:29:58 +00:00
parent 1afca056e3
commit 6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions

View file

@ -3,6 +3,10 @@
"extends": "@ljharb",
"globals": {
"DataView": false,
},
"rules": {
"new-cap": ["error", {
"capIsNewExceptions": [

View file

@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v3.0.4](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.3...v3.0.4) - 2024-02-02
### Commits
- [patch] add types [`15fab4c`](https://github.com/fengyuanchen/is-array-buffer/commit/15fab4c68378904a12592969042e638dbc6be8e5)
## [v3.0.3](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.2...v3.0.3) - 2024-02-02
### Commits
- [Fix] TAs can take a DataView in node 0.8; use a simpler check [`69a03f6`](https://github.com/fengyuanchen/is-array-buffer/commit/69a03f671f892b724be1a899a3d90c981e7601c9)
- [Dev Deps] update `aud`, `available-typed-arrays`, `npmignore`, `object-inspect`, `tape` [`53ca341`](https://github.com/fengyuanchen/is-array-buffer/commit/53ca34182d2aab61e90e744ee47d01f6577b616e)
- [Deps] update `call-bind`, `get-intrinsic`, `is-typed-array` [`bec883f`](https://github.com/fengyuanchen/is-array-buffer/commit/bec883f31e83410a46927a843ded46ebffbbb1f6)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`944d4ce`](https://github.com/fengyuanchen/is-array-buffer/commit/944d4cea229ce29a0965665bf59df290c53ecbbb)
- [meta] add missing `engines.node` [`0852be6`](https://github.com/fengyuanchen/is-array-buffer/commit/0852be6f64188912d2383ff9b6a7cc12bd369006)
- [Deps] update `get-intrinsic` [`b59c4af`](https://github.com/fengyuanchen/is-array-buffer/commit/b59c4af432014649d6cd1f070cf6e9917e6ad524)
## [v3.0.2](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.1...v3.0.2) - 2023-03-01
### Commits

3
node_modules/is-array-buffer/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
declare function isArrayBuffer(value: unknown): value is ArrayBuffer;
export = isArrayBuffer;

View file

@ -3,16 +3,17 @@
var callBind = require('call-bind');
var callBound = require('call-bind/callBound');
var GetIntrinsic = require('get-intrinsic');
var isTypedArray = require('is-typed-array');
var $ArrayBuffer = GetIntrinsic('ArrayBuffer', true);
var $Float32Array = GetIntrinsic('Float32Array', true);
var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true);
/** @type {undefined | ((receiver: ArrayBuffer) => number) | ((receiver: unknown) => never)} */
var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true);
var $toString = callBound('Object.prototype.toString');
// in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method
var abSlice = $ArrayBuffer && !$byteLength && new $ArrayBuffer().slice;
var $abSlice = abSlice && callBind(abSlice);
var abSlice = !!$ArrayBuffer && !$byteLength && new $ArrayBuffer(0).slice;
var $abSlice = !!abSlice && callBind(abSlice);
/** @type {import('.')} */
module.exports = $byteLength || $abSlice
? function isArrayBuffer(obj) {
if (!obj || typeof obj !== 'object') {
@ -20,8 +21,10 @@ module.exports = $byteLength || $abSlice
}
try {
if ($byteLength) {
// @ts-expect-error no idea why TS can't handle the overload
$byteLength(obj);
} else {
// @ts-expect-error TS chooses not to type-narrow inside a closure
$abSlice(obj, 0);
}
return true;
@ -29,14 +32,10 @@ module.exports = $byteLength || $abSlice
return false;
}
}
: $Float32Array
// in node 0.8, ArrayBuffers have no prototype or own methods
? function IsArrayBuffer(obj) {
try {
return (new $Float32Array(obj)).buffer === obj && !isTypedArray(obj);
} catch (e) {
return typeof obj === 'object' && e.name === 'RangeError';
}
: $ArrayBuffer
// in node 0.8, ArrayBuffers have no prototype or own methods, but also no Symbol.toStringTag
? function isArrayBuffer(obj) {
return $toString(obj) === '[object ArrayBuffer]';
}
: function isArrayBuffer(obj) { // eslint-disable-line no-unused-vars
return false;

View file

@ -1,18 +1,20 @@
{
"name": "is-array-buffer",
"version": "3.0.2",
"version": "3.0.4",
"description": "Is this value a JS ArrayBuffer?",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"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",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only --",
@ -42,19 +44,26 @@
},
"homepage": "https://github.com/inspect-js/is-array-buffer#readme",
"devDependencies": {
"@ljharb/eslint-config": "^21.0.1",
"aud": "^2.0.2",
"@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/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",
"available-typed-arrays": "^1.0.5",
"available-typed-arrays": "^1.0.6",
"es-value-fixtures": "^1.4.2",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.0",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.12.3",
"object-inspect": "^1.13.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.6.3"
"tape": "^5.7.4",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
@ -67,12 +76,14 @@
},
"dependencies": {
"call-bind": "^1.0.2",
"get-intrinsic": "^1.2.0",
"is-typed-array": "^1.1.10"
"get-intrinsic": "^1.2.1"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}

View file

@ -11,21 +11,28 @@ var isArrayBuffer = require('..');
test('isArrayBuffer', function (t) {
t.equal(typeof isArrayBuffer, 'function', 'is a function');
var nonABs = v.primitives.concat(
/** @type {unknown[]} */
var nonABs = [].concat(
// @ts-expect-error TS sucks with [].concat
v.primitives,
v.objects,
typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer() : []
typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer(0) : []
);
forEach(nonABs, function (nonAB) {
t.equal(isArrayBuffer(nonAB), false, inspect(nonAB) + ' is not an ArrayBuffer');
});
t.test('actual ArrayBuffer instances', { skip: typeof ArrayBuffer === 'undefined' }, function (st) {
// @ts-expect-error TS grumbles about 0 args
var ab = new ArrayBuffer();
st.equal(isArrayBuffer(ab), true, inspect(ab) + ' is an ArrayBuffer');
var ab42 = new ArrayBuffer(42);
st.equal(isArrayBuffer(ab42), true, inspect(ab42) + ' is an ArrayBuffer');
var dv = new DataView(ab42);
st.equal(isArrayBuffer(dv), false, inspect(dv) + ' is not an ArrayBuffer');
st.end();
});

49
node_modules/is-array-buffer/tsconfig.json generated vendored Normal file
View file

@ -0,0 +1,49 @@
{
"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"
]
}