bito-code-review[bot] commented on code in PR #42939:
URL: https://github.com/apache/superset/pull/42939#discussion_r4086927116


##########
superset-frontend/scripts/build.js:
##########
@@ -60,26 +60,29 @@ function getPackages(packagePattern, tsOnly = false) {
   // Find packages in both @superset-ui and @apache-superset scopes
   const supersetUiPackages = [
     ...new Set(
-      fastGlob
-        .sync([
+      globSync(
+        [
           `./node_modules/@superset-ui/${pattern}/src/**/*.${
             tsOnly ? '{ts,tsx}' : '{ts,tsx,js,jsx}'
           }`,
-        ])
-        .map(x => x.split('/')[3])
+        ],
+        { followSymlinks: true },
+      )
+        .map(x => x.split('/')[2])

Review Comment:
   <!-- Bito Reply -->
   The suggestion to use index [2] is correct in this context. When using 
`globSync` with `followSymlinks: true`, the leading `./` is omitted from the 
returned paths, shifting the package name index from [3] to [2].
   
   **superset-frontend/scripts/build.js**
   ```
   globSync(
           [
             `./node_modules/@superset-ui/${pattern}/src/**/*.${
               tsOnly ? '{ts,tsx}' : '{ts,tsx,js,jsx}'
             }`,
           ],
           { followSymlinks: true },
         )
           .map(x => x.split('/')[2])
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to