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

workspace-tools

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workspace-tools - npm Package Compare versions

Comparing version 0.7.5 to 0.7.6

17

CHANGELOG.json

@@ -5,3 +5,18 @@ {

{
"date": "Mon, 25 May 2020 18:15:03 GMT",
"date": "Tue, 26 May 2020 16:55:38 GMT",
"tag": "workspace-tools_v0.7.6",
"version": "0.7.6",
"comments": {
"patch": [
{
"comment": "fixes an issue with globby so that workspaces matches are found correctly",
"author": "kchau@microsoft.com",
"commit": "a310abc8eaddb42b849d71ff43d6cadc75b5bfd4",
"package": "workspace-tools"
}
]
}
},
{
"date": "Mon, 25 May 2020 18:15:11 GMT",
"tag": "workspace-tools_v0.7.5",

@@ -8,0 +23,0 @@ "version": "0.7.5",

# Change Log - workspace-tools
This log was last generated on Mon, 25 May 2020 18:15:03 GMT and should not be manually modified.
This log was last generated on Tue, 26 May 2020 16:55:38 GMT and should not be manually modified.
<!-- Start content -->
## 0.7.6
Tue, 26 May 2020 16:55:38 GMT
### Patches
- fixes an issue with globby so that workspaces matches are found correctly (kchau@microsoft.com)
## 0.7.5
Mon, 25 May 2020 18:15:03 GMT
Mon, 25 May 2020 18:15:11 GMT

@@ -11,0 +19,0 @@ ### Patches

@@ -20,2 +20,14 @@ "use strict";

});
it("gets the name and path of the workspaces against a packages spec of an individual package", async () => {
const packageRoot = await setupFixture_1.setupFixture("monorepo-globby");
const workspacesPackageInfo = yarnWorkspaces_1.getYarnWorkspaces(packageRoot);
const packageAPath = path_1.default.join(packageRoot, "packages", "package-a");
const packageBPath = path_1.default.join(packageRoot, "packages", "package-b");
const individualPath = path_1.default.join(packageRoot, "packages", "individual");
expect(workspacesPackageInfo).toMatchObject([
{ name: "individual", path: individualPath },
{ name: "package-a", path: packageAPath },
{ name: "package-b", path: packageBPath },
]);
});
});

17

lib/getPackagePaths.js

@@ -9,7 +9,12 @@ "use strict";

function getPackagePaths(workspacesRoot, packages) {
const packagePaths = packages.map(glob => globby_1.default.sync(glob, {
cwd: workspacesRoot,
onlyDirectories: true,
absolute: true
}));
const packagePaths = packages.map((glob) => {
const globbed = globby_1.default
.sync(path_1.default.join(glob, "package.json").replace(/\\/g, "/"), {
cwd: workspacesRoot,
absolute: true,
ignore: ["**/node_modules/**"],
})
.map((p) => path_1.default.dirname(p));
return globbed;
});
/*

@@ -23,4 +28,4 @@ * fast-glob returns unix style path,

})
.map(p => path_1.default.join(p));
.map((p) => path_1.default.join(p));
}
exports.getPackagePaths = getPackagePaths;
{
"name": "workspace-tools",
"version": "0.7.5",
"version": "0.7.6",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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