Skip to content

Conversation

DuckThom
Copy link

@DuckThom DuckThom commented Feb 1, 2024

No description provided.

@@ -254,7 +254,7 @@ public function testShouldIgnoreDefaultOutputPathFromConfigIfTargetArgumentExist
* */
public function testShouldTemplateMessagesHasHandlebars()
{
$template = "$this->rootPath/src/Mariuzzo/LaravelJsLocalization/Generators/Templates/messages.js";
$template = "$this->rootPath/src/Mariuzzo/LaravelJsLocalization/Generators/Templates/messages.cjs";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a separate test performed for the .mjs file, leaving the previous unchanged

Comment on lines +77 to +81
if ($options['module']) {
$template = $this->file->get(__DIR__.'/Templates/messages.mjs');
} else {
$template = $this->file->get(__DIR__.'/Templates/messages.cjs');
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change as it changes the default file name extension from .js to .cjs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the extension back to .js for when the option is not set to maintain compatibility. Otherwise this should be scheduled to major version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants