web-csv-toolbox 0.0.0-next-20231227174357 → 0.0.0-next-20231228093916

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +36 -14
  2. package/package.json +5 -3
package/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  <div align="center">
2
2
 
3
- [![Node.js CI](https://github.com/kamiazya/web-csv-toolbox/actions/workflows/node.js.yaml/badge.svg)](https://github.com/kamiazya/web-csv-toolbox/actions/workflows/node.js.yaml)
4
3
  [![npm version](https://badge.fury.io/js/web-csv-toolbox.svg)](https://badge.fury.io/js/web-csv-toolbox)
5
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
5
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
@@ -38,9 +37,8 @@ A CSV Toolbox utilizing Web Standard APIs.
38
37
  - Using only Web Standards APIs.
39
38
  - 💪 **Property-based testing.**
40
39
  - Using [fast-check](https://fast-check.dev/) and [vitest](https://vitest.dev).
41
- - ✅ **_To Be Tested_** **Cross-platform.**
40
+ - ✅ **Cross-platform.**
42
41
  - Works on browsers, Node.js, and Deno.
43
- - Only web standard APIs are used, so it should work with these runtimes.
44
42
 
45
43
  ## Key Features 📗
46
44
 
@@ -158,6 +156,30 @@ for await (const record of parse(csv, { headers: ['name', 'age'] })) {
158
156
  // { name: 'Bob', age: '69' }
159
157
  ```
160
158
 
159
+ ## Supported Runtimes 💻
160
+
161
+ ### Works on Node.js [![Node.js CI](https://github.com/kamiazya/web-csv-toolbox/actions/workflows/node.js.yaml/badge.svg)](https://github.com/kamiazya/web-csv-toolbox/actions/workflows/node.js.yaml)
162
+
163
+ | Versions | Status |
164
+ | -------- | ------ |
165
+ | 20.x | ✅ |
166
+ | 18.x | ✅ |
167
+
168
+
169
+ ### Works on Browser [![Browsers CI](https://github.com/kamiazya/web-csv-toolbox/actions/workflows/browsers.yaml/badge.svg)](https://github.com/kamiazya/web-csv-toolbox/actions/workflows/browsers.yaml)
170
+
171
+ | OS | Chrome | FireFox | Default |
172
+ | ------- | ------ | ------- | ------------- |
173
+ | Windows | ✅ | ✅ | ✅ (Edge) |
174
+ | macos | ✅ | ✅ | ⬜ (Safari *) |
175
+ | Linux | ✅ | ✅ | - |
176
+
177
+ > **\* To Be Tested**: [I couldn't launch Safari in headless mode](https://github.com/vitest-dev/vitest/blob/main/packages/browser/src/node/providers/webdriver.ts#L39-L41) on GitHub Actions, so I couldn't verify it, but it probably works.
178
+
179
+ ### Others
180
+
181
+ - Verify that JavaScript is executable on the Deno. [![Deno CI](https://github.com/kamiazya/web-csv-toolbox/actions/workflows/deno.yaml/badge.svg)](https://github.com/kamiazya/web-csv-toolbox/actions/workflows/deno.yaml)
182
+
161
183
  ## APIs 🧑‍💻
162
184
 
163
185
  ### High-level APIs 🚀
@@ -204,20 +226,20 @@ ideal for developers looking for in-depth control and flexibility.
204
226
 
205
227
  ### Common Options ⚙️
206
228
 
207
- | Option | Description | Default | Notes |
208
- | -------------- | ------------------------------------- | ----------- | ----- |
209
- | `delimiter` | Character to separate fields | `,` | |
210
- | `quotation` | Character used for quoting fields | `"` | |
211
- | `headers` | Custom headers for the parsed records | First row | If not provided, the first row is used as headers |
229
+ | Option | Description | Default | Notes |
230
+ | ----------- | ------------------------------------- | --------- | ------------------------------------------------- |
231
+ | `delimiter` | Character to separate fields | `,` | |
232
+ | `quotation` | Character used for quoting fields | `"` | |
233
+ | `headers` | Custom headers for the parsed records | First row | If not provided, the first row is used as headers |
212
234
 
213
235
  ### Advanced Options (Binary-Specific) 🧬
214
236
 
215
- | Option | Description | Default | Notes |
216
- | --------------- | ------------------------------------------------- | --------- | ---------------------- |
217
- | `charset` | Character encoding for binary CSV inputs | `utf-8` | See [Encoding API Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API/Encodings) for the encoding formats that can be specified. |
218
- | `decompression` | Decompression algorithm for compressed CSV inputs | | See [DecompressionStream Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream#browser_compatibilit). |
219
- | `ignoreBOM` | Whether to ignore Byte Order Mark (BOM) | `false` | See [TextDecoderOptions.ignoreBOM](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoderStream/ignoreBOM) for more information about the BOM. |
220
- | `fatal` | Throw an error on invalid characters | `false` | See [TextDecoderOptions.fatal](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoderStream/fatal) for more information. |
237
+ | Option | Description | Default | Notes |
238
+ | --------------- | ------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
239
+ | `charset` | Character encoding for binary CSV inputs | `utf-8` | See [Encoding API Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API/Encodings) for the encoding formats that can be specified. |
240
+ | `decompression` | Decompression algorithm for compressed CSV inputs | | See [DecompressionStream Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream#browser_compatibilit). |
241
+ | `ignoreBOM` | Whether to ignore Byte Order Mark (BOM) | `false` | See [TextDecoderOptions.ignoreBOM](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoderStream/ignoreBOM) for more information about the BOM. |
242
+ | `fatal` | Throw an error on invalid characters | `false` | See [TextDecoderOptions.fatal](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoderStream/fatal) for more information. |
221
243
 
222
244
  ## How to Contribute 💪
223
245
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-csv-toolbox",
3
- "version": "0.0.0-next-20231227174357",
3
+ "version": "0.0.0-next-20231228093916",
4
4
  "description": "A CSV Toolbox utilizing Web Standard APIs.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -24,6 +24,7 @@
24
24
  "scripts": {
25
25
  "doc": "typedoc",
26
26
  "test": "vitest",
27
+ "test:browser": "vitest --browser",
27
28
  "format": "biome format . --write",
28
29
  "lint": "biome lint .",
29
30
  "check": "biome check src --apply",
@@ -53,9 +54,9 @@
53
54
  "@changesets/cli": "^2.27.1",
54
55
  "@fast-check/vitest": "^0.0.9",
55
56
  "@rollup/plugin-terser": "^0.4.4",
57
+ "@vitest/browser": "^1.1.0",
56
58
  "changesets-github-release": "^0.1.0",
57
59
  "husky": "^8.0.0",
58
- "jsdom": "^23.0.1",
59
60
  "lint-staged": "^15.2.0",
60
61
  "rollup": "^4.9.1",
61
62
  "rollup-plugin-delete": "^2.0.0",
@@ -64,6 +65,7 @@
64
65
  "typedoc": "^0.25.4",
65
66
  "typedoc-plugin-mdn-links": "^3.1.9",
66
67
  "typescript": "^5.3.2",
67
- "vitest": "^1.1.0"
68
+ "vitest": "^1.1.0",
69
+ "webdriverio": "^8.27.0"
68
70
  }
69
71
  }