Skip to content

Commit d3d163f

Browse files
Merge branch 'main' into alert-autofix-3
2 parents 29900bb + 39581cc commit d3d163f

8 files changed

Lines changed: 20 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [ master, main ]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
test:
1114
runs-on: ubuntu-latest

docs/syntax.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ The unary `+` and `-` operators are an exception, and always have their normal p
9999
| sqrt x | Square root of x. Result is NaN (Not a Number) if x is negative. |
100100
| tan x | Tangent of x (x is in radians) |
101101
| tanh x | Hyperbolic tangent of x (x is in radians) |
102-
| trunc x | Integral part of a X, looks like floor(x) unless for negative number |
102+
| trunc x | Integral part of x; behaves like floor(x) for positive numbers, but rounds toward zero for negative numbers. |
103103

104104
## Pre-defined Functions
105105

@@ -233,7 +233,7 @@ The parser includes comprehensive string manipulation capabilities.
233233
|:--------------------- |:----------- |
234234
| padLeft(str, len, padChar?) | Pads a string on the left with spaces (or optional padding character) to reach the target length. |
235235
| padRight(str, len, padChar?) | Pads a string on the right with spaces (or optional padding character) to reach the target length. |
236-
| padBoth(str, len, padChar?) | Pads a string on both sides with spaces (or optional padding character) to reach the target length. If an odd number of padding characters is needed, the extra character is added on the right. |
236+
| padBoth(str, len, padChar?) | Pads a string on both sides with spaces (or optional padding character) to reach the target length. If `len` is less than or equal to the string length, the original string is returned unchanged (no truncation). If an odd number of padding characters is needed, the extra character is added on the right. |
237237

238238
### Slicing and Encoding
239239

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,11 @@
163163
"optionalDependencies": {
164164
"@modelcontextprotocol/sdk": "^1.29.0",
165165
"zod": "^4.3.6"
166+
},
167+
"overrides": {
168+
"hono": "^4.12.14"
169+
},
170+
"resolutions": {
171+
"hono": "^4.12.14"
166172
}
167173
}

samples/language-service-sample/app.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ function loadExampleFromUrl() {
165165
(function() {
166166
const resizer = document.getElementById('verticalResizer');
167167
const contextPane = document.getElementById('contextPane');
168-
const resultsPane = document.getElementById('resultsPane');
169168
const bottomArea = document.getElementById('bottomArea');
170169
let isResizing = false;
171170

@@ -182,7 +181,6 @@ function loadExampleFromUrl() {
182181

183182
const containerRect = bottomArea.getBoundingClientRect();
184183
const containerWidth = containerRect.width;
185-
const resizerWidth = 6;
186184

187185
let newLeftWidth = e.clientX - containerRect.left;
188186
newLeftWidth = Math.max(containerWidth * 0.2, Math.min(containerWidth * 0.8, newLeftWidth));

src/functions/math/advanced.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ const GAMMA_P = [
1616
0.36899182659531622704e-5
1717
] as const;
1818

19-
function isInteger(value: number | undefined): boolean {
20-
if (value === undefined) {
21-
return false;
22-
}
19+
function isInteger(value: number): boolean {
2320
return isFinite(value) && (value === Math.round(value));
2421
}
2522

src/mcp-server/server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { createLanguageService } from '../language-service/language-service.js';
33
import type { LanguageServiceOptions } from '../language-service/language-service.types.js';
44
import { registerTools } from './tools.js';
55

6+
const DEFAULT_MCP_SERVER_VERSION = '0.5.0';
7+
68
export interface CreateMcpServerOptions {
79
operators?: LanguageServiceOptions['operators'];
810
name?: string;
@@ -12,7 +14,7 @@ export interface CreateMcpServerOptions {
1214
export function createMcpServer(options: CreateMcpServerOptions = {}): McpServer {
1315
const server = new McpServer({
1416
name: options.name ?? 'expreszo-mcp',
15-
version: options.version ?? '0.5.0'
17+
version: options.version ?? DEFAULT_MCP_SERVER_VERSION
1618
});
1719

1820
const ls = createLanguageService({ operators: options.operators });

test/types/type-guards.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ describe('Type Guards', () => {
209209
}
210210
});
211211

212-
it('should narrow types correctly with isFunction', () => {
212+
it('should narrow types correctly with isFunction', async () => {
213213
const value: Value = Math.sin;
214214

215215
if (isFunction(value)) {
216216
// TypeScript should know value is ExpressionFunction here
217217
expect(typeof value).toBe('function');
218-
expect(typeof value(Math.PI / 2)).toBe('number');
218+
expect(typeof await value(Math.PI / 2)).toBe('number');
219219
}
220220
});
221221

0 commit comments

Comments
 (0)