@ripple-ts/language-server 0.3.11 → 0.3.13
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 +44 -0
- package/README.md +2 -2
- package/package.json +3 -3
- package/src/autoInsertPlugin.js +3 -3
- package/src/completionPlugin.js +8 -2
- package/src/utils.js +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @ripple-ts/language-server
|
|
2
2
|
|
|
3
|
+
## 0.3.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#862](https://github.com/Ripple-TS/ripple/pull/862)
|
|
8
|
+
[`48af856`](https://github.com/Ripple-TS/ripple/commit/48af85678d5e1b32bb1c5e3fbb2fb07498bc88a3)
|
|
9
|
+
Thanks [@leonidaz](https://github.com/leonidaz)! - Add a release changeset for
|
|
10
|
+
the async tracking work introduced in commit
|
|
11
|
+
`4eb4d6851573d771d65f1e85b1b442ad3cdc53d2`.
|
|
12
|
+
|
|
13
|
+
This ships async tracking as a first-class feature in Ripple:
|
|
14
|
+
- remove and prohibit direct component-level `await`; async component flows now
|
|
15
|
+
require using `trackAsync()` (with `trackPending()` for pending state checks)
|
|
16
|
+
- add `trackAsync()` and `trackPending()` support so async values can be read
|
|
17
|
+
through Ripple's reactive runtime using tracked async values
|
|
18
|
+
- update compiler/runtime behavior for `try`/`catch`/`pending` boundaries so
|
|
19
|
+
async pending and error states can render and recover correctly in client and
|
|
20
|
+
SSR paths
|
|
21
|
+
- align `@ripple-ts/compat-react` async boundary behavior with the new Ripple
|
|
22
|
+
async tracking semantics
|
|
23
|
+
- update editor/tooling integration to match the new async syntax/runtime shape
|
|
24
|
+
|
|
25
|
+
- [`6e11177`](https://github.com/Ripple-TS/ripple/commit/6e111778cae4e7d9876e51e293520f0859eb5890)
|
|
26
|
+
Thanks [@trueadm](https://github.com/trueadm)! - Add `.rsrx` support across
|
|
27
|
+
Ripple tooling and rename the repository's tracked `.ripple` modules to `.rsrx`.
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
[[`6e11177`](https://github.com/Ripple-TS/ripple/commit/6e111778cae4e7d9876e51e293520f0859eb5890)]:
|
|
30
|
+
- @ripple-ts/typescript-plugin@0.3.13
|
|
31
|
+
|
|
32
|
+
## 0.3.12
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- [#859](https://github.com/Ripple-TS/ripple/pull/859)
|
|
37
|
+
[`cdd31ba`](https://github.com/Ripple-TS/ripple/commit/cdd31ba4c07ce504b01d56533e19a6ba37879f5a)
|
|
38
|
+
Thanks [@trueadm](https://github.com/trueadm)! - Add first-phase `.tsrx` support
|
|
39
|
+
across the core Ripple tooling so Vite, Rollup, TypeScript, the language server,
|
|
40
|
+
Prettier, ESLint, and editor integrations accept both `.ripple` and `.tsrx`
|
|
41
|
+
files.
|
|
42
|
+
|
|
43
|
+
- Updated dependencies
|
|
44
|
+
[[`cdd31ba`](https://github.com/Ripple-TS/ripple/commit/cdd31ba4c07ce504b01d56533e19a6ba37879f5a)]:
|
|
45
|
+
- @ripple-ts/typescript-plugin@0.3.12
|
|
46
|
+
|
|
3
47
|
## 0.3.11
|
|
4
48
|
|
|
5
49
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ It uses this language server internally.
|
|
|
43
43
|
3. Add a new language server in it
|
|
44
44
|
4. Specify `ripple-language-server --stdio` as the command in it.
|
|
45
45
|
5. Go to `Mappings` —> `File name patterns` and add a new value with
|
|
46
|
-
`File name patterns` set to `*.
|
|
46
|
+
`File name patterns` set to `*.tsrx` and `Language Id` set to `ripple`.
|
|
47
47
|
|
|
48
48
|
#### Neovim (v0.11+)
|
|
49
49
|
|
|
@@ -90,7 +90,7 @@ release:
|
|
|
90
90
|
5. Copy the `Ripple.sublime-package` file into `Installed Packages/` and restart
|
|
91
91
|
Sublime Text.
|
|
92
92
|
|
|
93
|
-
Diagnostics, completions, and other features should work in `.
|
|
93
|
+
Diagnostics, completions, and other features should work in `.tsrx` files now.
|
|
94
94
|
|
|
95
95
|
## Standalone Usage
|
|
96
96
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ripple-ts/language-server",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
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.
|
|
22
|
+
"@ripple-ts/typescript-plugin": "0.3.13"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"ripple": "0.3.
|
|
25
|
+
"ripple": "0.3.13"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"typescript": "^5.9.3"
|
package/src/autoInsertPlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @import { LanguageServicePlugin } from '@volar/language-server' */
|
|
2
2
|
|
|
3
|
-
const { getVirtualCode, createLogging } = require('./utils.js');
|
|
3
|
+
const { getVirtualCode, createLogging, is_ripple_document } = require('./utils.js');
|
|
4
4
|
|
|
5
5
|
const { log } = createLogging('[Ripple Auto-Insert Plugin]');
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ function createAutoInsertPlugin() {
|
|
|
38
38
|
capabilities: {
|
|
39
39
|
autoInsertionProvider: {
|
|
40
40
|
triggerCharacters: ['>'],
|
|
41
|
-
configurationSections: ['ripple.autoClosingTags'],
|
|
41
|
+
configurationSections: ['ripple.autoClosingTags.enabled'],
|
|
42
42
|
},
|
|
43
43
|
documentOnTypeFormattingProvider: {
|
|
44
44
|
triggerCharacters: ['>'],
|
|
@@ -55,7 +55,7 @@ function createAutoInsertPlugin() {
|
|
|
55
55
|
* @returns {Promise<string | null>}
|
|
56
56
|
*/
|
|
57
57
|
async provideAutoInsertSnippet(document, position, lastChange, _token) {
|
|
58
|
-
if (!document.uri
|
|
58
|
+
if (!is_ripple_document(document.uri)) {
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
61
|
|
package/src/completionPlugin.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/** @import { LanguageServicePlugin, TextEdit, CompletionItem } from '@volar/language-server'; */
|
|
2
2
|
|
|
3
3
|
const { CompletionItemKind, InsertTextFormat } = require('@volar/language-server');
|
|
4
|
-
const {
|
|
4
|
+
const {
|
|
5
|
+
getVirtualCode,
|
|
6
|
+
createLogging,
|
|
7
|
+
isInsideImport,
|
|
8
|
+
isInsideExport,
|
|
9
|
+
is_ripple_document,
|
|
10
|
+
} = require('./utils.js');
|
|
5
11
|
|
|
6
12
|
const { log } = createLogging('[Ripple Completion Plugin]');
|
|
7
13
|
|
|
@@ -374,7 +380,7 @@ function createCompletionPlugin() {
|
|
|
374
380
|
// This ensures TypeScript/JavaScript completions are still shown alongside Ripple snippets
|
|
375
381
|
isAdditionalCompletion: true,
|
|
376
382
|
async provideCompletionItems(document, position, completionContext, _token) {
|
|
377
|
-
if (!document.uri
|
|
383
|
+
if (!is_ripple_document(document.uri)) {
|
|
378
384
|
return { items: [], isIncomplete: false };
|
|
379
385
|
}
|
|
380
386
|
|
package/src/utils.js
CHANGED
|
@@ -24,6 +24,8 @@ const IMPORT_EXPORT_REGEX = {
|
|
|
24
24
|
from: /from\s*['"][^'"]*['"]\s*;?/,
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
const RIPPLE_EXTENSIONS = ['.ripple', '.rsrx', '.tsrx'];
|
|
28
|
+
|
|
27
29
|
/** @type {is_identifier_obfuscated} */
|
|
28
30
|
let is_identifier_obfuscated;
|
|
29
31
|
/** @type {deobfuscate_identifier} */
|
|
@@ -150,9 +152,19 @@ function isInsideExport(text, start) {
|
|
|
150
152
|
return isInsideImportOrExport('export', text, start);
|
|
151
153
|
}
|
|
152
154
|
|
|
155
|
+
/**
|
|
156
|
+
* @param {string} document_uri
|
|
157
|
+
* @returns {boolean}
|
|
158
|
+
*/
|
|
159
|
+
function is_ripple_document(document_uri) {
|
|
160
|
+
return RIPPLE_EXTENSIONS.some((extension) => document_uri.endsWith(extension));
|
|
161
|
+
}
|
|
162
|
+
|
|
153
163
|
module.exports = {
|
|
164
|
+
RIPPLE_EXTENSIONS,
|
|
154
165
|
getVirtualCode,
|
|
155
166
|
getWordFromPosition,
|
|
167
|
+
is_ripple_document,
|
|
156
168
|
isInsideImport,
|
|
157
169
|
isInsideExport,
|
|
158
170
|
createLogging,
|