Skip to content

Commit 8f8bd7c

Browse files
authored
chore: update deps (#3436)
1 parent 2d7702a commit 8f8bd7c

15 files changed

Lines changed: 150 additions & 120 deletions

File tree

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'github-actions'
4+
directory: '/'
5+
schedule:
6+
interval: 'weekly'
7+
- package-ecosystem: 'npm'
8+
directory: '/'
9+
schedule:
10+
interval: 'weekly'

.github/workflows/check.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,19 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [macos-latest, ubuntu-latest]
21-
node-version: [16.x]
21+
node-version: [20.x]
2222

2323
steps:
2424
- uses: actions/checkout@v4
25-
- uses: actions/setup-python@v4
26-
with:
27-
python-version: '3.10'
2825
- name: Use Node.js ${{ matrix.node-version }}
2926
uses: actions/setup-node@v4
3027
with:
3128
node-version: ${{ matrix.node-version }}
32-
- uses: actions/setup-python@v4
33-
with:
34-
python-version: '3.10'
3529
- name: Get yarn cache directory path
3630
id: yarn_cache_dir_path
3731
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
3832

39-
- uses: actions/cache@v3
33+
- uses: actions/cache@v4
4034
id: yarn_cache
4135
with:
4236
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
@@ -63,15 +57,15 @@ jobs:
6357
runs-on: windows-2019
6458
steps:
6559
- uses: actions/checkout@v4
66-
- name: Use Node.js 16.x
60+
- name: Use Node.js 20.x
6761
uses: actions/setup-node@v4
6862
with:
69-
node-version: 16.x
63+
node-version: 20.x
7064
- name: Get yarn cache directory path
7165
id: yarn_cache_dir_path
7266
run: echo "dir=$(yarn config get cacheFolder)" >> $Env:GITHUB_OUTPUT
7367

74-
- uses: actions/cache@v3
68+
- uses: actions/cache@v4
7569
id: yarn_cache
7670
with:
7771
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}

.github/workflows/ci.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ jobs:
2424
strategy:
2525
matrix:
2626
os: [macos-latest, ubuntu-latest]
27-
node-version: [16.x]
27+
node-version: [20.x]
2828
ci-project: [node, jsdom]
2929

3030
steps:
3131
- uses: actions/checkout@v4
32-
- uses: actions/setup-python@v4
33-
with:
34-
python-version: '3.10'
3532
- name: Use Node.js ${{ matrix.node-version }}
3633
uses: actions/setup-node@v4
3734
with:
@@ -40,7 +37,7 @@ jobs:
4037
id: yarn_cache_dir_path
4138
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
4239

43-
- uses: actions/cache@v3
40+
- uses: actions/cache@v4
4441
id: yarn_cache
4542
with:
4643
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
@@ -56,9 +53,9 @@ jobs:
5653
run: |
5754
yarn run ci --selectProjects ${{ matrix.ci-project }}
5855
59-
- if: ${{ matrix.node-version == '16.x' && matrix.os == 'ubuntu-latest' }}
56+
- if: ${{ matrix.node-version == '20.x' && matrix.os == 'ubuntu-latest' }}
6057
name: Upload coverage to Codecov
61-
uses: codecov/codecov-action@v3
58+
uses: codecov/codecov-action@v4
6259
with:
6360
token: ${{ secrets.CORE_CODECOV_TOKEN }}
6461
flags: ${{ matrix.ci-project }}

.github/workflows/deploy.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,11 @@ jobs:
2121
with:
2222
token-server: ${{ secrets.BOT_TOKEN_SERVER }}
2323
flag: ${{ secrets.BOT_FLAG }}
24-
2524
- uses: actions/checkout@v4
26-
- uses: actions/setup-python@v4
27-
with:
28-
python-version: '3.10'
2925
- name: Get yarn cache directory path
3026
id: yarn_cache_dir_path
3127
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
32-
33-
- uses: actions/cache@v3
28+
- uses: actions/cache@v4
3429
id: yarn_cache
3530
with:
3631
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}

.github/workflows/e2e.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414

1515
jobs:
1616
build:
17-
name: ubuntu-latest, Node.js 16.x
17+
name: ubuntu-latest, Node.js 20.x
1818

1919
runs-on: ubuntu-latest
2020
timeout-minutes: 60
@@ -23,19 +23,16 @@ jobs:
2323
- name: Checkout
2424
uses: actions/checkout@v2
2525

