sku 12.6.1 → 12.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # sku
2
2
 
3
+ ## 12.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix default compile package detection in PNPM repos ([#975](https://github.com/seek-oss/sku/pull/975))
8
+
3
9
  ## 12.6.1
4
10
 
5
11
  ### Patch Changes
@@ -2,7 +2,6 @@ const { posix: path } = require('node:path');
2
2
  const chalk = require('chalk');
3
3
  const { fdir: Fdir } = require('fdir');
4
4
 
5
- const { cwd } = require('../lib/cwd');
6
5
  const toPosixPath = require('../lib/toPosixPath');
7
6
 
8
7
  const { rootDir, isPnpm } = require('../lib/packageManager');
@@ -15,18 +14,17 @@ let detectedCompilePackages = [];
15
14
  // package manager. In either case, we can't correctly detect compile packages.
16
15
  if (rootDir) {
17
16
  try {
18
- let crawler = new Fdir();
17
+ // Always use full paths so we don't need to worry about joining paths later
18
+ let crawler = new Fdir().withFullPaths();
19
19
 
20
20
  if (isPnpm) {
21
21
  // Follow symlinks inside node_modules into the pnpm virtual store
22
- crawler = crawler.withSymlinks().withRelativePaths();
23
- } else {
24
- crawler = crawler.withBasePath();
22
+ crawler = crawler.withSymlinks();
25
23
  }
26
24
 
27
25
  const seekDependencyGlob = '**/@seek/*/package.json';
28
26
 
29
- let results = crawler
27
+ const results = crawler
30
28
  .glob(seekDependencyGlob)
31
29
  .crawl('./node_modules/@seek')
32
30
  .sync();
@@ -43,23 +41,17 @@ if (rootDir) {
43
41
  );
44
42
 
45
43
  const pnpmVirtualStoreResults = new Fdir()
46
- .withRelativePaths()
44
+ .withFullPaths()
47
45
  .glob(seekDependencyGlob)
48
46
  .crawl(pnpmVirtualStoreRelativePath)
49
47
  .sync();
50
48
 
51
49
  results.push(...pnpmVirtualStoreResults);
52
-
53
- // All results will be relative to the virtual store directory, so we need
54
- // to prepend the relative path from the current directory to the virtual store
55
- results = results.map((file) =>
56
- path.join(pnpmVirtualStoreRelativePath, file),
57
- );
58
50
  }
59
51
 
60
52
  detectedCompilePackages = results
61
53
  .map((packagePath) => {
62
- const packageJson = require(path.join(cwd(), packagePath));
54
+ const packageJson = require(packagePath);
63
55
 
64
56
  return {
65
57
  isCompilePackage: Boolean(packageJson.skuCompilePackage),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sku",
3
- "version": "12.6.1",
3
+ "version": "12.6.2",
4
4
  "description": "Front-end development toolkit, powered by Webpack, Babel, CSS Modules, Less and Jest",
5
5
  "main": "index.js",
6
6
  "bin": {