You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm i -D @sveltejs/adapter-cloudflare-workers@next and add import cloudflare from '@sveltejs/adapter-cloudflare-workers'; and adapter: cloudflare(), to svelte.config.js
Severity
Annoying but not a show-stopper presently because I can use an alternate syntax:
[build.upload]
format = "service-worker"
Additional context
The problem is caused by using the stale toml package which hasn't been updated in 2 years and is still back at the 0.4.0 TOML spec. I propose opening a PR to switch to using https://www.npmjs.com/package/@iarna/toml or some other Javascript package (see https://github.com/toml-lang/toml/wiki) which is up to date with the latest TOML spec as done by others to parse the wrangler.toml properly when using TOML syntax introduced after 0.4.0. Can I open a PR?
Someone proposed support for TOML 0.5.0 to the stale toml package, but no dice as the package maintainer is no longer responding: BinaryMuse/toml-node#50
The text was updated successfully, but these errors were encountered:
jacob-8
changed the title
Change TOML parser to an active project that supports the latest TOML syntax
Change TOML parser to an active project that supports the latest TOML syntax [adapter-cloudflare-workers]
May 19, 2021
jacob-8
changed the title
Change TOML parser to an active project that supports the latest TOML syntax [adapter-cloudflare-workers]
Change TOML parser to an active project that supports the latest TOML syntax
May 20, 2021
Describe the bug
I upgraded to the most recent wrangler version and expected adding upload.format = "service-worker" to the wrangler.toml (for adapter-cloudflare-workers) file to just work as described in https://developers.cloudflare.com/workers/cli-wrangler/configuration#service-workers but when the adapter (https://github.com/sveltejs/kit/blob/master/packages/adapter-cloudflare-workers/index.js#L61) parses it with the toml package it throws:
Error parsing wrangler.toml: Expected "=", [ \t] or [A-Za-z0-9_\-] but "." found.
To Reproduce
npm init svelte@next
andnpm i
npm i -D @sveltejs/adapter-cloudflare-workers@next
and addimport cloudflare from '@sveltejs/adapter-cloudflare-workers';
andadapter: cloudflare(),
to svelte.config.jswrangler init
(assumes you've installed wrangler globally)or any other wrangler instruction using the . syntax.
npm run build
<-- Bug throws hereExpected behavior
I expected the build to complete successfully and for me to be able to then publish the built site using
wrangler publish
.Information about your SvelteKit Installation:
Severity
Annoying but not a show-stopper presently because I can use an alternate syntax:
Additional context
The problem is caused by using the stale toml package which hasn't been updated in 2 years and is still back at the 0.4.0 TOML spec. I propose opening a PR to switch to using https://www.npmjs.com/package/@iarna/toml or some other Javascript package (see https://github.com/toml-lang/toml/wiki) which is up to date with the latest TOML spec as done by others to parse the wrangler.toml properly when using TOML syntax introduced after 0.4.0. Can I open a PR?
Someone proposed support for TOML 0.5.0 to the stale toml package, but no dice as the package maintainer is no longer responding: BinaryMuse/toml-node#50
The text was updated successfully, but these errors were encountered: