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

@tunnckocore/utils

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tunnckocore/utils - npm Package Compare versions

Comparing version 0.5.3 to 0.6.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [0.6.0](https://github.com/tunnckoCore/opensource/compare/@tunnckocore/utils@0.5.3...@tunnckocore/utils@0.6.0) (2019-09-19)
### Features
* **utils:** rename props, provide packageRootPath ([f31e802](https://github.com/tunnckoCore/opensource/commit/f31e802))
## [0.5.3](https://github.com/tunnckoCore/opensource/compare/@tunnckocore/utils@0.5.2...@tunnckocore/utils@0.5.3) (2019-09-19)

@@ -8,0 +19,0 @@

4

package.json
{
"version": "0.5.3",
"version": "0.6.0",
"name": "@tunnckocore/utils",

@@ -38,3 +38,3 @@ "description": "Utility functions and helpers for internal usage and monorepos",

],
"gitHead": "292cfa46bdd66a7f544bde02fb18a4ef91b75a76"
"gitHead": "8a0ca03bbc3ee827575d88353f0e89dbb5d70782"
}

@@ -82,9 +82,9 @@ const fs = require('fs');

const fromRoot = (...x) => path.resolve(cwd, ...x);
const packagePath = fromRoot('package.json');
const lernaPath = fromRoot('lerna.json');
const pkg = parseJson(packagePath);
const lerna = parseJson(lernaPath);
const packageJsonPath = fromRoot('package.json');
const lernaJsonPath = fromRoot('lerna.json');
const packageJson = parseJson(packageJsonPath);
const lernaJson = parseJson(lernaJsonPath);
const workspaces = []
.concat(lerna.packages || (pkg.workspaces || []))
.concat(lernaJson.packages || (packageJson.workspaces || []))
.filter((x) => typeof x === 'string')

@@ -95,3 +95,3 @@ .filter(Boolean)

// console.log('workspaces', workspaces);
let exts = [].concat(pkg.extensions).filter(Boolean);
let exts = [].concat(packageJson.extensions).filter(Boolean);

@@ -107,3 +107,15 @@ if (exts.length === 0) {

return { workspaces, extensions, exts, lerna, lernaPath, pkg, packagePath };
const fpath = [lernaJsonPath, packageJsonPath].find((x) => fs.existsSync(x));
const packageRootPath = fpath ? path.dirname(fpath) : null;
return {
workspaces,
extensions,
exts,
lernaJson,
lernaJsonPath,
packageJson,
packageJsonPath,
packageRootPath,
};
}
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