Skip to content

Commit 3ed451b

Browse files
author
winjo
committed
feat: bundle antd3, upgrade lsif
1 parent 8ea272a commit 3ed451b

5 files changed

Lines changed: 18 additions & 15 deletions

File tree

packages/lsif-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"dependencies": {
2222
"@alipay/alex-core": "0.9.2",
2323
"@alipay/alex-shared": "0.9.2",
24-
"@alipay/lsif-client": "^1.1.1"
24+
"@alipay/lsif-client": "^1.2.0"
2525
},
2626
"peerDependencies": {
2727
"@ali/ide-core-common": "1.35.2",

packages/lsif-service/src/language-service.contribution.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ export class LsifContribution
192192
});
193193
break;
194194
case '':
195+
case OriginScheme.File:
195196
locationUri = Uri.file(paths.posix.join(_rootUri.path.toString(), path));
196197
break;
197198
// 无法处理的协议不处理

packages/lsif-service/src/lib-scheme.provider.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class LibEditorDocumentModelProvider implements IEditorDocumentModelConte
3535
return Promise.resolve('');
3636
}
3737

38-
async fetchJarContent(uri: URI) {
38+
async fetchJarContent(uri: URI): Promise<string> {
3939
const path = uri.path.toString();
4040
const rex = /^\/?([^\/]+)\/([^\/]+)\/([^\/]+)\/(.+)$/;
4141

@@ -44,15 +44,11 @@ export class LibEditorDocumentModelProvider implements IEditorDocumentModelConte
4444
throw new Error('uri string not match');
4545
}
4646

47-
const [_, scope, name, version, filepath] = match;
47+
const [_, scope, name, version, filePath] = match;
4848

49-
const endpoint = `/api/lsif/jar-content?module=${scope}:${name}:${version}&filePath=${filepath}`;
50-
51-
// 放在 lsif-client
52-
const ret = await axios.get(endpoint, {
53-
// @ts-ignore
54-
...this.lsifClient.requestConfig,
49+
return this.lsifClient.jarContent({
50+
module: `${scope}:${name}:${version}`,
51+
filePath,
5552
});
56-
return (ret.data.success && ret.data.content) || '';
5753
}
5854
}

packages/toolkit/webpack/config.build.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,14 @@ module.exports = createWebpackConfig({
3838
commonjs: 'react-dom',
3939
amd: 'react-dom',
4040
},
41+
moment: {
42+
root: 'moment',
43+
commonjs2: 'moment',
44+
commonjs: 'moment',
45+
amd: 'moment',
46+
},
4147
},
42-
/^antd/,
48+
/^@ant-design\/icons/,
4349
],
4450
optimization: {
4551
minimize: false,

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -763,10 +763,10 @@
763763
utility "^1.13.1"
764764
uuid "^3.2.1"
765765

766-
"@alipay/lsif-client@^1.1.1":
767-
version "1.1.1"
768-
resolved "https://registry.npm.alibaba-inc.com/@alipay/lsif-client/download/@alipay/lsif-client-1.1.1.tgz#ee5d59e6d4e1d303f45d71a0e8f8ef52a41b5881"
769-
integrity sha1-7l1Z5tTh0wP0XXGg6PjvUqQbWIE=
766+
"@alipay/lsif-client@^1.2.0":
767+
version "1.2.0"
768+
resolved "https://registry.npm.alibaba-inc.com/@alipay/lsif-client/download/@alipay/lsif-client-1.2.0.tgz#c3c0d4819ed7d22ec9d5e5586ea3f2f62b77d4a0"
769+
integrity sha1-w8DUgZ7X0i7J1eVYbqPy9it31KA=
770770
dependencies:
771771
axios "^0.21.1"
772772

0 commit comments

Comments
 (0)