Commit Graph
8 Commits
Author SHA1 Message Date
Muh Muhten 450ade4818 Add import metadata key "optional"
A library marked is imported if found, but silently skipped if missing.
This is the desired semantic for the auto-include at ~/.jq
2019-02-20 19:16:18 -06:00
Muh Muhten 4f4494c770 Catch .. as the first component of a module path
Only the second and subsequent path components were being checked, which
I guess is theoretically security-relevant.

There's no apparent point to reconstructing the path after splitting it
by adding /s back in, either.
2019-02-20 19:16:18 -06:00
Muh Muhten ff014824bc Pass on the error message when rel_path is invalid
"Module path must be a string" is not a useful error message when the
reason the module path isn't a string is because the string it was got
replaced with an invalid with an error message for some other reason.

Also fixes a few memory leaks on early exits.
2019-02-20 19:16:18 -06:00
Muh Muhten 12a628abdc Fix include/import namespace confusion 2019-01-30 09:47:24 -06:00
Nicolas Williams b5560d8420 Fix import as $data linking 2017-12-10 23:09:35 -06:00
Nicolas Williams 0bd7614bd5 Always use jv_mem_*alloc() 2017-04-21 18:41:06 -05:00
Nicolas Williams ec07936888 Fix Windows build (fix #911) 2016-01-16 16:51:01 -06:00
David Tolnay 0c93eb3379 Move source files to src/ 2015-08-23 20:36:11 -07:00