mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Version 0.7.3
This commit is contained in:
parent
940834f70e
commit
6a4e44918c
5 changed files with 30 additions and 6 deletions
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -4,7 +4,7 @@
|
|||
"luau-lsp.types.roblox": false,
|
||||
"luau-lsp.require.mode": "relativeToFile",
|
||||
"luau-lsp.require.directoryAliases": {
|
||||
"@lune/": "./docs/typedefs"
|
||||
"@lune/": "./docs/typedefs/"
|
||||
},
|
||||
// Luau - ignore type defs file in docs dir and dev scripts we use
|
||||
"luau-lsp.ignoreGlobs": [
|
||||
|
|
|
@ -8,6 +8,14 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## `0.7.3` - July 5th, 2023
|
||||
|
||||
### Changed
|
||||
|
||||
- When using `roblox.serializeModel`, Lune will no longer keep internal unique ids. <br/>
|
||||
This is consistent with what Roblox does and prevents Lune from always generating a new and unique file. <br/>
|
||||
This previously caused unnecessary diffs when using git or other kinds of source control. ([Relevant issue](https://github.com/filiptibell/lune/issues/61))
|
||||
|
||||
## `0.7.2` - June 28th, 2023
|
||||
|
||||
### Added
|
||||
|
|
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -1138,7 +1138,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lune"
|
||||
version = "0.7.2"
|
||||
version = "0.7.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-compression",
|
||||
|
@ -1169,7 +1169,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lune-cli"
|
||||
version = "0.7.2"
|
||||
version = "0.7.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap 4.3.8",
|
||||
|
@ -1193,7 +1193,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lune-roblox"
|
||||
version = "0.7.2"
|
||||
version = "0.7.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"glam",
|
||||
|
|
|
@ -5,7 +5,7 @@ default-members = ["packages/cli"]
|
|||
# Package config values shared across all packages,
|
||||
# such as version, license, and other metadata
|
||||
[workspace.package]
|
||||
version = "0.7.2"
|
||||
version = "0.7.3"
|
||||
edition = "2021"
|
||||
license = "MPL-2.0"
|
||||
repository = "https://github.com/filiptibell/lune"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use rbx_dom_weak::{InstanceBuilder as DomInstanceBuilder, WeakDom};
|
||||
use rbx_dom_weak::{types::Ref as DomRef, InstanceBuilder as DomInstanceBuilder, WeakDom};
|
||||
use rbx_xml::{
|
||||
DecodeOptions as XmlDecodeOptions, DecodePropertyBehavior as XmlDecodePropertyBehavior,
|
||||
EncodeOptions as XmlEncodeOptions, EncodePropertyBehavior as XmlEncodePropertyBehavior,
|
||||
|
@ -274,6 +274,9 @@ impl Document {
|
|||
instance.clone_into_external_dom(&mut dom);
|
||||
}
|
||||
|
||||
let root_ref = dom.root_ref();
|
||||
recurse_strip_unique_ids(&mut dom, root_ref);
|
||||
|
||||
Ok(Self {
|
||||
kind: DocumentKind::Model,
|
||||
format: DocumentFormat::default(),
|
||||
|
@ -281,3 +284,16 @@ impl Document {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn recurse_strip_unique_ids(dom: &mut WeakDom, dom_ref: DomRef) {
|
||||
let child_refs = match dom.get_by_ref_mut(dom_ref) {
|
||||
Some(inst) => {
|
||||
inst.properties.remove("UniqueId");
|
||||
inst.children().to_vec()
|
||||
}
|
||||
None => Vec::new(),
|
||||
};
|
||||
for child_ref in child_refs {
|
||||
recurse_strip_unique_ids(dom, child_ref)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue