From 2ef2d08388c5342314f4f65588989fdf260e9b8c Mon Sep 17 00:00:00 2001 From: Xinyuan Lin Date: Sat, 13 Dec 2025 21:21:04 -0800 Subject: [PATCH 1/5] Replace Apache License with MIT License header Signed-off-by: Xinyuan Lin --- .../src/language-server-runner.ts | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/pyright-language-service/src/language-server-runner.ts b/pyright-language-service/src/language-server-runner.ts index 9773c7cc8d2..f4224b86219 100644 --- a/pyright-language-service/src/language-server-runner.ts +++ b/pyright-language-service/src/language-server-runner.ts @@ -1,21 +1,8 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ +// The source file can be referred to: https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/src/common/node/language-server-runner.ts import {WebSocketServer} from "ws"; import {Server} from 'node:http'; @@ -46,4 +33,4 @@ export const runLanguageServer = ( server: httpServer, wss }); -}; \ No newline at end of file +}; From a04e0d0dda1e0101c7338e62cfd8c50ede75e3ee Mon Sep 17 00:00:00 2001 From: Xinyuan Lin Date: Sat, 13 Dec 2025 21:23:12 -0800 Subject: [PATCH 2/5] Update main.ts Signed-off-by: Xinyuan Lin --- pyright-language-service/src/main.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/pyright-language-service/src/main.ts b/pyright-language-service/src/main.ts index 8cd21134d80..a8f7d760def 100644 --- a/pyright-language-service/src/main.ts +++ b/pyright-language-service/src/main.ts @@ -1,21 +1,4 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ +//The source file can be referred to: https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/src/python/server/main.ts import {dirname, resolve} from "node:path"; import {runLanguageServer} from "./language-server-runner.ts"; From 9e3f81efa729fa7d486c03638cdb482389c07a52 Mon Sep 17 00:00:00 2001 From: Xinyuan Lin Date: Sat, 13 Dec 2025 21:25:16 -0800 Subject: [PATCH 3/5] Update hocon-parser.d.ts Signed-off-by: Xinyuan Lin --- .../src/types/hocon-parser.d.ts | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/pyright-language-service/src/types/hocon-parser.d.ts b/pyright-language-service/src/types/hocon-parser.d.ts index 47008074dcb..880060f27bc 100644 --- a/pyright-language-service/src/types/hocon-parser.d.ts +++ b/pyright-language-service/src/types/hocon-parser.d.ts @@ -1,22 +1,3 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - declare module 'hocon-parser' { /** * The module itself is callable, accepting a string (HOCON config) and returning a parsed object. @@ -24,4 +5,4 @@ declare module 'hocon-parser' { function hoconParser(input: string): any; export = hoconParser; -} \ No newline at end of file +} From 4323a4a957a448db69b75c319ea0215d231ae6a5 Mon Sep 17 00:00:00 2001 From: Xinyuan Lin Date: Sat, 13 Dec 2025 21:32:49 -0800 Subject: [PATCH 4/5] Update license information in server-commons.ts Signed-off-by: Xinyuan Lin --- .../src/server-commons.ts | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/pyright-language-service/src/server-commons.ts b/pyright-language-service/src/server-commons.ts index 5ef2e6f0edf..72002bc6b9a 100644 --- a/pyright-language-service/src/server-commons.ts +++ b/pyright-language-service/src/server-commons.ts @@ -1,22 +1,8 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ +//The source file can be referred to: https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/src/common/node/server-commons.ts import {ServerOptions, WebSocketServer} from "ws"; import {IncomingMessage, Server} from "node:http"; import {fileURLToPath, URL} from "node:url"; @@ -116,4 +102,4 @@ export const upgradeWsServer = (runconfig: LanguageServerRunConfig, export const getLocalDirectory = (referenceUrl: string | URL) => { const __filename = fileURLToPath(referenceUrl); return dirname(__filename); -}; \ No newline at end of file +}; From 651266e76a45f11b0194b848785e3def78a5f933 Mon Sep 17 00:00:00 2001 From: Xinyuan Lin Date: Sat, 13 Dec 2025 21:34:21 -0800 Subject: [PATCH 5/5] Update .licenserc.yaml Signed-off-by: Xinyuan Lin --- .licenserc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.licenserc.yaml b/.licenserc.yaml index fed8faf136e..a6b12484b51 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -26,3 +26,4 @@ header: - '.licenserc.yaml' - 'frontend/.yarn/**' - 'amber/src/main/python/proto/**' + - 'pyright-language-service/**'