Deployed the page to Github Pages.

This commit is contained in:
Batuhan Berk Başoğlu 2024-11-03 21:30:09 -05:00
parent 1d79754e93
commit 2c89899458
Signed by: batuhan-basoglu
SSH key fingerprint: SHA256:kEsnuHX+qbwhxSAXPUQ4ox535wFHu/hIRaa53FzxRpo
62797 changed files with 6551425 additions and 15279 deletions

View file

@ -0,0 +1,22 @@
MIT License
Copyright (c) 2014-present Sebastian McKenzie and other contributors
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.

View file

@ -0,0 +1,19 @@
# @babel/helper-builder-binary-assignment-operator-visitor
> Helper function to build binary assignment operator visitors
See our website [@babel/helper-builder-binary-assignment-operator-visitor](https://babeljs.io/docs/babel-helper-builder-binary-assignment-operator-visitor) for more information.
## Install
Using npm:
```sh
npm install --save @babel/helper-builder-binary-assignment-operator-visitor
```
or using yarn:
```sh
yarn add @babel/helper-builder-binary-assignment-operator-visitor
```

View file

@ -0,0 +1,75 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = explode;
var _t = require("@babel/types");
const {
assignmentExpression,
cloneNode,
isIdentifier,
isLiteral,
isMemberExpression,
isPrivateName,
isPureish,
isSuper,
memberExpression,
toComputedKey
} = _t;
function getObjRef(node, nodes, scope) {
let ref;
if (isIdentifier(node)) {
if (scope.hasBinding(node.name)) {
return node;
} else {
ref = node;
}
} else if (isMemberExpression(node)) {
ref = node.object;
if (isSuper(ref) || isIdentifier(ref) && scope.hasBinding(ref.name)) {
return ref;
}
} else {
throw new Error(`We can't explode this node type ${node["type"]}`);
}
const temp = scope.generateUidIdentifierBasedOnNode(ref);
scope.push({
id: temp
});
nodes.push(assignmentExpression("=", cloneNode(temp), cloneNode(ref)));
return temp;
}
function getPropRef(node, nodes, scope) {
const prop = node.property;
if (isPrivateName(prop)) {
throw new Error("We can't generate property ref for private name, please install `@babel/plugin-transform-class-properties`");
}
const key = toComputedKey(node, prop);
if (isLiteral(key) && isPureish(key)) return key;
const temp = scope.generateUidIdentifierBasedOnNode(prop);
scope.push({
id: temp
});
nodes.push(assignmentExpression("=", cloneNode(temp), cloneNode(prop)));
return temp;
}
function explode(node, nodes, scope) {
const obj = getObjRef(node, nodes, scope);
let ref, uid;
if (isIdentifier(node)) {
ref = cloneNode(node);
uid = obj;
} else {
const prop = getPropRef(node, nodes, scope);
const computed = node.computed || isLiteral(prop);
uid = memberExpression(cloneNode(obj), cloneNode(prop), computed);
ref = memberExpression(cloneNode(obj), cloneNode(prop), computed);
}
return {
uid: uid,
ref: ref
};
}
//# sourceMappingURL=explode-assignable-expression.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _t = require("@babel/types");
var _explodeAssignableExpression = require("./explode-assignable-expression.js");
const {
assignmentExpression,
sequenceExpression
} = _t;
function _default(opts) {
const {
build,
operator
} = opts;
const visitor = {
AssignmentExpression(path) {
const {
node,
scope
} = path;
if (node.operator !== operator + "=") return;
const nodes = [];
const exploded = (0, _explodeAssignableExpression.default)(node.left, nodes, scope);
nodes.push(assignmentExpression("=", exploded.ref, build(exploded.uid, node.right)));
path.replaceWith(sequenceExpression(nodes));
},
BinaryExpression(path) {
const {
node
} = path;
if (node.operator === operator) {
path.replaceWith(build(node.left, node.right));
}
}
};
return visitor;
}
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"version":3,"names":["_t","require","_explodeAssignableExpression","assignmentExpression","sequenceExpression","_default","opts","build","operator","visitor","AssignmentExpression","path","node","scope","nodes","exploded","explode","left","push","ref","uid","right","replaceWith","BinaryExpression"],"sources":["../src/index.ts"],"sourcesContent":["import { assignmentExpression, sequenceExpression } from \"@babel/types\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\n\nimport explode from \"./explode-assignable-expression.ts\";\n\nexport default function (opts: {\n build: (\n left: t.Expression | t.PrivateName | t.Super,\n right: t.Expression,\n ) => t.Expression;\n operator: t.BinaryExpression[\"operator\"];\n}) {\n const { build, operator } = opts;\n\n const visitor: Visitor = {\n AssignmentExpression(path) {\n const { node, scope } = path;\n if (node.operator !== operator + \"=\") return;\n\n const nodes: t.AssignmentExpression[] = [];\n // @ts-expect-error Fixme: node.left can be a TSAsExpression\n const exploded = explode(node.left, nodes, scope);\n nodes.push(\n assignmentExpression(\n \"=\",\n exploded.ref,\n build(exploded.uid, node.right),\n ),\n );\n path.replaceWith(sequenceExpression(nodes));\n },\n\n BinaryExpression(path) {\n const { node } = path;\n if (node.operator === operator) {\n path.replaceWith(build(node.left, node.right));\n }\n },\n };\n return visitor;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAIA,IAAAC,4BAAA,GAAAD,OAAA;AAAyD;EAJhDE,oBAAoB;EAAEC;AAAkB,IAAAJ,EAAA;AAMlC,SAAAK,SAAUC,IAMxB,EAAE;EACD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAGF,IAAI;EAEhC,MAAMG,OAAgB,GAAG;IACvBC,oBAAoBA,CAACC,IAAI,EAAE;MACzB,MAAM;QAAEC,IAAI;QAAEC;MAAM,CAAC,GAAGF,IAAI;MAC5B,IAAIC,IAAI,CAACJ,QAAQ,KAAKA,QAAQ,GAAG,GAAG,EAAE;MAEtC,MAAMM,KAA+B,GAAG,EAAE;MAE1C,MAAMC,QAAQ,GAAG,IAAAC,oCAAO,EAACJ,IAAI,CAACK,IAAI,EAAEH,KAAK,EAAED,KAAK,CAAC;MACjDC,KAAK,CAACI,IAAI,CACRf,oBAAoB,CAClB,GAAG,EACHY,QAAQ,CAACI,GAAG,EACZZ,KAAK,CAACQ,QAAQ,CAACK,GAAG,EAAER,IAAI,CAACS,KAAK,CAChC,CACF,CAAC;MACDV,IAAI,CAACW,WAAW,CAAClB,kBAAkB,CAACU,KAAK,CAAC,CAAC;IAC7C,CAAC;IAEDS,gBAAgBA,CAACZ,IAAI,EAAE;MACrB,MAAM;QAAEC;MAAK,CAAC,GAAGD,IAAI;MACrB,IAAIC,IAAI,CAACJ,QAAQ,KAAKA,QAAQ,EAAE;QAC9BG,IAAI,CAACW,WAAW,CAACf,KAAK,CAACK,IAAI,CAACK,IAAI,EAAEL,IAAI,CAACS,KAAK,CAAC,CAAC;MAChD;IACF;EACF,CAAC;EACD,OAAOZ,OAAO;AAChB","ignoreList":[]}

View file

@ -0,0 +1,25 @@
{
"name": "@babel/helper-builder-binary-assignment-operator-visitor",
"version": "7.25.9",
"description": "Helper function to build binary assignment operator visitors",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-helper-builder-binary-assignment-operator-visitor"
},
"homepage": "https://babel.dev/docs/en/next/babel-helper-builder-binary-assignment-operator-visitor",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"dependencies": {
"@babel/traverse": "^7.25.9",
"@babel/types": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
}