8 Commits

Author SHA1 Message Date
aa03c83407 bump deps
All checks were successful
Unit tests / Unit tests (lts/hydrogen) (push) Successful in -1m52s
NPM Audit Check / Check NPM audit (push) Successful in -2m8s
Unit tests / Unit tests (latest) (push) Successful in -1m42s
Unit tests / Unit tests (lts/*) (push) Successful in -1m54s
2025-12-01 19:41:45 -05:00
ed3f97f17a patch vite vulnerability that only affects windoze
Some checks failed
Unit tests / Unit tests (latest) (push) Successful in -1m46s
Unit tests / Unit tests (lts/*) (push) Successful in -1m48s
Unit tests / Unit tests (lts/hydrogen) (push) Successful in -1m56s
NPM Audit Check / Check NPM audit (push) Failing after -2m8s
2025-10-27 23:15:00 -05:00
3a78d49974 bump dependencies
Some checks failed
Unit tests / Unit tests (lts/*) (push) Successful in -1m48s
Unit tests / Unit tests (lts/hydrogen) (push) Successful in -1m56s
Unit tests / Unit tests (latest) (push) Successful in -1m44s
NPM Audit Check / Check NPM audit (push) Failing after -2m10s
2025-10-15 00:25:50 -05:00
0d53a6ccde replace Math.random() with crypto.randomInt() 2025-10-15 00:24:59 -05:00
6ecc03a670 bump vite version (dev dependency)
All checks were successful
Unit tests / Unit tests (latest) (push) Successful in -2m4s
Unit tests / Unit tests (lts/*) (push) Successful in -2m4s
Unit tests / Unit tests (lts/hydrogen) (push) Successful in -2m3s
NPM Audit Check / Check NPM audit (push) Successful in -2m11s
2025-09-09 17:50:56 -05:00
3f0121a9ff mirror actions to tangled
All checks were successful
Unit tests / Unit tests (latest) (push) Successful in -2m3s
Unit tests / Unit tests (lts/*) (push) Successful in -2m4s
Unit tests / Unit tests (lts/hydrogen) (push) Successful in -2m4s
NPM Audit Check / Check NPM audit (push) Successful in -2m17s
2025-09-02 21:06:16 -05:00
021f714b06 add lts/hydrogen to test env
All checks were successful
NPM Audit Check / Check NPM audit (push) Successful in -2m17s
Unit tests / Unit tests (latest) (push) Successful in -2m5s
Unit tests / Unit tests (lts/*) (push) Successful in -2m5s
Unit tests / Unit tests (lts/hydrogen) (push) Successful in -1m59s
2025-09-02 20:59:17 -05:00
b0e4a10b3e node version matrix
All checks were successful
NPM Audit Check / Check NPM audit (push) Successful in -2m17s
Unit tests / Unit tests (latest) (push) Successful in -1m57s
Unit tests / Unit tests (lts/*) (push) Successful in -1m59s
2025-09-02 00:21:14 -05:00
7 changed files with 349 additions and 266 deletions

View File

@@ -14,6 +14,13 @@ jobs:
timeout-minutes: 20
strategy:
fail-fast: true
matrix:
nodever:
[
'latest',
'lts/*',
'lts/hydrogen'
]
permissions:
contents: read
@@ -23,6 +30,9 @@ jobs:
- name: Setup nodejs
uses: https://github.com/actions/setup-node@v4
with:
node-version: "${{ matrix.nodever }}"
check-latest: true
- name: Install dependencies
run: npm ci

View File

@@ -0,0 +1,18 @@
when:
- event: ["push"]
branch: ["master"]
engine: "nixery"
dependencies:
nixpkgs:
- nodejs
steps:
- name: "NPM Audit"
command: "npm audit"
clone:
skip: false
depth: 3
submodules: false

View File

@@ -0,0 +1,24 @@
when:
- event: ["push"]
branch: ["master"]
engine: "nixery"
dependencies:
nixpkgs:
- nodejs
steps:
- name: "Install dependencies"
command: "npm ci"
- name: "tsc"
command: "npm run build && echo 'done.'"
- name: "tests"
command: "npm test"
clone:
skip: false
depth: 3
submodules: false

551
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "morning-report",
"version": "0.0.2",
"version": "0.0.5",
"description": "Procedurally generates a radio weather report",
"keywords": [
"weather",
@@ -35,8 +35,8 @@
"openweather-api-node": "3.1.5"
},
"devDependencies": {
"typescript": "5.9.2",
"@types/node": "24.3.0",
"typescript": "5.9.3",
"@types/node": "24.10.1",
"vitest": "3.2.4",
"@vitest/coverage-v8": "3.2.4"
}

View File

@@ -2,6 +2,7 @@ import { OpenWeatherAPI, type DailyWeather } from 'openweather-api-node';
import { voiceLines } from './voice.js';
import type { Config } from './index.js';
import type { Voice } from './voice.js';
import crypto from 'crypto';
type SegmentName = string;
type SequenceName = string;
@@ -16,7 +17,7 @@ type Sequences = { [sequence: SequenceName]: Sequence };
let config: Config = null;
function selectOne<T>(arr: T[]): T {
return arr[Math.floor(Math.random() * arr.length)];
return arr[crypto.randomInt(0, arr.length)];
}
function resolveSide(side: string, currentWeather: DailyWeather) {

View File

@@ -1,7 +1,6 @@
import { describe, expect, it, vi } from 'vitest';
import { type CurrentWeather, type Options } from 'openweather-api-node';
import { type Options } from 'openweather-api-node';
import { Sequencer } from '../src/sequencer.js';
import type { Config } from '../src/index.js';
const dummyWeather: Options = { key: 'dummy' };