Skip to content

Commit 1f2d116

Browse files
authored
Merge pull request #31 from jackdbd/upgrade-dependencies
Upgrade dependencies and improve typings
2 parents 5321349 + 2aecd4b commit 1f2d116

File tree

13 files changed

+5259
-5100
lines changed

13 files changed

+5259
-5100
lines changed

.github/workflows/ci.yaml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ on:
88
- main
99

1010
jobs:
11-
ci-on-cloud-build:
12-
name: CI on ${{ matrix.os }}, Node.js ${{ matrix.node }}
11+
build-audit-test:
12+
name: Build & Test all packages on ${{ matrix.os }}, Node ${{ matrix.node }}
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest]
17-
# pick at least one Node.js `lts` version and the `current` version (i.e. the latest Node.js version available)
17+
# Try testing all packages with:
18+
# 1. Maintenance LTS
19+
# 2. Active LTS
20+
# 3. Current (i.e. the latest Node.js version available)
1821
# https://nodejs.org/en/
19-
# node: ['16.15.1', 'current']
22+
# https://nodejs.org/en/about/releases/
2023
# it seems Cloud Build complains with HTTP 429 if I trigger too many builds
2124
# Quota exceeded for quota metric 'Build and Operation Get requests'
22-
node: ['16.15.1']
25+
node: ['16.17.0', 'current']
2326
steps:
2427
- name: 🛎️ Check out repo
2528
uses: actions/checkout@v3
@@ -32,69 +35,70 @@ jobs:
3235
- name: ⚙️ Install dependencies
3336
run: npm ci
3437

35-
- name: 🛡️ Audit dependencies
38+
- name: 🛡️ Audit dependencies (audit-level high)
3639
# https://docs.npmjs.com/cli/v8/commands/npm-audit#audit-level
3740
run: npm audit --audit-level high
3841

39-
- name: 🔧 Build packages
42+
- name: 🛡️ Audit dependencies (audit-level moderate)
43+
continue-on-error: true
44+
run: npm audit --audit-level moderate
45+
46+
- name: 📦 Build all libraries
4047
run: npm run build:libs
4148

42-
- name: 🔍 Test library @jackdbd/checks
49+
- name: 🔍 Test @jackdbd/checks
4350
run: npm run test:ci -w packages/checks
4451

45-
- name: 🔍 Test library @jackdbd/cloud-scheduler-utils
52+
- name: 🔍 Test @jackdbd/cloud-scheduler-utils
4653
env:
4754
SA_NOTIFIER: ${{ secrets.SA_NOTIFIER }}
4855
run: npm run test:ci -w packages/cloud-scheduler-utils
4956

50-
- name: 🔍 Test library @jackdbd/cloud-tasks-utils
57+
- name: 🔍 Test @jackdbd/cloud-tasks-utils
5158
run: npm run test:ci -w packages/cloud-tasks-utils
5259

53-
- name: 🔍 Test library @jackdbd/firestore-utils
60+
- name: 🔍 Test @jackdbd/firestore-utils
5461
env:
5562
SA_FIRESTORE_USER_TEST: ${{ secrets.SA_FIRESTORE_USER_TEST }}
5663
SA_FIRESTORE_VIEWER_TEST: ${{ secrets.SA_FIRESTORE_VIEWER_TEST }}
5764
run: npm run test:ci -w packages/firestore-utils
5865

59-
- name: 🔍 Test library @jackdbd/notifications
66+
- name: 🔍 Test @jackdbd/notifications
6067
env:
6168
TELEGRAM: ${{ secrets.TELEGRAM }}
6269
run: npm run test:ci -w packages/notifications
6370

64-
- name: 🔍 Test library @jackdbd/plausible-client
71+
- name: 🔍 Test @jackdbd/plausible-client
6572
env:
6673
PLAUSIBLE: ${{ secrets.PLAUSIBLE }}
6774
run: npm run test:ci -w packages/plausible-client
6875

69-
- name: 🔍 Test library @jackdbd/schemas
76+
- name: 🔍 Test @jackdbd/schemas
7077
run: npm run test:ci -w packages/schemas
7178

72-
- name: 🔍 Test library @jackdbd/secret-manager-utils
79+
- name: 🔍 Test @jackdbd/secret-manager-utils
7380
env:
7481
SA_SECRET_MANAGER_ADMIN_TEST: ${{ secrets.SA_SECRET_MANAGER_ADMIN_TEST }}
7582
run: npm run test:ci -w packages/secret-manager-utils
7683

