@lvce-editor/shared-process 0.100.5 → 0.100.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.100.5",
3
+ "version": "0.100.7",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "1.9.0",
21
- "@lvce-editor/extension-host-helper-process": "0.100.5",
21
+ "@lvce-editor/extension-host-helper-process": "0.100.7",
22
22
  "@lvce-editor/ipc": "16.10.0",
23
23
  "@lvce-editor/json-rpc": "8.6.0",
24
24
  "@lvce-editor/jsonc-parser": "1.5.0",
@@ -3,6 +3,6 @@ import { fileURLToPath } from 'url'
3
3
 
4
4
  export const getBuiltinExtensionsPath = () => {
5
5
  const staticServerPath = fileURLToPath(import.meta.resolve('@lvce-editor/static-server'))
6
- const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'f9f1c73', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'efa4b02', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -6,6 +6,7 @@ import {
6
6
  executeMarkdownLanguageServerRequest,
7
7
  isMarkdownLanguageServerRequest,
8
8
  } from '../MarkdownLanguageServerRequest/MarkdownLanguageServerRequest.js'
9
+ import { normalizeLanguageServerDocumentUri } from '../NormalizeLanguageServerDocumentUri/NormalizeLanguageServerDocumentUri.js'
9
10
 
10
11
 
11
12
 
@@ -57,13 +58,20 @@ import {
57
58
 
58
59
 
59
60
 
60
- const getSpawnOptions = (uri, argv) => {
61
+ export const getSpawnOptions = (
62
+ uri,
63
+ argv,
64
+ ) => {
61
65
  const executablePath = fileURLToPath(uri)
62
66
  const extension = extname(executablePath).toLowerCase()
63
67
  if (extension === '.js' || extension === '.mjs' || extension === '.cjs') {
64
68
  return {
65
69
  args: [executablePath, ...argv],
66
70
  command: process.execPath,
71
+ env: {
72
+ ...process.env,
73
+ ELECTRON_RUN_AS_NODE: '1',
74
+ },
67
75
  }
68
76
  }
69
77
  return {
@@ -127,8 +135,9 @@ export class LanguageServerConnection {
127
135
 
128
136
  constructor({ argv, rootUri, uri } ) {
129
137
  this.rootUri = rootUri
130
- const { args, command } = getSpawnOptions(uri, argv)
138
+ const { args, command, env } = getSpawnOptions(uri, argv)
131
139
  this.child = spawn(command, [...args], {
140
+ env,
132
141
  stdio: ['pipe', 'pipe', 'pipe'],
133
142
  })
134
143
  this.child.stdout.on('data', (chunk) => {
@@ -403,12 +412,13 @@ export class LanguageServerConnection {
403
412
  if (typeof uri !== 'string' || !Array.isArray(diagnostics)) {
404
413
  return
405
414
  }
406
- this.publishedDiagnostics.set(uri, diagnostics)
407
- const waiters = this.diagnosticWaiters.get(uri)
415
+ const normalizedUri = normalizeLanguageServerDocumentUri(uri)
416
+ this.publishedDiagnostics.set(normalizedUri, diagnostics)
417
+ const waiters = this.diagnosticWaiters.get(normalizedUri)
408
418
  if (!waiters) {
409
419
  return
410
420
  }
411
- this.diagnosticWaiters.delete(uri)
421
+ this.diagnosticWaiters.delete(normalizedUri)
412
422
  for (const waiter of waiters) {
413
423
  waiter.resolve(diagnostics)
414
424
  }
@@ -15,9 +15,6 @@ const normalizeRemoteFileUrl = (uri) => {
15
15
  }
16
16
 
17
17
  export const normalizeLanguageServerDocumentUri = (uri) => {
18
- if (uri.startsWith('/')) {
19
- return pathToFileURL(uri).href
20
- }
21
- const normalizedUri = normalizeRemoteFileUrl(uri) || uri
18
+ const normalizedUri = uri.startsWith('/') ? pathToFileURL(uri).href : normalizeRemoteFileUrl(uri) || uri
22
19
  return normalizedUri.replace(windowsFileUriRegex, (_, driveLetter) => `file:///${driveLetter.toLowerCase()}%3A`)
23
20
  }
@@ -61,11 +61,11 @@ export const getSetupName = () => {
61
61
  return 'Lvce-Setup'
62
62
  }
63
63
 
64
- export const version = '0.100.5'
64
+ export const version = '0.100.7'
65
65
 
66
- export const commit = 'f9f1c73'
66
+ export const commit = 'efa4b02'
67
67
 
68
- export const date = '2026-08-10T15:50:28.000Z'
68
+ export const date = '2026-08-10T17:49:38.000Z'
69
69
 
70
70
  export const getVersion = () => {
71
71
  return version
@@ -2,5 +2,5 @@ import { join } from 'node:path'
2
2
  import * as Root from '../Root/Root.js'
3
3
 
4
4
  export const getPreloadUrl = () => {
5
- return join(Root.root, 'static', 'f9f1c73', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', 'efa4b02', 'packages', 'preload', 'dist', 'index.js')
6
6
  }