@ripple-ts/language-server 0.3.13 → 0.3.15

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @ripple-ts/language-server
2
2
 
3
+ ## 0.3.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @ripple-ts/typescript-plugin@0.3.15
9
+
10
+ ## 0.3.14
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies []:
15
+ - @ripple-ts/typescript-plugin@0.3.14
16
+
3
17
  ## 0.3.13
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ripple-ts/language-server",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "description": "Language Server Protocol implementation for Ripple",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -19,10 +19,10 @@
19
19
  "volar-service-typescript": "0.0.70",
20
20
  "vscode-languageserver-textdocument": "^1.0.12",
21
21
  "vscode-uri": "^3.1.0",
22
- "@ripple-ts/typescript-plugin": "0.3.13"
22
+ "@ripple-ts/typescript-plugin": "0.3.15"
23
23
  },
24
24
  "devDependencies": {
25
- "ripple": "0.3.13"
25
+ "@tsrx/ripple": "0.0.3"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "typescript": "^5.9.3"
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @import {Diagnostic, Range, LanguageServicePlugin, LanguageServiceContext, Position, Mapper} from '@volar/language-server';
3
3
  * @import {TextDocument} from 'vscode-languageserver-textdocument';
4
- * @import {RippleVirtualCode} from '@ripple-ts/typescript-plugin/src/language.js';
4
+ * @import {TSRXVirtualCode} from '@ripple-ts/typescript-plugin/src/language.js';
5
5
  */
6
6
  // @ts-expect-error: ESM type import is fine
7
- /** @import {RippleCompileError} from 'ripple/compiler'; */
7
+ /** @import {TSRXCompileError} from '@tsrx/ripple'; */
8
8
 
9
9
  const { getVirtualCode, createLogging } = require('./utils.js');
10
10
 
@@ -62,8 +62,8 @@ function createCompileErrorDiagnosticPlugin() {
62
62
  }
63
63
 
64
64
  /**
65
- * @param {RippleCompileError} error
66
- * @param {RippleVirtualCode} virtualCode
65
+ * @param {TSRXCompileError} error
66
+ * @param {TSRXVirtualCode} virtualCode
67
67
  * @param {Mapper | undefined} sourceMap
68
68
  * @param {TextDocument} document
69
69
  * @returns {Diagnostic}
@@ -121,7 +121,7 @@ function parseCompilationErrorWithDocument(error, virtualCode, sourceMap, docume
121
121
  }
122
122
 
123
123
  /**
124
- * @param {RippleCompileError} error
124
+ * @param {TSRXCompileError} error
125
125
  * @param {TextDocument} document
126
126
  * @returns {Range}
127
127
  */
@@ -134,7 +134,7 @@ function get_error_range_from_source(error, document) {
134
134
  }
135
135
 
136
136
  /**
137
- * @param {RippleCompileError} error
137
+ * @param {TSRXCompileError} error
138
138
  * @param {number} [start_offset]
139
139
  * @returns {number}
140
140
  */
@@ -148,7 +148,7 @@ function get_end_offset_from_error(error, start_offset) {
148
148
  }
149
149
 
150
150
  /**
151
- * @param {RippleCompileError} error
151
+ * @param {TSRXCompileError} error
152
152
  * @returns {number}
153
153
  */
154
154
  function get_start_offset_from_error(error) {
@@ -1,6 +1,6 @@
1
1
  /** @import { LanguageServicePlugin, LocationLink } from '@volar/language-server'; */
2
2
  // @ts-expect-error type-only import from ESM module into CJS is fine
3
- /** @import { DefinitionLocation } from 'ripple/compiler'; */
3
+ /** @import { DefinitionLocation } from '@tsrx/ripple'; */
4
4
 
5
5
  const { TextDocument } = require('vscode-languageserver-textdocument');
6
6
  const { getVirtualCode, createLogging, getWordFromPosition } = require('./utils.js');
package/src/utils.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /** @import { TextDocument } from 'vscode-languageserver-textdocument' */
2
2
  /** @import { LanguageServiceContext, Mapper, SourceScript } from '@volar/language-server' */
3
- /** @import {RippleVirtualCode} from '@ripple-ts/typescript-plugin/src/language.js' */
3
+ /** @typedef {import('@ripple-ts/typescript-plugin/src/language.js').TSRXVirtualCode} TSRXVirtualCode */
4
4
  // @ts-expect-error: ESM type import is fine
5
- /** @import {is_identifier_obfuscated, deobfuscate_identifier, IDENTIFIER_OBFUSCATION_PREFIX} from 'ripple/compiler/internal/identifier/utils' */
5
+ /** @import { isIdentifierObfuscated, deobfuscateIdentifier, IDENTIFIER_OBFUSCATION_PREFIX } from '@tsrx/core' */
6
6
 
7
7
  const { URI } = require('vscode-uri');
8
8
  const {
@@ -26,21 +26,21 @@ const IMPORT_EXPORT_REGEX = {
26
26
 
27
27
  const RIPPLE_EXTENSIONS = ['.ripple', '.rsrx', '.tsrx'];
28
28
 
29
- /** @type {is_identifier_obfuscated} */
29
+ /** @type {typeof isIdentifierObfuscated} */
30
30
  let is_identifier_obfuscated;
31
- /** @type {deobfuscate_identifier} */
31
+ /** @type {typeof deobfuscateIdentifier} */
32
32
  let deobfuscate_identifier;
33
- /** @type {IDENTIFIER_OBFUSCATION_PREFIX} */
34
- let IDENTIFIER_OBFUSCATION_PREFIX;
33
+ /** @type {typeof IDENTIFIER_OBFUSCATION_PREFIX} */
34
+ let identifier_obfuscation_prefix;
35
35
  /** @type {RegExp} */
36
36
  let obfuscated_identifier_regex;
37
37
 
38
- import('ripple/compiler/internal/identifier/utils').then((imports) => {
39
- is_identifier_obfuscated = imports.is_identifier_obfuscated;
40
- deobfuscate_identifier = imports.deobfuscate_identifier;
41
- IDENTIFIER_OBFUSCATION_PREFIX = imports.IDENTIFIER_OBFUSCATION_PREFIX;
38
+ import('@tsrx/core').then((imports) => {
39
+ is_identifier_obfuscated = imports.isIdentifierObfuscated;
40
+ deobfuscate_identifier = imports.deobfuscateIdentifier;
41
+ identifier_obfuscation_prefix = imports.IDENTIFIER_OBFUSCATION_PREFIX;
42
42
  obfuscated_identifier_regex = new RegExp(
43
- escapeRegExp(IDENTIFIER_OBFUSCATION_PREFIX) + charAllowedWordRegex.source + '+',
43
+ escapeRegExp(identifier_obfuscation_prefix) + charAllowedWordRegex.source + '+',
44
44
  'gm',
45
45
  );
46
46
  });
@@ -76,7 +76,7 @@ function concatMarkdownContents(...contents) {
76
76
  * @param {TextDocument} document
77
77
  * @returns
78
78
  {{
79
- virtualCode: RippleVirtualCode;
79
+ virtualCode: TSRXVirtualCode;
80
80
  sourceUri: URI;
81
81
  sourceScript: SourceScript<URI> | undefined;
82
82
  sourceMap: Mapper | undefined;
@@ -89,7 +89,7 @@ function getVirtualCode(document, context) {
89
89
  );
90
90
  const [sourceUri, virtualCodeId] = decoded;
91
91
  const sourceScript = context.language.scripts.get(sourceUri);
92
- const virtualCode = /** @type {RippleVirtualCode} */ (
92
+ const virtualCode = /** @type {TSRXVirtualCode} */ (
93
93
  sourceScript?.generated?.embeddedCodes.get(virtualCodeId)
94
94
  );
95
95