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
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.
I found out you where using fast-xml-parser in your test but not in the lib.
This lib is compatible with all env and requires a minimum number of changes.
I made the change and it also reduced the bundle size:
The test passed:
I found only one change during my test: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> header is never present with the new lib.
But it seems it passed your test.
It should be double checked to be sure it's working without the header.
If it's required, i can update the code
Last require change: mime-types to mime package
For that one, I honestly didn't want to change it since the change to the original repo was minimal: riderx/mime-types@fdb301e
PR here: jshttp/mime-types#120
But the package creator is against that change, since express is still supporting node 0.10: jshttp/mime-types#115
I made the change he suggested, and put mime package.
That led me to make the big change you see in the last commit.
I had to switch to type module and then the build script was totally broken.
The easy way was, for me, to use a more modern builder.
I hope this will not become too big of a change.
It would be awesome to prioritize this to make it work on Cloudflare workers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.jsonthat 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.jsonand 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