Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addTemplateFormats no longer takes array as argument in alpha 7+ #3265

Closed
chee opened this issue Apr 25, 2024 · 3 comments
Closed

addTemplateFormats no longer takes array as argument in alpha 7+ #3265

chee opened this issue Apr 25, 2024 · 3 comments
Labels
bug release: canary A release on the canary channel

Comments

@chee
Copy link

chee commented Apr 25, 2024

Operating system

macOS 14.4.1 (23E224)

Eleventy

3.0.0-alpha.6 vs 3.0.0-alpha.7

Describe the bug

addTemplateFormats used to allow an array as the first argument, but now it does not.

Reproduction steps

  1. Add multiple template formats using an array

// in eleventy.config.js
eleventyConfig.addTemplateFormats(["txt", "text"])
  1. try with alpha.6

npm install @11ty/eleventy@3.0.0-alpha.6
npx eleventy
# [11ty] Wrote 0 files in 0.01 seconds (v3.0.0-alpha.6)
  1. try with alpha.7, alpha.8, alpha.9

npm install @11ty/eleventy@3.0.0-alpha.9
npx eleventy                                
# [11ty] entry.trim is not a function (via TypeError)
# [11ty] 
# [11ty] Original error stack trace: TypeError: entry.trim is not a function
# [11ty]     at file:///usr/chee/tmp/eleventytest/node_modules/@11ty/eleventy/src/Util/ProjectTemplateFormats.js:28:40
# [11ty]     at Array.map (<anonymous>)
# [11ty]     at #normalize (file:///usr/chee/tmp/eleventytest/node_modules/@11ty/eleventy/src/Util/ProjectTemplateFormats.js:28:19)
# [11ty]     at ProjectTemplateFormats.addViaConfig (file:///usr/chee/tmp/eleventytest/node_modules/@11ty/eleventy/src/Util/ProjectTemplateFormats.js:101:43)
# [11ty]     at TemplateConfig.mergeConfig (file:///usr/chee/tmp/eleventytest/node_modules/@11ty/eleventy/src/TemplateConfig.js:426:25)
# [11ty]     at async TemplateConfig.init (file:///usr/chee/tmp/eleventytest/node_modules/@11ty/eleventy/src/TemplateConfig.js:186:17)
# [11ty]     at async Eleventy.initializeConfig (file:///usr/chee/tmp/eleventytest/node_modules/@11ty/eleventy/src/Eleventy.js:160:3)

Expected behavior

to be like before

Reproduction URL

No response

Screenshots

No response

@zachleat zachleat added release: canary A release on the canary channel and removed needs-triage labels Apr 25, 2024
@zachleat zachleat added this to the Eleventy 3.0.0 milestone Apr 25, 2024
@zachleat
Copy link
Member

Sorry about that! I’ll get it fixed for the next alpha!

@chee
Copy link
Author

chee commented Apr 25, 2024

yay <3 thank u !!

@zachleat
Copy link
Member

Shipping with 3.0.0-alpha.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug release: canary A release on the canary channel
Projects
None yet
Development

No branches or pull requests

2 participants