@marktiderman/genesis-notifications 0.4.0 → 0.4.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.
@@ -203,10 +203,12 @@ update public.notification_preferences set quiet_hours_start = '06:00' where use
203
203
  select is(private.genesis_notifications_quiet_until(pg_temp.u('c3'), '2026-11-01 10:59+00'), null, 'a start equal to the end is no quiet hours');
204
204
 
205
205
  -- Push during quiet hours waits; a transactional one doesn't ----------------------------
206
- -- a1 is quiet all day long, in UTC.
206
+ -- a1 is quiet from an hour before now to an hour after, in UTC: a window around the test's own
207
+ -- clock (it may run past midnight, which the claim handles), never a fixed one a clock can be outside.
207
208
  insert into public.notification_preferences (user_id, quiet_hours_enabled, quiet_hours_start, quiet_hours_end, time_zone)
208
- values (pg_temp.u('a1'), true, '00:00', '23:59', 'UTC')
209
- on conflict (user_id) do update set quiet_hours_enabled = true, quiet_hours_start = '00:00', quiet_hours_end = '23:59', time_zone = 'UTC';
209
+ values (pg_temp.u('a1'), true, ((now() at time zone 'UTC') - interval '1 hour')::time, ((now() at time zone 'UTC') + interval '1 hour')::time, 'UTC')
210
+ on conflict (user_id) do update set quiet_hours_enabled = true, quiet_hours_start = excluded.quiet_hours_start,
211
+ quiet_hours_end = excluded.quiet_hours_end, time_zone = 'UTC';
210
212
  insert into k select 'q1', notification_id from public.genesis_notify('gntest.message', jsonb_build_array(pg_temp.u('a1')), '{}', 'push:msg-q');
211
213
  insert into k select 'q2', notification_id from public.genesis_notify('gntest.alert', jsonb_build_array(pg_temp.u('a1')), '{}', 'alert-1');
212
214
  update public.notification_deliveries set send_after = now() - interval '1 minute' where notification_id in (pg_temp.k('q1'), pg_temp.k('q2'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marktiderman/genesis-notifications",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -93,13 +93,13 @@
93
93
  "README.md"
94
94
  ],
95
95
  "dependencies": {
96
- "@marktiderman/genesis-features": "^0.8.0"
96
+ "@marktiderman/genesis-features": "^0.8.1"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "@marktiderman/genesis-core": ">=1.17.0 <3.0.0",
100
100
  "@marktiderman/genesis-native": ">=0.2.0 <1.0.0",
101
101
  "@marktiderman/genesis-supabase": ">=0.7.0 <1.0.0",
102
- "@marktiderman/genesis-ui": "^2.25.1",
102
+ "@marktiderman/genesis-ui": "^2.27.0",
103
103
  "@marktiderman/genesis-ui-native": ">=2.9.0 <4.0.0",
104
104
  "@react-email/components": "^1.0.0",
105
105
  "@tanstack/react-query": "^5.0.0",
@@ -133,11 +133,11 @@
133
133
  }
134
134
  },
135
135
  "devDependencies": {
136
- "@marktiderman/genesis-core": "^2.4.0",
137
- "@marktiderman/genesis-native": "^0.6.0",
136
+ "@marktiderman/genesis-core": "^2.5.0",
137
+ "@marktiderman/genesis-native": "^0.7.0",
138
138
  "@marktiderman/genesis-supabase": "^0.11.0",
139
- "@marktiderman/genesis-ui": "^2.25.1",
140
- "@marktiderman/genesis-ui-native": "^3.2.2",
139
+ "@marktiderman/genesis-ui": "^2.27.0",
140
+ "@marktiderman/genesis-ui-native": "^3.3.0",
141
141
  "@react-email/components": "1.0.12",
142
142
  "@tanstack/react-query": "^5.104.5",
143
143
  "@testing-library/react": "^16.3.2",