Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hegel/core

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hegel/core - npm Package Compare versions

Comparing version 0.0.36 to 0.0.37

2

package.json
{
"name": "@hegel/core",
"author": "Artem Kobzar",
"version": "0.0.36",
"version": "0.0.37",
"description": "",

@@ -6,0 +6,0 @@ "main": "index.js",

@@ -141,2 +141,6 @@ "use strict";

return (currentNode, parentNode, precompute, middlecompute, postcompute, meta = {}) => {
if (currentNode.type === _nodes2.default.EXPORT_NAMED_DECLARATION || currentNode.type === _nodes2.default.EXPORT_DEFAULT_DECLARATION) {
currentNode = currentNode.declaration;
}
switch (currentNode.type) {

@@ -266,3 +270,3 @@ case _nodes2.default.VARIABLE_DECLARATION:

if (currentNode.type === _nodes2.default.EXPORT_NAMED_DECLARATION || currentNode.type === _nodes2.default.EXPORT_DEFAULT_DECLARATION) {
currentNode = currentNode.declaration;
currentNode = currentNode.declaration || currentNode;
}

@@ -316,2 +320,6 @@

return (currentNode, parentNode, precompute, middlecompute, postcompute, meta = {}) => {
if (currentNode.type === _nodes2.default.EXPORT_NAMED_DECLARATION || currentNode.type === _nodes2.default.EXPORT_DEFAULT_DECLARATION) {
currentNode = currentNode.declaration;
}
const currentScope = (0, _scopeUtils.getParentForNode)(currentNode, parentNode, moduleScope);

@@ -364,2 +372,15 @@ const typeScope = (0, _scopeUtils.findNearestTypeScope)(currentScope, moduleScope);

case _nodes2.default.EXPORT_LIST:
const isTypeExport = currentNode.exportKind === "type";
const specifiersSource = isTypeExport ? moduleScope.typeScope : moduleScope;
const specifiersTarget = isTypeExport ? moduleScope.exportsTypes : moduleScope.exports;
currentNode.specifiers.forEach(({
local,
exported
}) => {
const existedVariableOrType = specifiersSource instanceof _moduleScope.ModuleScope ? specifiersSource.findVariable(local, parentNode, moduleScope, precompute, middlecompute, postcompute) : specifiersSource.findTypeWithName(local.name, parentNode, moduleScope, precompute, middlecompute, postcompute);
specifiersTarget.set(exported.name, existedVariableOrType);
});
break;
case _nodes2.default.VARIABLE_DECLARATOR:

@@ -366,0 +387,0 @@ const variableInfo = currentScope.findVariable(currentNode.id);

@@ -160,5 +160,10 @@ "use strict";

this.assertParameters(appliedParameters, loc);
let isBottomPresented = false;
const parameters = this.genericArguments.map((t, i) => {
const appliedType = appliedParameters[i];
if (appliedType instanceof _bottomType.$BottomType) {
isBottomPresented = true;
}
if (appliedType === undefined) {

@@ -211,2 +216,8 @@ if (t.defaultType === undefined) {

if (isBottomPresented) {
return new _bottomType.$BottomType({
parent: theMostPriorityParent
}, this, parameters, loc);
}
try {

@@ -213,0 +224,0 @@ const result = this.subordinateType.changeAll([...this.genericArguments, oldAppliedSelf], [...parameters, appliedSelf], theMostPriorityParent);

@@ -138,2 +138,11 @@ "use strict";

if (realProperty instanceof _unionType.UnionType) {
try {
const variants = realProperty.variants.map(p => this.applyGeneric([realTarget, p], loc, shouldBeMemoize, isCalledAsBottom));
return _unionType.UnionType.term(_unionType.UnionType.getName(variants), {}, variants);
} catch {
throw new _errors2.default(`Property "${propertyName}" does not exist in "${currentTarget.name}"`, loc);
}
}
if (realTarget instanceof _unionType.UnionType) {

@@ -140,0 +149,0 @@ try {

@@ -25,2 +25,4 @@ "use strict";

TS_TYPE_PARAMETER: "TSTypeParameter",
EXPORT_LIST: "ExportList",
EXPORT_SPECIFIER: "ExportSpecifier",
EXPORT_NAMED_DECLARATION: "ExportNamedDeclaration",

@@ -27,0 +29,0 @@ EXPORT_DEFAULT_DECLARATION: "ExportDefaultDeclaration",

@@ -186,2 +186,10 @@ "use strict";

if (currentNode.declaration == null) {
return {
type: _nodes2.default.EXPORT_LIST,
exportKind: currentNode.exportKind,
specifiers: currentNode.specifiers
};
}
return currentNode.declaration.type !== _nodes2.default.VARIABLE_DECLARATION ? { ...currentNode.declaration,

@@ -188,0 +196,0 @@ exportAs: currentNode.type === _nodes2.default.EXPORT_DEFAULT_DECLARATION ? "default" : currentNode.declaration.id.name

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc