feat: docker compose maybe

This commit is contained in:
2023-11-13 16:10:04 -05:00
parent 180b261e40
commit b625ccd8d6
8031 changed files with 2182966 additions and 0 deletions

61
node_modules/is-reference/README.md generated vendored Normal file
View File

@ -0,0 +1,61 @@
# is-reference
Utility for determining whether an AST node is a reference.
`foo` is a reference in these cases:
```js
console.log(foo);
var foo;
function foo() {}
function bar(foo) {}
export { foo as x };
```
`foo` is *not* a reference in these cases:
```js
var obj = { foo: 1 };
console.log(obj.foo);
export { x as foo };
```
In all cases, `foo` is an `Identifier` node, but the two kinds must be treated differently for the purposes of scope analysis etc. (The examples are non-exhaustive.)
## Installation
```bash
npm install is-reference
```
## Usage
Example using [Acorn](https://github.com/ternjs/acorn) and [estree-walker](https://github.com/Rich-Harris/estree-walker):
```js
import { parse } from 'acorn';
import { walk } from 'estree-walker';
import is_reference from 'is-reference';
const identifiers = [];
const references = [];
const ast = parse(`var a = b.c;`);
walk(ast, {
enter(node, parent) {
if (node.type === 'Identifier') identifiers.push(node);
if (is_reference(node, parent)) references.push(node);
}
});
identifiers.forEach(node => console.log(node.name)); // a, b, c
references.forEach(node => console.log(node.name)); // a, b
```
## License
MIT

48
node_modules/is-reference/package.json generated vendored Normal file
View File

@ -0,0 +1,48 @@
{
"name": "is-reference",
"version": "3.0.2",
"description": "Determine whether an AST node is a reference",
"type": "module",
"module": "src/index.js",
"types": "types/index.d.ts",
"exports": {
"types": "./types/index.d.ts",
"import": "./src/index.js"
},
"files": [
"src",
"types"
],
"scripts": {
"test": "uvu",
"prepublishOnly": "npm test && dts-buddy"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Rich-Harris/is-reference.git"
},
"keywords": [
"ast",
"javascript",
"estree",
"acorn"
],
"author": "Rich Harris",
"license": "MIT",
"bugs": {
"url": "https://github.com/Rich-Harris/is-reference/issues"
},
"homepage": "https://github.com/Rich-Harris/is-reference#readme",
"dependencies": {
"@types/estree": "*"
},
"devDependencies": {
"acorn": "^8.0.5",
"acorn-class-fields": "^1.0.0",
"acorn-static-class-features": "^1.0.0",
"dts-buddy": "^0.2.4",
"estree-walker": "^3.0.0",
"typescript": "^4.1.5",
"uvu": "^0.5.1"
}
}

49
node_modules/is-reference/src/index.js generated vendored Normal file
View File

@ -0,0 +1,49 @@
/** @typedef { import('estree').Node} Node */
/** @typedef {Node | {
* type: 'PropertyDefinition';
* computed: boolean;
* value: Node
* }} NodeWithPropertyDefinition */
/**
*
* @param {NodeWithPropertyDefinition} node
* @param {NodeWithPropertyDefinition} parent
* @returns {boolean}
*/
export default function is_reference (node, parent) {
if (node.type === 'MemberExpression') {
return !node.computed && is_reference(node.object, node);
}
if (node.type === 'Identifier') {
if (!parent) return true;
switch (parent.type) {
// disregard `bar` in `foo.bar`
case 'MemberExpression': return parent.computed || node === parent.object;
// disregard the `foo` in `class {foo(){}}` but keep it in `class {[foo](){}}`
case 'MethodDefinition': return parent.computed;
// disregard the `foo` in `class {foo=bar}` but keep it in `class {[foo]=bar}` and `class {bar=foo}`
case 'PropertyDefinition': return parent.computed || node === parent.value;
// disregard the `bar` in `{ bar: foo }`, but keep it in `{ [bar]: foo }`
case 'Property': return parent.computed || node === parent.value;
// disregard the `bar` in `export { foo as bar }` or
// the foo in `import { foo as bar }`
case 'ExportSpecifier':
case 'ImportSpecifier': return node === parent.local;
// disregard the `foo` in `foo: while (...) { ... break foo; ... continue foo;}`
case 'LabeledStatement':
case 'BreakStatement':
case 'ContinueStatement': return false;
default: return true;
}
}
return false;
}

11
node_modules/is-reference/types/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,11 @@
declare module 'is-reference' {
export default function is_reference(node: NodeWithPropertyDefinition, parent: NodeWithPropertyDefinition): boolean;
export type Node = import('estree').Node;
export type NodeWithPropertyDefinition = Node | {
type: 'PropertyDefinition';
computed: boolean;
value: Node;
};
}
//# sourceMappingURL=index.d.ts.map

14
node_modules/is-reference/types/index.d.ts.map generated vendored Normal file
View File

@ -0,0 +1,14 @@
{
"version": 3,
"file": "index.d.ts",
"names": [
"Node"
],
"sources": [
"../src/index.js"
],
"sourcesContent": [
null
],
"mappings": ";;aAAgCA,IAAIA"
}