New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cldcvr/custom-elements-manifest-to-types

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cldcvr/custom-elements-manifest-to-types - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

18

dist/index.js

@@ -196,3 +196,2 @@ "use strict";

const moduleName = modulePath || "./src"; //module.path.slice(0, -3);
const extractedTypes = new Set();
(_a = module.declarations) === null || _a === void 0 ? void 0 : _a.forEach((declaration) => {

@@ -203,2 +202,3 @@ if (!("customElement" in declaration) || !declaration.customElement) {

if (declaration.attributes) {
const extractedTypes = new Set();
declaration.attributes.forEach((attribute) => {

@@ -215,12 +215,12 @@ var _a;

});
if (extractedTypes.size > 0) {
let importStatement = `import type { `;
Array.from(extractedTypes).forEach((et, idx) => {
importStatement += `${et}${idx < extractedTypes.size - 1 ? "," : ""}`;
});
importStatement += `} from '${moduleName}';`;
moduleTypeImports.push(importStatement);
}
}
});
if (extractedTypes.size > 0) {
let importStatement = `import type { `;
Array.from(extractedTypes).forEach((et, idx) => {
importStatement += `${et}${idx < extractedTypes.size - 1 ? "," : ""}`;
});
importStatement += `} from '${moduleName}';`;
moduleTypeImports.push(importStatement);
}
});

@@ -227,0 +227,0 @@ return moduleTypeImports;

@@ -220,3 +220,3 @@ import { Declaration, Package, PropertyLike } from "custom-elements-manifest/schema";

const moduleName = modulePath || "./src"; //module.path.slice(0, -3);
const extractedTypes: Set<string> = new Set();
module.declarations?.forEach((declaration) => {

@@ -228,2 +228,3 @@ if (!("customElement" in declaration) || !declaration.customElement) {

if (declaration.attributes) {
const extractedTypes: Set<string> = new Set();
declaration.attributes.forEach((attribute) => {

@@ -239,12 +240,13 @@ if (attribute.type?.text) {

});
if (extractedTypes.size > 0) {
let importStatement = `import type { `;
Array.from(extractedTypes).forEach((et, idx) => {
importStatement += `${et}${idx < extractedTypes.size - 1 ? "," : ""}`;
});
importStatement += `} from '${moduleName}';`;
moduleTypeImports.push(importStatement);
}
}
});
if (extractedTypes.size > 0) {
let importStatement = `import type { `;
Array.from(extractedTypes).forEach((et, idx) => {
importStatement += `${et}${idx < extractedTypes.size - 1 ? "," : ""}`;
});
importStatement += `} from '${moduleName}';`;
moduleTypeImports.push(importStatement);
}
});

@@ -251,0 +253,0 @@

{
"name": "@cldcvr/custom-elements-manifest-to-types",
"version": "1.0.5",
"version": "1.0.6",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

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