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
1
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 1.7.0-alpha.1158492a to 1.7.0-alpha.1b73ffed

8

lib/__tests__/index.test.js

@@ -7,2 +7,6 @@ 'use strict';

var _babelIpc = require('liferay-npm-build-tools-common/lib/babel-ipc');
var babelIpc = _interopRequireWildcard(_babelIpc);
var _pluginLogger = require('liferay-npm-build-tools-common/lib/plugin-logger');

@@ -23,3 +27,5 @@

beforeEach(function () {
_pluginLogger2.default.set(__filename, logger = new _pluginLogger2.default());
babelIpc.set(__filename, {
log: logger = new _pluginLogger2.default()
});
});

@@ -26,0 +32,0 @@

@@ -51,3 +51,10 @@ 'use strict';

if (state.normalizeCount) {
_pluginLogger2.default.get(state).info('normalize-requires', 'Normalized', state.normalizeCount, 'requires');
var _babelIpc$get = babelIpc.get(state, function () {
return {
log: new _pluginLogger2.default()
};
}),
log = _babelIpc$get.log;
log.info('normalize-requires', 'Normalized', state.normalizeCount, 'requires');
}

@@ -60,2 +67,6 @@ }

var _babelIpc = require('liferay-npm-build-tools-common/lib/babel-ipc');
var babelIpc = _interopRequireWildcard(_babelIpc);
var _pluginLogger = require('liferay-npm-build-tools-common/lib/plugin-logger');

@@ -67,2 +78,4 @@

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
/**

@@ -69,0 +82,0 @@ * Check whether a module name refers to a package entry point.

4

package.json
{
"name": "babel-plugin-normalize-requires",
"version": "1.7.0-alpha.1158492a",
"version": "1.7.0-alpha.1b73ffed",
"description": "A Babel plugin that rewrites require() calls to normalize them (removing extensions and trailing slashes, for example).",

@@ -15,4 +15,4 @@ "main": "lib/index.js",

"dependencies": {
"liferay-npm-build-tools-common": "1.7.0-alpha.1158492a"
"liferay-npm-build-tools-common": "1.7.0-alpha.1b73ffed"
}
}
import * as babel from 'babel-core';
import * as babelIpc from 'liferay-npm-build-tools-common/lib/babel-ipc';
import PluginLogger from 'liferay-npm-build-tools-common/lib/plugin-logger';

@@ -8,3 +9,5 @@ import plugin from '../index';

beforeEach(() => {
PluginLogger.set(__filename, (logger = new PluginLogger()));
babelIpc.set(__filename, {
log: (logger = new PluginLogger()),
});
});

@@ -11,0 +14,0 @@

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

import * as babelIpc from 'liferay-npm-build-tools-common/lib/babel-ipc';
import PluginLogger from 'liferay-npm-build-tools-common/lib/plugin-logger';

@@ -56,3 +57,7 @@

if (state.normalizeCount) {
PluginLogger.get(state).info(
const {log} = babelIpc.get(state, () => ({
log: new PluginLogger(),
}));
log.info(
'normalize-requires',

@@ -59,0 +64,0 @@ 'Normalized',

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