77-
- name: 🔍 Test library @jackdbd/send-telegram-message
84+
- name: 🔍 Test @jackdbd/send-telegram-message
7885
env:
7986
TELEGRAM: ${{ secrets.TELEGRAM }}
8087
run: npm run test:ci -w packages/send-telegram-message
8188

82-
- name: 🔍 Test library @jackdbd/sqlite-utils
89+
- name: 🔍 Test @jackdbd/sqlite-utils
8390
run: npm run test:ci -w packages/sqlite-utils
8491

85-
- name: 🔍 Test library @jackdbd/stripe-utils
92+
- name: 🔍 Test @jackdbd/stripe-utils
8693
run: npm run test:ci -w packages/stripe-utils
8794

88-
- name: 🔍 Test library @jackdbd/tags-logger
95+
- name: 🔍 Test @jackdbd/tags-logger
8996
run: npm run test:ci -w packages/tags-logger
9097

91-
# - name: 🔍 Test library @jackdbd/telegram-bot
92-
# run: npm run test:ci -w packages/telegram-bot
93-
94-
- name: 🔍 Test library @jackdbd/telegram-text-messages
98+
- name: 🔍 Test @jackdbd/telegram-text-messages
9599
run: npm run test:ci -w packages/telegram-text-messages
96100

97-
- name: 🔍 Test library @jackdbd/utils
101+
- name: 🔍 Test @jackdbd/utils
98102
run: npm run test:ci -w packages/utils
99103

100104
- name: ⬆️ Upload test coverage to Codecov

.github/workflows/release-to-npmjs.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
name: 'release-to-npmjs'
1+
name: 'Release to npmjs.com'
22

33
on:
4-
pull_request:
54
push:
65
branches:
76
- canary
@@ -14,7 +13,10 @@ jobs:
1413
strategy:
1514
matrix:
1615
os: [ubuntu-latest]
17-
node: ['16.15.1']
16+
# Use the Active LTS for this workflow
17+
# https://nodejs.org/en/
18+
# https://nodejs.org/en/about/releases/
19+
node: ['16.17.0']
1820
steps:
1921
- name: 🛎️ Check out repo
2022
uses: actions/checkout@v3
@@ -24,10 +26,10 @@ jobs:
2426
with:
2527
node-version: ${{ matrix.node }}
2628

27-
- name: 👀 Check npm version
28-
run: npm version
29+
# - name: 👀 Check npm version
30+
# run: npm version
2931

30-
- name: ⬇️ Install dependencies from npmjs
32+
- name: ⬇️ Install dependencies
3133
run: npm install
3234
# run: npm install --legacy-peer-deps
3335

.vscode/settings.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
{
22
"editor.formatOnSave": false,
3-
"files.associations": { "*.json": "jsonc" },
3+
// The extension pflannery.vscode-versionlens works only if the file type
4+
// associated to package.json is json, not jsonc.
5+
// For tsconfig files we can use jsonc without issues.
6+
// https://marketplace.visualstudio.com/items?itemName=pflannery.vscode-versionlens
7+
"files.associations": {
8+
"*.json": "json",
9+
"tsconfig*.json": "jsonc"
10+
},
411
"files.exclude": {
512
"**/node_modules/": true
613
},

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Calderone
22

33
![CI workflow](https://github.com/jackdbd/calderone/actions/workflows/ci.yaml/badge.svg)
4-
![release-to-npmjs workflow](https://github.com/jackdbd/calderone/actions/workflows/release-to-npmjs.yaml/badge.svg)
4+
![Release to npmjs.com workflow](https://github.com/jackdbd/calderone/actions/workflows/release-to-npmjs.yaml/badge.svg)
55
[![codecov](https://codecov.io/gh/jackdbd/calderone/branch/main/graph/badge.svg?token=P5uJ3doRer)](https://codecov.io/gh/jackdbd/calderone)
66
[![CodeFactor](https://www.codefactor.io/repository/github/jackdbd/calderone/badge)](https://www.codefactor.io/repository/github/jackdbd/calderone)
77
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
@@ -14,7 +14,7 @@ Monorepo that I use for a bunch of stuff, managed with [npm workspaces](https://
1414
>
1515
> All libraries of this monorepo are published to npmjs as ECMAScript modules.
1616
>
17-
> At the moment no one of these packages has a CommonJS build.
17+
> At the moment none of these packages has a CommonJS build.
1818
1919
## Installation
2020

0 commit comments

Comments
 (0)