-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from volarjs:master #66
base: master
Are you sure you want to change the base?
Conversation
Run & review this pull request in StackBlitz Codeflow. |
021988a
to
2e0980a
Compare
c6fabee
to
a0048bc
Compare
2c64157
to
ed967b6
Compare
ae3f0d5
to
005aff1
Compare
679dda0
to
f10a6ee
Compare
2a2814a
to
c1c0f0b
Compare
…tion.shouldRename`
* fix(test-utils): use stdio transport for test server Using the IPC transport, breaks code coverage. This is related to bcoe/c8#189. * fix(test-utils): handle window/logMessage notifications When using the `stdio` transport, console logging is redirected to `window/logMessage` output.
…ventLeadingOffset` enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
packages/typescript/lib/node/proxyCreateProgram.ts (1)
1-1
: Missing Dependency: Add@volar/language-core
topackage.json
The package
@volar/language-core
is not listed as a dependency or devDependency inpackage.json
. To ensure the imports inproxyCreateProgram.ts
work correctly, please add this package to your project's dependencies.
- Ensure
@volar/language-core
is added topackage.json
under dependencies or devDependencies.Analysis chain
New Imports: Ensure Correct Usage
The new imports from
@volar/language-core
are necessary for the enhanced functionality. Ensure that these imports are correctly utilized and that the package is listed as a dependency inpackage.json
.Verify that
@volar/language-core
is listed as a dependency inpackage.json
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `@volar/language-core` is listed as a dependency in `package.json`. # Test: Search for `@volar/language-core` in `package.json`. Expect: Dependency listed. rg '@volar/language-core' package.jsonLength of output: 38
Script:
#!/bin/bash # Description: Verify that `@volar/language-core` is listed as a dependency or devDependency in `package.json`. # Test: Search for `@volar/language-core` in `package.json`. Expect: Dependency or devDependency listed. jq '.dependencies["@volar/language-core"], .devDependencies["@volar/language-core"]' package.jsonLength of output: 109
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/typescript/lib/node/proxyCreateProgram.ts (1 hunks)
Additional comments not posted (7)
packages/typescript/lib/node/proxyCreateProgram.ts (7)
7-17
: Helper Function:arrayEqual
The
arrayEqual
function correctly compares two arrays for equality. Ensure that this function is tested and used appropriately.The code changes are approved.
18-30
: Helper Function:objectEqual
The
objectEqual
function correctly compares two objects for equality. Ensure that this function is tested and used appropriately.The code changes are approved.
40-47
: New Variables: Ensure Proper InitializationThe new variables
sourceFileSnapshots
,parsedSourceFiles
,lastOptions
,languagePlugins
,language
, andmoduleResolutionCache
are correctly initialized. Ensure that these variables are used appropriately throughout the function.The code changes are approved.
111-217
: Dynamic Extensions: Ensure Proper HandlingThe dynamic generation of
extensions
from the language plugins allows for greater adaptability. Ensure that the module resolution process correctly handles arbitrary file extensions.The code changes are approved.
220-227
: Program Decoration: Ensure Correct DecorationThe
decorateProgram
function is used to decorate the program with thelanguage
. Ensure that the decoration process is correctly implemented and that the__volar__
property is correctly set.The code changes are approved.
54-108
: Enhanced Logic: Ensure Correct FunctionalityThe enhanced logic ensures that the program only re-initializes when necessary, reducing unnecessary processing. Ensure that the
create
function correctly returns the expected structure and that thelanguage
andlanguagePlugins
are correctly initialized.Ensure that the
create
function correctly returns the expected structure. Verify the correctness of thelanguage
andlanguagePlugins
initialization.Verification successful
Verification Successful: Correct Return Structure and Initialization
The
create
function correctly returns the expected structure, and the initialization oflanguage
andlanguagePlugins
is handled properly in the code. The logic ensures that the program only re-initializes when necessary, reducing unnecessary processing.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the `create` function return structure and initialization of `language` and `languagePlugins`. # Test: Search for the `create` function implementation. Expect: Correct return structure. rg --type ts -A 10 $'create'Length of output: 149994
35-38
: Function Signature Change:proxyCreateProgram
The
proxyCreateProgram
function now accepts acreate
parameter that can return either an array ofLanguagePlugin<string>
or an object containinglanguagePlugins
and an optionalsetup
function. Ensure that all calls toproxyCreateProgram
are updated to match the new signature.Run the following script to verify the function usage:
Verification successful
Function Signature Change Verified:
proxyCreateProgram
The
proxyCreateProgram
function's new signature is correctly implemented inrunTsc.ts
. ThegetLanguagePlugins
variable matches the expected return type, ensuring compatibility with the updated function signature. No further changes are needed.
runTsc.ts
: ThegetLanguagePlugins
variable is correctly defined to match the new signature.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `proxyCreateProgram` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type ts -A 5 $'proxyCreateProgram'Length of output: 2125
Script:
#!/bin/bash # Extract more context around the `proxyCreateProgram` usage in `runTsc.ts` to verify the `create` parameter. rg --type ts -A 10 -B 5 'proxyCreateProgram' packages/typescript/lib/quickstart/runTsc.tsLength of output: 1096
Script:
#!/bin/bash # Search for the implementation of `getLanguagePlugins` to verify its return type. rg --type ts 'function getLanguagePlugins' -A 10Length of output: 50
Script:
#!/bin/bash # Search for `getLanguagePlugins` as a variable or import to locate its definition. rg --type ts 'getLanguagePlugins'Length of output: 712
…open in the editor for TS project (#235)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (8)
- packages/language-server/lib/project/typescriptProjectLs.ts (1 hunks)
- packages/language-service/lib/features/resolveCodeAction.ts (2 hunks)
- packages/language-service/lib/features/resolveCodeLens.ts (1 hunks)
- packages/language-service/lib/features/resolveCompletionItem.ts (2 hunks)
- packages/language-service/lib/features/resolveDocumentLink.ts (1 hunks)
- packages/language-service/lib/features/resolveInlayHint.ts (1 hunks)
- packages/language-service/lib/features/resolveWorkspaceSymbol.ts (1 hunks)
- packages/test-utils/index.ts (12 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/language-server/lib/project/typescriptProjectLs.ts
Additional context used
Biome
packages/language-service/lib/features/resolveInlayHint.ts
[error] 14-14: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
[error] 22-22: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
packages/language-service/lib/features/resolveWorkspaceSymbol.ts
[error] 14-14: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
[error] 22-22: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
packages/language-service/lib/features/resolveDocumentLink.ts
[error] 15-15: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
[error] 27-27: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
packages/language-service/lib/features/resolveCodeAction.ts
[error] 16-16: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
[error] 39-39: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
packages/language-service/lib/features/resolveCodeLens.ts
[error] 19-19: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
[error] 35-35: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
packages/language-service/lib/features/resolveCompletionItem.ts
[error] 19-19: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
[error] 61-61: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
Additional comments not posted (31)
packages/language-service/lib/features/resolveInlayHint.ts (1)
6-6
: LGTM!The function changes reflect a shift to a plugin-oriented approach, which enhances modularity and flexibility.
Also applies to: 12-19
packages/language-service/lib/features/resolveWorkspaceSymbol.ts (1)
6-6
: LGTM!The function changes reflect a shift to a plugin-oriented approach, which enhances modularity and flexibility.
Also applies to: 12-19
packages/language-service/lib/features/resolveDocumentLink.ts (1)
7-7
: LGTM!The function changes reflect a shift to a plugin-oriented approach, which enhances modularity and flexibility.
Also applies to: 13-23
packages/language-service/lib/features/resolveCodeAction.ts (3)
2-2
: LGTM!The import statement for
LanguageServiceContext
is correct and necessary for the updated context type.The code changes are approved.
7-7
: LGTM!The change in the
register
function's parameter type fromServiceContext
toLanguageServiceContext
is consistent with the new architecture.The code changes are approved.
Line range hint
22-32
: LGTM!The changes to the assignment and transformation of the
item
variable are consistent with the new architecture and improve the flexibility of the code action resolution process.The code changes are approved.
Tools
Biome
[error] 16-16: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
packages/language-service/lib/features/resolveCodeLens.ts (3)
2-3
: LGTM!The import statement for
LanguageServiceContext
is correct and necessary for the updated context type.The code changes are approved.
8-8
: LGTM!The change in the
register
function's parameter type fromServiceContext
toLanguageServiceContext
is consistent with the new architecture.The code changes are approved.
24-30
: LGTM!The changes to the assignment and handling of
data.sourceFileUri
are consistent with the new architecture and improve the reliability of URI handling.The code changes are approved.
packages/language-service/lib/features/resolveCompletionItem.ts (3)
2-3
: LGTM!The import statement for
LanguageServiceContext
is correct and necessary for the updated context type.The code changes are approved.
9-9
: LGTM!The change in the
register
function's parameter type fromServiceContext
toLanguageServiceContext
is consistent with the new architecture.The code changes are approved.
25-46
: LGTM!The changes to the handling of
data.embeddedDocumentUri
, decoding and retrieval of embedded documents, and the mapping and transformation of completion items are consistent with the new architecture and improve the handling of embedded documents.The code changes are approved.
packages/test-utils/index.ts (19)
15-20
: Update communication method with child process.The
fork
method now uses--stdio
instead of--node-ipc
, and the connection is established usingchildProcess.stdout
andchildProcess.stdin
directly. This change enhances control over the input/output streams.The code changes are approved.
24-25
: Establish connection using child process streams.The connection is now established using
childProcess.stdout
andchildProcess.stdin
directly, which provides better control over the input/output streams.The code changes are approved.
27-32
: Initialize document versions, opened documents, and settings.The initialization of
documentVersions
,openedDocuments
, andsettings
is correctly implemented.The code changes are approved.
35-37
: Add enhanced notification handling.New notification handling has been added to log messages based on their type (Error, Warning, or Info). This allows for better debugging and logging of messages received from the language server.
The code changes are approved.
38-44
: Log messages based on their type.The logging of messages based on their type (Error, Warning, or Info) is correctly implemented.
The code changes are approved.
46-47
: Dispose connection on request.The connection is disposed of correctly on request.
The code changes are approved.
48-53
: Handle configuration requests.The handling of configuration requests is correctly implemented.
The code changes are approved.
59-64
: Expand method signature.The
initialize
method's signature has been expanded to include additional parameters for capabilities and locale, providing more flexibility in the initialization process.The code changes are approved.
69-77
: Send initialization request and notification.The initialization request and notification are correctly sent to the connection.
The code changes are approved.
88-94
: Open text document and send notification.The function correctly opens a text document and sends a notification to the connection.
The code changes are approved.
110-118
: Open untitled document and send notification.The function correctly opens an untitled document and sends a notification to the connection.
The code changes are approved.
134-137
: Check and close existing document.The function now checks if a document already exists and closes it before creating a new version. This ensures that the document's versioning is managed correctly.
The code changes are approved.
138-144
: Open in-memory document and send notification.The function correctly opens an in-memory document and sends a notification to the connection.
The code changes are approved.
169-187
: Add method to update text document.The addition of
updateTextDocument
allows for applying edits to existing documents, enhancing the server's capability to manage text documents effectively.The code changes are approved.
188-196
: Add method to update configuration.The new method
updateConfiguration
handles updates to the language server's settings dynamically. This method merges new settings into the existing configuration and sends a notification if the server is running.The code changes are approved.
454-460
: Modify method to print snapshots.The
printSnapshots
function has been modified to accept different parameters and to utilize new types, indicating a shift in how source files and virtual files are handled.The code changes are approved.
468-471
: Modify method to print a single snapshot.The
printSnapshot
function has been modified to accept different parameters and to utilize new types, indicating a shift in how source files and virtual files are handled.The code changes are approved.
Line range hint
474-485
: Process source mappings.The way source mappings are processed has been updated, replacing the
SourceMap
with adefaultMapperFactory
, which suggests improvements in how source locations are resolved.The code changes are approved.
Line range hint
552-554
: Add method to normalize log text.The
normalizeLogText
function replaces certain characters in the text with visual indicators, which can help in debugging and logging.The code changes are approved.
if (!service[1].resolveInlayHint) | ||
const plugin = context.plugins[data.pluginIndex]; | ||
if (!plugin[1].resolveInlayHint) { | ||
delete item.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the delete
operator to improve performance.
The use of delete
can lead to performance degradation. Consider setting the property to undefined
instead, which maintains the object's prototype chain.
Propose this change:
- delete item.data;
+ item.data = undefined;
Also applies to: 22-22
Tools
Biome
[error] 14-14: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
if (data) { | ||
const plugin = context.plugins[data.pluginIndex]; | ||
if (!plugin[1].resolveWorkspaceSymbol) { | ||
delete item.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the delete
operator to improve performance.
The use of delete
can lead to performance degradation. Consider setting the property to undefined
instead, which maintains the object's prototype chain.
Propose this change:
- delete item.data;
+ item.data = undefined;
Also applies to: 22-22
Tools
Biome
[error] 14-14: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
if (!service[1].resolveDocumentLink) | ||
const plugin = context.plugins[data.pluginIndex]; | ||
if (!plugin[1].resolveDocumentLink) { | ||
delete item.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the delete
operator to improve performance.
The use of delete
can lead to performance degradation. Consider setting the property to undefined
instead, which maintains the object's prototype chain.
Propose this change:
- delete item.data;
+ item.data = undefined;
Also applies to: 27-27
Tools
Biome
[error] 15-15: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
), | ||
} | ||
: item | ||
); | ||
} | ||
|
||
delete item.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the delete operator for performance reasons.
Using delete
on properties can lead to performance issues due to deoptimization in JavaScript engines.
Consider setting the property to undefined
instead:
- delete item.data;
+ item.data = undefined;
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
delete item.data; | |
item.data = undefined; |
Tools
Biome
[error] 39-39: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
const plugin = context.plugins[data.pluginIndex]; | ||
if (!plugin[1].resolveCodeAction) { | ||
delete item.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the delete operator for performance reasons.
Using delete
on properties can lead to performance issues due to deoptimization in JavaScript engines.
Consider setting the property to undefined
instead:
- delete item.data;
+ item.data = undefined;
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const plugin = context.plugins[data.pluginIndex]; | |
if (!plugin[1].resolveCodeAction) { | |
delete item.data; | |
const plugin = context.plugins[data.pluginIndex]; | |
if (!plugin[1].resolveCodeAction) { | |
item.data = undefined; |
Tools
Biome
[error] 16-16: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
|
||
item.command = context.commands.showReferences.create(data.sourceFileUri, item.range.start, references); | ||
} | ||
|
||
delete item.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the delete operator for performance reasons.
Using delete
on properties can lead to performance issues due to deoptimization in JavaScript engines.
Consider setting the property to undefined
instead:
- delete item.data;
+ item.data = undefined;
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
delete item.data; | |
item.data = undefined; |
Tools
Biome
[error] 35-35: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
const plugin = context.plugins[data.pluginIndex]; | ||
if (!plugin[1].resolveCodeLens) { | ||
delete item.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the delete operator for performance reasons.
Using delete
on properties can lead to performance issues due to deoptimization in JavaScript engines.
Consider setting the property to undefined
instead:
- delete item.data;
+ item.data = undefined;
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const plugin = context.plugins[data.pluginIndex]; | |
if (!plugin[1].resolveCodeLens) { | |
delete item.data; | |
const plugin = context.plugins[data.pluginIndex]; | |
if (!plugin[1].resolveCodeLens) { | |
item.data = undefined; |
Tools
Biome
[error] 19-19: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
const plugin = context.plugins[data.pluginIndex]; | ||
|
||
if (!service[1].resolveCompletionItem) | ||
if (!plugin[1].resolveCompletionItem) { | ||
delete item.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the delete operator for performance reasons.
Using delete
on properties can lead to performance issues due to deoptimization in JavaScript engines.
Consider setting the property to undefined
instead:
- delete item.data;
+ item.data = undefined;
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const plugin = context.plugins[data.pluginIndex]; | |
if (!service[1].resolveCompletionItem) | |
if (!plugin[1].resolveCompletionItem) { | |
delete item.data; | |
const plugin = context.plugins[data.pluginIndex]; | |
if (!plugin[1].resolveCompletionItem) { | |
item.data = undefined; |
Tools
Biome
[error] 19-19: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
@@ -46,6 +58,7 @@ export function register(context: ServiceContext) { | |||
item.detail = item.detail; | |||
} | |||
|
|||
delete item.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing the delete operator for performance reasons.
Using delete
on properties can lead to performance issues due to deoptimization in JavaScript engines.
Consider setting the property to undefined
instead:
- delete item.data;
+ item.data = undefined;
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
delete item.data; | |
item.data = undefined; |
Tools
Biome
[error] 61-61: Avoid the delete operator which can impact performance.
Unsafe fix: Use an undefined assignment instead.
(lint/performance/noDelete)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- packages/language-server/browser.ts (1 hunks)
- packages/language-server/lib/features/languageFeatures.ts (1 hunks)
- packages/language-server/lib/server.ts (1 hunks)
- packages/language-server/lib/types.ts (1 hunks)
- packages/language-server/node.ts (1 hunks)
Additional context used
Biome
packages/language-server/node.ts
[error] 33-33: eval() exposes to security risks and performance issues.
See the MDN web docs for more details.
Refactor the code so that it doesn't need to call eval().(lint/security/noGlobalEval)
packages/language-server/lib/features/languageFeatures.ts
[error] 519-519: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
Additional comments not posted (27)
packages/language-server/lib/types.ts (6)
1-4
: LGTM!The import statements are correct and necessary for the functionality of the file.
The code changes are approved.
6-10
: LGTM!The
LanguageServerEnvironment
interface is correctly defined and provides the necessary structure for the environment.The code changes are approved.
12-16
: LGTM!The
LanguageServerProject
interface is correctly defined and provides the necessary methods for managing a language server project.The code changes are approved.
19-26
: LGTM!The
LanguageServerState
interface is correctly defined and provides the necessary structure for managing the state of a language server.The code changes are approved.
29-29
: LGTM!The
LanguageServer
type is correctly defined and provides a clear indication of the return type of thecreateServerBase
function.The code changes are approved.
31-38
: LGTM!The
ExperimentalFeatures
interface is correctly defined and provides the necessary structure for managing experimental features.The code changes are approved.
packages/language-server/node.ts (2)
1-4
: LGTM!The import statements are correct and necessary for the functionality of the file.
The code changes are approved.
12-15
: LGTM!The
createConnection
function is correctly implemented and provides the necessary functionality for creating a connection.The code changes are approved.
packages/language-server/browser.ts (2)
1-5
: LGTM!The import statements are correct and necessary for the functionality of the file.
The code changes are approved.
13-18
: LGTM!The
createConnection
function is correctly implemented and provides the necessary functionality for creating a connection.The code changes are approved.
packages/language-server/lib/server.ts (9)
1-10
: LGTM!The import statements are necessary for the new functionality and types introduced in the file.
The code changes are approved.
12-74
: LGTM!The renaming and new parameter improve the modularity and flexibility of the server initialization. The function is well-structured and encapsulates various server state properties.
The code changes are approved.
46-57
: LGTM!The restructuring improves the readability and maintainability of the code. The use of a
state
object encapsulates various server state properties, leading to cleaner and more manageable code.The code changes are approved.
58-60
: LGTM!The change ensures that the project setup is performed after the server is initialized, improving the initialization process.
The code changes are approved.
62-63
: LGTM!The change ensures that the project is reloaded when the server is shut down, improving the shutdown process.
The code changes are approved.
Line range hint
766-782
: LGTM!The function is well-structured and ensures that tasks are performed asynchronously, improving the performance and responsiveness of the server.
The code changes are approved.
Line range hint
784-792
: LGTM!The function ensures that completion items are handled correctly based on the client's capabilities, improving the completion experience.
The code changes are approved.
Line range hint
794-805
: LGTM!The function ensures that definition items are handled correctly based on the client's capabilities, improving the definition experience.
The code changes are approved.
Line range hint
808-810
: LGTM!The function is simple and effective for introducing a delay in asynchronous tasks.
The code changes are approved.
packages/language-server/lib/features/languageFeatures.ts (8)
1-6
: LGTM!The import statements are necessary for the new functionality and types introduced in the file.
The code changes are approved.
724-734
: LGTM!The function is well-structured and ensures that refresh requests are handled correctly.
The code changes are approved.
736-752
: LGTM!The function is well-structured and ensures that diagnostics are updated in batches, improving performance.
The code changes are approved.
754-764
: LGTM!The function is well-structured and ensures that diagnostics are updated correctly.
The code changes are approved.
766-782
: LGTM!The function is well-structured and ensures that tasks are performed asynchronously, improving the performance and responsiveness of the server.
The code changes are approved.
784-792
: LGTM!The function ensures that completion items are handled correctly based on the client's capabilities, improving the completion experience.
The code changes are approved.
794-805
: LGTM!The function ensures that definition items are handled correctly based on the client's capabilities, improving the definition experience.
The code changes are approved.
808-810
: LGTM!The function is simple and effective for introducing a delay in asynchronous tasks.
The code changes are approved.
export function createServer(connection: vscode.Connection) { | ||
const server = createServerBase(connection, { | ||
timer: { | ||
setImmediate(callback: (...args: any[]) => void, ...args: any[]): vscode.Disposable { | ||
const handle = setImmediate(callback, ...args); | ||
return { dispose: () => clearImmediate(handle) }; | ||
}, | ||
setImmediate: setImmediate, | ||
}, | ||
loadTypeScript(options) { | ||
const tsdk = options.typescript && 'tsdk' in options.typescript | ||
? options.typescript.tsdk | ||
: undefined; | ||
if (!tsdk) { | ||
return; | ||
} | ||
for (const name of ['./typescript.js', './tsserverlibrary.js']) { | ||
try { | ||
return require(require.resolve(name, { paths: [tsdk] })); | ||
} catch { } | ||
} | ||
}); | ||
server.fileSystem.install('file', nodeFsProvider); | ||
server.fileSystem.install('http', httpFsProvider); | ||
server.fileSystem.install('https', httpFsProvider); | ||
server.onInitialized(() => listenEditorSettings(server)); | ||
return server; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhance error handling in createServer
.
Consider adding error handling for the server initialization process to manage potential failures gracefully.
export function createServer(connection: vscode.Connection) {
try {
const server = createServerBase(connection, {
timer: {
setImmediate: setImmediate,
},
});
server.fileSystem.install('file', nodeFsProvider);
server.fileSystem.install('http', httpFsProvider);
server.fileSystem.install('https', httpFsProvider);
server.onInitialized(() => listenEditorSettings(server));
return server;
} catch (error) {
console.error('Error initializing server:', error);
throw error;
}
}
export function loadTsdkByPath(tsdk: string, locale: string | undefined) { | ||
locale = locale?.toLowerCase(); | ||
|
||
throw new Error(`Can't find typescript.js or tsserverlibrary.js in ${tsdk}`); | ||
}, | ||
async loadTypeScriptLocalized(options, locale) { | ||
const tsdk = options.typescript && 'tsdk' in options.typescript | ||
? options.typescript.tsdk | ||
: undefined; | ||
if (!tsdk) { | ||
return; | ||
} | ||
// webpack compatibility | ||
const _require: NodeRequire = eval('require'); | ||
|
||
return { | ||
typescript: loadLib(), | ||
diagnosticMessages: loadLocalizedDiagnosticMessages(), | ||
}; | ||
|
||
function loadLib(): typeof import('typescript') { | ||
for (const name of ['./typescript.js', './tsserverlibrary.js']) { | ||
try { | ||
const path = require.resolve(`./${locale}/diagnosticMessages.generated.json`, { paths: [tsdk] }); | ||
return require(path); | ||
return _require(_require.resolve(name, { paths: [tsdk] })); | ||
} catch { } | ||
}, | ||
fs: createFs(params.initializationOptions ?? {}), | ||
})); | ||
} | ||
// for bun | ||
for (const name of ['typescript.js', 'tsserverlibrary.js']) { | ||
try { | ||
return _require(tsdk + '/' + name); | ||
} catch { } | ||
} | ||
throw new Error(`Can't find typescript.js or tsserverlibrary.js in ${JSON.stringify(tsdk)}`); | ||
} | ||
|
||
function loadLocalizedDiagnosticMessages(): import('typescript').MapLike<string> | undefined { | ||
if (locale === 'en') { | ||
return; | ||
} | ||
try { | ||
const path = _require.resolve(`./${locale}/diagnosticMessages.generated.json`, { paths: [tsdk] }); | ||
return _require(path); | ||
} catch { } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using eval
.
The use of eval
for defining _require
poses security risks and performance issues. Consider refactoring to avoid eval
.
- const _require: NodeRequire = eval('require');
+ const _require: NodeRequire = require;
Committable suggestion was skipped due to low confidence.
Tools
Biome
[error] 33-33: eval() exposes to security risks and performance issues.
See the MDN web docs for more details.
Refactor the code so that it doesn't need to call eval().(lint/security/noGlobalEval)
export function createServer(connection: vscode.Connection) { | ||
const server = createServerBase(connection, { | ||
timer: { | ||
setImmediate(callback: (...args: any[]) => void, ...args: any[]): vscode.Disposable { | ||
const handle = setTimeout(callback, 0, ...args); | ||
return { dispose: () => clearTimeout(handle) }; | ||
}, | ||
}, | ||
async loadTypeScript(options) { | ||
const tsdkUrl = options.typescript && 'tsdkUrl' in options.typescript | ||
? options.typescript.tsdkUrl | ||
: undefined; | ||
if (!tsdkUrl) { | ||
return; | ||
} | ||
const _module = globalThis.module; | ||
globalThis.module = { exports: {} } as typeof _module; | ||
await import(`${tsdkUrl}/typescript.js`); | ||
const ts = globalThis.module.exports; | ||
globalThis.module = _module; | ||
return ts as typeof import('typescript'); | ||
}, | ||
async loadTypeScriptLocalized(options, locale) { | ||
const tsdkUrl = options.typescript && 'tsdkUrl' in options.typescript | ||
? options.typescript.tsdkUrl | ||
: undefined; | ||
if (!tsdkUrl) { | ||
return; | ||
} | ||
try { | ||
const json = await httpSchemaRequestHandler(`${tsdkUrl}/${locale}/diagnosticMessages.generated.json`); | ||
if (json) { | ||
return JSON.parse(json); | ||
} | ||
} | ||
catch { } | ||
}, | ||
fs: { | ||
async stat(uri) { | ||
if (uri.startsWith('__invalid__:')) { | ||
return; | ||
} | ||
if (uri.startsWith('http://') || uri.startsWith('https://')) { // perf | ||
const text = await this.readFile(uri); | ||
if (text !== undefined) { | ||
return { | ||
type: FileType.File, | ||
size: text.length, | ||
ctime: -1, | ||
mtime: -1, | ||
}; | ||
} | ||
return undefined; | ||
} | ||
return await connection.sendRequest(FsStatRequest.type, uri); | ||
}, | ||
async readFile(uri) { | ||
if (uri.startsWith('__invalid__:')) { | ||
return; | ||
} | ||
if (uri.startsWith('http://') || uri.startsWith('https://')) { // perf | ||
return await httpSchemaRequestHandler(uri); | ||
} | ||
return await connection.sendRequest(FsReadFileRequest.type, uri) ?? undefined; | ||
}, | ||
async readDirectory(uri) { | ||
if (uri.startsWith('__invalid__:')) { | ||
return []; | ||
} | ||
if (uri.startsWith('http://') || uri.startsWith('https://')) { // perf | ||
return []; | ||
} | ||
return await connection.sendRequest(FsReadDirectoryRequest.type, uri); | ||
setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => { | ||
setTimeout(callback, 0, ...args); | ||
}, | ||
}, | ||
})); | ||
}); | ||
server.fileSystem.install('http', httpFsProvider); | ||
server.fileSystem.install('https', httpFsProvider); | ||
server.onInitialized(() => listenEditorSettings(server)); | ||
return server; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhance error handling in createServer
.
Consider adding error handling for the server initialization process to manage potential failures gracefully.
export function createServer(connection: vscode.Connection) {
try {
const server = createServerBase(connection, {
timer: {
setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => {
setTimeout(callback, 0, ...args);
},
},
});
server.fileSystem.install('http', httpFsProvider);
server.fileSystem.install('https', httpFsProvider);
server.onInitialized(() => listenEditorSettings(server));
return server;
} catch (error) {
console.error('Error initializing server:', error);
throw error;
}
}
export async function loadTsdkByUrl(tsdkUrl: string, locale: string | undefined) { | ||
locale = locale?.toLowerCase(); | ||
|
||
return { | ||
typescript: await loadLib(), | ||
diagnosticMessages: await loadLocalizedDiagnosticMessages(), | ||
}; | ||
|
||
async function loadLib(): Promise<typeof import('typescript')> { | ||
const originalModule = globalThis.module; | ||
try { | ||
globalThis.module = { exports: {} } as typeof originalModule; | ||
await import(`${tsdkUrl}/typescript.js`); | ||
return globalThis.module.exports as typeof import('typescript'); | ||
} finally { | ||
globalThis.module = originalModule; | ||
} | ||
} | ||
return `/${parsed.scheme}${parsed.authority ? '@' + parsed.authority : ''}${parsed.path}`; | ||
} | ||
|
||
function fileNameToUri(fileName: string) { | ||
const parts = fileName.split('/'); | ||
if (parts.length <= 1) { | ||
return URI.from({ | ||
scheme: '__invalid__', | ||
path: fileName, | ||
}).toString(); | ||
async function loadLocalizedDiagnosticMessages(): Promise<import('typescript').MapLike<string> | undefined> { | ||
if (locale === 'en') { | ||
return; | ||
} | ||
try { | ||
const json = await httpSchemaRequestHandler(URI.parse(`${tsdkUrl}/${locale}/diagnosticMessages.generated.json`)); | ||
if (json) { | ||
return JSON.parse(json); | ||
} | ||
} | ||
catch { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve error handling in loadTsdkByUrl
.
The loadTsdkByUrl
function should handle errors more robustly, especially when dealing with dynamic imports and HTTP requests.
async function loadLib(): Promise<typeof import('typescript')> {
const originalModule = globalThis.module;
try {
globalThis.module = { exports: {} } as typeof originalModule;
await import(`${tsdkUrl}/typescript.js`);
return globalThis.module.exports as typeof import('typescript');
} catch (error) {
console.error('Error loading TypeScript library:', error);
throw error;
} finally {
globalThis.module = originalModule;
}
}
async function loadLocalizedDiagnosticMessages(): Promise<import('typescript').MapLike<string> | undefined> {
if (locale === 'en') {
return;
}
try {
const json = await httpSchemaRequestHandler(URI.parse(`${tsdkUrl}/${locale}/diagnosticMessages.generated.json`));
if (json) {
return JSON.parse(json);
}
} catch (error) {
console.error('Error loading localized diagnostic messages:', error);
return undefined;
}
}
|
||
const uri = URI.parse(textDocument.uri); | ||
const languageService = (await project.getLanguageService(uri)); | ||
return languageService.getDocumentDropEdits(uri, position, dataTransferMap, token); | ||
}); | ||
} | ||
|
||
// Diagnostic support | ||
const supportsDiagnosticPull = !!initializeParams.capabilities.workspace?.diagnostics; | ||
const diagnosticProvider = languageServicePlugins.some(({ capabilities }) => !!capabilities.diagnosticProvider); | ||
const interFileDependencies = languageServicePlugins.some(({ capabilities }) => capabilities.diagnosticProvider?.interFileDependencies); | ||
const workspaceDiagnostics = languageServicePlugins.some(({ capabilities }) => capabilities.diagnosticProvider?.workspaceDiagnostics); | ||
|
||
if (diagnosticProvider) { | ||
if (supportsDiagnosticPull && !interFileDependencies) { | ||
serverCapabilities.diagnosticProvider = { | ||
// Unreliable, see https://github.com/microsoft/vscode-languageserver-node/issues/848#issuecomment-2189521060 | ||
interFileDependencies: false, | ||
workspaceDiagnostics, | ||
}; | ||
|
||
if (initializeParams.capabilities.workspace?.diagnostics?.refreshSupport) { | ||
refreshHandlers.push(() => { | ||
server.connection.languages.diagnostics.refresh(); | ||
}); | ||
} | ||
else { | ||
console.warn('Diagnostics refresh is not supported by the client.'); | ||
} | ||
} | ||
else { | ||
documents.onDidChangeContent(({ document }) => { | ||
const changedDocument = documents.get(URI.parse(document.uri)); | ||
if (!changedDocument) { | ||
return; | ||
} | ||
if (interFileDependencies) { | ||
const remainingDocuments = [...documents.all()].filter(doc => doc !== changedDocument); | ||
updateDiagnosticsBatch(project, [changedDocument, ...remainingDocuments]); | ||
} | ||
else { | ||
updateDiagnosticsBatch(project, [changedDocument]); | ||
} | ||
}); | ||
documents.onDidClose(({ document }) => { | ||
server.connection.sendDiagnostics({ uri: document.uri, diagnostics: [] }); | ||
}); | ||
configurations.onDidChange(() => requestRefresh(false)); | ||
|
||
refreshHandlers.push(async clearDiagnostics => { | ||
if (clearDiagnostics) { | ||
for (const document of documents.all()) { | ||
server.connection.sendDiagnostics({ uri: document.uri, diagnostics: [] }); | ||
} | ||
} | ||
await updateDiagnosticsBatch(project, [...documents.all()]); | ||
}); | ||
} | ||
server.connection.languages.diagnostics.on(async (params, token, _workDoneProgressReporter, resultProgressReporter) => { | ||
const uri = URI.parse(params.textDocument.uri); | ||
const result = await worker(uri, token, languageService => { | ||
return languageService.getDiagnostics( | ||
uri, | ||
errors => { | ||
// resultProgressReporter is undefined in vscode | ||
resultProgressReporter?.report({ | ||
relatedDocuments: { | ||
[params.textDocument.uri]: { | ||
kind: vscode.DocumentDiagnosticReportKind.Full, | ||
items: errors, | ||
}, | ||
}, | ||
}); | ||
}, | ||
token | ||
); | ||
}); | ||
return { | ||
kind: vscode.DocumentDiagnosticReportKind.Full, | ||
items: result ?? [], | ||
}; | ||
}); | ||
} | ||
|
||
if (workspaceDiagnostics) { | ||
server.connection.languages.diagnostics.onWorkspace(async (_params, token) => { | ||
const items: vscode.WorkspaceDocumentDiagnosticReport[] = []; | ||
for (const languageService of await project.getExistingLanguageServices()) { | ||
if (token.isCancellationRequested) { | ||
break; | ||
} | ||
const result = await languageService.getWorkspaceDiagnostics(token); | ||
items.push(...result); | ||
} | ||
return { items }; | ||
}); | ||
} | ||
}); | ||
|
||
return { requestRefresh }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider refactoring the register
function for better readability and maintainability.
The register
function is quite large and handles many responsibilities. Consider breaking it into smaller, more focused functions to improve readability and maintainability. Each capability setup could potentially be a separate function.
Example refactor for selectionRangeProvider
setup:
function setupSelectionRangeProvider(server: LanguageServerState, serverCapabilities: any, languageServicePlugins: any) {
if (languageServicePlugins.some(({ capabilities }) => capabilities.selectionRangeProvider)) {
serverCapabilities.selectionRangeProvider = true;
server.connection.onSelectionRanges(async (params, token) => {
const uri = URI.parse(params.textDocument.uri);
return await worker(uri, token, languageService => {
return languageService.getSelectionRanges(uri, params.positions, token);
});
});
}
}
// Similar functions can be created for other capabilities
Tools
Biome
[error] 519-519: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (12)
- CHANGELOG.md (1 hunks)
- extensions/labs/package.json (2 hunks)
- lerna.json (1 hunks)
- packages/eslint/package.json (2 hunks)
- packages/jsdelivr/package.json (1 hunks)
- packages/kit/package.json (2 hunks)
- packages/language-core/package.json (2 hunks)
- packages/language-server/package.json (2 hunks)
- packages/language-service/package.json (2 hunks)
- packages/monaco/package.json (2 hunks)
- packages/source-map/package.json (2 hunks)
- packages/test-utils/package.json (2 hunks)
Files skipped from review due to trivial changes (1)
- packages/jsdelivr/package.json
Files skipped from review as they are similar to previous changes (8)
- lerna.json
- packages/eslint/package.json
- packages/kit/package.json
- packages/language-core/package.json
- packages/language-server/package.json
- packages/language-service/package.json
- packages/monaco/package.json
- packages/test-utils/package.json
Additional context used
LanguageTool
CHANGELOG.md
[uncategorized] ~11-~11: The official spelling of this programming framework is “Vue.js”.
Context: ... unopened files are synced to project ([vuejs/language-tools#4711](https://github.com...(NODE_JS)
[uncategorized] ~11-~11: The official spelling of this programming framework is “Vue.js”.
Context: ...om/vuejs/language-tools/issues/4711)) ([vuejs/language-tools#4632](https://github.com...(NODE_JS)
[uncategorized] ~45-~45: The official spelling of this programming framework is “Vue.js”.
Context: ...rkspace symbols support for TS plugin ([vuejs/language-tools#4595](https://github.com...(NODE_JS)
[uncategorized] ~46-~46: The official spelling of this programming framework is “Vue.js”.
Context: ...ng code actions support for TS plugin ([vuejs/language-tools#4586](https://github.com...(NODE_JS)
[uncategorized] ~86-~86: The official spelling of this programming framework is “Vue.js”.
Context: ... ID casing verify to language service ([vuejs/language-tools#4497](https://github.com...(NODE_JS)
[misspelling] ~106-~106: This word is normally spelled with a hyphen.
Context: ...abs:** language client ID should not be case sensitive - language-server: fix URI conversi...(EN_COMPOUNDS_CASE_SENSITIVE)
[uncategorized] ~109-~109: The official spelling of this programming framework is “Vue.js”.
Context: ...r tolerant tocontentChanges
length ([vuejs/language-tools#4457](https://github.com...(NODE_JS)
[grammar] ~140-~140: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...language-service:** fixed conversion of markdown links - vscode: showed error on mis...(MARKDOWN_NNP)
[uncategorized] ~181-~181: The official spelling of this programming framework is “Vue.js”.
Context: ...list should be valid completion result [vuejs/language-tools#4368](https://github.com...(NODE_JS)
[grammar] ~183-~183: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...:** transforming volar embedded URIs in markdown [volarjs#180](https://github.com/volarjs/volar...(MARKDOWN_NNP)
[uncategorized] ~202-~202: The official spelling of this programming framework is “Vue.js”.
Context: ...al completion not working in TS plugin [vuejs/language-tools#4323](https://github.com...(NODE_JS)
[uncategorized] ~214-~214: The official spelling of this programming framework is “Vue.js”.
Context: ... cannot display source code for errors [vuejs/language-tools#4099](https://github.com...(NODE_JS)
[uncategorized] ~217-~217: The official spelling of this programming framework is “Vue.js”.
Context: ...rameter hints not working in TS plugin [vuejs/language-tools#3948](https://github.com...(NODE_JS)
[uncategorized] ~218-~218: The official spelling of this programming framework is “Vue.js”.
Context: ... tolerance with TS file size assertion [vuejs/language-tools#4278](https://github.com...(NODE_JS)
[uncategorized] ~221-~221: The official spelling of this programming framework is “Vue.js”.
Context: ...inclusive performance rename operation [vuejs/language-tools#4297](https://github.com...(NODE_JS)
[uncategorized] ~222-~222: The official spelling of this programming framework is “Vue.js”.
Context: ...ize filePath for language service APIs [vuejs/language-tools#4297](https://github.com...(NODE_JS)
[uncategorized] ~224-~224: The official spelling of this programming framework is “Vue.js”.
Context: ...e failed to match tsconfig immediately [vuejs/language-tools#4297](https://github.com...(NODE_JS)
[uncategorized] ~231-~231: The official spelling of this programming framework is “Vue.js”.
Context: ...nTsc` performance regression since 2.0 [vuejs/language-tools#4238](https://github.com...(NODE_JS)
[uncategorized] ~232-~232: The official spelling of this programming framework is “Vue.js”.
Context: ...runTsc` cache module resolution result [vuejs/language-tools#4177](https://github.com...(NODE_JS)
[uncategorized] ~250-~250: The official spelling of this programming framework is “Vue.js”.
Context: ... mapping for formatting APIs in plugin [vuejs/language-tools#4066](https://github.com...(NODE_JS)
[uncategorized] ~251-~251: The official spelling of this programming framework is “Vue.js”.
Context: ... mapping for file rename API in plugin [vuejs/language-tools#3646](https://github.com...(NODE_JS)
[grammar] ~252-~252: The auxiliary verb ‘do’ requires the base form of the verb.
Context: ...** semantic tokens range param does not mapped correctly [vuejs/language-tools#3934](h...(DID_BASEFORM)
[uncategorized] ~252-~252: The official spelling of this programming framework is “Vue.js”.
Context: ... range param does not mapped correctly [vuejs/language-tools#3934](https://github.com...(NODE_JS)
[uncategorized] ~252-~252: The official spelling of this programming framework is “Vue.js”.
Context: ....com/vuejs/language-tools/issues/3934) [vuejs/language-tools#3935](https://github.com...(NODE_JS)
[misspelling] ~269-~269: This word is normally spelled with a hyphen.
Context: ...* sys cache is not updated correctly in case sensitive file system [volarjs#153](https://github.com/v...(EN_COMPOUNDS_CASE_SENSITIVE)
[uncategorized] ~288-~288: The official spelling of this programming framework is “Vue.js”.
Context: ... caused severe performance regressions [vuejs/language-tools#4024](https://github.com...(NODE_JS)
[grammar] ~350-~350: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...ixes - language-service: transform markdown links in completion items [volarjs#133](https:...(MARKDOWN_NNP)
[grammar] ~364-~364: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...pened - language-service: transform markdown links for hover content (https://github...(MARKDOWN_NNP)
Markdownlint
CHANGELOG.md
310-310: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
311-311: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
312-312: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
313-313: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
314-314: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
315-315: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
324-324: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
325-325: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
326-326: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
327-327: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
328-328: Expected: 2; Actual: 1
Unordered list indentation(MD007, ul-indent)
310-310: Column: 1
Hard tabs(MD010, no-hard-tabs)
311-311: Column: 1
Hard tabs(MD010, no-hard-tabs)
312-312: Column: 1
Hard tabs(MD010, no-hard-tabs)
313-313: Column: 1
Hard tabs(MD010, no-hard-tabs)
314-314: Column: 1
Hard tabs(MD010, no-hard-tabs)
315-315: Column: 1
Hard tabs(MD010, no-hard-tabs)
324-324: Column: 1
Hard tabs(MD010, no-hard-tabs)
325-325: Column: 1
Hard tabs(MD010, no-hard-tabs)
326-326: Column: 1
Hard tabs(MD010, no-hard-tabs)
327-327: Column: 1
Hard tabs(MD010, no-hard-tabs)
328-328: Column: 1
Hard tabs(MD010, no-hard-tabs)
270-270: null
Bare URL used(MD034, no-bare-urls)
346-346: null
Bare URL used(MD034, no-bare-urls)
352-352: null
Bare URL used(MD034, no-bare-urls)
364-364: null
Bare URL used(MD034, no-bare-urls)
365-365: null
Bare URL used(MD034, no-bare-urls)
Additional comments not posted (8)
packages/source-map/package.json (2)
3-3
: Version update approved.The version update from
2.0.0-alpha.13
to2.4.1
is noted.The code changes are approved.
3-3
: Verify the impact of removing dependencies.The removal of the dependencies section suggests a significant change in dependency management. Ensure that the package no longer relies on the
muggle-string
library or that dependencies are now managed differently.Run the following script to verify the impact of the removal of the dependencies section:
Verification successful
Removal of
muggle-string
dependency confirmed as intentional.The
muggle-string
dependency has been intentionally removed, as noted in theCHANGELOG.md
, and there are no references to it in the codebase. This confirms that the removal does not impact the current functionality.
CHANGELOG.md
: Decoupling frommuggle-string
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of removing the dependencies section. # Test: Search for the usage of `muggle-string`. Expect: No occurrences. rg --type python -A 5 $'muggle-string'Length of output: 68
Script:
#!/bin/bash # Description: Verify the impact of removing the dependencies section. # Test: Search for the usage of `muggle-string` in JavaScript and TypeScript files. rg --type js -A 5 'muggle-string' rg --type ts -A 5 'muggle-string'Length of output: 67
Script:
#!/bin/bash # Description: Comprehensive search for `muggle-string` in all files. # Test: Search for the usage of `muggle-string` in all files to ensure no lingering references. rg 'muggle-string'Length of output: 81
extensions/labs/package.json (2)
4-4
: Version update approved.The version update from
2.0.0-alpha.13
to2.4.1
is noted.The code changes are approved.
70-76
: Dependency updates approved.The updates to
@volar/language-server
,@volar/source-map
, and@volar/vscode
from2.0.0-alpha.13
to2.4.1
are noted. The addition of@vscode/vsce
with the version set tolatest
is also noted.The code changes are approved.
CHANGELOG.md (4)
5-7
: Features section approved.The documented features in versions
2.4.1
and2.4.0
provide valuable information about the new capabilities of the project.The code changes are approved.
Also applies to: 26-36
9-17
: Bug fixes section approved.The documented bug fixes in versions
2.4.1
and2.4.0
provide valuable information about the resolved issues in the project.The code changes are approved.
Also applies to: 38-48
Tools
LanguageTool
[uncategorized] ~11-~11: The official spelling of this programming framework is “Vue.js”.
Context: ... unopened files are synced to project ([vuejs/language-tools#4711](https://github.com...(NODE_JS)
[uncategorized] ~11-~11: The official spelling of this programming framework is “Vue.js”.
Context: ...om/vuejs/language-tools/issues/4711)) ([vuejs/language-tools#4632](https://github.com...(NODE_JS)
19-23
: Refactors section approved.The documented refactors in versions
2.4.1
and2.4.0
provide valuable information about the improvements in the project's codebase.The code changes are approved.
Also applies to: 58-74
11-11
: Correct typographical issues.Apply these corrections to maintain consistency and accuracy in the documentation:
- Replace "vuejs" with "Vue.js".
- Add a hyphen to "case sensitive" to make it "case-sensitive".
- Capitalize "markdown" to "Markdown".
- vuejs + Vue.js - case sensitive + case-sensitive - markdown + MarkdownAlso applies to: 45-45, 46-46, 86-86, 109-109, 181-181, 202-202, 214-214, 217-217, 218-218, 221-221, 222-222, 224-224, 231-231, 232-232, 250-250, 251-251, 252-252, 269-269, 288-288, 350-350, 364-364
Tools
LanguageTool
[uncategorized] ~11-~11: The official spelling of this programming framework is “Vue.js”.
Context: ... unopened files are synced to project ([vuejs/language-tools#4711](https://github.com...(NODE_JS)
[uncategorized] ~11-~11: The official spelling of this programming framework is “Vue.js”.
Context: ...om/vuejs/language-tools/issues/4711)) ([vuejs/language-tools#4632](https://github.com...(NODE_JS)
…ode mapped verbatim to generated code. (#236)
4131dbe
to
44197ff
Compare
765adc5
to
ea92d55
Compare
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )