Update snapshot files to reflect changes in module structure and properties

- Changed various instances from Folder to ModuleScript in snapshot files to align with updated project structure.
- Added new ModuleScript instances with appropriate properties in multiple test snapshots, enhancing test coverage for module handling.
- Updated project names in syncback snapshots to ensure consistency with the new structure.
This commit is contained in:
Joe 2026-01-30 09:28:22 -06:00
parent f08a4d21e7
commit 4aac7d0d48
35 changed files with 390 additions and 114 deletions

View file

@ -3,9 +3,11 @@ source: tests/tests/build.rs
expression: contents
---
<roblox version="4">
<Item class="Folder" referent="0">
<Item class="Script" referent="0">
<Properties>
<string name="Name">client_init</string>
<token name="RunContext">2</token>
<string name="Source">return "From folder/init.client.luau"</string>
</Properties>
</Item>
</roblox>

View file

@ -11,11 +11,23 @@ expression: contents
<Properties>
<string name="Name">src</string>
</Properties>
</Item>
<Item class="Folder" referent="2">
<Item class="ModuleScript" referent="2">
<Properties>
<string name="Name">subproject</string>
<string name="Name">outer.spec</string>
<string name="Source">-- This file should be included.</string>
</Properties>
</Item>
</Item>
<Item class="Folder" referent="3">
<Properties>
<string name="Name">subproject</string>
</Properties>
<Item class="ModuleScript" referent="4">
<Properties>
<string name="Name">inner</string>
<string name="Source">-- This file should be included.</string>
</Properties>
</Item>
</Item>
</Item>
</roblox>

View file

@ -7,5 +7,11 @@ expression: contents
<Properties>
<string name="Name">ignore_glob_nested</string>
</Properties>
<Item class="ModuleScript" referent="1">
<Properties>
<string name="Name">include</string>
<string name="Source">-- This file must be present.</string>
</Properties>
</Item>
</Item>
</roblox>

View file

@ -7,5 +7,11 @@ expression: contents
<Properties>
<string name="Name">ignore_glob_spec</string>
</Properties>
<Item class="ModuleScript" referent="1">
<Properties>
<string name="Name">shouldBeIncluded</string>
<string name="Source">-- this file should be present</string>
</Properties>
</Item>
</Item>
</roblox>

View file

@ -3,9 +3,16 @@ source: tests/tests/build.rs
expression: contents
---
<roblox version="4">
<Item class="Folder" referent="0">
<Item class="ModuleScript" referent="0">
<Properties>
<string name="Name">init_with_children</string>
<string name="Source">-- init.lua</string>
</Properties>
<Item class="ModuleScript" referent="1">
<Properties>
<string name="Name">other</string>
<string name="Source">-- other.lua</string>
</Properties>
</Item>
</Item>
</roblox>

View file

@ -7,5 +7,11 @@ expression: contents
<Properties>
<string name="Name">module_in_folder</string>
</Properties>
<Item class="ModuleScript" referent="1">
<Properties>
<string name="Name">aModule</string>
<string name="Source">-- This is a Lua module</string>
</Properties>
</Item>
</Item>
</roblox>

View file

@ -3,9 +3,10 @@ source: tests/tests/build.rs
expression: contents
---
<roblox version="4">
<Item class="Folder" referent="0">
<Item class="ModuleScript" referent="0">
<Properties>
<string name="Name">module_init</string>
<string name="Source">return "From folder/init.luau"</string>
</Properties>
</Item>
</roblox>

View file

@ -5,12 +5,14 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)"
instances:
id-2:
Children: []
ClassName: Folder
ClassName: ModuleScript
Id: id-2
Metadata:
ignoreUnknownInstances: false
Name: edit_init
Parent: "00000000000000000000000000000000"
Properties: {}
Properties:
Source:
String: "-- Original contents"
messageCursor: 0
sessionId: id-1

View file

@ -4,13 +4,53 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)"
---
instances:
id-2:
Children: []
ClassName: Folder
Children:
- id-3
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: false
Name: empty_folder
ignoreUnknownInstances: true
Name: meshpart
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children:
- id-4
- id-5
ClassName: Workspace
Id: id-3
Metadata:
ignoreUnknownInstances: true
Name: Workspace
Parent: id-2
Properties:
NeedsPivotMigration:
Bool: false
id-4:
Children: []
ClassName: ObjectValue
Id: id-4
Metadata:
ignoreUnknownInstances: true
Name: ObjectValue
Parent: id-3
Properties:
Attributes:
Attributes: {}
Value:
Ref: id-5
id-5:
Children: []
ClassName: MeshPart
Id: id-5
Metadata:
ignoreUnknownInstances: true
Name: Sword
Parent: id-3
Properties:
MeshId:
ContentId: "rbxasset://fonts/sword.mesh"
TextureID:
ContentId: "rbxasset://textures/SwordTexture.png"
messageCursor: 0
sessionId: id-1

View file

@ -2,7 +2,7 @@
source: tests/tests/serve.rs
expression: redactions.redacted_yaml(&info)
---
projectName: empty_folder
projectName: meshpart
protocolVersion: 5
rootInstanceId: id-2
serverVersion: "[server-version]"

