@critical-path/svelte 0.15.9 → 0.16.1

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,5 +1,60 @@
1
1
  # @critical-path/svelte
2
2
 
3
+ ## 0.16.1
4
+
5
+ ### Patch Changes
6
+
7
+ - b243a37: Fix correctness and safety issues found in a code audit.
8
+
9
+ **@critical-path/core**
10
+ - `SQLiteStore` now loads `node:sqlite` via `process.getBuiltinModule`, fixing `require is not defined` when constructed from a filename in plain Node ESM.
11
+ - Removed the unused `better-sqlite3` runtime dependency.
12
+ - `engine.addDependency` now detects indirect cycles (e.g. A → B → C → D → A), not just cycles between direct neighbours.
13
+ - Fixed `generateKeyBetween` returning out-of-range, duplicate keys after repeated inserts after the same item. It now throws a `RangeError` when `a >= b`.
14
+ - Added `engine.deleteProject(id)`, which deletes a project's tasks through `deleteTask` and publishes a new `project.deleted` event and webhook.
15
+ - Added exported `ValidationError` and `NotFoundError` classes. `logTime` now rejects non-numeric hours.
16
+
17
+ **@critical-path/server**
18
+ - `DELETE /projects/:id`, `POST /tasks/:id/dependencies` and `POST /time-entries` now go through the engine, so cycle checks, hour validation, roll-ups, events and webhooks apply.
19
+ - Added `PATCH /projects/:id`.
20
+ - `DELETE` on a resource that does not exist now returns `404` instead of `200 { success: false }`.
21
+ - Malformed JSON returns `400`, validation errors `400`, `NotFoundError` `404`, and dependency cycles `409`. Unexpected errors return a generic `500` message outside development.
22
+ - `OPTIONS` preflight requests return `204` with CORS headers.
23
+ - New router/adapter options: `onError(error, request)` to report unexpected errors or return a custom response, and `exposeErrors` to include real messages in 500 responses (defaults to on only when `NODE_ENV === 'development'`).
24
+ - `createNextHandler` returns a callable handler that also exposes per-method properties, so `export { handler as GET }` works as documented.
25
+
26
+ **@critical-path/mcp**
27
+ - Tools excluded via the `tools` option can no longer be called by name.
28
+ - Tool arguments are validated with each tool's zod schema; undeclared fields are stripped.
29
+ - Tool listings include `title` and MCP `readOnlyHint` / `destructiveHint` annotations.
30
+
31
+ **@critical-path/svelte**
32
+ - Rebuilt with the bundled `@critical-path/mcp` WebMCP argument validation.
33
+
34
+ **@critical-path/client**
35
+ - Delete methods resolve to `false` when the server returns `404`, keeping their boolean contract with the new server behaviour.
36
+ - Updated dependencies [b243a37]
37
+ - @critical-path/core@0.22.0
38
+ - @critical-path/mcp@0.7.0
39
+ - @critical-path/client@0.14.7
40
+
41
+ ## 0.16.0
42
+
43
+ ### Minor Changes
44
+
45
+ - f3301bf: - Added comprehensive task lifecycle and semantic status predicates (`isDraftTask`, `isArchivedTask`, `isTrashedTask`, `isTrashedOrArchivedTask`, `isWorkflowTask`, `getTaskSemanticStatus`, `isTaskCompleted`, `isTaskInProgress`, `isTaskNotStarted`, `isTaskCanceled`, `isTaskActive`, `isTaskUnassigned`).
46
+ - Hardened mention extraction with markdown code suppression (`stripMarkdownCode`) to prevent code blocks, inline code, HTML elements, and URLs from triggering false positive mentions while preserving rich-text mention nodes.
47
+ - Added Base-62 fractional indexing utilities (`generateKeyBetween`, `generateNKeysBetween`) for zero-cost lexical task/item reordering without array shifting or bulk database rewrites.
48
+ - Added `completedAt` lifecycle timestamp tracking alongside `actualEndDate`, automatic timestamp assignment upon entering `completed` or `canceled`, and timestamp + progress reset upon reopening to `not_started` or `in_progress`.
49
+ - Added `isTempTaskId` utility and hardened optimistic temporary task handling in `@critical-path/svelte` (`TaskState`) and `@critical-path/react` (`useTasks`) with in-flight creation resolution and ID mapping to prevent 404 errors during rapid optimistic updates and deletions.
50
+
51
+ ### Patch Changes
52
+
53
+ - Updated dependencies [f3301bf]
54
+ - @critical-path/core@0.21.0
55
+ - @critical-path/client@0.14.6
56
+ - @critical-path/mcp@0.6.9
57
+
3
58
  ## 0.15.9
4
59
 
5
60
  ### Patch Changes