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

liferay-npm-build-tools-common

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liferay-npm-build-tools-common - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

lib/fs.js

@@ -26,3 +26,3 @@ 'use strict';

if (info.dir != '') {
if (_path2.default.basename(info.dir) != '') {
mkdirp(info.dir);

@@ -29,0 +29,0 @@ }

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

* @param {String} modulePath the relative or absolute path to a JS module file
* @return {String} the full path to the package.json file
* @return {String} the full path to the package.json file (with native path
* separators)
*/
function getPackageJsonPath(modulePath) {
return getPackageDir(modulePath) + '/package.json';
return _path2.default.join(getPackageDir(modulePath), 'package.json');
}

@@ -34,9 +35,11 @@

* @param {String} modulePath the relative or absolute path to a JS module file
* @return {String} the full path to the package directory
* @return {String} the full path to the package directory (with native path
* separators)
*/
function getPackageDir(modulePath) {
var dir = packageDirCache[modulePath];
var absModulePath = _path2.default.resolve(modulePath);
var dir = packageDirCache[absModulePath];
if (!dir) {
dir = _path2.default.resolve(modulePath);
dir = absModulePath;
var found = false;

@@ -46,3 +49,3 @@

try {
_fs2.default.statSync('' + dir + _path2.default.sep + '/package.json');
_fs2.default.statSync(_path2.default.join(dir, 'package.json'));
found = true;

@@ -60,3 +63,3 @@ } catch (err) {

packageDirCache[modulePath] = dir;
packageDirCache[absModulePath] = dir;
}

@@ -63,0 +66,0 @@

{
"name": "liferay-npm-build-tools-common",
"version": "1.2.0",
"version": "1.2.1",
"description": "Utility library for Liferay NPM Build Tools.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -12,3 +12,3 @@ import fs from 'fs';

if (info.dir != '') {
if (path.basename(info.dir) != '') {
mkdirp(info.dir);

@@ -15,0 +15,0 @@ }

@@ -9,6 +9,7 @@ import fs from 'fs';

* @param {String} modulePath the relative or absolute path to a JS module file
* @return {String} the full path to the package.json file
* @return {String} the full path to the package.json file (with native path
* separators)
*/
export function getPackageJsonPath(modulePath) {
return `${getPackageDir(modulePath)}/package.json`;
return path.join(getPackageDir(modulePath), 'package.json');
}

@@ -19,9 +20,11 @@

* @param {String} modulePath the relative or absolute path to a JS module file
* @return {String} the full path to the package directory
* @return {String} the full path to the package directory (with native path
* separators)
*/
export function getPackageDir(modulePath) {
let dir = packageDirCache[modulePath];
let absModulePath = path.resolve(modulePath);
let dir = packageDirCache[absModulePath];
if (!dir) {
dir = path.resolve(modulePath);
dir = absModulePath;
let found = false;

@@ -31,3 +34,3 @@

try {
fs.statSync(`${dir}${path.sep}/package.json`);
fs.statSync(path.join(dir, 'package.json'));
found = true;

@@ -47,3 +50,3 @@ } catch (err) {

packageDirCache[modulePath] = dir;
packageDirCache[absModulePath] = dir;
}

@@ -50,0 +53,0 @@

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