@vureact/compiler-core 1.0.1 → 1.0.2

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,5 +1,5 @@
1
1
  /**
2
- * @vureact/compiler-core v1.0.0
2
+ * @vureact/compiler-core v1.0.2
3
3
  * (c) 2025-present Ruihong Zhong (Ryan John)
4
4
  * @license MIT
5
5
  */
@@ -1341,7 +1341,14 @@ var DOLLAR_IDENTIFIERS = [
1341
1341
  "$pinia",
1342
1342
  "$event"
1343
1343
  ];
1344
- var VUE_PACKAGES = ["vue", "vite", "pinia", "nuxt"];
1344
+ var VUE_PACKAGES = [
1345
+ "vue",
1346
+ "vite",
1347
+ "pinia",
1348
+ "nuxt",
1349
+ // 不需要带到 React 项目中
1350
+ "@vureact/compiler-core"
1351
+ ];
1345
1352
 
1346
1353
  // src/plugins/postcss.ts
1347
1354
  import postcss from "postcss";
@@ -5059,7 +5066,7 @@ function transform(ast, ctx, options) {
5059
5066
  }
5060
5067
 
5061
5068
  // package.json
5062
- var version = "1.0.0";
5069
+ var version = "1.0.2";
5063
5070
  var bin = {
5064
5071
  vureact: "./bin/vureact.js"
5065
5072
  };
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9;/**
2
- * @vureact/compiler-core v1.0.0
2
+ * @vureact/compiler-core v1.0.2
3
3
  * (c) 2025-present Ruihong Zhong (Ryan John)
4
4
  * @license MIT
5
5
  */
@@ -1341,7 +1341,14 @@ var DOLLAR_IDENTIFIERS = [
1341
1341
  "$pinia",
1342
1342
  "$event"
1343
1343
  ];
1344
- var VUE_PACKAGES = ["vue", "vite", "pinia", "nuxt"];
1344
+ var VUE_PACKAGES = [
1345
+ "vue",
1346
+ "vite",
1347
+ "pinia",
1348
+ "nuxt",
1349
+ // 不需要带到 React 项目中
1350
+ "@vureact/compiler-core"
1351
+ ];
1345
1352
 
1346
1353
  // src/plugins/postcss.ts
1347
1354
  var _postcss = require('postcss'); var _postcss2 = _interopRequireDefault(_postcss);
@@ -5059,7 +5066,7 @@ function transform(ast, ctx, options) {
5059
5066
  }
5060
5067
 
5061
5068
  // package.json
5062
- var version = "1.0.0";
5069
+ var version = "1.0.2";
5063
5070
  var bin = {
5064
5071
  vureact: "./bin/vureact.js"
5065
5072
  };
package/lib/cli.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * @vureact/compiler-core v1.0.0
3
+ * @vureact/compiler-core v1.0.2
4
4
  * (c) 2025-present Ruihong Zhong (Ryan John)
5
5
  * @license MIT
6
6
  */
@@ -12,7 +12,7 @@ import {
12
12
  calcElapsedTime,
13
13
  normalizePath,
14
14
  version
15
- } from "./chunk-U72HWKIZ.esm.js";
15
+ } from "./chunk-BITJMMDW.esm.js";
16
16
 
17
17
  // src/cli/index.ts
18
18
  import { cac } from "cac";
package/lib/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict"; function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
3
- * @vureact/compiler-core v1.0.0
3
+ * @vureact/compiler-core v1.0.2
4
4
  * (c) 2025-present Ruihong Zhong (Ryan John)
5
5
  * @license MIT
6
6
  */
@@ -12,7 +12,7 @@
12
12
 
13
13
 
14
14
 
15
- var _chunk5M5CTYQRjs = require('./chunk-5M5CTYQR.js');
15
+ var _chunkVW3OOYW6js = require('./chunk-VW3OOYW6.js');
16
16
 
17
17
  // src/cli/index.ts
18
18
  var _cac = require('cac');
