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

refactor(encoding/csv): unified dir and move to single-export files #3024

Closed
wants to merge 4 commits into from
Closed

refactor(encoding/csv): unified dir and move to single-export files #3024

wants to merge 4 commits into from

Conversation

timreichen
Copy link
Contributor

@timreichen timreichen commented Dec 20, 2022

ref: #2538

This PR moves all csv related stuff into the same dir.

  • encoding/csv.ts → encoding/csv/mod.ts
  • encoding/test_csv.ts → encoding/csv/mod_test.ts
  • encoding/testdata/*.csv → encoding/csv/testdata/*.csv

splits logic into single export files.

⚠️ https://deno.land/std@$STD_VERSION/encoding/csv.ts is deprecated.

@iuioiua
Copy link
Contributor

iuioiua commented Dec 20, 2022

I don't think the original files with public exports should be deleted. Instead, a deprecation note should be added and the exported functions should come from the new function locations.

This gives devs enough time to migrate.

I did this here for the single-export restructure: https://github.com/denoland/deno_std/blob/7afe49284d0b5357eaf0f5668080cd26f13a1d8b/streams/buffer.ts

@iuioiua
Copy link
Contributor

iuioiua commented Dec 20, 2022

Also, it might be a good idea to also action #2936 at the same time, if possible.

@timreichen timreichen changed the title BREAKING(encoding/csv): unified dir refactor(encoding/csv): unified dir and move to single-export files Dec 20, 2022
@timreichen
Copy link
Contributor Author

@iuioiua good points. I added the re-exports file and split parse and stringify into separate files.

*
* @example
* ```ts
* import { parse } from "https://deno.land/std@$STD_VERSION/encoding/csv/mod.ts";
Copy link
Contributor

Choose a reason for hiding this comment

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

For imports within examples, it might be better to link to the most direct file. For example:

import { parse } from "https://deno.land/std@$STD_VERSION/encoding/csv/parse.ts";

@iuioiua
Copy link
Contributor

iuioiua commented Dec 26, 2022

Related: #2936.

@timreichen
Copy link
Contributor Author

closing in favour of #2936

@timreichen timreichen closed this Jan 28, 2023
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.

2 participants