vanus-labs / vanus

Vanus is a Serverless, event streaming system with processing capabilities. It easily connects SaaS, Cloud Services, and Databases to help users build next-gen Event-driven Applications.
https://vanus.ai
Apache License 2.0
2.28k stars 112 forks source link

fix: json template render bad empty array and empty object #644

Closed ifplusor closed 11 months ago

ifplusor commented 11 months ago

What problem does this PR solve?

JSON template renders bad empty array and empty object

Problem Summary

What has changed and how does it work?

Check List

Tests

codecov[bot] commented 11 months ago

Codecov Report

Merging #644 (b8dfc8d) into main (ee76217) will decrease coverage by 5.74%. Report is 106 commits behind head on main. The diff coverage is 3.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #644      +/-   ##
==========================================
- Coverage   57.07%   51.33%   -5.74%     
==========================================
  Files         190      260      +70     
  Lines       15191    19566    +4375     
==========================================
+ Hits         8670    10045    +1375     
- Misses       5884     8703    +2819     
- Partials      637      818     +181     
Flag Coverage Δ
unittests 51.33% <3.63%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
api/errors/app.go 30.90% <ø> (ø)
lib/bytes/clone_go119.go 0.00% <ø> (ø)
lib/bytes/escape.go 54.46% <ø> (ø)
lib/bytes/io.go 0.00% <ø> (ø)
lib/bytes/parse.go 7.14% <ø> (ø)
lib/bytes/unsafe.go 100.00% <ø> (ø)
lib/bytes/utf8.go 11.11% <ø> (ø)
lib/json/path/parse.go 49.41% <ø> (ø)
lib/json/path/path.go 0.00% <ø> (ø)
lib/json/path/segment.go 0.00% <ø> (ø)
... and 31 more

... and 393 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3267c49...b8dfc8d. Read the comment docs.