4032 Commits
Author SHA1 Message Date
Oliver Hamlet 55bdf56227 Update version and changelog for v0.28.0 0.28.0 2025-08-02 16:36:20 +01:00
Oliver Hamlet ff86fdc65d Version array-parameterized-test independently of libloot 2025-08-02 16:26:09 +01:00
Oliver Hamlet d4d6893491 Use enums instead of bools in public API
Replace the boolean parameters for including user metadata and evaluating conditions with MergeMode and EvalMode enums.

The C++ and Python wrappers still use booleans because they're more constrained than enums in those languages, which can be given invalid values.
2025-08-02 16:05:36 +01:00
Oliver Hamlet 4e74a174c5 Enable the doc_markdown Clippy lint in libloot 2025-08-02 16:05:36 +01:00
Oliver Hamlet c61fcd248d Be more specific with clippy's exhaustive_enums lint exceptions 2025-08-02 16:05:36 +01:00
Oliver Hamlet b75eced9ea Rename and tidy up the parameterized-test crate
It needed to be renamed to allow it to be published on crates.io, as there's already a parameterized_test crate there.
2025-08-02 16:05:36 +01:00
Oliver Hamlet 8cf7a0adf1 Add more Cargo package fields
Explicitly disable publishing the FFI wrappers, since there's no point them being on crates.io.
2025-08-02 11:16:25 +01:00
Oliver Hamlet 903bdf6ef7 Add a FetchContent example to cpp readme 2025-08-01 18:21:44 +01:00
Oliver Hamlet bca7af2af8 Update the changelog 2025-08-01 18:20:33 +01:00
Oliver Hamlet 7acd54a9b7 Use --workspace instead of deprecated --all 2025-08-01 18:20:15 +01:00
Oliver Hamlet 2b59b6f76a Set /MP for specific CMake targets
So that libloot doesn't override the global setting if included as a dependency.
2025-08-01 18:19:48 +01:00
Oliver Hamlet 67b50ee8d9 Deny unreachable_pub lint in libloot 2025-07-31 22:10:44 +01:00
Oliver Hamlet 139047f230 Remove unused Cargo profile 2025-07-31 22:10:05 +01:00
Oliver Hamlet f69bd3b632 Update Node.js wrapper to 2024 edition 2025-07-31 22:10:01 +01:00
Oliver Hamlet 4acc64247e Deduplicate Cargo package fields across workspace
Also deduplicate version numbers in CMakeLists.txt.
2025-07-31 22:08:46 +01:00
Oliver Hamlet 724f6eaa15 Add versions to dependency copyright notices 2025-07-30 19:15:09 +01:00
Oliver Hamlet cdb4433124 Fix finding archives for plugin basenames containing periods 2025-07-30 19:08:46 +01:00
Oliver Hamlet f14e47e0e8 Switch to the regress crate for regex
It uses about 56 MB less memory when LOOT launches into my Skyrim SE
large test load order with the latest masterlist and prelude, and
explicitly targets ECMAScript-like syntax like C++ std::regex does,
though supports newer functionality.

Compared to fancy-regex's syntax support, regress adds support for the
\0 nul character escape and removes support for:

- modifiers (e.g. `(?i)`)
- some Unicode character classes (e.g. used with `\p{}` and `\P{}`)
- the ASCII/POSIX character classes (e.g. `[:alpha:]`)
- various character escapes, including \A \a \z \b{start} \<
  \b{end} \> \b{start-half} \b{end-half}
- (?P<name>exp) named capture groups

However, since regress's v flag requires more characters to be escaped
inside character classes than fancy-regex's Unicode support requires,
it's not used, so that further restricts the supported Unicode character
classes, and means that character class intersection, union and
subtraction syntaxes aren't supported.

The nul character escape is irrelevant for filename matching as it's not
allowed in Windows or Linux filenames.

Compared to C++ std::regex, the new restrictions are:

- the lack of support for ASCII/POSIX character classes
- the lack of support for control character escapes (e.g. `\cX`)

The lack of support for control character escapes is irrelevant as
control characters aren't allowed in Windows filenames.

A search of the masterlists doesn't find any use of the ASCII character
classes, and it's very unlikely that any user metadata would use them.
If such syntax is in use, it'll cause an error.
2025-07-29 18:25:40 +01:00
Oliver Hamlet efd2d43ae3 Update plugin name regex doc
fancy-regex supports more syntax than C++ std::regex, but for the syntax
that they both accept:

- std::regex matches . against a single character, fancy-regex matches
  it against a Unicode codepoint
- \w \W \d \D \s \S \b and \B are locale-dependent in std::regex but
  Unicode-aware and locale-independent in fancy-regex
- case-insensitive comparisons are locale-dependent in std::regex but
  are Unicode-aware and locale-independent in fancy-regex
- std::regex supports \0 and \cX escapes, where X is in [A-Za-z] but
  fancy-regex does not. This is not significant for libloot's usage as
  nul and control characters are not allowed in Windows filenames.
- std::regex treats \< and \> as < and > respectively, but fancy-regex
  treats them as start- and end-of-word boundary assertions
  respectively. This is not significant for libloot's usage as they are
  not allowed in Windows filenames.
- std::regex allows a literal [ to appear within a character class, but
  fancy-regex requires it to be escaped.

These differences are unlikely to cause any issues.
2025-07-29 17:56:31 +01:00
Oliver Hamlet 675a4fa0c2 Fix missing doc comment 2025-07-28 17:44:17 +01:00
Oliver Hamlet ac0a355117 Update NAPI-RS to v3 2025-07-27 10:00:40 +01:00
Oliver Hamlet d6be961095 Be a bit more consistent with function naming
This makes it so that all non-public functions use camelCase and all public functions use PascalCase.

I regret choosing to use PascalCase for function names, but it's not worth breaking the whole public API to change that, and at least this approach has precedent in how Go decides if a function is public or private.
2025-07-26 21:49:49 +01:00
Oliver Hamlet e6ced54842 Improve handling of invalid placeholders during message substitution 2025-07-25 22:45:30 +01:00
Oliver HamletandGitHub b3c12f8913 Merge pull request #127 from loot/dependabot/cargo/cxx-build-1.0.161
Bump cxx-build from 1.0.160 to 1.0.161
2025-07-25 20:59:28 +01:00
Oliver HamletandGitHub 10e3428758 Merge pull request #126 from loot/dependabot/cargo/cxx-1.0.161
Bump cxx from 1.0.160 to 1.0.161
2025-07-25 20:58:51 +01:00