Update toml library from toml-j0.4 to @iarna/toml@2.2.3 (#2547)
This commit is contained in:
@ -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"
|
||||
|
@ -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(
|
||||
|
@ -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';
|
||||
|
Reference in New Issue
Block a user