chore: update Node.js version and refine launch configuration

- Updated the Node.js version in .nvmrc from 22.6.0 to 24.0.0-nightly for compatibility with the latest features.
- Modified the launch.json configuration to reflect the new Node.js runtime path, ensuring the development environment is aligned with the updated version.
- Cleaned up whitespace in document.service.ts for improved code readability.

These changes ensure the project is using the latest Node.js version and maintain a clean and efficient development setup.
This commit is contained in:
2024-12-11 01:15:02 +07:00
parent 9500471faf
commit c6482b16f2
3 changed files with 5 additions and 9 deletions

2
.nvmrc
View File

@@ -1 +1 @@
22.6.0
24.0.0-nightly202412106c03beba46

3
.vscode/launch.json vendored
View File

@@ -4,6 +4,7 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach by Process ID",
"processId": "${command:PickProcess}",
@@ -15,7 +16,7 @@
"type": "node",
"request": "launch",
"name": "Launch Program",
"runtimeExecutable": "C:\\Users\\AliensVN\\AppData\\Roaming\\fnm\\node-versions\\v22.6.0\\installation\\node.exe",
"runtimeExecutable": "C:\\Users\\AliensVN\\AppData\\Roaming\\fnm\\node-versions\\v24.0.0-nightly202412106c03beba46\\installation\\node.exe",
"skipFiles": ["<node_internals>/**"],
"cwd": "${workspaceFolder}",
"program": "${file}",

View File

@@ -132,11 +132,7 @@ export class DocumentService {
const diff = await this.diff(pageText, grammarCheckResult.result)
// Build payload
const payload: DocumentDelta = {
documentId,
pageIndex: pageId,
ops: diff.ops,
}
// Publish the result to the subscriber
this.pubSub.publish(`${DocumentEvent.AI_SUGGESTION}.${documentId}.${pageId}`, payload)
@@ -150,4 +146,3 @@ export class DocumentService {
return diff
}
}