Update toml library from toml-j0.4 to @iarna/toml@2.2.3 (#2547)

This commit is contained in:
cetra3
2019-08-28 22:46:11 +00:00
committed by Shawn Erquhart
parent 4c5fe6a606
commit 9cb7cd7214
4 changed files with 17 additions and 7 deletions

View File

@ -59,7 +59,7 @@
"redux-thunk": "^2.3.0",
"sanitize-filename": "^1.6.1",
"semaphore": "^1.0.5",
"toml-j0.4": "^1.1.1",
"@iarna/toml": "2.2.3",
"tomlify-j0.4": "^3.0.0-alpha.0",
"url": "^0.11.0",
"what-input": "^5.1.4"

View File

@ -83,6 +83,16 @@ describe('Frontmatter', () => {
});
});
it('should parse TOML with 0.5 style dates', () => {
expect(
FrontmatterInfer.fromFile('+++\ntitle = "TOML"\ndate = 2018-12-24\n+++\nContent'),
).toEqual({
title: 'TOML',
date: new Date('2018-12-24T00:00:00.000Z'),
body: 'Content',
});
});
it('should parse TOML with +++ delimiters when it is explicitly set as the format without a custom delimiter', () => {
expect(
frontmatterTOML('~~~').fromFile(

View File

@ -1,4 +1,4 @@
import toml from 'toml-j0.4';
import toml from '@iarna/toml';
import tomlify from 'tomlify-j0.4';
import moment from 'moment';
import AssetProxy from 'ValueObjects/AssetProxy';