hainenber commented on code in PR #42939:
URL: https://github.com/apache/superset/pull/42939#discussion_r3999887966
##########
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:
That's incorrect. `fs.globSync` with `followSymlink: true` will not contain
the dot prefix in the resulting items, unlike `fast-glob.sync`. That's why the
index has to be degraded to 2, i.e.
`node_modules/@superset-ui/preset-chart-deckgl`
##########
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:
That's incorrect. `fs.globSync` with `followSymlink: true` will not contain
the dot prefix in the resulting items, unlike `fast-glob.sync`. That's why the
index has to be degraded to 2, i.e.
`node_modules/@superset-ui/preset-chart-deckgl`
--
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]