Commit Graph

526 Commits

Author SHA1 Message Date
John Bartholomew
7c36700ad7 reformat setup.py 2025-02-22 20:32:24 +00:00
John Bartholomew
3c92d79e96 ci: python cibuildwheel updates for go-jsonnet
- Checkout with submodules, otherwise the sdist won't include libjsonnet.h
- Install golang in the cibuildwheel build container.
- Skip musllinux build; it's not working for me.
- Skip Windows platform builds; they're not working for me.

It would be nice to get the other platforms working but I have already
spent hours on this and haven't succeeded yet. Previous go-jsonnet
releases on PyPI didn't have prebuilt wheel packages anyway, so it's
still strictly better to have some rather than none even if not all
platforms are covered.
2025-02-22 20:32:22 +00:00
John Bartholomew
e9ee116a7a tests: fix python compat test to allow pre-release versions 2025-02-22 17:57:53 +00:00
John Bartholomew
579361c1b5 ci: update versions of referenced github actions in ci.yml 2025-02-22 17:41:22 +00:00
John Bartholomew
e04e807f4e ci: run build-and-test on pushes to prepare-release branch 2025-02-22 17:32:12 +00:00
John Bartholomew
6f82698b7d ci: copy the publish-python.yml workflow from C++ jsonnet 2025-02-22 17:30:56 +00:00
John Bartholomew
63ffeb8875 ci: configure goreleaser to create draft GitHub releases 2025-02-22 17:30:56 +00:00
John Bartholomew
90261f34cf ci: trigger release workflow manually 2025-02-22 17:30:56 +00:00
John Bartholomew
40f0aa57e2 ci: update release workflow action references 2025-02-22 17:30:56 +00:00
John Bartholomew
6fa97cc3dc chore: update golang.org/x/crypto to v0.33.0 2025-02-21 16:32:36 +00:00
John Bartholomew
923f51b8e3 switch to go mod based goveralls in CI 2025-01-20 21:45:24 +00:00
John Bartholomew
9e1e952016 port some Python wrapper code fixes from C++ jsonnet
See commits on the C++ repo:

- 913281d203
- 842d31eefd
2025-01-20 21:45:24 +00:00
John Bartholomew
e1304d1698 update cppjsonnet and depend on a specific commit of jsonnet
This changes the bazel module dependencies so that the C++ jsonnet
repo dependency (which is actually used as the source for the
standard library and nothing else in the Bazel build) comes from
a specific commit of the jsonnet repo, rather than depending on
the 'published' jsonnet 0.20.0.