View file

@ -9,7 +9,7 @@ instances:
Id: id-2
Metadata:
ignoreUnknownInstances: false
Name: edit_init
Name: move_folder_of_stuff
Parent: "00000000000000000000000000000000"
Properties: {}
messageCursor: 0

View file

@ -2,7 +2,7 @@
source: tests/tests/serve.rs
expression: redactions.redacted_yaml(info)
---
projectName: edit_init
projectName: move_folder_of_stuff
protocolVersion: 5
rootInstanceId: id-2
serverVersion: "[server-version]"

View file

@ -3,114 +3,40 @@ source: tests/tests/serve.rs
expression: "read_response.intern_and_redact(&mut redactions, root_id)"
---
instances:
id-10:
id-2:
Children:
- id-3
- id-4
ClassName: Folder
Id: id-2
Metadata:
ignoreUnknownInstances: false
Name: ref_properties_remove
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children: []
ClassName: ObjectValue
Id: id-10
Id: id-3
Metadata:
ignoreUnknownInstances: true
Name: ProjectPointer
Parent: id-9
ignoreUnknownInstances: false
Name: pointer
Parent: id-2
Properties:
Attributes:
Attributes: {}
Value:
Ref: id-9
id-2:
Children:
- id-3
ClassName: DataModel
Id: id-2
Metadata:
ignoreUnknownInstances: true
Name: ref_properties
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children:
- id-4
- id-5
- id-7
- id-9
ClassName: Workspace
Id: id-3
Metadata:
ignoreUnknownInstances: true
Name: Workspace
Parent: id-2
Properties:
NeedsPivotMigration:
Bool: false
Ref: id-4
id-4:
Children: []
ClassName: ObjectValue
Id: id-4
Metadata:
ignoreUnknownInstances: true
Name: CrossFormatPointer
Parent: id-3
ignoreUnknownInstances: false
Name: target
Parent: id-2
Properties:
Attributes:
Attributes: {}
Value:
Ref: id-5
id-5:
Children:
- id-6
ClassName: Folder
Id: id-5
Metadata:
ignoreUnknownInstances: false
Name: FolderTarget
Parent: id-3
Properties: {}
id-6:
Children: []
ClassName: ObjectValue
Id: id-6
Metadata:
ignoreUnknownInstances: false
Name: FolderPointer
Parent: id-5
Properties:
Attributes:
Attributes: {}
Value:
Ref: id-5
id-7:
Children:
- id-8
ClassName: Folder
Id: id-7
Metadata:
ignoreUnknownInstances: false
Name: ModelTarget
Parent: id-3
Properties: {}
id-8:
Children: []
ClassName: Model
Id: id-8
Metadata:
ignoreUnknownInstances: false
Name: ModelPointer
Parent: id-7
Properties:
Attributes:
Attributes: {}
NeedsPivotMigration:
Bool: false
PrimaryPart:
Ref: id-7
id-9:
Children:
- id-10
ClassName: Folder
Id: id-9
Metadata:
ignoreUnknownInstances: true
Name: ProjectTarget
Parent: id-3
Properties: {}
messageCursor: 0
sessionId: id-1

View file

@ -2,7 +2,7 @@
source: tests/tests/serve.rs
expression: redactions.redacted_yaml(info)
---
projectName: ref_properties
projectName: ref_properties_remove
protocolVersion: 5
rootInstanceId: id-2
serverVersion: "[server-version]"

View file

@ -4,7 +4,9 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)"
---
instances:
id-2:
Children: []
Children:
- id-3
- id-4
ClassName: Folder
Id: id-2
Metadata:
@ -12,5 +14,29 @@ instances:
Name: scripts
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children: []
ClassName: Script
Id: id-3
Metadata:
ignoreUnknownInstances: false
Name: bar
Parent: id-2
Properties:
RunContext:
Enum: 1
Source:
String: "-- Hello, from bar!"
id-4:
Children: []
ClassName: ModuleScript
Id: id-4
Metadata:
ignoreUnknownInstances: false
Name: foo
Parent: id-2
Properties:
Source:
String: "-- Hello, from foo!"
messageCursor: 0
sessionId: id-1

View file

@ -4,13 +4,25 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)"
---
instances:
id-2:
Children: []
Children:
- id-3
ClassName: Folder
Id: id-2
Metadata:
ignoreUnknownInstances: false
Name: scripts
Name: sync_rule_alone
Parent: "00000000000000000000000000000000"
Properties: {}
id-3:
Children: []
ClassName: StringValue
Id: id-3
Metadata:
ignoreUnknownInstances: false
Name: foo
Parent: id-2
Properties:
Value:
String: "Hello, world!"
messageCursor: 0
sessionId: id-1

View file

@ -2,7 +2,7 @@
source: tests/tests/serve.rs
expression: redactions.redacted_yaml(info)
---
projectName: scripts
projectName: sync_rule_alone
protocolVersion: 5
rootInstanceId: id-2
serverVersion: "[server-version]"

View file

