-
Notifications
You must be signed in to change notification settings - Fork 42
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
Deno Support #87
Closed
Closed
Deno Support #87
Conversation
This file contains 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
This proves to be too difficult to justify the effort. It seems like socket.io actually ships Deno support now (see socketio/socket.io#3600 (comment)), however, Deno also ships support for npm packages soon. This is still a bit experimental, but with the import CloudConvert from 'npm:cloudconvert'
const cloudConvert = new CloudConvert('api_key');
let job = await cloudConvert.jobs.create({
tasks: {
'import-my-file': {
operation: 'import/url',
url: 'https://my-url'
},
'convert-my-file': {
operation: 'convert',
input: 'import-my-file',
output_format: 'pdf',
some_other_option: 'value'
},
'export-my-file': {
operation: 'export/url',
input: 'convert-my-file'
}
}
}); Hence, I will close this. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Deno Support
This is an attempt to migrate the module to Deno, and to use
dnt
to build a Node module from the code again.So far, this is very much not usable. There are a number of challenges that are hard to solve. If anyone has an idea how to tackle them, please comment below. Until then, this PR will peacefully rot here for a while in draft state.
Pending Tasks
--unstable
to be used, because we have dependencies viaesm.sh
which use the Node compat libs internally. See Deno support #85 for alternatives that could work around this.FormData
without reading them into memory first. A possible workaround would be to implement the multipart/form-data protocol in JS and then upload this stream. But who really wants to do that?dnt
which means that the emitted code requires Node>=16.Further Notes
This PR completely removes all Node config, and migrates to Deno tooling. As a result, this PR has a huge diff. However, most commits are not that interesting actually. The complete diff of code changes can be seen in 3064ff6.
Development works like this:
deno task check
- perform typecheckingdeno task build
- build Node module from Deno codedeno task test && deno task test-integration
- run testsdeno fmt
- format source codedeno lint
lint source codeCloses #85.