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

babel-plugin-normalize-requires

Package Overview
Dependencies
Maintainers
16
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-normalize-requires - npm Package Compare versions

Comparing version 2.27.0 to 2.28.0

6

lib/index.js

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

const { node } = path;
if (node.name == 'require') {
if (node.name === 'require') {
const parent = path.parent;

@@ -89,7 +89,7 @@ if (t.isCallExpression(parent)) {

const firstSlashIndex = moduleName.indexOf('/');
if (firstSlashIndex == -1) {
if (firstSlashIndex === -1) {
return true;
}
const restOfModuleName = moduleName.substring(firstSlashIndex + 1);
if (moduleName.startsWith('@') && restOfModuleName.indexOf('/') == -1) {
if (moduleName.startsWith('@') && restOfModuleName.indexOf('/') === -1) {
return true;

@@ -96,0 +96,0 @@ }

{
"author": "Liferay Frontend Infrastructure Team <pt-frontend-infrastructure@liferay.com>",
"dependencies": {
"liferay-npm-build-tools-common": "2.27.0"
"liferay-npm-build-tools-common": "2.28.0"
},

@@ -19,4 +19,4 @@ "description": "A Babel plugin that rewrites require() calls to normalize them (removing extensions and trailing slashes, for example).",

},
"version": "2.27.0",
"gitHead": "e19c5b4d5fc7c2196cc37a6e31a30afe1d2c3f74"
"version": "2.28.0",
"gitHead": "c511aeac6b153a560c83c0a0f8bee50efaa5a6a3"
}

@@ -19,3 +19,3 @@ /**

if (node.name == 'require') {
if (node.name === 'require') {
const parent = path.parent;

@@ -89,3 +89,3 @@

if (firstSlashIndex == -1) {
if (firstSlashIndex === -1) {
return true;

@@ -96,3 +96,3 @@ }

if (moduleName.startsWith('@') && restOfModuleName.indexOf('/') == -1) {
if (moduleName.startsWith('@') && restOfModuleName.indexOf('/') === -1) {
return true;

@@ -99,0 +99,0 @@ }

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