fix: Deno and cloudflare workers deploy #1265
Open
+726
−2,011
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As I reported here: #1261
There is some issue in Deno and also in Cloudflare workers to deploy.
I used a hack with ESM to deploy, but found out the only problem was the Babel config.
The good part is it's easy to fix, since it's already stated in
package.json
that the min version to use the package is Node.js 16.The
node:
was introduced in Node.js 16.Since then, it also got back ported to Node.js 14 and Node.js 12, but I followed what was set in
package.json
and aligned the test to run only from 16.I also updated the lint step to run on the latest LTS, that is optional I can remove it if required.
Link: who talks about supported version: https://2ality.com/2021/12/node-protocol-imports.html
Node.js doc: https://nodejs.org/api/esm.html#node-imports