6 Commits

Author SHA1 Message Date
3a78d49974 bump dependencies
All checks were successful
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) Successful in -2m11s
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 85 additions and 29 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

50
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "morning-report",
"version": "0.0.2",
"version": "0.0.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "morning-report",
"version": "0.0.2",
"version": "0.0.3",
"license": "MIT",
"dependencies": {
"json5": "2.2.3",
@@ -16,9 +16,9 @@
"morning-report": "distribution/src/index.js"
},
"devDependencies": {
"@types/node": "24.3.0",
"@types/node": "24.7.2",
"@vitest/coverage-v8": "3.2.4",
"typescript": "5.9.2",
"typescript": "5.9.3",
"vitest": "3.2.4"
}
},
@@ -921,13 +921,14 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "24.3.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz",
"integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==",
"version": "24.7.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.2.tgz",
"integrity": "sha512-/NbVmcGTP+lj5oa4yiYxxeBjRivKQ5Ns1eSZeB99ExsEQ6rX5XYU1Zy/gGxY/ilqtD4Etx9mKyrPxZRetiahhA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"undici-types": "~7.10.0"
"undici-types": "~7.14.0"
}
},
"node_modules/@vitest/coverage-v8": {
@@ -1695,6 +1696,7 @@
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
"peer": true,
"engines": {
"node": ">=12"
},
@@ -2011,14 +2013,14 @@
"license": "MIT"
},
"node_modules/tinyglobby": {
"version": "0.2.14",
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",
"integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",
"version": "0.2.15",
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
"integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"fdir": "^6.4.4",
"picomatch": "^4.0.2"
"fdir": "^6.5.0",
"picomatch": "^4.0.3"
},
"engines": {
"node": ">=12.0.0"
@@ -2058,9 +2060,9 @@
}
},
"node_modules/typescript": {
"version": "5.9.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz",
"integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
"version": "5.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -2072,25 +2074,26 @@
}
},
"node_modules/undici-types": {
"version": "7.10.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
"integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
"version": "7.14.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz",
"integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==",
"dev": true,
"license": "MIT"
},
"node_modules/vite": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.3.tgz",
"integrity": "sha512-OOUi5zjkDxYrKhTV3V7iKsoS37VUM7v40+HuwEmcrsf11Cdx9y3DIr2Px6liIcZFwt3XSRpQvFpL3WVy7ApkGw==",
"version": "7.1.5",
"resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz",
"integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.5.0",
"picomatch": "^4.0.3",
"postcss": "^8.5.6",
"rollup": "^4.43.0",
"tinyglobby": "^0.2.14"
"tinyglobby": "^0.2.15"
},
"bin": {
"vite": "bin/vite.js"
@@ -2182,6 +2185,7 @@
"integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@types/chai": "^5.2.2",
"@vitest/expect": "3.2.4",

View File

@@ -1,6 +1,6 @@
{
"name": "morning-report",
"version": "0.0.2",
"version": "0.0.3",
"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.7.2",
"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' };