format: prettify entire project
This commit is contained in:
8
node_modules/side-channel/index.d.ts
generated
vendored
8
node_modules/side-channel/index.d.ts
generated
vendored
@ -3,10 +3,10 @@ import getSideChannelMap from 'side-channel-map';
|
||||
import getSideChannelWeakMap from 'side-channel-weakmap';
|
||||
|
||||
declare namespace getSideChannel {
|
||||
type Channel<K, V> =
|
||||
| getSideChannelList.Channel<K, V>
|
||||
| ReturnType<Exclude<typeof getSideChannelMap<K, V>, false>>
|
||||
| ReturnType<Exclude<typeof getSideChannelWeakMap<K, V>, false>>;
|
||||
type Channel<K, V> =
|
||||
| getSideChannelList.Channel<K, V>
|
||||
| ReturnType<Exclude<typeof getSideChannelMap<K, V>, false>>
|
||||
| ReturnType<Exclude<typeof getSideChannelWeakMap<K, V>, false>>;
|
||||
}
|
||||
|
||||
declare function getSideChannel<K, V>(): getSideChannel.Channel<K, V>;
|
||||
|
57
node_modules/side-channel/index.js
generated
vendored
57
node_modules/side-channel/index.js
generated
vendored
@ -6,38 +6,39 @@ var getSideChannelList = require('side-channel-list');
|
||||
var getSideChannelMap = require('side-channel-map');
|
||||
var getSideChannelWeakMap = require('side-channel-weakmap');
|
||||
|
||||
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
||||
var makeChannel =
|
||||
getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
||||
|
||||
/** @type {import('.')} */
|
||||
module.exports = function getSideChannel() {
|
||||
/** @typedef {ReturnType<typeof getSideChannel>} Channel */
|
||||
/** @typedef {ReturnType<typeof getSideChannel>} Channel */
|
||||
|
||||
/** @type {Channel | undefined} */ var $channelData;
|
||||
/** @type {Channel | undefined} */ var $channelData;
|
||||
|
||||
/** @type {Channel} */
|
||||
var channel = {
|
||||
assert: function (key) {
|
||||
if (!channel.has(key)) {
|
||||
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
||||
}
|
||||
},
|
||||
'delete': function (key) {
|
||||
return !!$channelData && $channelData['delete'](key);
|
||||
},
|
||||
get: function (key) {
|
||||
return $channelData && $channelData.get(key);
|
||||
},
|
||||
has: function (key) {
|
||||
return !!$channelData && $channelData.has(key);
|
||||
},
|
||||
set: function (key, value) {
|
||||
if (!$channelData) {
|
||||
$channelData = makeChannel();
|
||||
}
|
||||
/** @type {Channel} */
|
||||
var channel = {
|
||||
assert: function (key) {
|
||||
if (!channel.has(key)) {
|
||||
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
||||
}
|
||||
},
|
||||
delete: function (key) {
|
||||
return !!$channelData && $channelData['delete'](key);
|
||||
},
|
||||
get: function (key) {
|
||||
return $channelData && $channelData.get(key);
|
||||
},
|
||||
has: function (key) {
|
||||
return !!$channelData && $channelData.has(key);
|
||||
},
|
||||
set: function (key, value) {
|
||||
if (!$channelData) {
|
||||
$channelData = makeChannel();
|
||||
}
|
||||
|
||||
$channelData.set(key, value);
|
||||
}
|
||||
};
|
||||
// @ts-expect-error TODO: figure out why this is erroring
|
||||
return channel;
|
||||
$channelData.set(key, value);
|
||||
},
|
||||
};
|
||||
// @ts-expect-error TODO: figure out why this is erroring
|
||||
return channel;
|
||||
};
|
||||
|
166
node_modules/side-channel/package.json
generated
vendored
166
node_modules/side-channel/package.json
generated
vendored
@ -1,85 +1,85 @@
|
||||
{
|
||||
"name": "side-channel",
|
||||
"version": "1.1.0",
|
||||
"description": "Store information about any JS value in a side channel. Uses WeakMap if available.",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"types": "./index.d.ts",
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"postlint": "tsc -p . && attw -P",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "npx npm@'>=10.2' audit --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/side-channel.git"
|
||||
},
|
||||
"keywords": [
|
||||
"weakmap",
|
||||
"map",
|
||||
"side",
|
||||
"channel",
|
||||
"metadata"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/side-channel/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/side-channel#readme",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"object-inspect": "^1.13.3",
|
||||
"side-channel-list": "^1.0.0",
|
||||
"side-channel-map": "^1.0.1",
|
||||
"side-channel-weakmap": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.17.1",
|
||||
"@ljharb/eslint-config": "^21.1.1",
|
||||
"@ljharb/tsconfig": "^0.2.2",
|
||||
"@types/object-inspect": "^1.13.0",
|
||||
"@types/tape": "^5.6.5",
|
||||
"auto-changelog": "^2.5.0",
|
||||
"eclint": "^2.8.1",
|
||||
"encoding": "^0.1.13",
|
||||
"eslint": "=8.8.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.9.0",
|
||||
"typescript": "next"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
"name": "side-channel",
|
||||
"version": "1.1.0",
|
||||
"description": "Store information about any JS value in a side channel. Uses WeakMap if available.",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"types": "./index.d.ts",
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"postlint": "tsc -p . && attw -P",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "npx npm@'>=10.2' audit --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/side-channel.git"
|
||||
},
|
||||
"keywords": [
|
||||
"weakmap",
|
||||
"map",
|
||||
"side",
|
||||
"channel",
|
||||
"metadata"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/side-channel/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/side-channel#readme",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"object-inspect": "^1.13.3",
|
||||
"side-channel-list": "^1.0.0",
|
||||
"side-channel-map": "^1.0.1",
|
||||
"side-channel-weakmap": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.17.1",
|
||||
"@ljharb/eslint-config": "^21.1.1",
|
||||
"@ljharb/tsconfig": "^0.2.2",
|
||||
"@types/object-inspect": "^1.13.0",
|
||||
"@types/tape": "^5.6.5",
|
||||
"auto-changelog": "^2.5.0",
|
||||
"eclint": "^2.8.1",
|
||||
"encoding": "^0.1.13",
|
||||
"eslint": "=8.8.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.9.0",
|
||||
"typescript": "next"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
}
|
||||
|
12
node_modules/side-channel/tsconfig.json
generated
vendored
12
node_modules/side-channel/tsconfig.json
generated
vendored
@ -1,9 +1,7 @@
|
||||
{
|
||||
"extends": "@ljharb/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "es2021",
|
||||
},
|
||||
"exclude": [
|
||||
"coverage",
|
||||
],
|
||||
"extends": "@ljharb/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "es2021"
|
||||
},
|
||||
"exclude": ["coverage"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user