143 Commits

Author SHA1 Message Date
Boris Verkhovskiy
31ca0dfb08 add more type definitions (#374)
* rename github actions file

* type request

* type generators
2022-04-04 05:54:30 -07:00
Boris Verkhovskiy
1864b07750 completely convert to typescript (#373) 2022-03-31 20:37:50 -07:00
Boris Verkhovskiy
7c75a10c26 Reformat code (#372)
* format with prettier

* format pre-commit

* format in ci

* remove standardjs editor config
2022-03-31 20:34:00 -07:00
Boris Verkhovskiy
f29c397882 convert to typescript (#368)
* compile with typescript

* add types

* rename tree-sitter import file

* proofread README.md
2022-03-30 22:56:25 -07:00
Boris Verkhovskiy
9c01335485 build wasm on local npm install (#371)
* make package installable from git

* disable macos tests

because it doesn't find emcc for some reason
2022-03-30 06:35:13 -07:00
Boris Verkhovskiy
4129d6b885 depend on our fork of tree-sitter-bash (#346) 2022-03-19 02:51:47 -07:00
Boris Verkhovskiy
01f2538e59 bump version (#343)
and readme update
2022-03-16 15:08:19 -07:00
Boris Verkhovskiy
dfc8ce1782 add testing utilities and skip comments in input (#282)
* add script for saving output of the tool as test

* add script for comparing the raw request

between python and curl

* update after moving test files

* allow comments in test bash input

* restructure test files

and complete todo about relative path handling in gen-test

* handle comments in input and add node-fetch test

also add check that all generators are tested

* don't include test inputs in github language stats

* fix linter errors, use path for path logic in test

* report skipped languages once

* fix compare-requests by timing out quickly

* make converters in test-utils like cli.js

* report error when tests can't run, remove .DS_Store
2022-03-14 21:33:33 -07:00
Boris Verkhovskiy
883ef3dad3 lint and add CCError (#336)
* update linter

standardJS supports top-level await now

* lint all non-test JS files

* make cli expect Error objects only

* define CCError

* re-enable linter in CI
2022-03-14 17:05:34 -07:00
Boris Verkhovskiy
289aa2a85c Fix bash grammar WASM file (#320) 2021-12-29 02:04:37 -08:00
Борис Верховский
a92143a58f Generate tree-sitter-bash.wasm on npm publish (#310)
instead of keeping it in the git repository. Also, disable Windows in CI.
2021-10-15 12:12:55 -06:00
Борис Верховский
1c39b37ec5 Fix deprecation warning (#309) 2021-10-14 10:02:10 -06:00
Борис Верховский
34c34c3f3e run tests on Windows and macOS (#306)
Node 16 on Windows is disabled because curlconverter fails to build.
2021-10-13 07:30:21 -06:00
Борис Верховский
8251853d45 Update tree-sitter and other deps (#304)
making curlconverter installable on Node.js 16 on macOS
2021-10-11 11:45:53 -06:00
Борис Верховский
8f414fc09f add deleted curl arguments (#280)
from curl's git repo's history
2021-10-02 11:34:20 -06:00
Борис Верховский
a12a753f21 report curl version in command line (#300)
the version of curl that we extracted the arguments from.
2021-09-30 05:50:10 -06:00
Борис Верховский
c124a3efec remove startsWith polyfill (#296) 2021-09-28 04:36:06 -06:00
Борис Верховский
00bc8a9934 default to tree-sitter Node bindings instead of WASM (#294) 2021-09-28 03:43:39 -06:00
Борис Верховский
c43cc423b4 improve command line error reporting (#292)
node adds a useless suggestion to pass --trace-uncaught
2021-09-27 17:24:53 -06:00
Борис Верховский
547816a9f1 use file path relative to package location (#291) 2021-09-24 10:28:19 -06:00
Борис Верховский
5dd3b0abe2 make cli act as a drop-in replacement for curl (#285)
now you can paste a curl command into your shell, change "curl" to "curlconverter" and get a generated program instead of making the request.

You can still pipe a command through stdin and you can optionally pass the desired output language using --language as before. If you try to use -l, the old short option for --language, it'll silently no longer work.
2021-09-24 09:30:53 -06:00
Борис Верховский
2e072117dd Use tree-sitter for bash parsing (#278)
* convert to ES module

* replace yargs with tree-sitter for bash parsing

* fix tests

* request.data is always a string

* don't remove whitespace from -d

* correct arg precedence when determining method

also add a space before the backslash to avoid
an issue in tree-sitter bash grammar

* increment version
2021-09-20 14:56:15 -07:00
Nick Carneiro
d8c131a4e1 3.19.0 2021-03-25 20:31:56 -07:00
Nick Carneiro
5c61f9c6a7 3.18.0 2021-03-19 21:46:09 -07:00
Nick Carneiro
e389d000b2 depend on our own browser compatible yargs 2021-03-19 21:45:53 -07:00
Nick Carneiro
a6fd01354e 3.17.0 2021-03-19 21:38:33 -07:00
Nick Carneiro
8f0cd307e8 3.16.0 2021-03-19 21:36:53 -07:00
Nick Carneiro
35a0b8fd12 depend on our own version of yargs parser 2021-03-19 21:35:47 -07:00
Nick Carneiro
778862d89f 3.15.0 2021-03-19 09:04:18 -07:00
Nick Carneiro
746e335e23 depend on verhovsky fork for ansi c string support 2021-03-19 09:03:59 -07:00
Nick Carneiro
7920c6f0b4 version 3.14.0 2021-03-19 08:21:59 -07:00
Nick Carneiro
860bef658f bump version to 3.13.0 2020-12-26 15:48:17 -08:00
Ido Nava
71abf7f3f5 bump yargs version 2020-12-26 15:46:08 -08:00
Nick Carneiro
79793d8fc2 version bump 3.12.0 2020-11-16 14:20:25 -08:00
Nick Carneiro
98de471c0d 3.11.0 2020-09-25 15:56:55 -07:00
Nick Carneiro
d5957dafd0 3.10.1 2020-08-09 12:04:07 -07:00
Nick Carneiro
c82218686f 3.9.1 2020-08-08 15:00:20 -07:00
Nick Carneiro
31bcf4f43f 3.9.0 2020-08-06 18:51:41 -07:00
Nick Carneiro
01076c87a0 bump version to 3.8.0 2020-08-04 06:58:36 -07:00
Jeff Groom
e81ec36a03 use templating engine for ansible (#235) 2020-07-31 21:20:37 -07:00
Nick Carneiro
41b413682e update version and packages 2020-07-31 16:04:24 -07:00
romadrutskii
054024b7ac fix "URIError: malformed URI sequence" (#233)
* fix "URIError: malformed URI sequence"

* fix one-liner, add test case for python
2020-07-31 07:09:03 -07:00
Nick Carneiro
71325edd47 bump version to 3.6.0 for browser js 2020-06-17 12:46:00 -07:00
Nick Carneiro
929762087e bump version to 3.5.0 2020-05-12 13:00:50 -07:00
Nick Carneiro
0a1d48ca68 bump version to 3.4.0 2020-04-18 21:26:19 -07:00
Nick Carneiro
253355ab68 remove unused dependency on cmd package 2020-04-18 21:26:01 -07:00
Nick Carneiro
b8ead7802d bump version to 3.3.0 2020-04-18 21:21:54 -07:00
Nick Carneiro
ec52a90ddd bump version 2020-03-11 20:08:38 -07:00
Nick Carneiro
393e512aad bump version 3.1.0 2020-03-11 17:33:54 -07:00
Nick Carneiro
9a900f8443 major version bump because we're going for node 12+ 2020-03-08 18:33:34 -07:00