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

0.5.6 #4

Open
johnmanagexr opened this issue Mar 16, 2023 · 8 comments
Open

0.5.6 #4

johnmanagexr opened this issue Mar 16, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@johnmanagexr
Copy link

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).

image

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).

@johnmanagexr johnmanagexr added the bug Something isn't working label Mar 16, 2023
@hymanallan
Copy link

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).

image

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).

Same for us too

@pirufio
Copy link

pirufio commented Mar 16, 2023

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).
image
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).

Same for us too

same for us too

@wdavidw
Copy link
Member

wdavidw commented Mar 16, 2023

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 csv-stringify/sync instead of objects-to-csv which is useless. Rewriting the homepage example, which in the end use csv-stringify, leads to:

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.

@johnmanagexr
Copy link
Author

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 :) )

@wdavidw
Copy link
Member

wdavidw commented Mar 16, 2023

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.

@mewelling
Copy link

we were running into the same issue, and the new version seems to be working fine for us!

@wdavidw
Copy link
Member

wdavidw commented Mar 16, 2023

Excellent news

@wdavidw
Copy link
Member

wdavidw commented Mar 17, 2023

@johnmanagexr @hymanallan could you confirm and close the issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants