@tarojs/plugin-platform-harmony-cpp 4.1.12-alpha.0 → 4.1.12-alpha.3

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/index.js CHANGED
@@ -15,7 +15,7 @@ var utils = require('@tarojs/vite-runner/dist/utils');
15
15
  var parseCssToStylesheet = require('@tarojs/parse-css-to-stylesheet');
16
16
  var constants = require('@tarojs/vite-runner/dist/harmony/postcss/constants');
17
17
 
18
- var version = "4.1.12-alpha.0";
18
+ var version = "4.1.12-alpha.3";
19
19
 
20
20
  const PKG_NAME = '@taro-oh/library';
21
21
  const PKG_VERSION = version;
@@ -141,11 +141,11 @@ function appPlugin () {
141
141
  return {
142
142
  name: 'taro:vite-harmony-template-app',
143
143
  enforce: 'pre',
144
- buildStart() {
144
+ async buildStart() {
145
145
  const pluginContext = this;
146
146
  const { runnerUtils } = that.context;
147
147
  const { getViteHarmonyCompilerContext } = runnerUtils;
148
- const compiler = getViteHarmonyCompilerContext(pluginContext);
148
+ const compiler = await getViteHarmonyCompilerContext(pluginContext);
149
149
  if (compiler) {
150
150
  const app = compiler.app;
151
151
  app.modifyAppImport = function (importStr, _app) {
@@ -177,11 +177,11 @@ function injectEnv () {
177
177
  const businessId = that.getConfig().defineConstants?.LOCATION_APIKEY?.replace(/^['"]|['"]$/g, '');
178
178
  return {
179
179
  name: 'taro:vite-add-method-env',
180
- transform(code, id) {
180
+ async transform(code, id) {
181
181
  const pluginContext = this;
182
182
  const { runnerUtils } = that.context;
183
183
  const { getViteHarmonyCompilerContext } = runnerUtils;
184
- const compiler = getViteHarmonyCompilerContext(pluginContext);
184
+ const compiler = await getViteHarmonyCompilerContext(pluginContext);
185
185
  const exts = Array.from(new Set(compiler?.frameworkExts.concat(helper.SCRIPT_EXT)));
186
186
  if (!exts.some(ext => id?.split('?')[0].endsWith(ext))) {
187
187
  return;
@@ -296,7 +296,7 @@ function pagePlugin () {
296
296
  }
297
297
  }
298
298
  },
299
- buildStart() {
299
+ async buildStart() {
300
300
  const pluginContext = this;
301
301
  const { runnerUtils, runOpts } = that.context;
302
302
  const isPureComp = (page) => {
@@ -311,7 +311,7 @@ function pagePlugin () {
311
311
  return page.isPure;
312
312
  };
313
313
  const { getViteHarmonyCompilerContext } = runnerUtils;
314
- const compiler = getViteHarmonyCompilerContext(pluginContext);
314
+ const compiler = (await getViteHarmonyCompilerContext(pluginContext));
315
315
  const taroConfig = compiler.taroConfig;
316
316
  if (compiler?.pages instanceof Array || compiler?.components instanceof Array) {
317
317
  compiler.loaderMeta ||= {};
@@ -781,11 +781,11 @@ function renderPlugin () {
781
781
  return {
782
782
  name: 'taro:vite-harmony-template-render',
783
783
  enforce: 'pre',
784
- buildStart() {
784
+ async buildStart() {
785
785
  const pluginContext = this;
786
786
  const { runnerUtils } = that.context;
787
787
  const { getViteHarmonyCompilerContext } = runnerUtils;
788
- const compiler = getViteHarmonyCompilerContext(pluginContext);
788
+ const compiler = await getViteHarmonyCompilerContext(pluginContext);
789
789
  if (compiler) {
790
790
  compiler.extraComponents?.push('WaterFlowView');
791
791
  compiler.extraComponents?.push('WaterFlow');
@@ -983,11 +983,11 @@ function stylePlugin () {
983
983
  configResolved(config) {
984
984
  viteConfigResolved = config;
985
985
  },
986
- buildStart() {
986
+ async buildStart() {
987
987
  const pluginContext = this;
988
988
  const { runnerUtils } = that.context;
989
989
  const { getViteHarmonyCompilerContext } = runnerUtils;
990
- const compiler = getViteHarmonyCompilerContext(pluginContext);
990
+ const compiler = await getViteHarmonyCompilerContext(pluginContext);
991
991
  if (compiler) {
992
992
  compiler.loaderMeta ||= {};
993
993
  compiler.loaderMeta.enableParseJSXStyle = true;
@@ -1019,12 +1019,12 @@ function stylePlugin () {
1019
1019
  compiler?.pages?.forEach?.(modifyPageOrComp);
1020
1020
  compiler?.components?.forEach?.(modifyPageOrComp);
1021
1021
  },
1022
- buildEnd() {
1022
+ async buildEnd() {
1023
1023
  const pluginContext = this;
1024
1024
  const { runnerUtils } = that.context;
1025
1025
  const cacheStyleMap = new Map();
1026
1026
  const { getViteHarmonyCompilerContext } = runnerUtils;
1027
- const compiler = getViteHarmonyCompilerContext(pluginContext);
1027
+ const compiler = await getViteHarmonyCompilerContext(pluginContext);
1028
1028
  const cssModuleId = new Set();
1029
1029
  if (compiler) {
1030
1030
  PageMap.forEach((moduleInfo, styleJsonPath) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/plugin-platform-harmony-cpp",
3
- "version": "4.1.12-alpha.0",
3
+ "version": "4.1.12-alpha.3",
4
4
  "description": "鸿蒙系统插件 C-API 版本",
5
5
  "author": "O2Team",
6
6
  "homepage": "https://gitee.com/openharmony-sig/taro",
@@ -30,9 +30,9 @@
30
30
  "react-dom": "^18.3.1",
31
31
  "react-reconciler": "0.29.0",
32
32
  "scheduler": "^0.23.2",
33
- "@tarojs/react": "4.1.12-alpha.0",
34
- "@tarojs/service": "4.1.12-alpha.0",
35
- "@tarojs/runner-utils": "4.1.12-alpha.0"
33
+ "@tarojs/react": "4.1.12-alpha.3",
34
+ "@tarojs/runner-utils": "4.1.12-alpha.3",
35
+ "@tarojs/service": "4.1.12-alpha.3"
36
36
  },
37
37
  "devDependencies": {
38
38
  "rollup": "^3.29.4",
@@ -52,30 +52,30 @@
52
52
  "tslib": "^2.6.3",
53
53
  "typescript": "~5.4.5",
54
54
  "vite": "^4.2.0",
55
- "@tarojs/components": "4.1.12-alpha.0",
56
- "@tarojs/helper": "4.1.12-alpha.0",
57
- "@tarojs/plugin-framework-react": "4.1.12-alpha.0",
58
- "@tarojs/plugin-platform-harmony-ets": "4.1.12-alpha.0",
59
- "@tarojs/react": "4.1.12-alpha.0",
60
- "@tarojs/shared": "4.1.12-alpha.0",
61
- "@tarojs/runtime": "4.1.12-alpha.0",
62
- "@tarojs/taro": "4.1.12-alpha.0",
63
- "@tarojs/vite-runner": "4.1.12-alpha.0",
64
- "rollup-plugin-copy": "4.1.12-alpha.0"
55
+ "@tarojs/components": "4.1.12-alpha.3",
56
+ "@tarojs/helper": "4.1.12-alpha.3",
57
+ "@tarojs/plugin-platform-harmony-ets": "4.1.12-alpha.3",
58
+ "@tarojs/react": "4.1.12-alpha.3",
59
+ "@tarojs/plugin-framework-react": "4.1.12-alpha.3",
60
+ "@tarojs/runtime": "4.1.12-alpha.3",
61
+ "@tarojs/shared": "4.1.12-alpha.3",
62
+ "@tarojs/taro": "4.1.12-alpha.3",
63
+ "@tarojs/vite-runner": "4.1.12-alpha.3",
64
+ "rollup-plugin-copy": "4.1.12-alpha.3"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "less": "^4.2.0",
68
68
  "sass": "^1.75.0",
69
69
  "stylus": "^0.63.0",
70
- "@tarojs/components": "4.1.12-alpha.0",
71
- "@tarojs/helper": "4.1.12-alpha.0",
72
- "@tarojs/plugin-platform-harmony-ets": "4.1.12-alpha.0",
73
- "@tarojs/runtime": "4.1.12-alpha.0",
74
- "@tarojs/plugin-framework-react": "4.1.12-alpha.0",
75
- "@tarojs/react": "4.1.12-alpha.0",
76
- "@tarojs/shared": "4.1.12-alpha.0",
77
- "@tarojs/taro": "4.1.12-alpha.0",
78
- "@tarojs/vite-runner": "4.1.12-alpha.0"
70
+ "@tarojs/components": "4.1.12-alpha.3",
71
+ "@tarojs/helper": "4.1.12-alpha.3",
72
+ "@tarojs/plugin-framework-react": "4.1.12-alpha.3",
73
+ "@tarojs/react": "4.1.12-alpha.3",
74
+ "@tarojs/shared": "4.1.12-alpha.3",
75
+ "@tarojs/plugin-platform-harmony-ets": "4.1.12-alpha.3",
76
+ "@tarojs/runtime": "4.1.12-alpha.3",
77
+ "@tarojs/vite-runner": "4.1.12-alpha.3",
78
+ "@tarojs/taro": "4.1.12-alpha.3"
79
79
  },
80
80
  "scripts": {
81
81
  "prebuild": "rimraf --impl=move-remove dist",