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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
16 changes: 5 additions & 11 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,19 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
node-version: [16.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Get yarn cache directory path
id: yarn_cache_dir_path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn_cache
with:
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
Expand All @@ -63,15 +57,15 @@ jobs:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Use Node.js 16.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
- name: Get yarn cache directory path
id: yarn_cache_dir_path
run: echo "dir=$(yarn config get cacheFolder)" >> $Env:GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn_cache
with:
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
node-version: [16.x]
node-version: [20.x]
ci-project: [node, jsdom]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -40,7 +37,7 @@ jobs:
id: yarn_cache_dir_path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn_cache
with:
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
Expand All @@ -56,9 +53,9 @@ jobs:
run: |
yarn run ci --selectProjects ${{ matrix.ci-project }}

- if: ${{ matrix.node-version == '16.x' && matrix.os == 'ubuntu-latest' }}
- if: ${{ matrix.node-version == '20.x' && matrix.os == 'ubuntu-latest' }}
name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CORE_CODECOV_TOKEN }}
flags: ${{ matrix.ci-project }}
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,11 @@ jobs:
with:
token-server: ${{ secrets.BOT_TOKEN_SERVER }}
flag: ${{ secrets.BOT_FLAG }}

- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Get yarn cache directory path
id: yarn_cache_dir_path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn_cache
with:
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
build:
name: ubuntu-latest, Node.js 16.x
name: ubuntu-latest, Node.js 20.x

runs-on: ubuntu-latest
timeout-minutes: 60
Expand All @@ -23,19 +23,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js "16.x"
- name: Use Node.js "20.x"
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Get yarn cache directory path
id: yarn_cache_dir_path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn_cache
with:
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

steps:
# 判断用户是否有写权限
Expand All @@ -38,9 +38,6 @@ jobs:
with:
ref: ${{ github.event.inputs.ref }}
token: ${{ env.GITHUB_TOKEN }}
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -50,7 +47,7 @@ jobs:
id: yarn_cache_dir_path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn_cache
with:
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
environment: latest
strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

steps:
# 判断用户是否有管理员权限
Expand All @@ -45,9 +45,6 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: mukunku/tag-exists-action@v1.0.0
id: checkTag
env:
Expand All @@ -71,7 +68,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn_cache_dir_path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: yarn_cache
with:
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"lint-staged": "^12.1.2",
"lodash": "^4.17.21",
"mri": "^1.2.0",
"node-gyp": "^9.0.0"
"node-gyp": "^10.0.1"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,md,html,css,less,json,yml}": "prettier --write",
Expand Down Expand Up @@ -145,9 +145,5 @@
"tools/playwright",
"tools/cli-engine"
],
"resolutions": {
"classnames": "2.3.1",
"node-gyp": "9.3.1"
},
"packageManager": "yarn@3.6.4"
}
5 changes: 3 additions & 2 deletions packages/comments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"@opensumi/ide-core-common": "workspace:*",
"react-mentions": "^3.3.1"
"react-mentions": "^4.4.10"
},
"devDependencies": {
"@opensumi/ide-components": "workspace:*",
Expand All @@ -27,6 +27,7 @@
"@opensumi/ide-editor": "workspace:*",
"@opensumi/ide-main-layout": "workspace:*",
"@opensumi/ide-monaco-enhance": "workspace:*",
"@opensumi/ide-theme": "workspace:*"
"@opensumi/ide-theme": "workspace:*",
"@types/react-mentions": "^4.1.13"
}
}
8 changes: 5 additions & 3 deletions packages/comments/src/browser/comments-textarea.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface ICommentTextAreaProps extends React.TextareaHTMLAttributes<HTML
maxRows?: number;
initialHeight?: string;
value: string;
dragFiles?: (files: FileList) => void;
dragFiles?: (files: FileList) => void | Promise<void>;
}

const defaultTrigger = '@';
Expand Down Expand Up @@ -46,7 +46,7 @@ export const CommentsTextArea = React.forwardRef<HTMLTextAreaElement, ICommentTe
React.useImperativeHandle(ref, () => inputRef.current!);

