rusackas commented on code in PR #42939:
URL: https://github.com/apache/superset/pull/42939#discussion_r4086925754


##########
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:
   Agreed, hainenber's right here: `fs.globSync` drops the leading `./` that 
fast-glob kept, so `[2]` is the package name (`[3]` would just be `src`). Ran 
it against a current `node_modules` to be sure. Resolving.



##########
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])
         .filter(x => !META_PACKAGES.has(x)),
     ),
   ];
 
   const apachePackages = [
     ...new Set(
-      fastGlob
-        .sync([
+      globSync(
+        [
           `./node_modules/@apache-superset/${pattern}/src/**/*.${
             tsOnly ? '{ts,tsx}' : '{ts,tsx,js,jsx}'
           }`,
-        ])
-        .map(x => x.split('/')[3]),
+        ],
+        { followSymlinks: true },
+      ).map(x => x.split('/')[2]),

Review Comment:
   Same as above, no leading `./` from `fs.globSync`, so `[2]` is the package 
name for the `@apache-superset` scope too. Resolving.



-- 
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