@oevortex/ddg_search 1.1.9 → 1.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/CHANGELOG.md CHANGED
@@ -1,13 +1,29 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
- ## [1.1.9] - 2025-12-21
5
- ### Fixed
6
- - Fixed JSON parsing error in searchTool handler that caused "invalid character 'S' looking for beginning of value"
7
- - Removed JSON.stringify approach and implemented formatted text output for web search results
8
- - Improved result formatting to display numbered items, titles, URLs, snippets, and content consistently
4
+ ## [1.2.0] - 2025-12-21
5
+ ### Added
6
+ - Comprehensive Jest testing framework with ES module support
7
+ - Complete unit test suite for all utility functions (search, user_agents, search_iask, search_monica)
8
+ - Integration tests for MCP server functionality and tool routing
9
+ - Test infrastructure with mocking for all external dependencies
10
+ - Input validation across all search modules and tools
11
+ - Enhanced error handling with specific network error types
12
+ - Performance optimizations with timeout management and caching
13
+ - Improved logging and monitoring capabilities
14
+ - Fixed JSON parsing error in searchTool handler (1.1.9 regression)
15
+ - Updated package.json with comprehensive test scripts
16
+ - Added Babel configuration for test compatibility
17
+
18
+ ### Improved
19
+ - Search module robustness with AbortController and timeout management
20
+ - IAsk AI WebSocket connection handling with enhanced error reporting
21
+ - Monica AI stream processing with improved validation
22
+ - Tool schema validation with comprehensive parameter checking
23
+ - User agent rotation consistency and logging
24
+ - Cache management with hit detection and size controls
9
25
 
10
- ## [1.1.8] - 2025-12-03
26
+ ## [1.1.9] - 2025-12-21
11
27
  ### Added
12
28
  - Added new `getRandomUserAgent` function to rotate user agents
13
29
  - Added new `src/utils/user_agents.js` file containing list of user agents
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ presets: [
3
+ [
4
+ '@babel/preset-env',
5
+ {
6
+ targets: {
7
+ node: 'current'
8
+ }
9
+ }
10
+ ]
11
+ ]
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oevortex/ddg_search",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "A Model Context Protocol server for web search using DuckDuckGo and IAsk AI",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.ts",
@@ -15,7 +15,13 @@
15
15
  "oevortex-ddg-search": "bin/cli.js"
16
16
  },
17
17
  "scripts": {
18
- "test": "echo \"Error: no test specified\" && exit 1",
18
+ "test": "jest",
19
+ "test:watch": "jest --watch",
20
+ "test:coverage": "jest --coverage",
21
+ "test:unit": "jest --testPathPattern=src/__tests__/utils",
22
+ "test:integration": "jest --testPathPattern=src/__tests__/mcp-integration",
23
+ "test:tools": "jest --testPathPattern=src/__tests__/tools",
24
+ "test:all": "jest --coverage --verbose",
19
25
  "start": "node bin/cli.js",
20
26
  "prepublishOnly": "npm run lint",
21
27
  "lint": "echo \"No linting configured\"",
@@ -51,8 +57,13 @@
51
57
  "ws": "^8.18.3"
52
58
  },
53
59
  "devDependencies": {
60
+ "@babel/core": "^7.28.5",
61
+ "@babel/preset-env": "^7.28.5",
62
+ "@jest/globals": "^29.7.0",
54
63
  "@types/node": "^24.3.0",
64
+ "babel-jest": "^29.7.0",
65
+ "jest": "^29.7.0",
55
66
  "tsx": "^4.20.4",
56
67
  "typescript": "^5.9.2"
57
68
  }
58
- }
69
+ }