Update file extensions from .lua to .luau and adjust README for glob ignore tests

- Changed return statements in `init.client.lua` and `init.lua` files to reflect the new .luau extension.
- Updated README in `ignore_glob_spec` to specify that glob ignores now work with .spec.luau files instead of .spec.lua.
- Modified various test files to transition from .json to .json5 format, ensuring consistency across project configurations.
This commit is contained in:
Joe 2026-01-30 09:19:35 -06:00
parent 84f76d48fc
commit f08a4d21e7
6 changed files with 28 additions and 28 deletions

View file

@ -1 +1 @@
return "From folder/init.client.lua" return "From folder/init.client.luau"

View file

@ -1,2 +1,2 @@
# ignore_glob_spec # ignore_glob_spec
Tests that glob ignores work for the original use case: ignoring files in the same project that end in `.spec.lua`. Tests that glob ignores work for the original use case: ignoring files in the same project that end in `.spec.luau`.

View file

@ -1 +1 @@
return "From folder/init.lua" return "From folder/init.luau"

View file

@ -50,7 +50,7 @@ pub struct SourcemapCommand {
/// Where to output the sourcemap. Omit this to use stdout instead of /// Where to output the sourcemap. Omit this to use stdout instead of
/// writing to a file. /// writing to a file.
/// ///
/// Should end in .json. /// Should end in .json5.
#[clap(long, short)] #[clap(long, short)]
pub output: Option<PathBuf>, pub output: Option<PathBuf>,

View file

@ -221,7 +221,7 @@ fn empty_json_model() {
); );
fs::write( fs::write(
session.path().join("src/test.model.json"), session.path().join("src/test.model.json5"),
r#"{"ClassName": "Model"}"#, r#"{"ClassName": "Model"}"#,
) )
.unwrap(); .unwrap();
@ -378,7 +378,7 @@ fn no_name_top_level_project() {
read_response.intern_and_redact(&mut redactions, root_id) read_response.intern_and_redact(&mut redactions, root_id)
); );
let project_path = session.path().join("default.project.json"); let project_path = session.path().join("default.project.json5");
let mut project_contents = fs::read_to_string(&project_path).unwrap(); let mut project_contents = fs::read_to_string(&project_path).unwrap();
project_contents.push('\n'); project_contents.push('\n');
fs::write(&project_path, project_contents).unwrap(); fs::write(&project_path, project_contents).unwrap();
@ -427,7 +427,7 @@ fn ref_properties() {
); );
fs::write( fs::write(
session.path().join("ModelTarget.model.json"), session.path().join("ModelTarget.model.json5"),
r#"{ r#"{
"className": "Folder", "className": "Folder",
"attributes": { "attributes": {
@ -483,7 +483,7 @@ fn ref_properties_remove() {
read_response.intern_and_redact(&mut redactions, root_id) read_response.intern_and_redact(&mut redactions, root_id)
); );
fs::remove_file(session.path().join("src/target.model.json")).unwrap(); fs::remove_file(session.path().join("src/target.model.json5")).unwrap();
let socket_packet = session let socket_packet = session
.get_api_socket_packet(SocketPacketType::Messages, 0) .get_api_socket_packet(SocketPacketType::Messages, 0)
@ -525,7 +525,7 @@ fn ref_properties_patch_update() {
read_response.intern_and_redact(&mut redactions, root_id) read_response.intern_and_redact(&mut redactions, root_id)
); );
let target_path = session.path().join("ModelTarget.model.json"); let target_path = session.path().join("ModelTarget.model.json5");
// Inserting scale just to force the change processor to run // Inserting scale just to force the change processor to run
fs::write( fs::write(
@ -579,7 +579,7 @@ fn model_pivot_migration() {
read_response.intern_and_redact(&mut redactions, root_id) read_response.intern_and_redact(&mut redactions, root_id)
); );
let project_path = session.path().join("default.project.json"); let project_path = session.path().join("default.project.json5");
fs::write( fs::write(
project_path, project_path,
@ -592,7 +592,7 @@ fn model_pivot_migration() {
"$className": "Model" "$className": "Model"
}, },
"Tool": { "Tool": {
"$path": "Tool.model.json" "$path": "Tool.model.json5"
}, },
"Actor": { "Actor": {
"$className": "Actor" "$className": "Actor"

View file

@ -35,8 +35,8 @@ syncback_tests! {
// Ensures that syncback works with CSVs // Ensures that syncback works with CSVs
csv => ["src/csv_init/init.csv", "src/csv.csv"], csv => ["src/csv_init/init.csv", "src/csv.csv"],
// Ensures that if a RojoId is duplicated somewhere in the project, it's // Ensures that if a RojoId is duplicated somewhere in the project, it's
// rewritten rather than synced back as a conflict (preserves existing .json) // rewritten rather than synced back as a conflict
duplicate_rojo_id => ["container.model.json"], duplicate_rojo_id => ["container.model.json5"],
// Ensures that the `ignorePaths` setting works for additions (new files get .json5) // Ensures that the `ignorePaths` setting works for additions (new files get .json5)
ignore_paths_adding => ["src/int_value.model.json5", "src/subfolder/string_value.txt"], ignore_paths_adding => ["src/int_value.model.json5", "src/subfolder/string_value.txt"],
// Ensures that the `ignorePaths` setting works for `init` files // Ensures that the `ignorePaths` setting works for `init` files
@ -47,10 +47,10 @@ syncback_tests! {
ignore_trees_adding => [], ignore_trees_adding => [],
// Ensures that `ignoreTrees` works for removals // Ensures that `ignoreTrees` works for removals
ignore_trees_removing => [], ignore_trees_removing => [],
// Ensures that all of the JSON middlewares are handled as expected (preserves existing .json) // Ensures that all of the JSON middlewares are handled as expected
json_middlewares => ["src/dir_with_meta/init.meta.json", "src/model_json.model.json", "src/project_json.project.json"], json_middlewares => ["src/dir_with_meta/init.meta.json5", "src/model_json.model.json5", "src/project_json.project.json5"],
// Ensures projects that refer to other projects work as expected (preserves existing .json) // Ensures projects that refer to other projects work as expected
nested_projects => ["nested.project.json", "string_value.txt"], nested_projects => ["nested.project.json5", "string_value.txt"],
// Ensures files that are ignored by nested projects are picked up if // Ensures files that are ignored by nested projects are picked up if
// they're included in second project. Unusual but perfectly workable // they're included in second project. Unusual but perfectly workable
// pattern that syncback has to support. // pattern that syncback has to support.
@ -58,32 +58,32 @@ syncback_tests! {
// Ensures that projects respect `init` files when they're directly referenced from a node // Ensures that projects respect `init` files when they're directly referenced from a node
project_init => ["src/init.luau"], project_init => ["src/init.luau"],
// Ensures that projects can be reserialized by syncback and that // Ensures that projects can be reserialized by syncback and that
// default.project.json doesn't change unexpectedly (preserves existing .json) // default.project.json5 doesn't change unexpectedly
project_reserialize => ["attribute_mismatch.luau", "property_mismatch.project.json"], project_reserialize => ["attribute_mismatch.luau", "property_mismatch.project.json5"],
// Confirms that Instances that cannot serialize as directories serialize as rbxms // Confirms that Instances that cannot serialize as directories serialize as rbxms
rbxm_fallback => [], rbxm_fallback => [],
// Ensures that ref properties are linked properly on the file system (preserves existing .json) // Ensures that ref properties are linked properly on the file system
ref_properties => ["src/pointer.model.json", "src/target.model.json"], ref_properties => ["src/pointer.model.json5", "src/target.model.json5"],
// Ensures that ref properties are linked when no attributes are manually // Ensures that ref properties are linked when no attributes are manually
// set in the DataModel (new files get .json5) // set in the DataModel (new files get .json5)
ref_properties_blank => ["src/pointer.model.json5", "src/target.txt"], ref_properties_blank => ["src/pointer.model.json5", "src/target.txt"],
// Ensures that if there is a conflict in RojoRefs, one of them is rewritten (preserves existing .json) // Ensures that if there is a conflict in RojoRefs, one of them is rewritten
ref_properties_conflict => ["src/Pointer_2.model.json", "src/Target_2.model.json"], ref_properties_conflict => ["src/Pointer_2.model.json5", "src/Target_2.model.json5"],
// Ensures that having multiple pointers that are aimed at the same target doesn't trigger ref rewrites. // Ensures that having multiple pointers that are aimed at the same target doesn't trigger ref rewrites.
ref_properties_duplicate => [], ref_properties_duplicate => [],
// Ensures that ref properties that point to nothing after the prune both // Ensures that ref properties that point to nothing after the prune both
// do not leave any trace of themselves (new files get .json5) // do not leave any trace of themselves (new files get .json5)
ref_properties_pruned => ["src/Pointer1.model.json5", "src/Pointer2.model.json5", "src/Pointer3.model.json5"], ref_properties_pruned => ["src/Pointer1.model.json5", "src/Pointer2.model.json5", "src/Pointer3.model.json5"],
// Ensures that the old middleware is respected during syncback // Ensures that the old middleware is respected during syncback
respect_old_middleware => ["default.project.json", "src/model_json.model.json", "src/rbxm.rbxm", "src/rbxmx.rbxmx"], respect_old_middleware => ["default.project.json5", "src/model_json.model.json5", "src/rbxm.rbxm", "src/rbxmx.rbxmx"],
// Ensures that the `$schema` field roundtrips with syncback (preserves existing .json) // Ensures that the `$schema` field roundtrips with syncback
schema_roundtrip => ["default.project.json", "src/model.model.json", "src/init/init.meta.json", "src/adjacent.meta.json"], schema_roundtrip => ["default.project.json5", "src/model.model.json5", "src/init/init.meta.json5", "src/adjacent.meta.json5"],
// Ensures that StringValues inside project files are written to the // Ensures that StringValues inside project files are written to the
// project file, but only if they don't have `$path` set // project file, but only if they don't have `$path` set
string_value_project => ["default.project.json"], string_value_project => ["default.project.json5"],
// Ensures that sync rules are respected. This is really just a test to // Ensures that sync rules are respected. This is really just a test to
// ensure it uses the old path when possible, but we want the coverage. // ensure it uses the old path when possible, but we want the coverage.
sync_rules => ["src/module.modulescript", "src/text.text"], sync_rules => ["src/module.modulescript", "src/text.text"],
// Ensures that the `syncUnscriptable` setting works // Ensures that the `syncUnscriptable` setting works
unscriptable_properties => ["default.project.json"], unscriptable_properties => ["default.project.json5"],
} }