github streetsidesoftware/cspell v9.6.1

latest release: v9.6.2
11 hours ago

Fixes

fix: Move performance monitoring into its own package (#8431)

fix: Move performance monitoring into its own package (#8431)

Pull request overview

This PR extracts performance monitoring functionality from multiple packages into a new dedicated package @cspell/cspell-performance-monitor. The new package provides a centralized, conditionally-enabled performance measurement system using the standard Performance API.

Changes:

  • Created a new @cspell/cspell-performance-monitor package with improved performance measurement functions that can be conditionally enabled/disabled
  • Migrated and removed duplicate performance measurement code from cspell-lib, cspell-dictionary, and cspell-trie-lib packages
  • Updated performance measurement calls to use the new disposable pattern (using _ = measurePerf()) that leverages TypeScript's explicit resource management

fix: Add NotifyEmitter (#8423)

fix: Add NotifyEmitter (#8423)

Pull request overview

This pull request adds a new NotifyEmitter class to provide a reusable event notification system based on the Disposable pattern. The PR refactors the RPC server test to use this new event emitter pattern instead of a custom AsyncMessageQueue implementation, resulting in cleaner and more maintainable code.

Changes:

  • Introduces NotifyEmitter class with NotifyEvent pattern for event handling with automatic cleanup via Symbol.dispose
  • Adds helper functions notifyEventToPromise and notifyEventOnce for working with notify events
  • Creates MessagePortEvents wrapper class to adapt MessagePort events to the NotifyEmitter pattern
  • Refactors server.test.ts to use the new event system, removing the custom AsyncMessageQueue implementation
  • Adds result?: unknown field to RPCResponse interface for more consistent type handling
  • Exports new notify-related types and functions through the public API

refactor: Adjust RPC interface to use a config (#8420)

refactor: Adjust RPC interface to use a config (#8420)

Pull request overview

Refactors the RPC client/server APIs (and cspell RPC wrappers) to accept a single configuration object, and updates worker integration and tests accordingly.

Changes:

  • Update RPCClient/RPCServer (and CSpellRPCClient/CSpellRPCServer) constructors/factories to accept { port, ...options } config objects.
  • Adjust RPC tests and worker usage to match the new config-based API.
  • Update cspell-lib package entrypoint to dist/index.* and add src/index.ts re-export.

refactor: Refactor CLI to make it easier to spell check files in parallel (#8387)

refactor: Refactor CLI to make it easier to spell check files in parallel (#8387)

Pull request overview

This PR refactors the CLI file processing architecture to improve processing speed. The main improvements include extracting file processing logic into a dedicated module, adding sequence tracking for file processing, fixing regex lastIndex state sharing issues, and preparing infrastructure for optional worker pool parallelization (currently disabled).

Changes:

  • Extracted file processing logic from lint.ts into a new processFiles.ts module with improved batch processing
  • Added sequence tracking interfaces (FileToProcess, ProcessPrefetchFileResult) to maintain file processing order
  • Fixed regex lastIndex state sharing bugs by creating new RegExp instances before use
  • Added worker pool and RPC infrastructure to cspell-api.ts (currently disabled via feature flags)
  • Updated performance reporting to track both accumulated processing time and total elapsed time

refactor: Refactor settings a bit (#8385)

refactor: Refactor settings a bit (#8385)

Pull request overview

This pull request refactors settings handling in the CSpell codebase. The main focus is on improving the serialization of settings objects by adding circular reference detection and handling to walkToJSONObj, along with introducing new utility functions for working with settings that need to be serialized (e.g., for IPC via MessageChannel).

Changes:

  • Enhanced walkToJSONObj to handle circular references using a WeakMap-based visited tracking system
  • Added toCSpellSettingsWithSourceTrace and toCSpellSettingsWithOutSourceTrace functions to convert settings to serializable formats
  • Refactored processFile to accept and use userSettings parameter instead of directly accessing configInfo.config

refactor: Refactor internal settings (#8382)

refactor: Refactor internal settings (#8382)

Pull request overview

This pull request refactors the internal settings structure by reorganizing code from Models/CSpellSettingsInternalDef.js into a new Settings/internal/ directory structure. This improves code organization by collocating internal settings definitions with other settings-related code.

Changes:

  • Created new Settings/internal/ directory with split files: CSpellSettingsInternalDef.ts, InternalDictionaryDef.ts, and DictionarySettings.ts (with improved private field syntax)
  • Updated all import paths across the codebase from Models/CSpellSettingsInternalDef to Settings/internal/ or Settings/index
  • Added new utility function walkToJSONObj for JSON serialization (with comprehensive tests) and __getOriginalDefinition() method for accessing original dictionary definitions

fix: report errors in spelling result. (#8381)

fix: report errors in spelling result. (#8381)

Pull request overview

This PR enhances error reporting in spell check results by including configuration and dictionary errors directly in the SpellCheckFileResult object. Previously, errors were only extracted from configuration during the lint process; now they're also captured from the spell checking itself.

Changes:

  • Added configErrors and dictionaryErrors fields to SpellCheckFileResult interface
  • Refactored error reporting to extract errors from spell check results instead of re-computing them from configuration
  • Created a new cspell-api module to abstract spell checking implementation
  • Added comprehensive test coverage with fixture files demonstrating error scenarios

fix: Add CSpell Worker Pool (#8379)

fix: Add CSpell Worker Pool (#8379)

Pull request overview

This pull request adds a CSpell Worker Pool implementation to manage multiple spell-checking workers efficiently, along with significant improvements to the RPC infrastructure for better readiness tracking.

Changes:

  • Added CSpellWorkerPool class to manage a pool of spell-checking workers with configurable sizing based on CPU cores
  • Simplified the worker implementation by removing custom status tracking in favor of RPC-based readiness checks
  • Enhanced RPC client/server with ready request/response mechanism, allowing clients to wait for server initialization
  • Renamed Resolver utility class to Future with improved state tracking (added isRejected property)

refactor: Clean Up CSpell Worker (#8372)

refactor: Clean Up CSpell Worker (#8372)


fix: Add CSpellRPCServer and CSpellRPCClient classes (#8366)

fix: Add CSpellRPCServer and CSpellRPCClient classes (#8366)

Pull request overview

This pull request adds RPC (Remote Procedure Call) infrastructure to enable remote spell checking through CSpell. The implementation includes a generic RPC client/server framework, CSpell-specific RPC adapters, and worker thread support for isolated spell checking operations.

Changes:

  • Move the RPC framwork from cspell to cspell-lib
  • Adds complete RPC framework with message-based client/server communication over MessagePort
  • Implements CSpell-specific RPC server and client classes for remote spell checking
  • Introduces worker thread support for isolated spell checking operations
  • Adds utility functions for cloning and sanitizing settings for safe RPC transmission

fix: Work on adding support for Workers (#8363)

fix: Work on adding support for Workers (#8363)

Pull request overview

This pull request adds RPC (Remote Procedure Call) infrastructure to support Workers in the cspell package. The implementation provides a client-server communication framework using MessagePort for inter-process or inter-worker communication.

Changes:

  • Added RPC client and server implementations with support for request/response patterns, cancellation, and error handling
  • Implemented type-safe protocol definitions with automatic Promise wrapping for async operations
  • Created comprehensive test coverage for client, server, and integration scenarios

Dictionary Updates

fix: Workflow Bot -- Update Dictionaries (main) (#8433)

fix: Workflow Bot -- Update Dictionaries (main) (#8433)

Update Dictionaries (main)

Summary

 .../MartinThoma/LaTeX-examples/report.yaml         |  9 +---
 .../MartinThoma/LaTeX-examples/snapshot.txt        |  7 +--
 packages/cspell-bundled-dicts/package.json         | 10 ++--
 packages/cspell/src/__snapshots__/app.test.ts.snap |  6 +--
 pnpm-lock.yaml                                     | 57 ++++++++++++----------
 5 files changed, 42 insertions(+), 47 deletions(-)

Don't miss a new cspell release

NewReleases is sending notifications on new releases.