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

@blocz/detect-imports

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocz/detect-imports - npm Package Compare versions

Comparing version 0.1.0-beta.0 to 0.1.0-beta.1

lib/detect-imports.module.js

2

lib/detect-imports.js

@@ -1,2 +0,2 @@

var e,r=(e=require("acorn-jsx"))&&"object"==typeof e&&"default"in e?e.default:e,t=require("acorn");exports.detectImports=function(e){try{return Promise.resolve(function(e){try{return Promise.resolve(t.Parser.extend(r()).parse(e,{ecmaVersion:"latest",sourceType:"module"}))}catch(e){return Promise.reject(e)}}(e)).then(function(e){return e.body.filter(function(e){return"ImportDeclaration"===e.type}).map(function(e){return{module:e.source.value,imports:e.specifiers.map(function(e){return"ImportDefaultSpecifier"===e.type?{imported:"default",local:e.local.name}:"ImportSpecifier"===e.type?{imported:e.imported.name,local:e.local.name}:null}).filter(Boolean)}})})}catch(e){return Promise.reject(e)}};
var e=require("acorn-jsx"),r=require("acorn");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/t(e);exports.detectImports=function(e){try{return Promise.resolve(function(e){try{return Promise.resolve(r.Parser.extend(o.default()).parse(e,{ecmaVersion:"latest",sourceType:"module"}))}catch(e){return Promise.reject(e)}}(e)).then(function(e){return e.body.filter(function(e){return"ImportDeclaration"===e.type}).map(function(e){return{module:e.source.value,imports:e.specifiers.map(function(e){return"ImportDefaultSpecifier"===e.type?{imported:"default",local:e.local.name}:"ImportSpecifier"===e.type?{imported:e.imported.name,local:e.local.name}:null}).filter(Boolean)}})})}catch(e){return Promise.reject(e)}};
//# sourceMappingURL=detect-imports.js.map
{
"name": "@blocz/detect-imports",
"version": "0.1.0-beta.0",
"version": "0.1.0-beta.1",
"source": "src/index.ts",
"main": "lib/detect-imports.js",
"umd:main": "lib/detect-imports.umd.js",
"module": "lib/detect-imports.es.js",
"module": "lib/detect-imports.module.js",
"types": "lib/index.d.ts",

@@ -17,12 +16,11 @@ "repository": "git@github.com:bloczjs/mdx.git",

"scripts": {
"build": "rm -rf lib/ && microbundle --name $npm_package_name -o lib && mv lib/detect-imports/src/* lib/ && rm -rf lib/detect-imports/",
"prepublishOnly": "yarn -s build"
"build": "rm -rf lib/ && microbundle -f esm,cjs"
},
"devDependencies": {
"microbundle": "0.11.0"
"microbundle": "^0.14.2"
},
"dependencies": {
"acorn": "^8.0.0",
"acorn-jsx": "^5.3.1"
"acorn": "^8.6.0",
"acorn-jsx": "^5.3.2"
}
}

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