The package.json has a standard engines key. Is there a reason for not supporting this in notion vs creating a new toolchain key?
Hi @ProLoser, early on we discussed using engines. We ultimately decided there were a few issues with doing so, all related to Notion鈥檚 goal of repeatable builds / dev environments:
engines is typically used to represent the versions of node that your package will _work_ with, while toolchain is intended to represent the version that you _develop_ with.
engines in the docs only canonically supports node and npm keys, while we also want to support / track yarn.
The biggest issue, however, is that engines allows you to specify a Semver range specification for each tool. Due to the goal of repeatable builds, the version specified in Notion鈥檚 toolchain key are specific, resolved versions, and ranges aren鈥檛 allowed.
We鈥檙e also investigating (#282) supporting a separate .notionrc file to specify these values (among other configurations) as an option in place of the package.json key.
Ah interesting. I also just realized we worked in the same office together lol. You realize this is Dean, right?
I did :) Figured I鈥檇 answer the question first. How are things at PS? And out of curiosity, how did you hear about Notion?
I don't remember how, but it popped up somewhere during my research. I use fish shell so I've always run into huge problems with n and nvm and all the others. PS is good, I'm assuming you've read the news so yeah that's fun.
I actually hadn鈥檛 until now, but yeah, exciting!
Most helpful comment
Hi @ProLoser, early on we discussed using
engines. We ultimately decided there were a few issues with doing so, all related to Notion鈥檚 goal of repeatable builds / dev environments:enginesis typically used to represent the versions ofnodethat your package will _work_ with, whiletoolchainis intended to represent the version that you _develop_ with.enginesin the docs only canonically supportsnodeandnpmkeys, while we also want to support / trackyarn.The biggest issue, however, is that
enginesallows you to specify a Semver range specification for each tool. Due to the goal of repeatable builds, the version specified in Notion鈥檚toolchainkey are specific, resolved versions, and ranges aren鈥檛 allowed.We鈥檙e also investigating (#282) supporting a separate
.notionrcfile to specify these values (among other configurations) as an option in place of thepackage.jsonkey.