Commit Graph

73 Commits

Author SHA1 Message Date
Yusuke Tanaka
b0f2088044
docs(csv): more examples for parse and CsvParseStream (#5605)
This commit adds more examples to `parse` function and `CsvParseStream` class to
cover all the provided options.

Also fixes a few other things:

- Replace stale description `ParseError` with the correct `SyntaxError`.
- Fix the default value of `comment` property. The old comment says the default
  value is `#`, but this was wrong.
- Get negative value in `fieldsPerRecord` option working in `parse` as
  documented

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-08-01 21:24:15 -07:00
Yoshiya Hinosawa
dd80d82961
docs(csv): clarify CsvParseStream description (#5613) 2024-08-02 13:07:15 +09:00
Yusuke Tanaka
89770fc76a
fix(csv): show 1-based line and column numbers in error messages (#5604) 2024-08-01 08:07:52 -07:00
Yusuke Tanaka
b85d219148
feat(csv): support fieldsPerRecord in CsvParseStream (#5600)
Although the constructor of `CsvParseStream` accepts `fieldsPerRecord` option
(see https://jsr.io/@std/csv@1.0.0-rc.5/doc/~/CsvParseStreamOptions) that
ensures that every record has the specified (or inferred from the first row)
number of fields, this option has no effect at all in the current
implementation. To fix this issue, this patch implements the `fieldsPerRecord`
logic in `CsvParseStream` together with sufficient amount of test cases.
2024-08-01 03:48:14 -07:00
Yoshiya Hinosawa
577fd9a6e8
docs(csv): clarify parse document (#5597) 2024-08-01 14:36:23 +09:00
Yoshiya Hinosawa
b213d54732
docs(csv): correct thrown error type in fieldsPerRecord field description (#5594) 2024-07-31 20:44:54 +09:00
denobot
fb950fa0f3
chore: release 2024.07.26 (#5554)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2024-07-26 19:45:22 +09:00
Asher Gomez
482d28ac11
chore(csv): remove redundant constructor examples (#5509)
chore(csv): remove constructor examples
2024-07-23 12:05:23 +09:00
denobot
3ee4c4dd43
chore: release 2024.07.19 (#5494)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2024-07-19 20:22:43 +09:00
Tim Reichen
edd21d5ae5
BREAKING(csv): remove ParseError (#5405)
* initial commit

* update

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-07-16 17:35:40 +10:00
denobot
f54eab4355
chore: release 2024.07.12 (#5431)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2024-07-12 19:45:19 +09:00
lionel-rowe
c6af0c6e80
refactor(csv): rename graphemeLength to codePointLength (#5421) 2024-07-12 15:23:13 +09:00
Asher Gomez
ad1dad6ce6
docs(cli,csv,datetime,fmt,fs,http,ini,semver,testing): assert optional properties on types/interfaces have @default tag (#4933)
* docs: assert optional properties on types/interfaces have `@default` tag

* work

* work

* work

* work

* work

* work

* fix

* fix

* Update fs/expand_glob.ts

* cleanups

* cleanups

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-07-11 09:21:37 +00:00
Asher Gomez
41be714d64
BREAKING(csv): throw TypeError in stringify() instead of StringifyError (#5347) 2024-07-10 20:32:59 +10:00
denobot
dc14633394
chore: release 2024.07.09 (#5363)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2024-07-09 15:13:21 +09:00
Tim Reichen
e052dcb8ae
refactor(csv): rename arguments, variables and loop (#5297) 2024-07-04 20:15:24 +09:00
Tim Reichen
ae956512eb
test(csv): add grapheme length test (#5304) 2024-07-04 17:34:22 +09:00
Tim Reichen
c58879e6be
refactor(csv): remove runeCount() function (#5298) 2024-07-04 17:15:48 +10:00
Tim Reichen
73f236d2f2
refactor(csv): throw errors immediately (#5299) 2024-07-04 17:08:57 +10:00
Asher Gomez
d983137bc2
refactor(csv): minor cleanup (#5166)
* refactor(csv): minor cleanup

* x
2024-07-02 12:17:58 +09:00
Asher Gomez
d102a10235
refactor(assert,async,bytes,cli,collections,crypto,csv,data-structures,datetime,dotenv,encoding,expect,fmt,front-matter,fs,html,http,ini,internal,io,json,jsonc,log,media-types,msgpack,net,path,semver,streams,testing,text,toml,ulid,url,uuid,webgpu,yaml): import from @std/assert (#5199)
* refactor: import from `@std/assert`

* update
2024-06-30 08:30:10 +00:00
Asher Gomez
dc3154c948
BREAKING(csv): remove csv from module names (#5172)
* BREAKING(csv): move modules `csv-stringify-stream` to `stringify-stream` and `csv-parse-stream` to `parse-stream`

* fix
2024-06-28 16:07:36 +10:00
Asher Gomez
410053bf68
chore(csv): release csv@1.0.0-rc.1 (#5159) 2024-06-27 16:27:19 +09:00
Yoshiya Hinosawa
f36ac2ba8e
BREAKING(csv): make ReadOptions private (#5169)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-06-27 16:26:41 +09:00
Yoshiya Hinosawa
7bf534f8a9
docs(csv): fix description of ParseResult (#5170) 2024-06-27 16:24:30 +09:00
Asher Gomez
162e000be8
docs(csv): add module docs (#5157) 2024-06-27 15:52:13 +10:00
Yoshiya Hinosawa
cc6e465333
chore: Revert "refactor(csv): minor cleanups (#5158)" (#5163) 2024-06-27 13:46:09 +09:00
Asher Gomez
506439afd6
refactor(csv): minor cleanups (#5158)
* refactor(csv): minor cleanups

* fix
2024-06-27 13:27:13 +09:00
Yoshiya Hinosawa
c8a88593a2
refactor(csv): remove dead code and improve CsvParseStream test (#5153) 2024-06-27 12:48:19 +09:00
Yoshiya Hinosawa
9144a6253c
test(csv): improve CsvStringifyStream test (#5154) 2024-06-27 12:47:27 +09:00
Yoshiya Hinosawa
ba256e3579
refactor(csv): remove dead code and improve tests (#5151) 2024-06-26 19:31:53 +09:00
Yoshiya Hinosawa
2fd7c33676
test(csv): improve stringify testing (#5150) 2024-06-26 19:30:47 +09:00
denobot
0ea4868542
chore: release 2024.06.06 (#4984)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2024-06-06 20:26:57 +09:00
Asher Gomez
3eec370343
refactor(csv): cleanup use of @std/assert (#4976)
* refactor(csv): cleanup use of `@std/assert`

* update graph
2024-06-05 21:55:49 +00:00
denobot
b9374d3715
chore: release 2024.06.03 (#4935)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2024-06-03 15:44:03 +09:00
Asher Gomez
7d46b80cc1
docs(csv): use assertions in example code snippets (#4932)
* docs(csv): use assertions in example code snippets

* fixes
2024-06-03 15:44:18 +10:00
Yoshiya Hinosawa
3db62b0017
docs(csv): improve API docs (#4920)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-06-03 12:32:09 +09:00
denobot
51dc36d563
chore: release 2024.05.22 (#4830)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-05-22 19:57:28 +09:00
Yoshiya Hinosawa
722844250d
docs(csv,encoding,http,json,media-types,uuid): use rfc-editor.org for RFC links (#4777)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-05-20 16:14:09 +09:00
Yoshiya Hinosawa
3155f0050a
chore: switch to JSR-oriented codebase (#4650) 2024-04-29 11:57:30 +09:00
Yoshiya Hinosawa
c93b8a60d9
fix(csv): do not print empty header line when no columns are given in stringify() (#4610) 2024-04-22 14:12:48 +09:00
Yoshiya Hinosawa
78779a9d96
test(csv): fix type error in csv/parse_test.ts (#4609) 2024-04-22 14:06:38 +09:00
Wenceslao Avalos
31018f12b7
fix(csv): remove unused opt parameter (#4598)
Remove unused opt parameter (issue #4545), since the other overloads already handle it.
2024-04-16 21:57:08 +00:00
Asher Gomez
46d9fa594c
chore: update browser-compatible files with declaration (#4560) 2024-04-10 12:43:44 +10:00
Gabriele Belluardo
2990aa6de5
chore: enable single-var-declarator lint rule (#4488) 2024-03-14 22:18:00 +11:00
David Sherret
b72ec0651e
chore: latest verbatim-module-syntax fixes (#4418) 2024-02-29 18:01:26 -05:00
David Sherret
ef6b95f0c7
refactor: make the code work under verbatimModuleSyntax (#4406)
* Start

* Update

* Format

* Revert deno.json change

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-02-27 21:57:25 +00:00
David Luis
ad4abccb66
docs: replace markdown hyperlink syntax with {@link} tag where necessary. (#4253)
docs: replaces markdown hyperlink syntax with `{@link}` tag when necessary.
2024-02-01 09:19:46 +11:00
Asher Gomez
b1aeecfadd
docs(csv): complete documentation (#4163) 2024-01-11 17:02:30 +11:00
Simon Holloway
aec0327c6d
refactor(csv): prepare for noUncheckedIndexedAccess (#4157) 2024-01-11 08:35:50 +11:00