Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #5

Merged
merged 11 commits into from
Aug 30, 2024
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
dist
out
.gitignore

# Generated Emby client.
src/main/core/emby-client
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,30 @@ All art assets are stored in [resources/discord-art-assets/](resources/discord-a

Assets need to be uploaded in the application settings -> "Rich Presence" -> "Art Assets":
![discord-art-assets](/resources/docs/discord-art-assets.png)

## Emby API client

The Emby API client is generated using `npm run generate-emby-client`.

A local copy of the Emby OpenAPI configuration is used, so builds are reproducible.
To get the latest version of the OpenAPI JSON see:
https://dev.emby.media/doc/restapi/index.html#emby-api-browser

# Code Dependency Upgrade Notes

To upgrade `electron-store` to [version 9](https://github.com/sindresorhus/electron-store/releases/tag/v9.0.0) or higher the following config is required in `tsconfig.node.json`, because `electron-store` was converted into an ESM:

```
"compilerOptions": {
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
```

And `"type": "module"` needs to be added in the `package.json`.

This means that [imports need to be updated](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-make-my-typescript-project-output-esm) in the project:

> You must use a .js extension in relative imports even though you're importing .ts files.

The generated emby client in `./src/main/core/emby-client` does not work as ESM yet and a workaround using [fix-esm-import-path](https://www.npmjs.com/package/fix-esm-import-path) did not work.
Loading
Loading