@dcloudio/uni-cli-shared 3.0.0-alpha-4000020231215001 → 3.0.0-alpha-3090920231215001

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/dist/utils.d.ts CHANGED
@@ -7,12 +7,12 @@ export declare let isRunningWithYarnPnp: boolean;
7
7
  export declare const isWindows: boolean;
8
8
  export declare function normalizePath(id: string): string;
9
9
  export declare function checkElementNodeTag(node: RootNode | TemplateChildNode | null | undefined, tag: string): node is ElementNode;
10
- export declare function normalizeIdentifier(str: string): Capitalize<string>;
10
+ export declare function normalizeIdentifier(str: string): string;
11
11
  export declare function normalizePagePath(pagePath: string, platform: UniApp.PLATFORM): string | undefined;
12
12
  export declare function removeExt(str: string): string;
13
13
  export declare function normalizeNodeModules(str: string): string;
14
14
  export declare function normalizeMiniProgramFilename(filename: string, inputDir?: string): string;
15
- export declare function normalizeParsePlugins(importer: string, babelParserPlugins?: ParserPlugin[]): (import("@babel/parser").ParserPluginWithOptions | ("asyncDoExpressions" | "asyncGenerators" | "bigInt" | "classPrivateMethods" | "classPrivateProperties" | "classProperties" | "classStaticBlock" | "decimal" | "decorators-legacy" | "deferredImportEvaluation" | "decoratorAutoAccessors" | "destructuringPrivate" | "doExpressions" | "dynamicImport" | "explicitResourceManagement" | "exportDefaultFrom" | "exportNamespaceFrom" | "flow" | "flowComments" | "functionBind" | "functionSent" | "importMeta" | "jsx" | "logicalAssignment" | "importAssertions" | "importAttributes" | "importReflection" | "moduleBlocks" | "moduleStringNames" | "nullishCoalescingOperator" | "numericSeparator" | "objectRestSpread" | "optionalCatchBinding" | "optionalChaining" | "partialApplication" | "placeholders" | "privateIn" | "regexpUnicodeSets" | "sourcePhaseImports" | "throwExpressions" | "topLevelAwait" | "v8intrinsic" | "decorators" | "estree" | "moduleAttributes" | "optionalChainingAssign" | "pipelineOperator" | "recordAndTuple" | "typescript"))[];
15
+ export declare function normalizeParsePlugins(importer: string, babelParserPlugins?: ParserPlugin[]): ParserPlugin[];
16
16
  export declare function pathToGlob(pathString: string, glob: string, options?: {
17
17
  windows?: boolean;
18
18
  escape?: boolean;
@@ -19,17 +19,14 @@ function uniUTSUVueJavaScriptPlugin(options = {}) {
19
19
  if (!(0, vue_1.isVueSfcFile)(id)) {
20
20
  return;
21
21
  }
22
- return {
23
- code: code.replace(/<script([^>]*)>/gi, (match, attributes) => {
24
- // 如果 <script> 标签中没有 lang 属性,添加 lang="uts"
25
- if (!/lang=["']?[^"']*["']?/.test(attributes)) {
26
- return `<script${attributes} lang="uts">`;
27
- }
28
- // 否则,将现有的 lang 属性替换为 lang="uts"
29
- return match.replace(/lang=["']?ts["']?/, 'lang="uts"');
30
- }),
31
- map: null,
32
- };
22
+ return code.replace(/<script([^>]*)>/gi, (match, attributes) => {
23
+ // 如果 <script> 标签中没有 lang 属性,添加 lang="uts"
24
+ if (!/lang=["']?[^"']*["']?/.test(attributes)) {
25
+ return `<script${attributes} lang="uts">`;
26
+ }
27
+ // 否则,将现有的 lang 属性替换为 lang="uts"
28
+ return match.replace(/lang=["']?ts["']?/, 'lang="uts"');
29
+ });
33
30
  },
34
31
  };
35
32
  }
@@ -8,7 +8,7 @@ export declare const chunkToEmittedAssetsMap: WeakMap<RenderedChunk, Set<string>
8
8
  * Also supports loading plain strings with import text from './foo.txt?raw'
9
9
  */
10
10
  export declare function assetPlugin(config: ResolvedConfig, options?: {
11
- isAndroidX: boolean;
11
+ isAppX: boolean;
12
12
  }): Plugin;
13
13
  export declare function parseAssets(config: ResolvedConfig, code: string): string;
14
14
  export declare function registerAssetToChunk(chunk: RenderedChunk, file: string): void;
@@ -84,7 +84,7 @@ function assetPlugin(config, options) {
84
84
  return;
85
85
  }
86
86
  id = id.replace(urlRE, '$1').replace(/[\?&]$/, '');
87
- const url = await fileToUrl(id, config, options?.isAndroidX
87
+ const url = await fileToUrl(id, config, options?.isAppX
88
88
  ? {
89
89
  emitFile(emittedFile) {
90
90
  // 直接写入目标目录
@@ -92,7 +92,7 @@ function assetPlugin(config, options) {
92
92
  },
93
93
  }
94
94
  : this);
95
- if (options?.isAndroidX) {
95
+ if (options?.isAppX) {
96
96
  this.emitFile({
97
97
  type: 'asset',
98
98
  fileName: (0, utils_3.normalizeNodeModules)(path_1.default.relative(process.env.UNI_INPUT_DIR, id) + '.uts'),
@@ -32,7 +32,7 @@ export declare const isDirectCSSRequest: (request: string) => boolean;
32
32
  * Plugin applied before user plugins
33
33
  */
34
34
  export declare function cssPlugin(config: ResolvedConfig, options?: {
35
- isAndroidX: boolean;
35
+ isAppX: boolean;
36
36
  getDescriptor?(filename: string): SFCDescriptor | undefined;
37
37
  }): Plugin;
38
38
  /**
@@ -97,7 +97,7 @@ function wrapResolve(resolve, code, source, getDescriptor) {
97
97
  /**
98
98
  * Plugin applied before user plugins
99
99
  */
100
- function cssPlugin(config, options = { isAndroidX: false }) {
100
+ function cssPlugin(config, options = { isAppX: false }) {
101
101
  let server;
102
102
  let moduleCache;
103
103
  const resolveUrl = config.createResolver({
@@ -127,7 +127,7 @@ function cssPlugin(config, options = { isAndroidX: false }) {
127
127
  }
128
128
  const resolved = await wrapResolve(resolveUrl, source?.input.css || raw, source, options.getDescriptor)(url, importer);
129
129
  if (resolved) {
130
- return (0, asset_1.fileToUrl)(resolved, config, options?.isAndroidX
130
+ return (0, asset_1.fileToUrl)(resolved, config, options?.isAppX
131
131
  ? {
132
132
  emitFile(emittedFile) {
133
133
  // 直接写入目标目录
@@ -5,7 +5,7 @@ export interface UniViteFilterPluginOptions {
5
5
  filter: (id: string) => boolean;
6
6
  }
7
7
  export declare function injectAssetPlugin(config: ResolvedConfig, options?: {
8
- isAndroidX: boolean;
8
+ isAppX: boolean;
9
9
  }): void;
10
10
  export declare function injectCssPlugin(config: ResolvedConfig): void;
11
11
  export declare function injectCssPostPlugin(config: ResolvedConfig, newCssPostPlugin: Plugin): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-alpha-4000020231215001",
3
+ "version": "3.0.0-alpha-3090920231215001",
4
4
  "description": "@dcloudio/uni-cli-shared",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,19 +23,19 @@
23
23
  "dependencies": {
24
24
  "@ampproject/remapping": "^2.1.2",
25
25
  "@babel/core": "^7.21.3",
26
- "@babel/parser": "^7.23.5",
26
+ "@babel/parser": "^7.16.4",
27
27
  "@babel/types": "^7.20.7",
28
- "@dcloudio/uni-i18n": "3.0.0-alpha-4000020231215001",
29
- "@dcloudio/uni-shared": "3.0.0-alpha-4000020231215001",
28
+ "@dcloudio/uni-i18n": "3.0.0-alpha-3090920231215001",
29
+ "@dcloudio/uni-shared": "3.0.0-alpha-3090920231215001",
30
30
  "@intlify/core-base": "9.1.9",
31
31
  "@intlify/shared": "9.1.9",
32
32
  "@intlify/vue-devtools": "9.1.9",
33
33
  "@rollup/pluginutils": "^4.2.0",
34
- "@vue/compiler-core": "3.3.11",
35
- "@vue/compiler-dom": "3.3.11",
36
- "@vue/compiler-sfc": "3.3.11",
37
- "@vue/server-renderer": "3.3.11",
38
- "@vue/shared": "3.3.11",
34
+ "@vue/compiler-core": "3.2.47",
35
+ "@vue/compiler-dom": "3.2.47",
36
+ "@vue/compiler-sfc": "3.2.47",
37
+ "@vue/server-renderer": "3.2.47",
38
+ "@vue/shared": "3.2.47",
39
39
  "autoprefixer": "^10.4.14",
40
40
  "base64url": "^3.0.1",
41
41
  "chokidar": "^3.5.3",
@@ -47,7 +47,7 @@
47
47
  "fast-glob": "^3.2.11",
48
48
  "fs-extra": "^10.0.0",
49
49
  "hash-sum": "^2.0.0",
50
- "jsonc-parser": "^3.2.0",
50
+ "jsonc-parser": "^3.0.0",
51
51
  "magic-string": "^0.30.0",
52
52
  "merge": "^2.1.1",
53
53
  "mime": "^3.0.0",
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
66
66
  "devDependencies": {
67
- "@dcloudio/uni-uts-v1": "3.0.0-alpha-4000020231215001",
67
+ "@dcloudio/uni-uts-v1": "3.0.0-alpha-3090920231215001",
68
68
  "@types/babel__core": "^7.1.19",
69
69
  "@types/debug": "^4.1.7",
70
70
  "@types/estree": "^0.0.51",
@@ -78,6 +78,6 @@
78
78
  "@types/stylus": "^0.48.36",
79
79
  "postcss": "^8.4.21",
80
80
  "unplugin-auto-import": "^0.16.7",
81
- "vue": "3.3.11"
81
+ "vue": "3.2.47"
82
82
  }
83
83
  }