@next-core/build-next-bricks 1.14.4 → 1.14.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/build-next-bricks",
3
- "version": "1.14.4",
3
+ "version": "1.14.6",
4
4
  "description": "Build next bricks",
5
5
  "homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/build-next-bricks",
6
6
  "license": "GPL-3.0",
@@ -45,7 +45,7 @@
45
45
  "mini-css-extract-plugin": "^2.7.6",
46
46
  "postcss": "^8.4.31",
47
47
  "postcss-loader": "^7.3.3",
48
- "postcss-preset-env": "^9.2.0",
48
+ "postcss-preset-env": "^9.3.0",
49
49
  "style-loader": "^3.3.3",
50
50
  "typescript": "^5.2.2",
51
51
  "webpack": "^5.89.0"
@@ -53,5 +53,5 @@
53
53
  "devDependencies": {
54
54
  "@next-core/brick-manifest": "^0.5.1"
55
55
  },
56
- "gitHead": "eca74f3c2edb679ba7b7e5b089ed67a196ddd075"
56
+ "gitHead": "f1dbcc4d91c0036395d385c9e60af7b4159a292f"
57
57
  }
package/src/scanBricks.js CHANGED
@@ -719,17 +719,18 @@ export default async function scanBricks(packageDir) {
719
719
  if (files.length) {
720
720
  await Promise.all(
721
721
  [...new Set(files)].map((file) => {
722
- const fileName = path.dirname(file);
722
+ const dirName = path.dirname(file);
723
723
  const lastName = path.basename(file);
724
724
  const matchExtension = /\.[tj]sx?$/.test(lastName);
725
725
  const noExtension = !lastName.includes(".");
726
+ /** @type {[string, Set<string>]} */
726
727
  let fileInfo;
727
728
 
728
729
  if (matchExtension || noExtension) {
729
- fileInfo = [fileName, lastName.replace(/\.[^.]+$/, "")];
730
+ fileInfo = [dirName, new Set([lastName.replace(/\.[^.]+$/, "")])];
730
731
  }
731
732
  if (noExtension && existsSync(file) && statSync(file).isDirectory()) {
732
- fileInfo = [fileName, "index"];
733
+ fileInfo = [dirName, new Set(["index"])];
733
734
  }
734
735
 
735
736
  if (fileInfo) {