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

typings-core

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typings-core - npm Package Compare versions

Comparing version 1.1.3 to 1.2.0

2

dist/bundle.js

@@ -13,3 +13,3 @@ "use strict";

if (out == null) {
return Promise.reject(new TypeError('Out directory is required for bundle'));
return Promise.reject(new TypeError('Out file path is required for bundle'));
}

@@ -16,0 +16,0 @@ return dependencies_1.resolveAllDependencies({ cwd: cwd, dev: false, global: false, emitter: emitter })

@@ -280,13 +280,17 @@ "use strict";

var hasExports = false;
var hasDefaultExport = false;
var hasExportEquals = false;
var hasLocalImports = false;
var wasDeclared = false;
function replacer(node) {
if (node.kind === ts.SyntaxKind.ExportAssignment ||
node.kind === ts.SyntaxKind.ExportDeclaration) {
if (node.kind === ts.SyntaxKind.ExportAssignment) {
hasDefaultExport = !node.isExportEquals;
hasExportEquals = !hasDefaultExport;
}
else if (node.kind === ts.SyntaxKind.ExportDeclaration) {
hasExports = true;
}
else {
hasExports = hasExports ||
!!(node.flags & ts.NodeFlags.Export) ||
!!(node.flags & ts.NodeFlags.Default);
hasExports = hasExports || !!(node.flags & ts.NodeFlags.Export);
hasDefaultExport = hasDefaultExport || !!(node.flags & ts.NodeFlags.Default);
}

@@ -324,4 +328,19 @@ if (node.kind === ts.SyntaxKind.StringLiteral &&

function alias(name) {
var reexport = "import alias = require('" + modulePath + "');" + path_2.EOL + "export = alias;";
return hasExports ? declareText(name, reexport) : '';
var imports = [];
if (hasExportEquals) {
imports.push("import main = require('" + modulePath + "');");
imports.push("export = main;");
}
else {
if (hasExports) {
imports.push("export * from '" + modulePath + "';");
}
if (hasDefaultExport) {
imports.push("export { default } from '" + modulePath + "';");
}
}
if (imports.length === 0) {
return '';
}
return declareText(name, imports.join(path_2.EOL));
}

@@ -328,0 +347,0 @@ var isEntry = rawPath === entry;

@@ -70,2 +70,9 @@ "use strict";

var raw = "registry:" + meta.source + "/" + meta.name + "#" + entry.tag;
if (entry.deprecated) {
options.emitter.emit('deprecated', {
parent: options.parent,
raw: dependency.raw,
date: new Date(entry.deprecated)
});
}
return resolveDependencyInternally(type, location, raw, options);

@@ -72,0 +79,0 @@ }, function (error) {

{
"name": "typings-core",
"version": "1.1.3",
"version": "1.2.0",
"description": "The logic of Typings",

@@ -5,0 +5,0 @@ "main": "dist/typings.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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