26-
- name: Use Node.js "16.x"
26+
- name: Use Node.js "20.x"
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: '16.x'
29+
node-version: '20.x'
3030
registry-url: 'https://registry.npmjs.org'
31-
- uses: actions/setup-python@v4
32-
with:
33-
python-version: '3.10'
3431
- name: Get yarn cache directory path
3532
id: yarn_cache_dir_path
3633
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
3734

38-
- uses: actions/cache@v3
35+
- uses: actions/cache@v4
3936
id: yarn_cache
4037
with:
4138
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}

.github/workflows/release-rc.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [16.x]
19+
node-version: [20.x]
2020

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

53-
- uses: actions/cache@v3
50+
- uses: actions/cache@v4
5451
id: yarn_cache
5552
with:
5653
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}

.github/workflows/release.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
environment: latest
2020
strategy:
2121
matrix:
22-
node-version: [16.x]
22+
node-version: [20.x]
2323

2424
steps:
2525
# 判断用户是否有管理员权限
@@ -45,9 +45,6 @@ jobs:
4545
with:
4646
node-version: ${{ matrix.node-version }}
4747
registry-url: 'https://registry.npmjs.org'
48-
- uses: actions/setup-python@v4
49-
with:
50-
python-version: '3.10'
5148
- uses: mukunku/[email protected]
5249
id: checkTag
5350
env:
@@ -71,7 +68,7 @@ jobs:
7168
- name: Get yarn cache directory path
7269
id: yarn_cache_dir_path
7370
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
74-
- uses: actions/cache@v3
71+
- uses: actions/cache@v4
7572
id: yarn_cache
7673
with:
7774
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"lint-staged": "^12.1.2",
6767
"lodash": "^4.17.21",
6868
"mri": "^1.2.0",
69-
"node-gyp": "^9.0.0"
69+
"node-gyp": "^10.0.1"
7070
},
7171
"lint-staged": {
7272
"*.{js,jsx,ts,tsx,md,html,css,less,json,yml}": "prettier --write",
@@ -145,9 +145,5 @@
145145
"tools/playwright",
146146
"tools/cli-engine"
147147
],
148-
"resolutions": {
149-
"classnames": "2.3.1",
150-
"node-gyp": "9.3.1"
151-
},
152148
"packageManager": "[email protected]"
153149
}

packages/comments/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"dependencies": {
2020
"@opensumi/ide-core-common": "workspace:*",
21-
"react-mentions": "^3.3.1"
21+
"react-mentions": "^4.4.10"
2222
},
2323
"devDependencies": {
2424
"@opensumi/ide-components": "workspace:*",
@@ -27,6 +27,7 @@
2727
"@opensumi/ide-editor": "workspace:*",
2828
"@opensumi/ide-main-layout": "workspace:*",
2929
"@opensumi/ide-monaco-enhance": "workspace:*",
30-
"@opensumi/ide-theme": "workspace:*"
30+
"@opensumi/ide-theme": "workspace:*",
31+
"@types/react-mentions": "^4.1.13"
3132
}
3233
}

packages/comments/src/browser/comments-textarea.view.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface ICommentTextAreaProps extends React.TextareaHTMLAttributes<HTML
1616
maxRows?: number;
1717
initialHeight?: string;
1818
value: string;
19-
dragFiles?: (files: FileList) => void;
19+
dragFiles?: (files: FileList) => void | Promise<void>;
2020
}
2121

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

4848
const handleFileSelect = React.useCallback(
49-
async (event: DragEvent) => {
49+
async (event: React.DragEvent<HTMLTextAreaElement>) => {
5050
event.stopPropagation();
5151
event.preventDefault();
5252

@@ -165,7 +165,9 @@ export const CommentsTextArea = React.forwardRef<HTMLTextAreaElement, ICommentTe
165165
onDragOver={handleDragOver}
166166
onDrop={handleFileSelect}
167167
inputRef={inputRef}
168-
ref={itemRef}
168+
// in react 18, the type of ref is changed to LegacyRef<ClassComponent>
169+
// but actually it is working pass a dom element ref
170+
ref={itemRef as any}
169171
value={value}
170172
placeholder={placeholder}
171173
onChange={onChange}

0 commit comments

Comments
 (0)