Skip to content

Commit 1a48335

Browse files
committed
chore: update node to 22
1 parent 3e938c3 commit 1a48335

File tree

6 files changed

+3424
-8594
lines changed

6 files changed

+3424
-8594
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@ jobs:
1414
uses: actions/checkout@v4
1515
with:
1616
persist-credentials: false
17+
1718
- name: Setup Node.js
18-
uses: actions/setup-node@v1
19+
uses: actions/setup-node@v4
1920
with:
20-
node-version: 18.x
21-
- name: Install pkg globally
22-
run: npm install -g pkg
21+
node-version-file: 'package.json'
22+
2323
- name: Install dependencies
2424
run: npx ci --include=dev
25+
2526
- name: Tests
2627
run: npm run test
28+
2729
- name: Release
2830
env:
2931
GH_TOKEN: ${{ secrets.GH_TOKEN }}

build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ rm -rf .dist
44
mkdir -p .dist
55
cp -r index.js package*.json lib .dist
66
cd .dist
7-
npm install --omit=dev
7+
8+
echo "Installing dependencies..."
9+
npm install --omit=dev --omit=optional --no-fund --loglevel=error
810

911
echo "Building MBNDS exe..."
10-
pkg -c package.json -t node18-win-x64 index.js -o musicbee-navidrome-sync.exe
12+
pkg . --compress Brotli -o musicbee-navidrome-sync.exe

index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ const commandLinesOptions = {
3333
}
3434
};
3535

36+
program
37+
.name('musicbee-navidrome-sync')
38+
.description(
39+
`MusicBee to Navidrome Sync (MBNDS) : Tools to sync MusicBee DB to Navidrome DB (v${packageJson.version})\nhttps://github.com/rombat/musicbee-navidrome-sync`
40+
)
41+
.version(packageJson.version, '-v, --version', 'output the current version');
42+
3643
program
3744
.command('fullSync')
3845
.description('sync playcounts, track ratings, loved tracks and last played from MusicBee DB to Navidrome DB')
@@ -48,13 +55,6 @@ program
4855
)
4956
.action(runAction);
5057

51-
program
52-
.name('musicbee-navidrome-sync')
53-
.description(
54-
`MusicBee to Navidrome Sync (MBNDS) : Tools to sync MusicBee DB to Navidrome DB (v${packageJson.version})\nhttps://github.com/rombat/musicbee-navidrome-sync`
55-
)
56-
.version(packageJson.version, '-v, --version', 'output the current version');
57-
5858
program
5959
.command('albumsSync')
6060
.description('update all albums playcounts and ratings based on existing Navidrome DB')

lib/handlers/MBNDSynchronizer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const fs = require('fs');
1+
const fs = require('node:fs');
22
const csv2json = require('csvtojson');
33
const { Op } = require('sequelize');
44
const { randomUUID } = require('crypto');
@@ -14,7 +14,7 @@ dayjs.extend(customParseFormat);
1414
dayjs.extend(duration);
1515
dayjs.extend(relativeTime);
1616
const cliProgress = require('cli-progress');
17-
const path = require('path');
17+
const path = require('node:path');
1818

1919
const dbManager = require('./dbManager');
2020
const { findBestMatch } = require('../helpers/helpers');

0 commit comments

Comments
 (0)