@ -0,0 +1,25 @@
---
source: tests/tests/syncback.rs
expression: container.model.json5
---
{
children: [
{
attributes: {
Rojo_Id: "value_1",
Rojo_Ref_Value: "ReplicatedStorage/container/value_1",
},
className: "ObjectValue",
name: "value_1",
},
{
attributes: {
Rojo_Id: "value_1",
Rojo_Ref_Value: "ReplicatedStorage/container/value_2",
},
className: "ObjectValue",
name: "value_2",
},
],
className: "Folder",
}

View file

@ -3,10 +3,10 @@ source: tests/tests/syncback.rs
expression: src/dir_with_meta/init.meta.json5
---
{
className: "Configuration",
properties: {
Tags: [
"This tag on dir_with_meta",
],
},
className: "Configuration",
}

View file

@ -0,0 +1,10 @@
---
source: tests/tests/syncback.rs
expression: src/model_json.model.json5
---
{
className: "StringValue",
properties: {
Value: "This text is model_json",
},
}

View file

@ -0,0 +1,17 @@
---
source: tests/tests/syncback.rs
expression: src/project_json.project.json5
---
{
name: "project_json",
tree: {
$className: "Color3Value",
$properties: {
Value: [
1337,
-1337,
1337,
],
},
},
}

View file

@ -0,0 +1,19 @@
---
source: tests/tests/syncback.rs
expression: nested.project.json5
---
{
name: "Nested",
tree: {
$className: "Configuration",
BoolValue: {
$className: "BoolValue",
$properties: {
Value: true,
},
},
StringValue: {
$path: "string_value.txt",
},
},
}

View file

@ -0,0 +1,15 @@
---
source: tests/tests/syncback.rs
expression: property_mismatch.project.json5
---
{
name: "property_mismatch",
tree: {
$className: "BrickColorValue",
$properties: {
Value: {
BrickColor: 345,
},
},
},
}

View file

@ -0,0 +1,10 @@
---
source: tests/tests/syncback.rs
expression: src/pointer.model.json5
---
{
attributes: {
Rojo_Ref_Value: "ReplicatedStorage/target",
},
className: "ObjectValue",
}

View file

@ -0,0 +1,10 @@
---
source: tests/tests/syncback.rs
expression: src/target.model.json5
---
{
attributes: {
Rojo_Id: "test referent id",
},
className: "Folder",
}

View file

@ -0,0 +1,10 @@
---
source: tests/tests/syncback.rs
expression: src/Pointer_2.model.json5
---
{
attributes: {
Rojo_Ref_Value: "ReplicatedStorage/Target_2",
},
className: "ObjectValue",
}

View file

@ -0,0 +1,10 @@
---
source: tests/tests/syncback.rs
expression: src/Target_2.model.json5
---
{
attributes: {
Rojo_Id: "identical ID",
},
className: "Folder",
}

View file

@ -0,0 +1,16 @@
---
source: tests/tests/syncback.rs
expression: default.project.json5
---
{
name: "respect_old_middleware",
tree: {
$path: "src",
project_node: {
$className: "BoolValue",
$properties: {
Value: true,
},
},
},
}

View file

@ -5,6 +5,6 @@ expression: src/model_json.model.json5
{
className: "StringValue",
properties: {
Value: "This should be a .model.json5 file",
Value: "This should be a .model.json file",
},
}

View file

@ -0,0 +1,20 @@
---
source: tests/tests/syncback.rs
expression: default.project.json5
---
{
$schema: "rojo/project-schema",
name: "schema_roundtrip",
tree: {
$className: "Folder",
src: {
$path: "src",
},
trigger_reserialization: {
$className: "BoolValue",
$properties: {
Value: true,
},
},
},
}

View file

@ -0,0 +1,10 @@
---
source: tests/tests/syncback.rs
expression: src/adjacent.meta.json5
---
{
$schema: "rojo/adjacent-meta",
attributes: {
trigger_reserialization: true,
},
}

View file

@ -0,0 +1,10 @@
---
source: tests/tests/syncback.rs
expression: src/init/init.meta.json5
---
{
$schema: "rojo/init-meta",
attributes: {
trigger_reserialization: true,
},
}

View file

@ -0,0 +1,8 @@
---
source: tests/tests/syncback.rs
expression: src/model.model.json5
---
{
$schema: "rojo/model.json",
className: "BoolValue",
}

View file

@ -0,0 +1,22 @@
---
source: tests/tests/syncback.rs
expression: default.project.json5
---
{
name: "string_value_project",
tree: {
$className: "Folder",
inside_project_file: {
$className: "StringValue",
$properties: {
Value: "imgettingverytiredofwritingthesetests2",
},
},
on_file_system: {
$attributes: {
imgettingverytiredofwritingthesetests: "person299 was ahead of his time",
},
$path: "string_value.txt",
},
},
}

View file

@ -0,0 +1,18 @@
---
source: tests/tests/syncback.rs
expression: default.project.json5
---
{
name: "unscriptable_properties",
syncbackRules: {
syncUnscriptable: true,
},
tree: {
$className: "BinaryStringValue",
$properties: {
Value: {
BinaryString: "Rojo/is/cool",
},
},
},
}