smol-toml 1.2.0 → 1.2.2

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.
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
  [![TOML 1.0.0](https://img.shields.io/badge/TOML-1.0.0-9c4221?style=flat-square)](https://toml.io/en/v1.0.0)
3
3
  [![License](https://img.shields.io/github/license/squirrelchat/smol-toml.svg?style=flat-square)](https://github.com/squirrelchat/smol-toml/blob/mistress/LICENSE)
4
4
  [![npm](https://img.shields.io/npm/v/smol-toml?style=flat-square)](https://npm.im/smol-toml)
5
+ [![Build](https://img.shields.io/github/actions/workflow/status/squirrelchat/smol-toml/build.yml?style=flat-square&logo=github)](https://github.com/squirrelchat/smol-toml/actions/workflows/build.yml)
5
6
 
6
7
  A small, fast, and correct TOML parser and serializer. smol-toml is fully(ish) spec-compliant with TOML v1.0.0.
7
8
 
@@ -16,9 +17,15 @@ smol-toml passes most of the tests from the [`toml-test` suite](https://github.c
16
17
  it doesn't pass certain tests, namely:
17
18
  - Invalid UTF-8 strings are not rejected
18
19
  - Certain invalid UTF-8 codepoints are not rejected
20
+ - Certain invalid dates are not rejected
21
+ - For instance, `2023-02-30` would be accepted and parsed as `2023-03-02`. While additional checks could be performed
22
+ to reject these, they've not been added for performance reasons.
19
23
  - smol-toml doesn't preserve type information between integers and floats (in JS, everything is a float)
20
- - smol-toml doesn't support the whole 64-bit range for integers (but does throw an appropriate error)
21
- - As all numbers are floats in JS, the safe range is `2**53 - 1` <=> `-(2**53 - 1)`.
24
+
25
+ You can see a list of all tests smol-toml fails (and the reason why it fails these) in the list of skipped tests in
26
+ `run-toml-test.bash`. Note that some failures are *not* specification violations per-se. For instance, the TOML spec
27
+ does not require 64-bit integer range support or sub-millisecond time precision, but are included in the `toml-test`
28
+ suite. See https://github.com/toml-lang/toml-test/issues/154 and https://github.com/toml-lang/toml-test/issues/155
22
29
 
23
30
  ## Installation
24
31
  ```
package/dist/date.js CHANGED
@@ -52,7 +52,7 @@ class TomlDate extends Date {
52
52
  else {
53
53
  offset = match[3] || null;
54
54
  date = date.toUpperCase();
55
- if (!offset)
55
+ if (!offset && hasTime)
56
56
  date += 'Z';
57
57
  }
58
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smol-toml",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "keywords": [
5
5
  "toml",
6
6
  "parser",
@@ -14,8 +14,7 @@
14
14
  "author": "Cynthia <cyyynthia@borkenware.com>",
15
15
  "license": "BSD-3-Clause",
16
16
  "engines": {
17
- "node": ">= 18",
18
- "pnpm": ">= 9"
17
+ "node": ">= 18"
19
18
  },
20
19
  "scripts": {
21
20
  "build": "tsc",
@@ -34,12 +33,7 @@
34
33
  "typescript": "^5.4.5",
35
34
  "vitest": "^1.6.0"
36
35
  },
37
- "exports": {
38
- ".": {
39
- "types": "./dist/index.d.ts",
40
- "default": "./dist/index.js"
41
- }
42
- },
36
+ "main": "./dist/index.js",
43
37
  "types": "./dist/index.d.ts",
44
38
  "files": [
45
39
  "README.md",