Skip to content
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

fix(makeProgram): specify .mjs and .cjs config files are allowed #1976

Merged
merged 2 commits into from Apr 23, 2024

Conversation

wojtekmaj
Copy link
Contributor

Looking at the source code:

svgo/lib/svgo-node.js

Lines 39 to 50 in 2442f74

const js = path.join(dir, 'svgo.config.js');
if (await isFile(js)) {
return await importConfig(js);
}
const mjs = path.join(dir, 'svgo.config.mjs');
if (await isFile(mjs)) {
return await importConfig(mjs);
}
const cjs = path.join(dir, 'svgo.config.cjs');
if (await isFile(cjs)) {
return await importConfig(cjs);
}

it looks to me like not only .js, but also .mjs, and .cjs extensions are allowed in config files. This PR aligns the help text with the actual behavior.

Copy link
Member

@SethFalco SethFalco left a comment

Choose a reason for hiding this comment

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

Good catch! Had a nitpick, but if we can just update the wording, I'd be happy to merge this.

lib/svgo/coa.js Outdated Show resolved Hide resolved
Co-authored-by: Seth Falco <seth@falco.fun>
Copy link
Member

@SethFalco SethFalco left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks again! 👍🏽

@SethFalco SethFalco merged commit 888d078 into svg:main Apr 23, 2024
8 checks passed
@wojtekmaj wojtekmaj deleted the fix-docs branch April 23, 2024 11:44
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.

None yet

2 participants