@@ -28,7 +28,7 @@ async function resolveAction(root, options) {
28
28
  const projectRoot = root ? _path2.default.resolve(process.cwd(), root) : process.cwd();
29
29
  const userConfig = await loadUserConfig(projectRoot);
30
30
  const finalConfig = mergeConfig(projectRoot, options, userConfig);
31
- const compiler = new (0, _chunk5M5CTYQRjs.VuReact)(finalConfig);
31
+ const compiler = new (0, _chunkVW3OOYW6js.VuReact)(finalConfig);
32
32
  await compiler.execute();
33
33
  if (finalConfig.watch) {
34
34
  setupWatcher(compiler, finalConfig);
@@ -82,7 +82,7 @@ function mergeConfig(projectRoot, options, userConfig) {
82
82
  }
83
83
  function setupWatcher(compiler, config) {
84
84
  const spinner = _ora2.default.call(void 0, );
85
- const cmpHelper = new (0, _chunk5M5CTYQRjs.Helper)(config);
85
+ const cmpHelper = new (0, _chunkVW3OOYW6js.Helper)(config);
86
86
  const watcher = _chokidar2.default.watch(cmpHelper.getInputPath(), {
87
87
  ignored: cmpHelper.getExcludes(),
88
88
  persistent: true,
@@ -114,7 +114,7 @@ function setupWatcher(compiler, config) {
114
114
  const fn = processors[ext];
115
115
  const unit = await fn(filePath);
116
116
  cmpHelper.printCoreLogs();
117
- cmpHelper.printCompileInfo(filePath, _chunk5M5CTYQRjs.calcElapsedTime.call(void 0, startTime));
117
+ cmpHelper.printCompileInfo(filePath, _chunkVW3OOYW6js.calcElapsedTime.call(void 0, startTime));
118
118
  if (unit) {
119
119
  await _optionalChain([config, 'access', _11 => _11.onChange, 'optionalCall', _12 => _12(event, unit)]);
120
120
  }
@@ -123,7 +123,7 @@ function setupWatcher(compiler, config) {
123
123
  await compiler.processAsset(filePath);
124
124
  cmpHelper.print(
125
125
  _kleur2.default.blue("Copied Asset"),
126
- _kleur2.default.dim(_chunk5M5CTYQRjs.normalizePath.call(void 0, cmpHelper.relativePath(filePath)))
126
+ _kleur2.default.dim(_chunkVW3OOYW6js.normalizePath.call(void 0, cmpHelper.relativePath(filePath)))
127
127
  );
128
128
  }
129
129
  spinner.stop();
@@ -134,7 +134,7 @@ function setupWatcher(compiler, config) {
134
134
  await compiler.removeOutputPath(filePath, type2);
135
135
  cmpHelper.print(
136
136
  _kleur2.default.yellow("Removed"),
137
- _kleur2.default.dim(_chunk5M5CTYQRjs.normalizePath.call(void 0, cmpHelper.relativePath(filePath)))
137
+ _kleur2.default.dim(_chunkVW3OOYW6js.normalizePath.call(void 0, cmpHelper.relativePath(filePath)))
138
138
  );
139
139
  };
140
140
  if (type === "unlink") {
@@ -163,7 +163,7 @@ function resolveOptions(command) {
163
163
  }
164
164
 
165
165
  // src/cli/index.ts
166
- var [programName] = Object.keys(_chunk5M5CTYQRjs.bin);
166
+ var [programName] = Object.keys(_chunkVW3OOYW6js.bin);
167
167
  var cli = _cac.cac.call(void 0, programName);
168
168
  var buildCommand = cli.command("build [root]", "Compile Vue3 to React (one-time)");
169
169
  resolveOptions(buildCommand).action((root, options) => {
@@ -173,4 +173,4 @@ var watchCommand = cli.command("watch [root]", "Compile Vue3 to React and watch
173
173
  resolveOptions(watchCommand).action((root, options) => {
174
174
  resolveAction(root, { ...options, watch: true });
175
175
  });
176
- cli.help().version(_chunk5M5CTYQRjs.version).parse();
176
+ cli.help().version(_chunkVW3OOYW6js.version).parse();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vureact/compiler-core v1.0.0
2
+ * @vureact/compiler-core v1.0.2
3
3
  * (c) 2025-present Ruihong Zhong (Ryan John)
4
4
  * @license MIT
5
5
  */
@@ -18,7 +18,7 @@ import {
18
18
  parseOnlyScript,
19
19
  parseSFC,
20
20
  transform
21
- } from "./chunk-U72HWKIZ.esm.js";
21
+ } from "./chunk-BITJMMDW.esm.js";
22
22
  export {
23
23
  BaseCompiler,
24
24
  CacheKey,
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});/**
2
- * @vureact/compiler-core v1.0.0
2
+ * @vureact/compiler-core v1.0.2
3
3
  * (c) 2025-present Ruihong Zhong (Ryan John)
4
4
  * @license MIT
5
5
  */
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- var _chunk5M5CTYQRjs = require('./chunk-5M5CTYQR.js');
21
+ var _chunkVW3OOYW6js = require('./chunk-VW3OOYW6.js');
22
22
 
23
23
 
24
24
 
@@ -33,4 +33,4 @@ var _chunk5M5CTYQRjs = require('./chunk-5M5CTYQR.js');
33
33
 
34
34
 
35
35
 
36
- exports.BaseCompiler = _chunk5M5CTYQRjs.BaseCompiler; exports.CacheKey = _chunk5M5CTYQRjs.CacheKey; exports.FileCompiler = _chunk5M5CTYQRjs.FileCompiler; exports.Helper = _chunk5M5CTYQRjs.Helper; exports.VuReact = _chunk5M5CTYQRjs.VuReact; exports.defineConfig = _chunk5M5CTYQRjs.defineConfig; exports.generate = _chunk5M5CTYQRjs.generate; exports.generateComponent = _chunk5M5CTYQRjs.generateComponent; exports.generateOnlyScript = _chunk5M5CTYQRjs.generateOnlyScript; exports.parse = _chunk5M5CTYQRjs.parse; exports.parseOnlyScript = _chunk5M5CTYQRjs.parseOnlyScript; exports.parseSFC = _chunk5M5CTYQRjs.parseSFC; exports.transform = _chunk5M5CTYQRjs.transform;
36
+ exports.BaseCompiler = _chunkVW3OOYW6js.BaseCompiler; exports.CacheKey = _chunkVW3OOYW6js.CacheKey; exports.FileCompiler = _chunkVW3OOYW6js.FileCompiler; exports.Helper = _chunkVW3OOYW6js.Helper; exports.VuReact = _chunkVW3OOYW6js.VuReact; exports.defineConfig = _chunkVW3OOYW6js.defineConfig; exports.generate = _chunkVW3OOYW6js.generate; exports.generateComponent = _chunkVW3OOYW6js.generateComponent; exports.generateOnlyScript = _chunkVW3OOYW6js.generateOnlyScript; exports.parse = _chunkVW3OOYW6js.parse; exports.parseOnlyScript = _chunkVW3OOYW6js.parseOnlyScript; exports.parseSFC = _chunkVW3OOYW6js.parseSFC; exports.transform = _chunkVW3OOYW6js.transform;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vureact/compiler-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Next Vue to React compiler, compiles Vue 3 syntax into runnable React 18+ code.",
5
5
  "author": "Ruihong Zhong (Ryan John)",
6
6
  "license": "MIT",