const handleFileSelect = React.useCallback(
async (event: DragEvent) => {
async (event: React.DragEvent<HTMLTextAreaElement>) => {
event.stopPropagation();
event.preventDefault();

Expand Down Expand Up @@ -165,7 +165,9 @@ export const CommentsTextArea = React.forwardRef<HTMLTextAreaElement, ICommentTe
onDragOver={handleDragOver}
onDrop={handleFileSelect}
inputRef={inputRef}
ref={itemRef}
// in react 18, the type of ref is changed to LegacyRef<ClassComponent>
// but actually it is working pass a dom element ref
ref={itemRef as any}
value={value}
placeholder={placeholder}
onChange={onChange}
Expand Down
2 changes: 1 addition & 1 deletion packages/core-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@opensumi/vscode-debugprotocol": "1.49.0-beta.1",
"@vscode/codicons": "0.0.35",
"ajv": "^6.10.0",
"classnames": "2.3.1",
"classnames": "2.5.1",
"font-awesome": "^4.7.0",
"fuzzy": "^0.1.3",
"jsonc-parser": "^2.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/terminal-next/src/browser/component/resize.view.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import clx from 'classnames';
import cls from 'classnames';
import { observer } from 'mobx-react-lite';
import React from 'react';

import { useInjectable, getIcon } from '@opensumi/ide-core-browser';
import { getIcon, useInjectable } from '@opensumi/ide-core-browser';

import { ITerminalGroupViewService } from '../../common/controller';
import { IWidget, IWidgetGroup } from '../../common/resize';
Expand Down Expand Up @@ -88,7 +88,7 @@ export default observer((props: IResizeViewProps) => {
{props.draw(widget)}
{group.widgets.length > 1 && (
<div
className={clx(styles.closeBtn, getIcon('close'))}
className={cls(styles.closeBtn, getIcon('close'))}
onClick={() => {
handleRemoveWidget(widget.id);
}}
Expand Down
25 changes: 13 additions & 12 deletions tools/dev-tool/cli/rebuild-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports.rebuild = (argv) => {

if (target === 'electron') {
version = argv.electronVersion || require('electron/package.json').version;
const distUrl = argv.distUrl || 'https://electronjs.org/headers';
console.log('rebuilding native for electron version ' + version);
commands = [
os.platform() === 'win32' ? 'set HOME=~/.electron-gyp' : 'HOME=~/.electron-gyp',
Expand All @@ -30,7 +31,7 @@ module.exports.rebuild = (argv) => {
'--openssl_fips=X',
`--target=${version}`,
`--arch=${arch}`,
'--dist-url=https://electronjs.org/headers',
`--dist-url=${distUrl}`,
];
} else if (target === 'node') {
console.log('rebuilding native for node version ' + process.version);
Expand Down Expand Up @@ -69,18 +70,18 @@ module.exports.rebuild = (argv) => {
copySync(join(modulePath, 'build'), cache, { dereference: true, recursive: true });
}

function getBuildCacheDir(modulePath, type, version, arch) {
const info = require(join(modulePath, './package.json'));
return join(
require('os').homedir(),
'.sumi-dev',
'opensumi_build_cache',
`${type}-${version}-${arch}`,
info.name + '-' + info.version,
);
}

nativeModules.forEach((path) => {
rebuildModule(path, target, version, arch);
});
};

function getBuildCacheDir(modulePath, type, version, arch) {
const info = require(join(modulePath, './package.json'));
return join(
require('os').homedir(),
'.sumi-dev',
'opensumi_build_cache',
`${type}-${version}-${arch}`,
info.name + '-' + info.version,
);
}
8 changes: 3 additions & 5 deletions tools/dev-tool/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"name": "@opensumi/ide-dev-tool",
"version": "1.3.1",
"description": "@opensumi/ide-dev-tool",
"repository": {
"type": "git",
"url": "git@github.com:opensumi/core.git"
},
"private": true,
"resolutions": {
"terser": "^5.13.1"
},
"bin": {
"sumi": "./cli/index.js"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@types/koa": "^2.14.0",
"@types/koa-bodyparser": "^4.3.7",
Expand Down
Loading