@dcloudio/uni-cli-shared 3.0.0-alpha-4010320240415001 → 3.0.0-alpha-4010320240418001

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.
@@ -1,4 +1,2 @@
1
- export declare function rewriteConsoleExpr(method: string, id: string, filename: string, code: string, sourceMap?: boolean): {
2
- code: string;
3
- map: import("magic-string").SourceMap | null;
4
- };
1
+ import type { TransformResult } from 'vite';
2
+ export declare function rewriteConsoleExpr(method: string, id: string, filename: string, code: string, sourceMap?: boolean): TransformResult;
@@ -16,10 +16,13 @@ function rewriteConsoleExpr(method, id, filename, code, sourceMap = false) {
16
16
  const [, expr, type] = match;
17
17
  s.overwrite(match.index, match.index + expr.length + 1, method + `('${type}','at ${filename}:${locate(match.index).line + 1}',`);
18
18
  }
19
- return {
20
- code: s.toString(),
21
- map: sourceMap ? s.generateMap({ source: id, hires: true }) : null,
22
- };
19
+ if (s.hasChanged()) {
20
+ return {
21
+ code: s.toString(),
22
+ map: sourceMap ? s.generateMap({ hires: true }) : { mappings: '' },
23
+ };
24
+ }
25
+ return { code, map: { mappings: '' } };
23
26
  }
24
27
  exports.rewriteConsoleExpr = rewriteConsoleExpr;
25
28
  function getLocator(source) {
@@ -132,6 +132,7 @@ const vuePreset = {
132
132
  'provide',
133
133
  'useCssModule',
134
134
  'createApp',
135
+ 'hasInjectionContext',
135
136
  // effect scope
136
137
  'effectScope',
137
138
  'EffectScope',
@@ -28,7 +28,7 @@ function uniUTSUVueJavaScriptPlugin(options = {}) {
28
28
  // 否则,将现有的 lang 属性替换为 lang="uts"
29
29
  return match.replace(/lang=["']?ts["']?/, 'lang="uts"');
30
30
  }),
31
- map: null,
31
+ map: { mappings: '' },
32
32
  };
33
33
  },
34
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-alpha-4010320240415001",
3
+ "version": "3.0.0-alpha-4010320240418001",
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.23.3",
27
27
  "@babel/parser": "^7.23.9",
28
28
  "@babel/types": "^7.20.7",
29
- "@dcloudio/uni-i18n": "3.0.0-alpha-4010320240415001",
30
- "@dcloudio/uni-shared": "3.0.0-alpha-4010320240415001",
29
+ "@dcloudio/uni-i18n": "3.0.0-alpha-4010320240418001",
30
+ "@dcloudio/uni-shared": "3.0.0-alpha-4010320240418001",
31
31
  "@intlify/core-base": "9.1.9",
32
32
  "@intlify/shared": "9.1.9",
33
33
  "@intlify/vue-devtools": "9.1.9",
@@ -69,7 +69,7 @@
69
69
  },
70
70
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
71
71
  "devDependencies": {
72
- "@dcloudio/uni-uts-v1": "3.0.0-alpha-4010320240415001",
72
+ "@dcloudio/uni-uts-v1": "3.0.0-alpha-4010320240418001",
73
73
  "@types/babel__code-frame": "^7.0.6",
74
74
  "@types/babel__core": "^7.1.19",
75
75
  "@types/debug": "^4.1.7",