Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add option to generate ES module file #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DuckThom wants to merge 1 commit into rmariuzzo:master
base: master
Choose a base branch
Loading
from DuckThom:patch-1

Conversation

Copy link

@DuckThom DuckThom commented Feb 1, 2024

No description provided.

eWings-agency reacted with thumbs up emoji
@@ -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";
Copy link

@Chomiciak Chomiciak Feb 18, 2025

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');
}
Copy link

@Chomiciak Chomiciak Feb 18, 2025

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

Copy link

@Chomiciak Chomiciak Feb 18, 2025

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
Reviewers
1 more reviewer

@Chomiciak Chomiciak Chomiciak requested changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /