Skip to content

Commit 9326b64

Browse files
authored
Various Fixes (#53)
1 parent a70a127 commit 9326b64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1016
-1200
lines changed

.github/workflows/amazon-linux-2.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI Tests
2+
on: [push]
3+
jobs:
4+
swift-test:
5+
name: Swift ${{ matrix.swift }} on ${{ matrix.os }}
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
matrix:
9+
os: [ubuntu-latest, macos-latest, windows-latest]
10+
swift: ["6.0.1"]
11+
steps:
12+
- uses: SwiftyLab/setup-swift@latest
13+
with:
14+
swift-version: ${{ matrix.swift }}
15+
- name: Checkout source
16+
uses: actions/checkout@v2
17+
- name: Run tests
18+
run: swift test

.github/workflows/macos.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/ubuntu-bionic.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/ubuntu-focal.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/windows.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1-
## master
1+
## 0.3.0
2+
3+
- Lowercase "z" is now accepted as zero-timezone-offset indicator
4+
- Space is no longer accepted as an escaped character
5+
- Hex/Octal/Binary numbers with no digits surrounding `_` is considered invalid
6+
- Comments or whitespace at start of document no longer causes parsing failure
7+
- TOML with invalid UTF-8 byte sequence will be rejected. Previously these have
8+
been decoded with the replacement character (U-FFFD).
9+
- Local date with a trailing `T` such as `2023-04-16T` is considered invalid.
10+
- Day with value `00` is invalid.
11+
- Allow defining super table after it has been implicitly defined. For example,
12+
one could define `[a.b.c]`, then later `[a]`.
13+
- Using dotted keys to add up to a previously header-defined table is now
14+
invalid. For example, use `[a.b.c]` to create the table, and later have
15+
`b.c =` under `[a]`.
16+
- A standalone carriage return is no longer considered a valid newline
17+
- Inline tables are now immutable
18+
- Mutating array of tables that were implicitly created (e.g. `a = [{}]`) is now
19+
invalid
20+
- Keys with spaces in between segments are now valid
21+
- Multiline strings can now have 1 or two quotes as valid content
22+
- Local date with a comment (`1970-01-01 # some comment`) is now accepted
23+
- Control characters (except taps) in comments are now invalid
24+
- Escaped CLRF character in multiline string is properly handled
225

326
## 0.2.2
427

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test-SwiftPM:
1111
@swift test -Xswiftc -warnings-as-errors
1212

1313
test-docker:
14-
@Scripts/docker.sh TOMLDecoder 'swift test -Xswiftc -warnings-as-errors --enable-test-discovery' 5.5.3 focal
14+
@Scripts/docker.sh TOMLDecoder 'swift test -Xswiftc -warnings-as-errors --enable-test-discovery' 6.0.1 focal
1515

1616
benchmark:
1717
@cd Benchmarks; swift run -c release

Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ let package = Package(
66
name: "TOMLDecoder",
77
platforms: [.iOS(.v9), .tvOS(.v9), .watchOS(.v2), .macOS(.v10_10)],
88
products: [
9+
.executable(name: "compliance", targets: ["compliance"]),
910
.library(
1011
name: "TOMLDecoder",
1112
targets: ["TOMLDecoder"]),
1213
],
1314
targets: [
15+
.target(name: "compliance", dependencies: ["TOMLDecoder"]),
1416
.target(
1517
name: "TOMLDecoder",
1618
dependencies: ["Deserializer"]),

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
# TOMLDecoder
22

3-
||
4-
|-|
5-
|[![Amazon Linux 2](https://github.com/dduan/TOMLDecoder/workflows/Amazon%20Linux%202/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Amazon+Linux+2%22)|
6-
|[![CentOS 7](https://github.com/dduan/TOMLDecoder/workflows/CentOS%207/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22CentOS+7%22)|
7-
|[![macOS](https://github.com/dduan/TOMLDecoder/workflows/macOS/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22macOS%22)|
8-
|[![Ubuntu Bionic](https://github.com/dduan/TOMLDecoder/workflows/Ubuntu%20Bionic/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Ubuntu+Bionic%22)|
9-
|[![Ubuntu Focal](https://github.com/dduan/TOMLDecoder/workflows/Ubuntu%20Focal/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Ubuntu+Focal%22)|
10-
|[![Windows](https://github.com/dduan/TOMLDecoder/workflows/Windows%202019/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Windows%22)|
11-
12-
133
TOML parser for your Swift `Codable`s.
144

155
```swift
@@ -35,7 +25,7 @@ TOMLDecoder has a relatively simple set of APIs. Learn more in the [introduction
3525
#### With [SwiftPM](https://swift.org/package-manager)
3626

3727
```swift
38-
.package(url: "https://github.com/dduan/TOMLDecoder", from: "0.2.2")
28+
.package(url: "https://github.com/dduan/TOMLDecoder", from: "0.3.0")
3929
```
4030

4131
## License

0 commit comments

Comments
 (0)