workspace-tools
Advanced tools
Comparing version 0.7.5 to 0.7.6
@@ -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 }, | ||
]); | ||
}); | ||
}); |
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66550
1528