Sync with libloot v0.26.1

Aside from adding GameType::oblivionRemastered and its usage, this is almost entirely about moving C++ files and tests around.
This commit is contained in:
Oliver Hamlet
2025-05-02 17:56:49 +01:00
parent f1186e4c08
commit eabc7a5d85
52 changed files with 1100 additions and 184 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "libloot-nodejs"
version = "0.26.0"
version = "0.26.1"
[lib]
crate-type = ["cdylib"]
+1 -1
View File
@@ -3,7 +3,7 @@ import test from 'ava'
import { liblootVersion, isCompatible, Group } from '../index.js'
test('liblootVersion', t => {
t.is(liblootVersion(), "0.26.0")
t.is(liblootVersion(), "0.26.1")
});
test('isCompatible', t => {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "libloot-nodejs-linux-x64-gnu",
"version": "0.26.0",
"version": "0.26.1",
"os": [
"linux"
],
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "libloot-nodejs-win32-x64-msvc",
"version": "0.26.0",
"version": "0.26.1",
"os": [
"win32"
],
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "libloot-nodejs",
"version": "0.26.0",
"version": "0.26.1",
"main": "index.js",
"types": "index.d.ts",
"napi": {
+3
View File
@@ -19,6 +19,7 @@ pub enum GameType {
Morrowind,
Starfield,
OpenMW,
OblivionRemastered,
}
impl TryFrom<libloot::GameType> for GameType {
@@ -37,6 +38,7 @@ impl TryFrom<libloot::GameType> for GameType {
libloot::GameType::Morrowind => Ok(GameType::Morrowind),
libloot::GameType::Starfield => Ok(GameType::Starfield),
libloot::GameType::OpenMW => Ok(GameType::OpenMW),
libloot::GameType::OblivionRemastered => Ok(GameType::OblivionRemastered),
_ => Err(UnsupportedEnumValueError),
}
}
@@ -56,6 +58,7 @@ impl From<GameType> for libloot::GameType {
GameType::Morrowind => libloot::GameType::Morrowind,
GameType::Starfield => libloot::GameType::Starfield,
GameType::OpenMW => libloot::GameType::OpenMW,
GameType::OblivionRemastered => libloot::GameType::OblivionRemastered,
}
}
}