Commit Graph

36 Commits

Author SHA1 Message Date
Kenta Moriuchi
4d4bd0eb92
refactor(archive,async,cli,csv,dotenv,encoding,expect,fmt,front-matter,fs,http,internal,log,net,path,semver,testing,text,webgpu,yaml): enable "exactOptionalPropertyTypes" option (#5892) 2024-09-04 14:15:01 +09:00
Ian Bull
9a8b3a5d4e
refactor(csv): align additional error messages (#5796)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-08-26 14:11:55 +09:00
Yusuke Tanaka
8b21698495
fix(csv): remove undefined from possible value type of parse result (#5617)
As we discussed in
https://github.com/denoland/std/pull/5605#discussion_r1701028684, it seems like
we never get `undefined` as a parse result of fields. If there is a mismatch in
the number of fields across rows, the parse just throws an error. To better
reflect this in typing, this commit removes `undefined` from the record value
type.
2024-08-01 22:07:10 -07:00
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
Yusuke Tanaka
89770fc76a
fix(csv): show 1-based line and column numbers in error messages (#5604) 2024-08-01 08:07:52 -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
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
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
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
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
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
ba256e3579
refactor(csv): remove dead code and improve tests (#5151) 2024-06-26 19:31:53 +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
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
Yoshiya Hinosawa
3155f0050a
chore: switch to JSR-oriented codebase (#4650) 2024-04-29 11:57:30 +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
David Sherret
b72ec0651e
chore: latest verbatim-module-syntax fixes (#4418) 2024-02-29 18:01:26 -05:00
Asher Gomez
b1aeecfadd
docs(csv): complete documentation (#4163) 2024-01-11 17:02:30 +11:00
Lino Le Van
c46143f0ac
chore: update copyright year (#4046)
* chore: update copyright year

* fix

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-01-02 08:11:32 +11:00
David Sherret
b0803619af
refactor: add some missing explicit types (#3997)
* refactor: add some missing return types and mark some non-exported types as `@internal`

* Update expect/fn.ts

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>

* Remove @internals

* nits

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-12-19 00:26:13 +00:00
Asher Gomez
89d9442c14
BREAKING: remove deprecated std/csv exports (#3704) 2023-10-22 10:47:43 +09:00
Yoshiya Hinosawa
b631267edb
BREAKING(csv): deprecate error message exports (#3602) 2023-09-03 10:21:36 +09:00
Lino Le Van
2b5d71224f
refactor: cleanup usage of double equals (#3566)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-08-25 18:04:43 +09:00
Asher Gomez
239e85ad6a
BREAKING(testing, assert): move std/testing/asserts to std/assert (#3445) 2023-07-13 16:04:30 +09:00
Martin Fischer
a5b1d80736
chore: fix typos (#3458)
The typos were found with the typos[1] spell checker.  That spell
checker will be incorporated into the CI in a followup PR.

[1]: https://github.com/crate-ci/typos
2023-06-22 01:27:37 +09:00
ayame113
076516e8de
fix(csv): improve typing for CSV parser (#3267) 2023-04-04 13:53:16 +09:00
Asher Gomez
cf14c9b212
chore(tools): improved web-compatibility checks (#3263) 2023-03-18 21:36:00 +09:00
Asher Gomez
a5fffc5fb0
BREAKING(csv): move encoding/csv to own top-level folder and towards single-export files (#3228) 2023-03-13 14:56:25 +09:00