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 improperly configured error showing #136

Merged
merged 3 commits into from
Jan 24, 2023
Merged

Fix improperly configured error showing #136

merged 3 commits into from
Jan 24, 2023

Conversation

Kreeg
Copy link
Member

@Kreeg Kreeg commented Dec 20, 2022

Fixes #82

@Kreeg Kreeg requested a review from XhmikosR December 20, 2022 14:39
@Kreeg Kreeg force-pushed the issue/82 branch 2 times, most recently from a88f62d to 82e206a Compare December 20, 2022 14:43
index.js Outdated
@@ -13,6 +13,7 @@
/** @typedef {import('stream').TransformOptions} TransformOptions */

const { Transform } = require('stream');
const util = require('util');
Copy link
Member Author

Choose a reason for hiding this comment

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

@XhmikosR I'm not sure how to proceed here
'node:utils' available after Node v14

Copy link
Member

Choose a reason for hiding this comment

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

I suggest you just ignore the rule in package.json and we re-enable it after svg-sprite v3.0.0 where we drop support for Node.js < 14

@XhmikosR XhmikosR changed the title Fixed improperly configured error showing. Fix improperly configured error showing Dec 20, 2022
@XhmikosR
Copy link
Member

I assume you tested it, @Kreeg, right? I don't really use gulp or grunt a lot nowadays :)

I can make a new release after this is merged.

@Kreeg
Copy link
Member Author

Kreeg commented Dec 21, 2022

изображение
изображение

I changed svg-sprite package's file to throw errors and it seems to do well
There is some refactoring ahead in the main package. Sometime we throw formatted error like

 error = util.format('SVGSpriter.add: "%s" is not the local part of "%s"', name, file);

Sometimes we rely on winston logger, like

spriter.error('Optimizing "%s" with SVGO failed with error "%s"', shape.name, error);

I think these should be unified

@XhmikosR
Copy link
Member

Your call, but I agree we should be consistent. BTW, if we could replace winston with something smaller that has the same features we currently use that would make more sense.

@Kreeg Kreeg merged commit e487ce4 into main Jan 24, 2023
@Kreeg Kreeg deleted the issue/82 branch January 24, 2023 14:24
@Kreeg
Copy link
Member Author

Kreeg commented Feb 8, 2023

@XhmikosR hello. I think we're ready for new release.

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.

Unable to get proper error
2 participants