1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-08-01 14:34:35 +00:00
This commit is contained in:
MatteZ02
2020-03-03 22:30:50 +02:00
parent edfcc6f474
commit 30022c7634
11800 changed files with 1984416 additions and 1 deletions

11
node_modules/side-channel/.eslintrc generated vendored Normal file
View File

@@ -0,0 +1,11 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"max-lines-per-function": 0,
"max-params": 0,
"new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }],
},
}

12
node_modules/side-channel/.github/FUNDING.yml generated vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/side-channel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

15
node_modules/side-channel/.github/workflows/rebase.yml generated vendored Normal file
View File

@@ -0,0 +1,15 @@
name: Automatic Rebase
on: [pull_request]
jobs:
_:
name: "Automatic Rebase"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ljharb/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

8
node_modules/side-channel/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,8 @@
version: ~> 1.0
language: node_js
os:
- linux
import:
- ljharb/travis-ci:node/all.yml
- ljharb/travis-ci:node/pretest.yml
- ljharb/travis-ci:node/posttest.yml

36
node_modules/side-channel/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,36 @@
# Changelog
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).
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
## [v1.0.2](https://github.com/ljharb/side-channel/compare/v1.0.1...v1.0.2) - 2019-12-20
### Commits
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`4a526df`](https://github.com/ljharb/side-channel/commit/4a526df44e4701566ed001ec78546193f818b082)
- [Deps] update `es-abstract` [`d4f6e62`](https://github.com/ljharb/side-channel/commit/d4f6e629b6fb93a07415db7f30d3c90fd7f264fe)
## [v1.0.1](https://github.com/ljharb/side-channel/compare/v1.0.0...v1.0.1) - 2019-12-02
### Commits
- [Fix] add missing "exports" [`d212907`](https://github.com/ljharb/side-channel/commit/d2129073abf0701a5343bf28aa2145617604dc2e)
## v1.0.0 - 2019-12-02
### Commits
- Initial implementation [`dbebd3a`](https://github.com/ljharb/side-channel/commit/dbebd3a4b5ed64242f9a6810efe7c4214cd8cde4)
- Initial tests [`73bdefe`](https://github.com/ljharb/side-channel/commit/73bdefe568c9076cf8c0b8719bc2141aec0e19b8)
- Initial commit [`43c03e1`](https://github.com/ljharb/side-channel/commit/43c03e1c2849ec50a87b7a5cd76238a62b0b8770)
- npm init [`5c090a7`](https://github.com/ljharb/side-channel/commit/5c090a765d66a5527d9889b89aeff78dee91348c)
- [meta] add `auto-changelog` [`a5c4e56`](https://github.com/ljharb/side-channel/commit/a5c4e5675ec02d5eb4d84b4243aeea2a1d38fbec)
- [actions] add automatic rebasing / merge commit blocking [`bab1683`](https://github.com/ljharb/side-channel/commit/bab1683d8f9754b086e94397699fdc645e0d7077)
- [meta] add `funding` field; create FUNDING.yml [`63d7aea`](https://github.com/ljharb/side-channel/commit/63d7aeaf34f5650650ae97ca4b9fae685bd0937c)
- [Tests] add `npm run lint` [`46a5a81`](https://github.com/ljharb/side-channel/commit/46a5a81705cd2664f83df232c01dbbf2ee952885)
- Only apps should have lockfiles [`8b16b03`](https://github.com/ljharb/side-channel/commit/8b16b0305f00895d90c4e2e5773c854cfea0e448)
- [meta] add `safe-publish-latest` [`2f098ef`](https://github.com/ljharb/side-channel/commit/2f098ef092a39399cfe548b19a1fc03c2fd2f490)

21
node_modules/side-channel/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

2
node_modules/side-channel/README.md generated vendored Normal file
View File

@@ -0,0 +1,2 @@
# side-channel
Store information about any JS value in a side channel. Uses WeakMap if available.

107
node_modules/side-channel/index.js generated vendored Normal file
View File

@@ -0,0 +1,107 @@
'use strict';
var GetIntrinsic = require('es-abstract/GetIntrinsic');
var callBound = require('es-abstract/helpers/callBound');
var inspect = require('object-inspect');
var $TypeError = GetIntrinsic('%TypeError%');
var $WeakMap = GetIntrinsic('%WeakMap%', true);
var $Map = GetIntrinsic('%Map%', true);
var $push = callBound('Array.prototype.push');
var $weakMapGet = callBound('WeakMap.prototype.get', true);
var $weakMapSet = callBound('WeakMap.prototype.set', true);
var $weakMapHas = callBound('WeakMap.prototype.has', true);
var $mapGet = callBound('Map.prototype.get', true);
var $mapSet = callBound('Map.prototype.set', true);
var $mapHas = callBound('Map.prototype.has', true);
var objectGet = function (objects, key) { // eslint-disable-line consistent-return
for (var i = 0; i < objects.length; i += 1) {
if (objects[i].key === key) {
return objects[i].value;
}
}
};
var objectSet = function (objects, key, value) {
for (var i = 0; i < objects.length; i += 1) {
if (objects[i].key === key) {
objects[i].value = value; // eslint-disable-line no-param-reassign
return;
}
}
$push(objects, {
key: key,
value: value
});
};
var objectHas = function (objects, key) {
for (var i = 0; i < objects.length; i += 1) {
if (objects[i].key === key) {
return true;
}
}
return false;
};
module.exports = function getSideChannel() {
var $wm;
var $m;
var $o;
var channel = {
assert: function (key) {
if (!channel.has(key)) {
throw new $TypeError('Side channel does not contain ' + inspect(key));
}
},
get: function (key) { // eslint-disable-line consistent-return
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
if ($wm) {
return $weakMapGet($wm, key);
}
} else if ($Map) {
if ($m) {
return $mapGet($m, key);
}
} else {
if ($o) { // eslint-disable-line no-lonely-if
return objectGet($o, key);
}
}
},
has: function (key) {
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
if ($wm) {
return $weakMapHas($wm, key);
}
} else if ($Map) {
if ($m) {
return $mapHas($m, key);
}
} else {
if ($o) { // eslint-disable-line no-lonely-if
return objectHas($o, key);
}
}
return false;
},
set: function (key, value) {
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
if (!$wm) {
$wm = new $WeakMap();
}
$weakMapSet($wm, key, value);
} else if ($Map) {
if (!$m) {
$m = new $Map();
}
$mapSet($m, key, value);
} else {
if (!$o) {
$o = [];
}
objectSet($o, key, value);
}
}
};
return channel;
};

90
node_modules/side-channel/package.json generated vendored Normal file
View File

@@ -0,0 +1,90 @@
{
"_from": "side-channel@^1.0.1",
"_id": "side-channel@1.0.2",
"_inBundle": false,
"_integrity": "sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA==",
"_location": "/side-channel",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "side-channel@^1.0.1",
"name": "side-channel",
"escapedName": "side-channel",
"rawSpec": "^1.0.1",
"saveSpec": null,
"fetchSpec": "^1.0.1"
},
"_requiredBy": [
"/deep-equal"
],
"_resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.2.tgz",
"_shasum": "df5d1abadb4e4bf4af1cd8852bf132d2f7876947",
"_spec": "side-channel@^1.0.1",
"_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix\\node_modules\\deep-equal",
"author": {
"name": "Jordan Harband",
"email": "ljharb@gmail.com"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false
},
"bugs": {
"url": "https://github.com/ljharb/side-channel/issues"
},
"bundleDependencies": false,
"dependencies": {
"es-abstract": "^1.17.0-next.1",
"object-inspect": "^1.7.0"
},
"deprecated": false,
"description": "Store information about any JS value in a side channel. Uses WeakMap if available.",
"devDependencies": {
"@ljharb/eslint-config": "^15.1.0",
"auto-changelog": "^1.16.2",
"eslint": "^6.7.2",
"safe-publish-latest": "^1.1.4",
"tape": "^4.12.0"
},
"exports": {
".": [
{
"default": "./index.js"
},
"./index.js"
]
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"homepage": "https://github.com/ljharb/side-channel#readme",
"keywords": [
"weakmap",
"map",
"side",
"channel",
"metadata"
],
"license": "MIT",
"main": "index.js",
"name": "side-channel",
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/side-channel.git"
},
"scripts": {
"lint": "eslint .",
"posttest": "npx aud",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prepublish": "safe-publish-latest",
"pretest": "npm run lint",
"test": "npm run tests-only",
"tests-only": "node test",
"version": "auto-changelog && git add CHANGELOG.md"
},
"version": "1.0.2"
}

69
node_modules/side-channel/test/index.js generated vendored Normal file
View File

@@ -0,0 +1,69 @@
'use strict';
var test = require('tape');
var getSideChannel = require('../');
test('export', function (t) {
t.equal(typeof getSideChannel, 'function', 'is a function');
t.equal(getSideChannel.length, 0, 'takes no arguments');
var channel = getSideChannel();
t.ok(channel, 'is truthy');
t.equal(typeof channel, 'object', 'is an object');
t.end();
});
test('assert', function (t) {
var channel = getSideChannel();
t['throws'](
function () { channel.assert({}); },
TypeError,
'nonexistent value throws'
);
var o = {};
channel.set(o, 'data');
t.doesNotThrow(function () { channel.assert(o); }, 'existent value noops');
t.end();
});
test('has', function (t) {
var channel = getSideChannel();
var o = [];
t.equal(channel.has(o), false, 'nonexistent value yields false');
channel.set(o, 'foo');
t.equal(channel.has(o), true, 'existent value yields true');
t.end();
});
test('get', function (t) {
var channel = getSideChannel();
var o = {};
t.equal(channel.get(o), undefined, 'nonexistent value yields undefined');
var data = {};
channel.set(o, data);
t.equal(channel.get(o), data, '"get" yields data set by "set"');
t.end();
});
test('set', function (t) {
var channel = getSideChannel();
var o = function () {};
t.equal(channel.get(o), undefined, 'value not set');
channel.set(o, 42);
t.equal(channel.get(o), 42, 'value was set');
channel.set(o, Infinity);
t.equal(channel.get(o), Infinity, 'value was set again');
t.end();
});