The two repos are tightly coupled anyway so I think this more
accurately reflects the situation. Particularly since the C++ repo
is also linked (at a specific commit) as a git submodule, which
is used for non-Bazel build and testing.
2025-01-20 21:45:24 +00:00
John Bartholomew
64c3804248 update Bazel rules with gazelle and manually 2025-01-20 21:45:24 +00:00
John Bartholomew
86cd73aec9 remove unmaintained travis config
As far as I'm aware we use GitHub Actions for our CI needs now.
2025-01-20 21:45:24 +00:00
John Bartholomew
156aa1d156 remove outdated .tool-versions config
It was added in Jan 2020 and apparently has never been updated since
then. It refers to Bazel 1.2.1 which is long out of date (Bazel 5 is
the oldest still maintained version, and Bazel 8 is the current
active version).
2025-01-20 21:45:24 +00:00
Tim Vergenz
e6f64e89f1
feat: add |||- chomped text block syntax (#773)
Resolves google/jsonnet#289

Companion PR to google/jsonnet#1175
2025-01-20 21:45:15 +00:00
John Bartholomew
a45dd8a8f4 chore: run GitHub CI action on more pull request activity
This corresponds to a similar commit on the C++ jsonnet repo:
a02a615def

The is intended to make it easier for me to trigger running CI on
existing pull requests.
2025-01-19 22:06:27 +00:00
John Bartholomew
74c8d09d4a feat: update cpp-jsonnet and stdlib to latest (unreleased)
This includes the stdlib additions in
https://github.com/google/jsonnet/pull/1187

Also updates golden files for go-jsonnet tests; the changes
to the goldens are mostly changes to error locations from
the standard library.
2025-01-18 17:12:28 +00:00
John Bartholomew
b3fed3ba12 feat: add builtin atan2 and hypot functions 2025-01-18 17:05:14 +00:00
Dominik Süß
2b4d7535f5
fix: use debugValueToString for debugger operations (#759)
The `valueToString` operation introduced by #742 is incompatible with the way
the implementation from #739 as it tries to manifest an object from stack while
the implementation needed by the debugger returns the value as-is without
further evaluation.
2024-06-11 14:40:04 +01:00
Stanisław Barzowski
214a61790a
Update Go versions in CI. (#758)
Drop support for Go < 1.20.
2024-06-10 21:42:18 +01:00
Thomas Neidhart
e0c6a9ed6f
Fix linter: using a local in an assertion. (#723) 2024-06-10 21:28:17 +01:00
guoguangwu
04f3751f08
chore: remove refs to deprecated io/ioutil (#716) 2024-06-10 21:27:07 +01:00
Brad Ison
3d9a2bfbd0
Add optional parameters to manifestYamlStream in linter (#732) 2024-06-10 21:26:36 +01:00
Marko Mikulicic
94a40b2991
Fix field visibility in objectHas for extended objects (#737) 2024-06-10 21:26:12 +01:00
dependabot[bot]
c159b34cd2
chore(deps): bump golang.org/x/crypto from 0.9.0 to 0.17.0 (#738)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.9.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.9.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 21:25:20 +01:00
itchyny
4863a88228
chore: fix CI to follow the deprecation of goreleaser flags (#755)
* chore: fix CI to follow the deprecation of goreleaser flags

* chore: fix goreleaser config file to follow deprecation notice
2024-06-10 21:25:04 +01:00
itchyny
463509825c
chore: update rules_go and gazelle version to fix bazel build (#756)
* chore: update rules_go and gazelle version to fix bazel build

* chore: fix source file list in ast directory (ref: #746)

* chore: fix dependency list in formatter directory
2024-06-10 21:24:27 +01:00
itchyny
02bcb686b7
chore: fix compilation error of valueToString in debugger.go (#754) 2024-06-10 11:07:28 +01:00
Johannes Gräger
dec1aa2be3
feat: Go implementation for manifestYamlDoc and escapeStringJson (#742)
* Builtins for escapeStringJson and manifestYamlDoc

* Benchmark and tests
2024-06-09 19:27:15 +01:00
itchyny
fa70aa4711
feat: implement std.splitLimitR (#745) 2024-06-09 19:25:22 +01:00
itchyny
e544339880
Remove dependency on gen to generate sets (#746) 2024-06-09 19:24:41 +01:00
Aidan Rowe
5d760fb622
bump cpp_jsonnet dependency to align with v0.20.0 release (#748) 2024-06-09 19:22:09 +01:00
Shunsuke Suzuki
4324105af7
fix: fix conversion from int to float64 (#753)
* fix: fix conversion from int to float64

* fix: fix a compile error

```
cannot convert v (variable of type interface{}) to type float64: need type assertion
```
2024-06-09 15:42:32 +01:00
Thomas Neidhart
c8d95b9a6f
Gracefully handle encountered regular expression when running jsonnetfmt (#724)
* Gracefully handle encountered regular expression when running jsonnetfmt, adding tests.

* Do not validate verbatim strings.

* Also do not validate string blocks.

* Change golden prefix for formatter tests to fmt.golden to be consistant with cpp version.
2024-06-09 15:32:29 +01:00
Dominik Süß
6838b0a0b8
feat: add debugger support (#739) 2024-06-09 15:09:24 +01:00
zephyros-dev
fed90cd9cd
fix: add std.objectKeysValues to jsonnet-lint (#706) 2023-06-26 20:40:39 +01:00
Charles Korn
7b9f5fd4b4
Expose "unparse", FormatNode and RawAST (#710)
* Export FormatNode so external users can pretty print an AST

Signed-off-by: Tom Wilkie <tom@grafana.com>

* Expose RawAST function.

Signed-off-by: Tom Wilkie <tom@grafana.com>

* Add comment

Signed-off-by: Tom Wilkie <tom@grafana.com>

---------

Signed-off-by: Tom Wilkie <tom@grafana.com>
Co-authored-by: Tom Wilkie <tom@grafana.com>
2023-06-14 19:56:49 +01:00
Sean Gillespie
9639773cf0
Teach jsonnet-lint about optional parameters of std.manifestYamlDoc (#705)
manifestYamlDoc takes two optional parameters, `indent_array_in_object` and `quote_keys`. This commit teaches jsonnet-lint about them so that it doesn't raise errors when you use them.

There are other stdlib library functions with this problem; the true solution is probably to auto-generate this from the stdlib AST, but this at least gets the linter happy with this particular function.
2023-06-13 21:18:35 +01:00
Tareq Al-Maamari
16a10df1a7
chore: bump go to 1.20 (#707)
This will also resolve few vulnerabilities.
2023-06-13 21:17:47 +01:00
take
b7d09417d8
Remove .DS_Store (#703) 2023-06-13 21:13:31 +01:00
Jayme Bird
5fb0b0b578
feat: add std reverse linter (#709)
* feat: add std.reverse to linter

* feat: add linter test case

* feat: fix linter golden test data
2023-06-13 20:15:23 +01:00
Rohit Jangid
2a7260d60c
feat: Add more math functions (#702)
Co-authored-by: Dave Cunningham <sparkprime@gmail.com>
2023-06-13 20:14:26 +01:00
Deep Goel
572c054137
feat: implement std.avg (#700)
* feat: implement std.avg
2023-06-13 17:42:05 +01:00
Rohit Jangid
aece6e9b90
feat: add more crypto functions (#699)
* feat: add more crypto functions
2023-06-13 17:18:02 +01:00
Morten Mjelva
1096691eec
feat: Add support for bzlmod (#698)
* Add support for bzlmod
2023-06-13 16:57:38 +01:00
Tejesh Raut
fae841124f
Implement std.trim for string (#684)
* Implement std.trim for string
2023-06-13 13:05:28 +01:00
Jonathan Regehr
44538a33e1
Adds std.any and std.all to jsonnet-lint (#695)
Co-authored-by: Dave Cunningham <sparkprime@gmail.com>
2023-05-25 14:09:56 +01:00
Deep Goel
7edd5d373b
feat: implement std.maxArray (#696) 2023-05-25 13:45:24 +01:00