-
Notifications
You must be signed in to change notification settings - Fork 2
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
0.5.6 #4
Comments
I will investigate now. Thet latest mixme release of today didn't change the JS part, it introduces TypeScript definitions which were non-existant before. If I have one recommendation, start by using const fs = require('fs/promises');
const {stringify} = require('csv-stringify/sync');
// Sample data - two columns, three rows:
const data = [
{code: 'CA', name: 'California'},
{code: 'TX', name: 'Texas'},
{code: 'NY', name: 'New York'},
];
// If you use "await", code must be inside an asynchronous function:
(async () => {
const csv = stringify(data);
// Save to file:
await fs.writeFile('./test.csv', csv);
// Return the CSV file as string:
console.log(csv);
})(); It consumes the same amount of memory, the CSV-related code is cleaner, it uses standard Node.js to write the file, it is the same code being executed, and, from a CSV standpoint, using promise is a non-sense in this use-case. |
Thanks for taking a look! I do think this is a bit cleaner, thanks for taking the time to send some example code :) We use it in quite a few places right now, and are trying to get a release out today. Would it be possible to delete version 0.5.6 while you investigate? Thanks again (and thank you for creating and maintaining a useful package, even if the transitive dependency we use it for is actually useless :) ) |
Could you try version 0.5.9 and confirm it fixes the issue. I certainly fix something related with TS but the error I encountered was not the same as yours. |
we were running into the same issue, and the new version seems to be working fine for us! |
Excellent news |
@johnmanagexr @hymanallan could you confirm and close the issue ? |
Describe the bug
The latest version leads to "Cannot find module 'mixme' from specific imports"
To Reproduce
In a TypeScript file, import another package that transitively depends on mixme. We use ObjectsToCSV. Then try and build (or in our case, run a test).
In our case, it is simply
import ObjectsToCsv from 'objects-to-csv';
Additional context
This started today, and is reproducible with npm i but not npm ci. Given the timing of the latest release of mixme, I highly suspect the issue is with releasing version 0.5.6 and transitive dependencies not pinning versions.
A rollback of this version would be much appreciated, or releasing this as 0.6 may also help (but relies on transitive package management to not allow minor version increases).
The text was updated successfully, but these errors were encountered: