@happyvertical/smrt-jobs 0.53.0 → 0.53.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-jobs",
3
- "version": "0.53.0",
3
+ "version": "0.53.2",
4
4
  "smrtJsdoc": "strict",
5
5
  "description": "Background job processing for SMRT objects with persistence and scheduling",
6
6
  "author": "HappyVertical",
@@ -53,16 +53,16 @@
53
53
  "dependencies": {
54
54
  "@happyvertical/jobs": "^0.98.0",
55
55
  "@happyvertical/logger": "^0.98.0",
56
- "@happyvertical/smrt-config": "0.53.0",
57
- "@happyvertical/smrt-core": "0.53.0",
58
- "@happyvertical/smrt-tenancy": "0.53.0",
59
- "@happyvertical/smrt-types": "0.53.0",
60
- "@happyvertical/smrt-ui": "0.53.0",
56
+ "@happyvertical/smrt-config": "0.53.2",
57
+ "@happyvertical/smrt-core": "0.53.2",
58
+ "@happyvertical/smrt-tenancy": "0.53.2",
59
+ "@happyvertical/smrt-types": "0.53.2",
60
+ "@happyvertical/smrt-ui": "0.53.2",
61
61
  "@happyvertical/sql": "^0.98.0",
62
62
  "@happyvertical/utils": "^0.98.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@happyvertical/smrt-vitest": "0.53.0",
65
+ "@happyvertical/smrt-vitest": "0.53.2",
66
66
  "@sveltejs/package": "^2.5.8",
67
67
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
68
68
  "@types/node": "24.13.6",
@@ -82,12 +82,12 @@
82
82
  "directory": "packages/jobs"
83
83
  },
84
84
  "scripts": {
85
- "build": "vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json",
85
+ "build": "vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json && node ../../scripts/prune-svelte-package-artifacts.js dist",
86
86
  "build:watch": "vite build --mode library --watch",
87
87
  "clean": "rm -rf dist",
88
88
  "dev": "vite dev",
89
89
  "check": "pnpm exec svelte-check --tsconfig ./tsconfig.svelte.json",
90
- "typecheck": "tsc --noEmit && node ../../scripts/svelte-check-a11y.mjs --tsconfig ./tsconfig.svelte.json",
90
+ "typecheck": "tsc --noEmit && tsc -p tsconfig.test.json && node ../../scripts/svelte-check-a11y.mjs --tsconfig ./tsconfig.svelte.json && node ../../scripts/svelte-check-a11y.mjs --tsconfig ./tsconfig.svelte-test.json",
91
91
  "test": "vitest run",
92
92
  "test:watch": "vitest",
93
93
  "test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run optional.test.ts",
@@ -1,63 +0,0 @@
1
- // @vitest-environment jsdom
2
- /**
3
- * JobList ordering: rows keep the order they are supplied in until the host
4
- * passes a `sort` or the person activates a header — adding header sorting
5
- * must not silently reorder an existing host's list.
6
- */
7
- import { render, screen, userEvent } from '@happyvertical/smrt-vitest/svelte';
8
- import { describe, expect, it } from 'vitest';
9
- import JobList from '../JobList.svelte';
10
- function job(id, createdAt, queue = 'default') {
11
- return {
12
- id,
13
- queue,
14
- objectType: 'Thing',
15
- objectId: null,
16
- method: 'run',
17
- args: {},
18
- status: 'pending',
19
- priority: 0,
20
- attempts: 0,
21
- maxAttempts: 3,
22
- timeout: 0,
23
- timeoutBehavior: 'fail',
24
- runAt: createdAt,
25
- startedAt: null,
26
- completedAt: null,
27
- lastError: null,
28
- resultPointer: null,
29
- workerId: null,
30
- createdAt,
31
- updatedAt: createdAt,
32
- };
33
- }
34
- // Supplied oldest first, as a host that orders by queue position might.
35
- const jobs = [
36
- job('a', '2026-09-01T00:00:00Z', 'q-a'),
37
- job('b', '2026-09-03T00:00:00Z', 'q-b'),
38
- job('c', '2026-09-02T00:00:00Z', 'q-c'),
39
- ];
40
- const queues = () => Array.from(document.querySelectorAll('.job-list__cell--queue')).map((cell) => cell.textContent?.trim());
41
- describe('JobList ordering', () => {
42
- it('renders rows in the supplied order when no sort is given', () => {
43
- render(JobList, { props: { jobs, showActions: false } });
44
- expect(queues()).toEqual(['q-a', 'q-b', 'q-c']);
45
- });
46
- it('sorts when the host passes a sort', () => {
47
- render(JobList, {
48
- props: {
49
- jobs,
50
- showActions: false,
51
- sort: { columnId: 'createdAt', direction: 'desc' },
52
- },
53
- });
54
- expect(queues()).toEqual(['q-b', 'q-c', 'q-a']);
55
- });
56
- it('sorts once the person activates a header', async () => {
57
- render(JobList, { props: { jobs, showActions: false } });
58
- await userEvent.click(screen.getByRole('button', { name: /Queue/ }));
59
- expect(queues()).toEqual(['q-a', 'q-b', 'q-c']);
60
- await userEvent.click(screen.getByRole('button', { name: /Queue/ }));
61
- expect(queues()).toEqual(['q-c', 'q-b', 'q-a']);
62
- });
63
- });