@bit-sun/business-component 4.2.2-alpha.8-kong → 4.2.2-alpha.9-kong

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.esm.js CHANGED
@@ -26,7 +26,7 @@ import debounce$1 from 'lodash/debounce';
26
26
  import { DndProvider, useDrop, useDrag } from 'react-dnd';
27
27
  import { HTML5Backend } from 'react-dnd-html5-backend';
28
28
  import Editor$1, { monaco } from '@monaco-editor/react';
29
- import serialize, { deserialize } from '@/utils/serialize';
29
+ import serialize from 'serialize-javascript';
30
30
  import castArray from 'lodash/castArray';
31
31
  import { parse as parse$1 } from '@babel/parser';
32
32
  import { visit } from 'ast-types';
@@ -25533,6 +25533,10 @@ var ConfigButton = (function (props) {
25533
25533
  }));
25534
25534
  });
25535
25535
 
25536
+ var deserialize = function deserialize(data) {
25537
+ return eval('(' + data + ')');
25538
+ };
25539
+
25536
25540
  var validateSulaConfig = (function (data, _monaco, _editor) {
25537
25541
  if (!data) return;
25538
25542
  var _data$properties = data.properties,
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ var debounce = require('lodash/debounce');
30
30
  var reactDnd = require('react-dnd');
31
31
  var reactDndHtml5Backend = require('react-dnd-html5-backend');
32
32
  var Editor$1 = require('@monaco-editor/react');
33
- var serialize = require('@/utils/serialize');
33
+ var serialize = require('serialize-javascript');
34
34
  var castArray = require('lodash/castArray');
35
35
  var parser = require('@babel/parser');
36
36
  var astTypes = require('ast-types');
@@ -25556,6 +25556,10 @@ var ConfigButton = (function (props) {
25556
25556
  }));
25557
25557
  });
25558
25558
 
25559
+ var deserialize = function deserialize(data) {
25560
+ return eval('(' + data + ')');
25561
+ };
25562
+
25559
25563
  var validateSulaConfig = (function (data, _monaco, _editor) {
25560
25564
  if (!data) return;
25561
25565
  var _data$properties = data.properties,
@@ -31593,7 +31597,7 @@ var Editor = (function (props) {
31593
31597
  var handleCopy = function handleCopy() {
31594
31598
  var value1 = editorRef.current.getValue().slice(STRTEMP.length);
31595
31599
  try {
31596
- var res = serialize.deserialize(value1);
31600
+ var res = deserialize(value1);
31597
31601
  onRun(isTableAllValue ? _objectSpread2(_objectSpread2({}, value), {}, {
31598
31602
  columns: res.columns,
31599
31603
  fields: res.fields
@@ -31679,7 +31683,7 @@ var Editor = (function (props) {
31679
31683
  var onClickRun = function onClickRun() {
31680
31684
  var value1 = editorRef.current.getValue().slice(STRTEMP.length);
31681
31685
  try {
31682
- var res = serialize.deserialize(value1);
31686
+ var res = deserialize(value1);
31683
31687
  onRun(isTableAllValue ? _objectSpread2(_objectSpread2({}, value), {}, {
31684
31688
  columns: res.columns,
31685
31689
  fields: res.fields
@@ -24,3 +24,31 @@
24
24
  ## 下一步
25
25
  1. 在可安装依赖的环境运行 `npm test -- --runInBand src/components/Business/ImportExport/ImportWizard/Preview.test.tsx` 与 `npm run build`。
26
26
  2. 使用促销活动或档案导入样例做浏览器验收:错误预览不展示原因列表,错误文件可下载,部分成功导入行为保持不变。
27
+ # 当前进度
28
+
29
+ ## 当前目标
30
+ - IKTSOJ:修复 `4.2.2-alpha.8-kong` 发布包残留 `@/utils/serialize` 别名导致消费端 Webpack 构建失败的问题,并准备修正版。
31
+
32
+ ## 已完成
33
+ - 基于 `master-4.0-kong` 创建本地分支 `bugfix/IKTSOJ-business-component-serialize-resolution`。
34
+ - `src/components/Business/JsonQueryTable/jsonEditor/index.js` 将序列化工具导入改为相对路径。
35
+ - `package.json` 版本改为待发布的 `4.2.2-alpha.9-kong`;该版本此前在 npm registry 不存在。
36
+
37
+ ## 验证结果
38
+ - 命令:`npm run build`
39
+ - 结果:通过;CJS、ESM 构建均成功。保留既有 sourcemap、重复导出、循环依赖和 eval 警告。
40
+ - 命令:检查 `dist/index.js` 和 `dist/index.esm.js` 不包含 `@/utils/serialize`
41
+ - 结果:通过。
42
+ - 命令:`npm pack --dry-run --json --ignore-scripts --cache=/private/tmp/npm-cache-business-component`
43
+ - 结果:通过;包名和版本为 `@bit-sun/business-component@4.2.2-alpha.9-kong`,共 418 个文件。
44
+ - 命令:`npm publish --registry=https://registry.npmjs.org/ --tag latest --cache=/private/tmp/npm-cache-business-component`
45
+ - 结果:失败;npm 返回 `EOTP`,要求一次性验证码,未发布新版本。
46
+
47
+ ## 未决事项与风险
48
+ - npm 上的 `4.2.2-alpha.8-kong` 已发布且不能覆盖;修正版 `.9-kong` 当前尚未发布。
49
+ - 消费工程版本尚未切换到 `.9-kong`,需待发布成功后更新 promotion-activity-front 与 basic-data-front。
50
+ - 尚未提交或推送;不创建 OpenSpec change。
51
+
52
+ ## 下一步
53
+ 1. 由用户在本机终端执行已准备的 npm 发布并输入本地验证器验证码,不要在聊天中发送验证码。
54
+ 2. registry 确认 `.9-kong` 可查询后,再更新两个消费工程的别名依赖和 promotion-activity-front 锁文件。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.2-alpha.8-kong",
3
+ "version": "4.2.2-alpha.9-kong",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -10,7 +10,7 @@ import {
10
10
  Space,
11
11
  } from 'antd';
12
12
  import Editor, { monaco } from '@monaco-editor/react';
13
- import serialize, { deserialize } from '@/utils/serialize';
13
+ import serialize, { deserialize } from '../../../../utils/serialize';
14
14
  import {
15
15
  BulbOutlined,
16
16
  PlayCircleOutlined,