Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"name": "@codeblitzjs/core",
"private": true,
"version": "1.2.0",
"workspaces": [
"packages/*"
],
"description": "codeblitzjs",
"main": "index.js",
"engines": {
"opensumi": "3.3.2"
"opensumi": "3.3.3"
},
"scripts": {
"prepare": "husky install",
Expand Down Expand Up @@ -65,7 +64,6 @@
"execa": "^4.1.0",
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"gulp": "^4.0.2",
"husky": "^5.0.4",
"inquirer": "^7.3.3",
"jest": "^26.6.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"opensumi codeblitzjs"
],
"engines": {
"opensumi": "3.3.2",
"node": ">=10.0.0"
"opensumi": "3.3.3",
"node": ">=18.0.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js 版本升级需要彻底测试!

Node.js 的最低版本要求已经从 10.0.0 提升到 18.0.0,跳过了几个主要版本。直接从 Node.js 10.x 升级到 18.x 可能会引入兼容性问题,因为这些版本之间有许多变化和改进。

  • 使用 Node.js 18.x 彻底测试 CLI 包,以确保所有功能都能正常工作。
  • 更新文档和 README 文件,以反映新的 Node.js 最低版本要求。

},
"dependencies": {
"@codeblitzjs/ide-common": "workspace:*",
"@opensumi/extension-installer": "^0.0.1",
"@opensumi/ide-extension": "3.3.2",
"@opensumi/ide-extension": "3.3.3",
"commander": "^7.2.0",
"fs-extra": "^9.0.1",
"lodash.pick": "^4.4.0",
Expand Down
84 changes: 42 additions & 42 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,48 +33,48 @@
"@codeblitzjs/ide-plugin": "workspace:*",
"@codeblitzjs/ide-registry": "workspace:*",
"@codeblitzjs/ide-sumi-core": "workspace:*",
"@opensumi/ide-addons": "3.3.2",
"@opensumi/ide-ai-native": "3.3.2",
"@opensumi/ide-comments": "3.3.2",
"@opensumi/ide-core-browser": "3.3.2",
"@opensumi/ide-core-common": "3.3.2",
"@opensumi/ide-debug": "3.3.2",
"@opensumi/ide-decoration": "3.3.2",
"@opensumi/ide-design": "3.3.2",
"@opensumi/ide-editor": "3.3.2",
"@opensumi/ide-explorer": "3.3.2",
"@opensumi/ide-express-file-server": "3.3.2",
"@opensumi/ide-extension": "3.3.2",
"@opensumi/ide-extension-storage": "3.3.2",
"@opensumi/ide-file-scheme": "3.3.2",
"@opensumi/ide-file-service": "3.3.2",
"@opensumi/ide-file-tree-next": "3.3.2",
"@opensumi/ide-i18n": "3.3.2",
"@opensumi/ide-keymaps": "3.3.2",
"@opensumi/ide-logs": "3.3.2",
"@opensumi/ide-main-layout": "3.3.2",
"@opensumi/ide-markdown": "3.3.2",
"@opensumi/ide-markers": "3.3.2",
"@opensumi/ide-menu-bar": "3.3.2",
"@opensumi/ide-monaco": "3.3.2",
"@opensumi/ide-monaco-enhance": "3.3.2",
"@opensumi/ide-opened-editor": "3.3.2",
"@opensumi/ide-outline": "3.3.2",
"@opensumi/ide-output": "3.3.2",
"@opensumi/ide-overlay": "3.3.2",
"@opensumi/ide-preferences": "3.3.2",
"@opensumi/ide-quick-open": "3.3.2",
"@opensumi/ide-scm": "3.3.2",
"@opensumi/ide-search": "3.3.2",
"@opensumi/ide-status-bar": "3.3.2",
"@opensumi/ide-storage": "3.3.2",
"@opensumi/ide-testing": "3.3.2",
"@opensumi/ide-theme": "3.3.2",
"@opensumi/ide-toolbar": "3.3.2",
"@opensumi/ide-variable": "3.3.2",
"@opensumi/ide-webview": "3.3.2",
"@opensumi/ide-workspace": "3.3.2",
"@opensumi/ide-workspace-edit": "3.3.2",
"@opensumi/ide-addons": "3.3.3",
"@opensumi/ide-ai-native": "3.3.3",
"@opensumi/ide-comments": "3.3.3",
"@opensumi/ide-core-browser": "3.3.3",
"@opensumi/ide-core-common": "3.3.3",
"@opensumi/ide-debug": "3.3.3",
"@opensumi/ide-decoration": "3.3.3",
"@opensumi/ide-design": "3.3.3",
"@opensumi/ide-editor": "3.3.3",
"@opensumi/ide-explorer": "3.3.3",
"@opensumi/ide-express-file-server": "3.3.3",
"@opensumi/ide-extension": "3.3.3",
"@opensumi/ide-extension-storage": "3.3.3",
"@opensumi/ide-file-scheme": "3.3.3",
"@opensumi/ide-file-service": "3.3.3",
"@opensumi/ide-file-tree-next": "3.3.3",
"@opensumi/ide-i18n": "3.3.3",
"@opensumi/ide-keymaps": "3.3.3",
"@opensumi/ide-logs": "3.3.3",
"@opensumi/ide-main-layout": "3.3.3",
"@opensumi/ide-markdown": "3.3.3",
"@opensumi/ide-markers": "3.3.3",
"@opensumi/ide-menu-bar": "3.3.3",
"@opensumi/ide-monaco": "3.3.3",
"@opensumi/ide-monaco-enhance": "3.3.3",
"@opensumi/ide-opened-editor": "3.3.3",
"@opensumi/ide-outline": "3.3.3",
"@opensumi/ide-output": "3.3.3",
"@opensumi/ide-overlay": "3.3.3",
"@opensumi/ide-preferences": "3.3.3",
"@opensumi/ide-quick-open": "3.3.3",
"@opensumi/ide-scm": "3.3.3",
"@opensumi/ide-search": "3.3.3",
"@opensumi/ide-status-bar": "3.3.3",
"@opensumi/ide-storage": "3.3.3",
"@opensumi/ide-testing": "3.3.3",
"@opensumi/ide-theme": "3.3.3",
"@opensumi/ide-toolbar": "3.3.3",
"@opensumi/ide-variable": "3.3.3",
"@opensumi/ide-webview": "3.3.3",
"@opensumi/ide-workspace": "3.3.3",
"@opensumi/ide-workspace-edit": "3.3.3",
"@opensumi/textmate-languages": "^2.7.0",
"tslib": "^2.2.0"
},
Expand Down
16 changes: 8 additions & 8 deletions packages/sumi-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"@codeblitzjs/ide-common": "workspace:*",
"@codeblitzjs/ide-registry": "workspace:*",
"@opensumi/di": "^1.0.0",
"@opensumi/ide-ai-native": "3.3.2",
"@opensumi/ide-core-browser": "3.3.2",
"@opensumi/ide-core-common": "3.3.2",
"@opensumi/ide-debug": "3.3.2",
"@opensumi/ide-extension": "3.3.2",
"@opensumi/ide-file-scheme": "3.3.2",
"@opensumi/ide-file-service": "3.3.2",
"@opensumi/ide-logs": "3.3.2",
"@opensumi/ide-ai-native": "3.3.3",
"@opensumi/ide-core-browser": "3.3.3",
"@opensumi/ide-core-common": "3.3.3",
"@opensumi/ide-debug": "3.3.3",
"@opensumi/ide-extension": "3.3.3",
"@opensumi/ide-file-scheme": "3.3.3",
"@opensumi/ide-file-service": "3.3.3",
"@opensumi/ide-logs": "3.3.3",
"assert": "^2.0.0",
"fs-extra-factory": "^0.2.1",
"iconv-lite-umd": "^0.6.8",
Expand Down
5 changes: 5 additions & 0 deletions packages/sumi-core/resources/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"webview": "webview.66e57793.js",
"webview/index.html": "webview.805ab470/index.html",
"worker-host": "worker-host.490aafa0.js"
}
1 change: 1 addition & 0 deletions packages/sumi-core/resources/webview.66e57793.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/sumi-core/resources/webview.805ab470/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en" style="width: 100%; height: 100%;"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Webview Panel Container</title><script crossorigin src="../webview.66e57793.js"></script></head><body style="margin: 0; overflow: hidden; width: 100%; height: 100%"></body></html>
2 changes: 2 additions & 0 deletions packages/sumi-core/resources/worker-host.490aafa0.js

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions packages/sumi-core/resources/worker-host.490aafa0.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*!
* +----------------------------------------------------------------------------------+
* | murmurHash3.js v3.0.0 (http://github.com/karanlyons/murmurHash3.js) |
* | A TypeScript/JavaScript implementation of MurmurHash3's hashing algorithms. |
* |----------------------------------------------------------------------------------|
* | Copyright (c) 2012-2020 Karan Lyons. Freely distributable under the MIT license. |
* +----------------------------------------------------------------------------------+
*/

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/

/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
2 changes: 1 addition & 1 deletion packages/toolkit/define.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"__OPENSUMI_VERSION__": "3.3.2",
"__OPENSUMI_VERSION__": "3.3.3",
"__WORKER_HOST__": "https://gw.alipayobjects.com/os/cloud-ide/codeblitz/worker-host.490aafa0.js",
"__WEBVIEW_ENDPOINT__": "https://gw.alipayobjects.com/os/cloud-ide/codeblitz/webview.805ab470",
"__WEBVIEW_SCRIPT__": "https://gw.alipayobjects.com/os/cloud-ide/codeblitz/webview.66e57793.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/webpack/config.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const BannerPlugin = require('./util/banner-plugin');
const { nodePolyfill } = require('./util');
const { findPortSync } = require('./util/find-porter');
const { config } = require('./util');
const pkg = require('../../../package.json');
const pkg = require('../../../lerna.json');

const defaultHost = 'localhost';
const HOST = process.env.HOST || defaultHost;
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/webpack/config.webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = (option = {}) => {
},
output: {
filename: `[name].${isDev ? 'js' : '[contenthash:8].js'}`,
path: path.resolve(__dirname, `../dist`),
path: path.resolve(__dirname, '../../sumi-core/resources'),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

需要全面更新项目以适应新的输出目录

在检查过程中,我们发现了以下问题:

  1. webpack配置文件已正确更新为新的输出目录 '../../sumi-core/resources'。
  2. 然而,项目中仍有36个文件引用旧的 "../dist" 目录,这可能会导致构建和运行时错误。
  3. 有29个配置文件和package.json文件可能需要更新以反映新的目录结构。

建议采取以下措施:

  1. 仔细审查所有引用 "../dist" 的文件,并更新这些引用以指向新的输出目录。
  2. 检查并更新所有相关的配置文件和package.json文件,确保它们与新的目录结构一致。
  3. 在完成更新后,进行全面的测试,以确保所有功能和构建过程正常工作。
  4. 考虑使用项目范围的搜索和替换工具来协助更新过程,但要小心谨慎,以避免意外更改。

这个更改比预期的要复杂,需要对项目进行更广泛的修改。建议在进行这些更改时保持谨慎,并在每个阶段进行充分的测试。

Analysis chain

验证输出目录变更的影响

输出目录从 ../dist 变更为 ../../sumi-core/resources,这可能会影响构建过程和打包后文件的位置。请确保:

  1. 新的输出目录已正确配置且可访问。
  2. 项目中依赖打包文件的其他部分已相应更新。
  3. 构建脚本、部署流程等也已适配新的输出目录。

可以运行以下脚本来验证输出目录的变更是否影响了构建过程和项目的其他部分:

请运行上述验证脚本,确保输出目录的变更不会引入问题。如果验证不通过,请更新受影响的文件和配置。

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash

# 构建项目
npm run build

# 检查新的输出目录是否存在且包含预期的文件
if [ ! -d "packages/sumi-core/resources" ]; then
  echo "新的输出目录 packages/sumi-core/resources 不存在,请检查配置。"
  exit 1
fi

# 搜索项目中引用旧输出目录 ../dist 的文件
num_old_refs=$(grep -R --include=\*.{js,ts,jsx,tsx,html,css} "../dist" | wc -l)

if [ $num_old_refs -gt 0 ]; then
  echo "发现 $num_old_refs 处引用了旧的输出目录 ../dist,请相应更新。"
  # 列出引用位置供参考  
  grep -R --include=\*.{js,ts,jsx,tsx,html,css} "../dist"
  exit 1
fi

echo "输出目录变更验证通过。"

Length of output: 23973


Script:

#!/bin/bash

# 检查 webpack 配置文件中的新输出目录
echo "检查 webpack 配置文件中的新输出目录:"
grep -n "path.resolve(__dirname, '../../sumi-core/resources')" packages/toolkit/webpack/config.webview.js

# 列出包含 "../dist" 引用的文件
echo -e "\n包含 '../dist' 引用的文件列表:"
grep -R --include=\*.{js,ts,jsx,tsx,json} "../dist" . | cut -d: -f1 | sort | uniq

# 搜索可能需要更新的其他配置文件
echo -e "\n可能需要更新的其他配置文件:"
find . -name "*.config.js" -o -name "*.json" | xargs grep -l "dist"

Length of output: 5637

},
devtool: isDev ? 'inline-source-map' : false,
mode: isDev ? 'development' : 'production',
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/webpack/config.worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = () => {
},
output: {
filename: `[name].${isDev ? 'js' : '[contenthash:8].js'}`,
path: path.resolve(__dirname, '../dist'),
path: path.resolve(__dirname, '../../sumi-core/resources'),
},
target: 'webworker',
devtool: isDev ? 'inline-source-map' : false,
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ const assetsKeyMap = {
invoke(async () => {
signale.pending(`开始编译 worker-host 和 webview`);

await exec('npx rimraf ./packages/toolkit/dist');
await exec('npx rimraf ./packages/sumi-core/resources');
await exec(`yarn workspace @codeblitzjs/ide-toolkit build:host`);


const distDir = path.resolve(__dirname, '../packages/toolkit/dist');
const distDir = path.resolve(__dirname, '../packages/sumi-core/resources');
const manifest = require(path.join(distDir, 'manifest.json'));
const fileJSON = Object.keys(manifest).reduce((obj, key) => {
obj[key] = {
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const fse = require('fs-extra');
const path = require('path');
const pkg = require('../../package.json');
const pkg = require('../../lerna.json');

/**
* @param {string[]} files
Expand Down
Loading