@dcloudio/uni-cli-shared 3.0.0-alpha-4000220240302002 → 3.0.0-alpha-4000320240308001

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.
@@ -58,8 +58,7 @@ function checkPagesJson(jsonStr, inputDir) {
58
58
  if (pagePathNodes.length) {
59
59
  for (const node of pagePathNodes) {
60
60
  const pagePath = node.value ?? '';
61
- if (fs_1.default.existsSync(path_1.default.join(inputDir, pagePath + '.uvue')) ||
62
- fs_1.default.existsSync(path_1.default.join(inputDir, pagePath + '.vue'))) {
61
+ if (pageExistsWithCaseSync(path_1.default.join(inputDir, pagePath))) {
63
62
  continue;
64
63
  }
65
64
  const { line, column } = (0, utils_2.offsetToLineColumn)(jsonStr, node.offset);
@@ -78,6 +77,18 @@ function checkPagesJson(jsonStr, inputDir) {
78
77
  return true;
79
78
  }
80
79
  exports.checkPagesJson = checkPagesJson;
80
+ function pageExistsWithCaseSync(pagePath) {
81
+ try {
82
+ const files = fs_1.default.readdirSync(path_1.default.dirname(pagePath));
83
+ const basename = path_1.default.basename(pagePath);
84
+ const uvuePage = basename + '.uvue';
85
+ const vuePage = basename + '.vue';
86
+ return files.some((file) => file === uvuePage || file === vuePage);
87
+ }
88
+ catch (e) {
89
+ return false;
90
+ }
91
+ }
81
92
  function findSubPackageRoot(node) {
82
93
  const child = node.children?.find((child) => child.type === 'property' &&
83
94
  child.children &&
@@ -1122,7 +1122,9 @@ function rewriteScssReadFileSync() {
1122
1122
  if ((0, shared_1.isString)(filepath) &&
1123
1123
  (0, shared_1.isString)(content) &&
1124
1124
  preCssExtNames.includes(path_1.default.extname(filepath)) &&
1125
- content.includes('#endif')) {
1125
+ content.includes('#endif') &&
1126
+ // 目前无法区分app-nvue
1127
+ !content.includes('APP-NVUE')) {
1126
1128
  return (0, preprocess_1.preCss)(content);
1127
1129
  }
1128
1130
  return content;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-alpha-4000220240302002",
3
+ "version": "3.0.0-alpha-4000320240308001",
4
4
  "description": "@dcloudio/uni-cli-shared",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,8 +26,8 @@
26
26
  "@babel/core": "^7.21.3",
27
27
  "@babel/parser": "^7.23.5",
28
28
  "@babel/types": "^7.20.7",
29
- "@dcloudio/uni-i18n": "3.0.0-alpha-4000220240302002",
30
- "@dcloudio/uni-shared": "3.0.0-alpha-4000220240302002",
29
+ "@dcloudio/uni-i18n": "3.0.0-alpha-4000320240308001",
30
+ "@dcloudio/uni-shared": "3.0.0-alpha-4000320240308001",
31
31
  "@intlify/core-base": "9.1.9",
32
32
  "@intlify/shared": "9.1.9",
33
33
  "@intlify/vue-devtools": "9.1.9",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
69
69
  "devDependencies": {
70
- "@dcloudio/uni-uts-v1": "3.0.0-alpha-4000220240302002",
70
+ "@dcloudio/uni-uts-v1": "3.0.0-alpha-4000320240308001",
71
71
  "@types/babel__code-frame": "^7.0.6",
72
72
  "@types/babel__core": "^7.1.19",
73
73
  "@types/debug": "^4.1.7",