js-i18n-language-server 0.1.0 → 0.2.0
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/.gitignore +2 -0
- package/CHANGELOG.md +65 -153
- package/README.md +11 -1
- package/npm-shrinkwrap.json +4 -4
- package/package.json +10 -5
- package/run-js-i18n-language-server.js +0 -0
package/.gitignore
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,168 +1,80 @@
|
|
|
1
|
-
# Changelog
|
|
2
1
|
|
|
3
|
-
|
|
4
|
-
## [0.1.0] - 2026-01-25
|
|
2
|
+
## [0.2.0] - 2026-02-01
|
|
5
3
|
|
|
6
4
|
### Bug Fixes
|
|
7
5
|
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- Use channel-based Progress notification to fix race condition
|
|
12
|
-
- Move flag setting inside lock to prevent race condition
|
|
13
|
-
- Queue file updates during indexing to prevent data loss
|
|
14
|
-
- Resolve clippy warnings for static docs and function length
|
|
15
|
-
- Resolve clippy pedantic lint errors
|
|
16
|
-
- Resolve clippy lint warnings across test modules
|
|
17
|
-
- Use YAML frontmatter for path filtering
|
|
18
|
-
- Support complex object options in t() calls
|
|
19
|
-
- Remove unnecessary raw string hashes for nightly clippy
|
|
20
|
-
- Resolve clippy lints for nightly 1.95.0
|
|
21
|
-
- Correct release.toml format for cargo-release v0.25
|
|
22
|
-
- Use usage field for release task arguments
|
|
23
|
-
- Move MISE_ENV to job level for all steps
|
|
6
|
+
- Use --prepend for changelog to preserve manual entries
|
|
7
|
+
- Prevent duplicate translation entries during workspace indexing
|
|
8
|
+
- Replace blocking_lock with async lock to prevent deadlock
|
|
24
9
|
|
|
25
10
|
### Documentation
|
|
26
11
|
|
|
27
|
-
- Add
|
|
28
|
-
- Resolve TODO comments with proper documentation
|
|
29
|
-
- Add CLAUDE.md with path-specific rules for minimal startup context
|
|
30
|
-
- Expand testing rules with in-source test patterns
|
|
31
|
-
- Refactor rules for minimal startup context
|
|
32
|
-
- Add code comment policy
|
|
33
|
-
- Restructure documentation for developers and integrators
|
|
34
|
-
- Add initial CHANGELOG for v0.1.0 release
|
|
12
|
+
- Add i18n.getKeyAtPosition to LSP features
|
|
35
13
|
|
|
36
14
|
### Features
|
|
37
15
|
|
|
38
|
-
-
|
|
39
|
-
- Add
|
|
40
|
-
-
|
|
41
|
-
- Add
|
|
42
|
-
- Add
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
- Add
|
|
46
|
-
-
|
|
47
|
-
- Implement workspace reindexing and incremental updates
|
|
48
|
-
- Add Translation input and JSON flattening utility
|
|
49
|
-
- Add translation file indexing to workspace indexer
|
|
50
|
-
- Implement diagnostic generation for missing translation keys
|
|
51
|
-
- Add heuristic language detection from file paths
|
|
52
|
-
- Implement hover feature to display translations
|
|
53
|
-
- Add immediate diagnostics on file open
|
|
54
|
-
- Add references support for JSON translation files
|
|
55
|
-
- Add configurable indexing thread pool size
|
|
56
|
-
- Add Go to Definition support for translation keys
|
|
57
|
-
- Support Go to Definition from translation files
|
|
58
|
-
- Add completion support for translation keys
|
|
59
|
-
- Display multiple language translations in completion
|
|
60
|
-
- Support empty arguments t() for completion
|
|
61
|
-
- Add file watcher for translation files
|
|
62
|
-
- Add value position tracking for translation files
|
|
63
|
-
- Support hover in translation files
|
|
64
|
-
- Add required_languages and optional_languages settings
|
|
65
|
-
- Check translations per language with configurable filtering
|
|
66
|
-
- Add code action generation module
|
|
67
|
-
- Implement code action and execute command handlers
|
|
68
|
-
- Add VirtualTextConfig for translation decoration settings
|
|
69
|
-
- Add virtual_text module for translation decorations
|
|
70
|
-
- Add i18n.getDecorations command for virtual text support
|
|
71
|
-
- Send unused key diagnostics at initialization and on file changes
|
|
72
|
-
- Add primaryLanguages and currentLanguage settings
|
|
73
|
-
- Add tree-sitter queries for i18n patterns
|
|
74
|
-
- Add multi-query support and expand i18n pattern handling
|
|
75
|
-
- Add configurable key_separator support
|
|
76
|
-
- Add custom settings project for key_separator testing
|
|
77
|
-
- Implement config file change handling with progress notification
|
|
78
|
-
- Add SourceRange::contains and LSP type conversions
|
|
79
|
-
- Add collect_sorted_languages utility
|
|
80
|
-
- Add language priority sorting
|
|
81
|
-
- Add FileMatcher for centralized pattern matching
|
|
82
|
-
- Add delete_keys_from_json_text for key removal
|
|
83
|
-
- Add deleteUnusedKeys command for bulk cleanup
|
|
84
|
-
- Support global translation functions and method calls
|
|
85
|
-
- Add plural suffix support for i18next
|
|
86
|
-
- Add default_namespace setting
|
|
87
|
-
- Detect namespace from file path
|
|
88
|
-
- Add namespace support to type definitions
|
|
89
|
-
- Add array namespace and ns option support
|
|
90
|
-
- Add namespace fields to KeyUsage
|
|
91
|
-
- Add namespace filtering module
|
|
92
|
-
- Support array notation in child key matching
|
|
93
|
-
- Make glob patterns relative to config file directory
|
|
94
|
-
- Support real-time translation updates in editor
|
|
95
|
-
|
|
96
|
-
### Performance
|
|
97
|
-
|
|
98
|
-
- Implement true parallel execution with blocking thread pool
|
|
99
|
-
- Add query cache and reduce default thread count
|
|
16
|
+
- Add i18n.getKeyAtPosition command
|
|
17
|
+
- Add i18n.getCurrentLanguage command and reorder commands by category
|
|
18
|
+
- Rewrite editTranslation to accept value and write directly
|
|
19
|
+
- Add i18n.getTranslationValue command
|
|
20
|
+
- Add language fallback resolution to getCurrentLanguage
|
|
21
|
+
- Add i18n/decorationsChanged custom notification
|
|
22
|
+
- Restore edit translation code actions with experimental capability gate
|
|
23
|
+
- Add maxWidth for display-width-based truncation
|
|
24
|
+
- Make maxWidth required with default 32, maxLength optional
|
|
100
25
|
|
|
101
26
|
### Refactor
|
|
102
27
|
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- Add
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- Replace rolling file appender with configurable logging
|
|
122
|
-
- Restructure with separate projects per library
|
|
123
|
-
- Convert create_diagnostic_options to associated function
|
|
124
|
-
- Remove unnecessary dead_code allow
|
|
125
|
-
- Remove unused load_from_package_json function
|
|
126
|
-
- Use collect_sorted_languages for language resolution
|
|
127
|
-
- Use SourceRange type conversions
|
|
128
|
-
- Consolidate position_in_range into SourceRange::contains
|
|
129
|
-
- Add From trait and helper for tree-sitter conversion
|
|
130
|
-
- Split long function into smaller focused units
|
|
131
|
-
- Extract helper methods and simplify reindex_workspace
|
|
132
|
-
- Extract helpers for file edit operations
|
|
133
|
-
- Extract helpers and use or_else chain
|
|
134
|
-
- Introduce LanguagePriority enum for type-safe sorting
|
|
135
|
-
- Use functional style and idiomatic Rust patterns
|
|
136
|
-
- Simplify sorting logic and imports
|
|
137
|
-
- Migrate from mod.rs to modern Rust module style
|
|
138
|
-
- Simplify implementation
|
|
139
|
-
- Add #[deprecated] attribute to workspace_root()
|
|
140
|
-
- Simplify by removing config_dir abstraction
|
|
141
|
-
- Split config into development and CI environments
|
|
142
|
-
|
|
143
|
-
### Styling
|
|
144
|
-
|
|
145
|
-
- Translate comments to English
|
|
146
|
-
|
|
147
|
-
### Testing
|
|
148
|
-
|
|
149
|
-
- Improve test assertions with googletest matchers
|
|
150
|
-
- Migrate tests to googletest matchers
|
|
151
|
-
- Add comprehensive tests for detect_language_from_path
|
|
152
|
-
- Add unit tests for generate_hover_content
|
|
153
|
-
- Add boundary condition and config tests
|
|
154
|
-
- Add comprehensive workspace indexer tests
|
|
155
|
-
- Add comprehensive completion tests
|
|
156
|
-
- Add test for config_dir != workspace_root scenario
|
|
157
|
-
|
|
158
|
-
### Build
|
|
159
|
-
|
|
160
|
-
- Add salsa dependency and update configuration
|
|
161
|
-
- Add tree-sitter-json dependency
|
|
162
|
-
- Add num_cpus dependency for CPU core detection
|
|
163
|
-
|
|
164
|
-
### Deps
|
|
165
|
-
|
|
166
|
-
- Add jsonc-parser for CST-based JSON manipulation
|
|
28
|
+
- Rely on didChange for state sync after applyEdit
|
|
29
|
+
- Extract helpers and eliminate duplicated code
|
|
30
|
+
- Extract TruncateOption enum for truncation parameters
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [0.2.0] - 2026-02-01
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
- Use --prepend for changelog to preserve manual entries
|
|
38
|
+
- Prevent duplicate translation entries during workspace indexing
|
|
39
|
+
- Replace blocking_lock with async lock to prevent deadlock
|
|
40
|
+
|
|
41
|
+
### Documentation
|
|
42
|
+
|
|
43
|
+
- Add i18n.getKeyAtPosition to LSP features
|
|
44
|
+
|
|
45
|
+
### Features
|
|
167
46
|
|
|
47
|
+
- Add i18n.getKeyAtPosition command
|
|
48
|
+
- Add i18n.getCurrentLanguage command and reorder commands by category
|
|
49
|
+
- Rewrite editTranslation to accept value and write directly
|
|
50
|
+
- Add i18n.getTranslationValue command
|
|
51
|
+
- Add language fallback resolution to getCurrentLanguage
|
|
52
|
+
- Add i18n/decorationsChanged custom notification
|
|
53
|
+
- Restore edit translation code actions with experimental capability gate
|
|
54
|
+
- Add maxWidth for display-width-based truncation
|
|
55
|
+
- Make maxWidth required with default 32, maxLength optional
|
|
56
|
+
|
|
57
|
+
### Refactor
|
|
58
|
+
|
|
59
|
+
- Rely on didChange for state sync after applyEdit
|
|
60
|
+
- Extract helpers and eliminate duplicated code
|
|
61
|
+
- Extract TruncateOption enum for truncation parameters
|
|
62
|
+
|
|
63
|
+
# Changelog
|
|
64
|
+
|
|
65
|
+
All notable changes to this project will be documented in this file.
|
|
66
|
+
|
|
67
|
+
## [0.1.0] - 2026-01-26
|
|
68
|
+
|
|
69
|
+
Initial release of js-i18n-language-server.
|
|
70
|
+
|
|
71
|
+
### Features
|
|
168
72
|
|
|
73
|
+
- LSP support for JavaScript/TypeScript i18n libraries (i18next, next-intl, etc.)
|
|
74
|
+
- Completion for translation keys with multi-language preview
|
|
75
|
+
- Hover to display translations across all languages
|
|
76
|
+
- Go to Definition for translation keys (source → JSON, JSON → source)
|
|
77
|
+
- Diagnostics for missing translation keys
|
|
78
|
+
- Code Actions for quick fixes
|
|
79
|
+
- File watcher for translation file changes
|
|
80
|
+
- Configurable translation file patterns and namespaces
|
package/README.md
CHANGED
|
@@ -9,11 +9,21 @@ Provides IDE features (completion, hover, diagnostics, etc.) for translation key
|
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
|
+
### npm
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install -g js-i18n-language-server
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Cargo
|
|
19
|
+
|
|
12
20
|
```bash
|
|
13
21
|
cargo install --git https://github.com/nabekou29/js-i18n-language-server
|
|
14
22
|
```
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
### Binary
|
|
25
|
+
|
|
26
|
+
Download from [GitHub Releases](https://github.com/nabekou29/js-i18n-language-server/releases).
|
|
17
27
|
|
|
18
28
|
## Configuration
|
|
19
29
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"lockfileVersion": 3,
|
|
3
|
-
"name": "
|
|
3
|
+
"name": "js-i18n-language-server",
|
|
4
4
|
"packages": {
|
|
5
5
|
"": {
|
|
6
6
|
"bin": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"hasInstallScript": true,
|
|
24
24
|
"license": "MIT",
|
|
25
|
-
"name": "
|
|
26
|
-
"version": "0.
|
|
25
|
+
"name": "js-i18n-language-server",
|
|
26
|
+
"version": "0.2.0"
|
|
27
27
|
},
|
|
28
28
|
"node_modules/@isaacs/balanced-match": {
|
|
29
29
|
"engines": {
|
|
@@ -515,5 +515,5 @@
|
|
|
515
515
|
}
|
|
516
516
|
},
|
|
517
517
|
"requires": true,
|
|
518
|
-
"version": "0.
|
|
518
|
+
"version": "0.2.0"
|
|
519
519
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"artifactDownloadUrl": "https://github.com/nabekou29/js-i18n-language-server/releases/download/v0.
|
|
2
|
+
"artifactDownloadUrl": "https://github.com/nabekou29/js-i18n-language-server/releases/download/v0.2.0",
|
|
3
3
|
"bin": {
|
|
4
4
|
"js-i18n-language-server": "run-js-i18n-language-server.js"
|
|
5
5
|
},
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"detect-libc": "^2.1.2",
|
|
11
11
|
"rimraf": "^6.1.2"
|
|
12
12
|
},
|
|
13
|
-
"description": "
|
|
13
|
+
"description": "Language Server for JavaScript/TypeScript i18n (i18next, next-intl, react-intl)",
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"prettier": "^3.7.4"
|
|
16
16
|
},
|
|
@@ -27,7 +27,12 @@
|
|
|
27
27
|
"lsp",
|
|
28
28
|
"language-server",
|
|
29
29
|
"i18n",
|
|
30
|
-
"javascript"
|
|
30
|
+
"javascript",
|
|
31
|
+
"typescript",
|
|
32
|
+
"i18next",
|
|
33
|
+
"next-intl",
|
|
34
|
+
"react-intl",
|
|
35
|
+
"internationalization"
|
|
31
36
|
],
|
|
32
37
|
"license": "MIT",
|
|
33
38
|
"name": "js-i18n-language-server",
|
|
@@ -89,9 +94,9 @@
|
|
|
89
94
|
"zipExt": ".tar.xz"
|
|
90
95
|
}
|
|
91
96
|
},
|
|
92
|
-
"version": "0.
|
|
97
|
+
"version": "0.2.0",
|
|
93
98
|
"volta": {
|
|
94
99
|
"node": "18.14.1",
|
|
95
100
|
"npm": "9.5.0"
|
|
96
101
|
}
|
|
97
|
-
}
|
|
102
|
+
}
|
|
File without changes
|