Socket
Socket
Sign inDemoInstall

ast-module-types

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-module-types - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

14

index.js

@@ -202,6 +202,9 @@ 'use strict';

case 'ImportDefaultSpecifier':
case 'ImportNamespaceSpecifier':
case 'ImportNamespaceSpecifier': {
return true;
default:
}
default: {
return false;
}
}

@@ -216,6 +219,9 @@ };

case 'ExportDefaultDeclaration':
case 'ExportAllDeclaration':
case 'ExportAllDeclaration': {
return true;
default:
}
default: {
return false;
}
}

@@ -222,0 +228,0 @@ };

{
"name": "ast-module-types",
"version": "4.0.0",
"version": "5.0.0",
"description": "Collection of useful helper functions when trying to determine module type (CommonJS or AMD) properties of an AST node.",

@@ -10,7 +10,7 @@ "main": "index.js",

"scripts": {
"lint": "eslint index.js \"test/*.js\"",
"fix": "npm run lint -- --fix",
"mocha": "mocha",
"test": "npm run lint && npm run mocha",
"test:ci": "c8 npm run mocha"
"lint": "xo",
"fix": "xo --fix",
"uvu": "uvu test -i fixtures -i utils",
"test": "npm run lint && npm run uvu",
"test:ci": "c8 npm run uvu"
},

@@ -36,10 +36,44 @@ "repository": {

"engines": {
"node": ">=12.0"
"node": ">=14"
},
"devDependencies": {
"c8": "^7.13.0",
"eslint": "^8.36.0",
"mocha": "^9.2.2",
"node-source-walk": "^5.0.0"
"node-source-walk": "^6.0.0",
"uvu": "^0.5.6",
"xo": "^0.54.2"
},
"xo": {
"space": true,
"ignores": [
"test/fixtures/*"
],
"rules": {
"arrow-body-style": "off",
"capitalized-comments": "off",
"comma-dangle": [
"error",
"never"
],
"curly": [
"error",
"multi-line"
],
"operator-linebreak": [
"error",
"after"
],
"object-curly-spacing": [
"error",
"always"
],
"space-before-function-paren": [
"error",
"never"
],
"unicorn/prefer-module": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prevent-abbreviations": "off"
}
}
}

@@ -1,3 +0,7 @@

# ast-module-types [![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-ast-module-types/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-ast-module-types/actions/workflows/ci.yml?query=branch%3Amain) [![npm version](https://img.shields.io/npm/v/ast-module-types)](https://www.npmjs.com/package/ast-module-types) [![npm downloads](https://img.shields.io/npm/dm/ast-module-types)](https://www.npmjs.com/package/ast-module-types)
# ast-module-types
[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-ast-module-types/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-ast-module-types/actions/workflows/ci.yml?query=branch%3Amain)
[![npm version](https://img.shields.io/npm/v/ast-module-types?logo=npm&logoColor=fff)](https://www.npmjs.com/package/ast-module-types)
[![npm downloads](https://img.shields.io/npm/dm/ast-module-types)](https://www.npmjs.com/package/ast-module-types)
Collection of useful helper functions when trying to determine

@@ -12,3 +16,3 @@ module type (CommonJS or AMD) properties of an AST node.

### API
## API

@@ -39,3 +43,3 @@ Each of these takes in a single AST node argument

### Usage
## Usage

@@ -50,1 +54,5 @@ ```js

```
## License
[MIT](LICENSE)
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