From 598f4aa06f8fb2f71ad7715945da07132f1fe495 Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 20 May 2021 18:33:33 +0000 Subject: [PATCH 1/2] switch to @iarna/toml package with more recent TOML language features support --- packages/adapter-cloudflare-workers/index.js | 2 +- packages/adapter-cloudflare-workers/package.json | 2 +- packages/adapter-netlify/index.js | 2 +- packages/adapter-netlify/package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/adapter-cloudflare-workers/index.js b/packages/adapter-cloudflare-workers/index.js index 7fe50ad5f57c..4ed029f6e869 100644 --- a/packages/adapter-cloudflare-workers/index.js +++ b/packages/adapter-cloudflare-workers/index.js @@ -1,7 +1,7 @@ import fs from 'fs'; import { execSync } from 'child_process'; import esbuild from 'esbuild'; -import toml from 'toml'; +import toml from '@iarna/toml'; import { fileURLToPath } from 'url'; export default function () { diff --git a/packages/adapter-cloudflare-workers/package.json b/packages/adapter-cloudflare-workers/package.json index a8272d0f7587..0fac268b0bf8 100644 --- a/packages/adapter-cloudflare-workers/package.json +++ b/packages/adapter-cloudflare-workers/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "esbuild": "^0.11.18", - "toml": "^3.0.0" + "@iarna/toml": "^2.2.5" }, "devDependencies": { "@sveltejs/kit": "workspace:*" diff --git a/packages/adapter-netlify/index.js b/packages/adapter-netlify/index.js index 12c12e16e60f..0a2243b29cb5 100644 --- a/packages/adapter-netlify/index.js +++ b/packages/adapter-netlify/index.js @@ -2,7 +2,7 @@ import { appendFileSync, existsSync, readFileSync, writeFileSync } from 'fs'; import { join } from 'path'; import { fileURLToPath } from 'url'; import esbuild from 'esbuild'; -import toml from 'toml'; +import toml from '@iarna/toml'; export default function () { /** @type {import('@sveltejs/kit').Adapter} */ diff --git a/packages/adapter-netlify/package.json b/packages/adapter-netlify/package.json index 7d2a90c4480a..a37cc56424c4 100644 --- a/packages/adapter-netlify/package.json +++ b/packages/adapter-netlify/package.json @@ -19,7 +19,7 @@ "dependencies": { "@sveltejs/kit": "workspace:*", "esbuild": "^0.11.18", - "toml": "^3.0.0" + "@iarna/toml": "^2.2.5" }, "devDependencies": { "typescript": "^4.2.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d1295d54d0a0..a8184936fa0f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -67,25 +67,25 @@ importers: packages/adapter-cloudflare-workers: specifiers: + '@iarna/toml': ^2.2.5 '@sveltejs/kit': workspace:* esbuild: ^0.11.18 - toml: ^3.0.0 dependencies: + '@iarna/toml': 2.2.5 esbuild: 0.11.18 - toml: 3.0.0 devDependencies: '@sveltejs/kit': link:../kit packages/adapter-netlify: specifiers: + '@iarna/toml': ^2.2.5 '@sveltejs/kit': workspace:* esbuild: ^0.11.18 - toml: ^3.0.0 typescript: ^4.2.4 dependencies: + '@iarna/toml': 2.2.5 '@sveltejs/kit': link:../kit esbuild: 0.11.18 - toml: 3.0.0 devDependencies: typescript: 4.2.4 @@ -497,6 +497,10 @@ packages: resolution: {integrity: sha512-t2WRThg+eLkQNQCtPG2sCCq40lz3xeb7nsL7P8l4+wfSRbdLQXAY5IebMftI2YEZR4MRRhdgrg0p5fi/2yXypA==} dev: false + /@iarna/toml/2.2.5: + resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} + dev: false + /@istanbuljs/schema/0.1.3: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} @@ -3569,10 +3573,6 @@ packages: is-number: 7.0.0 dev: true - /toml/3.0.0: - resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} - dev: false - /totalist/1.1.0: resolution: {integrity: sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==} engines: {node: '>=6'} From ff0a33a6e882377cddbfbbc9db409dd64d503fbb Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 20 May 2021 18:41:09 +0000 Subject: [PATCH 2/2] add changeset --- .changeset/bright-sheep-promise.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/bright-sheep-promise.md diff --git a/.changeset/bright-sheep-promise.md b/.changeset/bright-sheep-promise.md new file mode 100644 index 000000000000..9ae02058ac28 --- /dev/null +++ b/.changeset/bright-sheep-promise.md @@ -0,0 +1,6 @@ +--- +'@sveltejs/adapter-cloudflare-workers': patch +'@sveltejs/adapter-netlify': patch +--- + +change toml parser to support dotted keys and other language features added after the TOML v0.4.0 spec