XFlow icon indicating copy to clipboard operation
XFlow copied to clipboard

xflow-extension中对model-service/constant的引用不应指定为ES Module的版本

Open hiwangyi opened this issue 2 years ago • 2 comments

问题描述

xflow-extension/canvas-dag-extension下的constant.ts:L3有对xflow-core/model-service/constant的引用。

由于此处直接引用了xflow-core的ES Module版本,因此在xflow-extension编译构建后产出的CommonJS版本代码中,也会存在对ES Module版本的xflow-core/model-service/constant引用(参见屏幕截图部分)。

这样的引用方式与xflow-extension中其他地方对xflow-core/model-service/constant的引用不一致(如xflow-extension/canvas-context-menu中的这一处引用),在代码编译构建之后存在CommonJS模块引用ES Module的情况,可能会造成一些模块打包工具(例如browserify)无法正确对引用了xflow的代码进行打包。

重现链接

重现步骤

预期行为

期望对xflow-core/model-service/constant的引用统一为如下形式:

import { MODELS } from '@antv/xflow-core'
...
// MODELS.getModelUtil
// MODELS.useModelValueUtil

而不是引用特定类型模块的代码(CommonJS或者ES Module)

平台

  • XFlow 版本: [1.0.48 ]

屏幕截图或视频(可选)

image

补充说明(可选)

No response

hiwangyi avatar Jun 14 '22 02:06 hiwangyi

👋 @hiwangyi

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

xflow-bot[bot] avatar Jun 14 '22 02:06 xflow-bot[bot]

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the AntV community! 💪💯

xflow-bot[bot] avatar Jul 04 '22 02:07 xflow-bot[bot]

Hey again!

It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot 🤖, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the AntV community! 💪💯

xflow-bot[bot] avatar Aug 14 '22 02:08 xflow-bot[bot]

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

xflow-bot[bot] avatar Aug 15 '23 00:08 xflow-bot[bot]