-
Notifications
You must be signed in to change notification settings - Fork 621
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
Changed behavior in: std/encoding/csv.ts #1840
Comments
We changed We change the return type of If you don't have time to update the script, please use the pinned version below <= v0.121.0. If you can update the script, please try the script like the below: import {
parse as parseCsv,
} from "https://deno.land/[email protected]/encoding/csv.ts";
const content = (await parseCsv(await Deno.readTextFile("csvTestItems.csv"), {
skipFirstRow: true,
})).map((e: any) => {
return { item: e.Name, quantity: e.Quantity, pricePerItem: `$${e.Price.toLocaleString("en-US")}`, isExpensive: e.Price >= 3000 };
});
console.log(content); |
I will update - thanks for the quick reply! |
The informations about breaking changes are available at the release page of each version, for example, https://github.com/denoland/deno_std/releases/tag/0.122.0 |
I have observed a changed behavior when using deno 1.18.0 and 'https://deno.land/std/encoding/csv.ts':
I'm am not sure if this is a bug or just some type related fallout.
Steps to reproduce
Here is some working code using [email protected]/encoding/csv.ts:
This compiles and runs without problems:
deno run -A --unstable csvTest.ts
If you switch the import statement to the one at the very top in order use the newer csv.ts version:
import { parse as parseCsv } from 'https://deno.land/std/encoding/csv.ts';
you get the following Typescript error:
The text was updated successfully, but these errors were encountered: