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 ADDED
@@ -0,0 +1,2 @@
1
+ /node_modules
2
+
package/CHANGELOG.md CHANGED
@@ -1,168 +1,80 @@
1
- # Changelog
2
1
 
3
- All notable changes to this project will be documented in this file.
4
- ## [0.1.0] - 2026-01-25
2
+ ## [0.2.0] - 2026-02-01
5
3
 
6
4
  ### Bug Fixes
7
5
 
8
- - Skip empty keys during validation
9
- - Update default translation file pattern for nested structures
10
- - Add delay before Progress End to avoid race condition
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 custom settings project documentation
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
- - Implement initial js-i18n-language-server
39
- - Add configuration management system
40
- - Implement workspace indexing system
41
- - Add salsa-based architecture foundation
42
- - Add IDE feature module stubs
43
- - Define validation error types and error messages
44
- - Implement complete configuration management and Backend integration
45
- - Add Send trait and Default implementation to Salsa database
46
- - Integrate Salsa database for incremental analysis
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
- - Consolidate error types and use LSP types
104
- - Move analyzer to syntax module with salsa integration
105
- - Improve workspace indexing implementation
106
- - Remove unused Translation struct
107
- - Extract common diagnostic logic into helper method
108
- - Prioritize translations and limit concurrency to prevent cpu starvation
109
- - Simplify logging by removing timing instrumentation
110
- - Split capture names for get and call contexts
111
- - Replace let chain with nested if-let
112
- - Replace let chains with nested if-let expressions
113
- - Use config-based pattern for file watching
114
- - Extract common helper methods to reduce code duplication
115
- - Extract ServerState from Backend
116
- - Extract LSP handlers into dedicated modules
117
- - Add explanatory comments to clippy allow attributes
118
- - Add CaptureName enum, batch locks, and key_separator support
119
- - Reduce clone() calls and shorten lock hold times
120
- - Replace verbose trace logs with tracing::instrument
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
- Or download from [GitHub Releases](https://github.com/nabekou29/js-i18n-language-server/releases).
24
+ ### Binary
25
+
26
+ Download from [GitHub Releases](https://github.com/nabekou29/js-i18n-language-server/releases).
17
27
 
18
28
  ## Configuration
19
29
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "lockfileVersion": 3,
3
- "name": "@js-i18n-language-server/js-i18n-language-server",
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": "@js-i18n-language-server/js-i18n-language-server",
26
- "version": "0.1.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.1.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.1.0",
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": "A simple Language Server Protocol implementation in Rust",
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.1.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