Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [["melodie", "@melodie/core", "@melodie/ui"]],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
7 changes: 7 additions & 0 deletions .changeset/thirty-needles-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'melodie': minor
'@melodie/core': minor
'@melodie/ui': minor
---

update dependencies, migrate to pnpm, vite, vitest, changesets, unocss and electron@28 which supports ESM
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
dist
out
coverage
.gitignore
apps/site
35 changes: 35 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:svelte/recommended',
'plugin:vitest/recommended',
'plugin:testing-library/dom',
'@electron-toolkit',
'@electron-toolkit/eslint-config-prettier'
],
env: {
browser: true,
es2020: true,
node: true
},
plugins: ['simple-import-sort'],
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
babelOptions: {
plugins: ['@babel/plugin-syntax-import-assertions']
},
extraFileExtensions: ['.svelte']
},
globals: {
RXJS_VERSION: true,
UNOCSS_VERSION: true
},
overrides: [{ files: ['*.svelte'], parser: 'svelte-eslint-parser' }],
rules: {
'simple-import-sort/imports': 'error',
'testing-library/no-wait-for-multiple-assertions': 'off',
// 'testing-library/no-await-sync-queries': 'off',
'testing-library/no-node-access': 'off'
}
}
39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ node_modules/
build/
coverage/
dist/
out/
__sapper__/
.svelte-kit/
.vercel/
.levels
.env
logs.txt
winehq.key
apps/desktop/package-lock.json
apps/site/static/fonts
apps/desktop/package-lock.json
6 changes: 6 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# sveltekit
engine-strict=true
# https://www.electron.build/index.html#note-for-pnpm
node-linker=hoisted
public-hoist-pattern=*
shamefully-hoist=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v20
9 changes: 6 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules/
build/
coverage/
out
dist
node_modules
build
coverage
LICENSE.md
10 changes: 10 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
semi: false
singleQuote: true
trailingComma: none
arrowParens: avoid
plugins:
- prettier-plugin-svelte
overrides:
- files: '*.svelte'
options:
parser: svelte
5 changes: 0 additions & 5 deletions .prettierrc.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .versionrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"eslint.format.enable": true,
"eslint.workingDirectories": [
"./apps/desktop/",
"./apps/ui/",
"./apps/site/",
"./common/core/",
"./common/ui/",
"./"
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ Another option is to open it with Control-click: it'll immediately register the

### features

- use lightweight thumbnails for images, except when displaying Album/Artist details

- when cover search failed once, do not retry on next start

- use file and folder names to complete missing tags

- merge components/Album|Artist|Playlist tests for GridItem + hover behaviour (desktop only)
Expand Down Expand Up @@ -90,15 +94,23 @@ Another option is to open it with Control-click: it'll immediately register the

### tools

- dependabot + dep update
- unit tests for log fowarder

- try out [electron-vite](https://evite.netlify.app/) and migrate to [svelte-kit](https://kit.svelte.dev/)

- manual depdency updates, including electron and faker

- dependabot

- changeset

- automated end-to-end tests

- more technical documentation (install & release process notably)

### Bugs and known issues

1. When server is not reachable, attempts to establish new WebSocket connection takes longer and longer
1. When loading the remote UI, playing current track is delayed by any other loading operation (like listing albums)

1. DMG package does not download updates: [it requires zip](https://github.com/electron-userland/electron-builder/issues/2199), and we cannot build zip because of [the accent in product name](https://github.com/electron-userland/electron-builder/issues/4306#issuecomment-717232761)...

Expand Down Expand Up @@ -202,7 +214,7 @@ You'll need npm@7+ and node@16+
```shell
git clone git@github.com:feugy/melodie.git
cd melodie
npm i
npm i --legacy-peer-deps
npm start
```

Expand Down
9 changes: 9 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Migration:

1. dev hot-reload in electron > electron-vite main in ESM can't be used because knex is dynamically importing its dialects (pg, mysql, aws-sdk...)
1. Atelier: http://localhost:3000/?tool=Components%2FImage%2FWith+escaped+path static file no served
1. BroadcastButton tests (canvas drama)
1. oramasearch
1. https://musicbrainz.org/doc/MusicBrainz_API
1. try out svelte 5
1. jsconfig everywhere
6 changes: 4 additions & 2 deletions apps/desktop/electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
appId: org.feugy.melodie
productName: Mélodie
copyright: Copyright © 2021 ${author}
copyright: Copyright © 2024 ${author}

asar: true
files:
- LICENSE
- CHANGELOG.md
- README.md
- PRIVACY POLICY.md
- main.js
- lib/**/*
- out/**/*
- package.json
- public/**/*
- '!**/tests/**/*'
Expand Down Expand Up @@ -59,7 +61,7 @@ publish:
repo: melodie

linux:
target: [snap, AppImage, tar.gz]
target: [AppImage, deb]
category: Audio
mimeTypes:
- inode/directory
Expand Down
42 changes: 42 additions & 0 deletions apps/desktop/electron.vite.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import defineUiConfig from '@melodie/ui/vite.config.js'
import { defineConfig } from 'electron-vite'

export default defineConfig(async args => {
const renderer = await defineUiConfig(args)
return {
/*main: {
build: {
lib: {
entry: './main.js',
formats: 'es'
},
rollupOptions: {
external: [
/^electron/,
'mock-aws-s3',
'aws-sdk',
'better-sqlite3',
'mysql2',
'oracledb',
'pg',
'tedious',
'mysql',
'pg-query-stream',
...builtinModules.flatMap(m => [m, `node:${m}`])
]
}
}
},*/
renderer: {
root: '../../common/ui',
define: renderer.define,
plugins: renderer.plugins,
build: {
rollupOptions: {
input: { index: '../../common/ui/index.html' }
},
outDir: 'out'
}
}
}
})
18 changes: 0 additions & 18 deletions apps/desktop/jest.config.js

This file was deleted.

Loading