Update toml library from toml-j0.4 to @iarna/toml@2.2.3 (#2547)
This commit is contained in:
parent
4c5fe6a606
commit
9cb7cd7214
@ -59,7 +59,7 @@
|
|||||||
"redux-thunk": "^2.3.0",
|
"redux-thunk": "^2.3.0",
|
||||||
"sanitize-filename": "^1.6.1",
|
"sanitize-filename": "^1.6.1",
|
||||||
"semaphore": "^1.0.5",
|
"semaphore": "^1.0.5",
|
||||||
"toml-j0.4": "^1.1.1",
|
"@iarna/toml": "2.2.3",
|
||||||
"tomlify-j0.4": "^3.0.0-alpha.0",
|
"tomlify-j0.4": "^3.0.0-alpha.0",
|
||||||
"url": "^0.11.0",
|
"url": "^0.11.0",
|
||||||
"what-input": "^5.1.4"
|
"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', () => {
|
it('should parse TOML with +++ delimiters when it is explicitly set as the format without a custom delimiter', () => {
|
||||||
expect(
|
expect(
|
||||||
frontmatterTOML('~~~').fromFile(
|
frontmatterTOML('~~~').fromFile(
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import toml from 'toml-j0.4';
|
import toml from '@iarna/toml';
|
||||||
import tomlify from 'tomlify-j0.4';
|
import tomlify from 'tomlify-j0.4';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import AssetProxy from 'ValueObjects/AssetProxy';
|
import AssetProxy from 'ValueObjects/AssetProxy';
|
||||||
|
10
yarn.lock
10
yarn.lock
@ -981,6 +981,11 @@
|
|||||||
unique-filename "^1.1.1"
|
unique-filename "^1.1.1"
|
||||||
which "^1.3.1"
|
which "^1.3.1"
|
||||||
|
|
||||||
|
"@iarna/toml@2.2.3":
|
||||||
|
version "2.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.3.tgz#f060bf6eaafae4d56a7dac618980838b0696e2ab"
|
||||||
|
integrity sha512-FmuxfCuolpLl0AnQ2NHSzoUKWEJDFl63qXjzdoWBVyFCXzMGm1spBzk7LeHNoVCiWCF7mRVms9e6jEV9+MoPbg==
|
||||||
|
|
||||||
"@jest/console@^24.7.1":
|
"@jest/console@^24.7.1":
|
||||||
version "24.7.1"
|
version "24.7.1"
|
||||||
resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.7.1.tgz#32a9e42535a97aedfe037e725bd67e954b459545"
|
resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.7.1.tgz#32a9e42535a97aedfe037e725bd67e954b459545"
|
||||||
@ -12205,11 +12210,6 @@ toidentifier@1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
|
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
|
||||||
integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
|
integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
|
||||||
|
|
||||||
toml-j0.4@^1.1.1:
|
|
||||||
version "1.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/toml-j0.4/-/toml-j0.4-1.1.1.tgz#eb0c70348609a0263bb1d6e4a3dd191dcca60866"
|
|
||||||
integrity sha512-lYK5otg0+cto8YmsWcPEfeiTiC/VU6P6HA6ooaYI9K/KYT24Jg0BrYtRZK1K3cwakSMyh6nttfJL9RmQH0gyCg==
|
|
||||||
|
|
||||||
tomlify-j0.4@^3.0.0-alpha.0:
|
tomlify-j0.4@^3.0.0-alpha.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/tomlify-j0.4/-/tomlify-j0.4-3.0.0.tgz#99414d45268c3a3b8bf38be82145b7bba34b7473"
|
resolved "https://registry.yarnpkg.com/tomlify-j0.4/-/tomlify-j0.4-3.0.0.tgz#99414d45268c3a3b8bf38be82145b7bba34b7473"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user