Skip to content

Commit 2cad49c

Browse files
authored
Merge branch 'master' into master
2 parents a1f28e7 + 036ba67 commit 2cad49c

37 files changed

+1542
-1276
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
(ns clj-kondo.com.gfredericks.test.chuck.checking
2+
(:require
3+
[clj-kondo.hooks-api :as api]))
4+
5+
(defn checking
6+
[{{:keys [children]} :node}]
7+
(let [[_checking desc & opt+bindings+body] children
8+
[opts binding-vec & body] (if (api/vector-node? (first opt+bindings+body))
9+
(into [(api/map-node {})] opt+bindings+body)
10+
opt+bindings+body)]
11+
(when-not (even? (count (:children binding-vec)))
12+
(throw (ex-info "checking requires an even number of bindings" {})))
13+
{:node (api/list-node
14+
(list*
15+
(api/token-node 'let)
16+
(api/vector-node (into [(api/token-node (symbol (gensym "_checking-desc"))) desc]
17+
(:children binding-vec)))
18+
opts
19+
body))}))
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{:hooks
2+
{:analyze-call
3+
{com.gfredericks.test.chuck.clojure-test/checking
4+
clj-kondo.com.gfredericks.test.chuck.checking/checking}}}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{:lint-as {schema.test/deftest clojure.test/deftest}}

.github/workflows/release.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
1-
name: release
1+
name: Release
22

33
on:
44
release:
5-
types: [published]
5+
types:
6+
- published # reacts to releases and prereleases, but not their drafts
67

78
jobs:
8-
release:
9+
build-and-release:
910
runs-on: ubuntu-latest
1011
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-java@v3
13-
with:
14-
distribution: zulu
15-
java-version: "8"
16-
cache: maven
17-
- name: Deploy to Clojars
18-
run: lein deploy releases
19-
env:
20-
LEIN_PASSWORD: ${{ secrets.LEIN_PASSWORD }}
12+
- uses: actions/checkout@v3
13+
- name: "Setup Java 8"
14+
uses: actions/setup-java@v3.12.0
15+
with:
16+
distribution: zulu
17+
java-version: 8 # build releases with java 8 for maximum compatibility
18+
- name: Setup Clojure
19+
uses: DeLaGuardo/setup-clojure@master
20+
with:
21+
lein: 2.9.4
22+
- name: Run tests
23+
run: lein do clean, all test, all check
24+
- name: Build jar
25+
run: lein jar
26+
- name: Deploy to Clojars
27+
run: lein deploy releases
28+
env:
29+
CLOJARS_USER: metosinci
30+
CLOJARS_DEPLOY_TOKEN: "${{ secrets.CLOJARS_DEPLOY_TOKEN }}"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
/doc
1010
/gh-pages
1111
/target
12-
pom.xml
1312
pom.xml.asc
13+
.cache
14+
node_modules

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 0.10.7 (2024-06-29)
2+
3+
* Support transforming multi-spec to JSON Schema. PR [#281](https://github.com/metosin/spec-tools/pull/281)
4+
* FIX :reason doesn't compose as expected [#171](https://github.com/metosin/spec-tools/issues/171)
5+
* Update Dependencies
6+
7+
```clojure
8+
[org.clojure/spec.alpha "0.5.238"] is available but we use "0.3.218"
9+
```
10+
111
# 0.10.6 (2023-08-28)
212

313
* Deprecate `spec-tools.openapi/openapi-spec`

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>metosin</groupId>
5+
<artifactId>spec-tools</artifactId>
6+
<packaging>jar</packaging>
7+
<version>0.10.7</version>
8+
<name>spec-tools</name>
9+
<description>Clojure(Script) tools for clojure.spec</description>
10+
<url>https://github.com/metosin/spec-tools</url>
11+
<licenses>
12+
<license>
13+
<name>Eclipse Public License</name>
14+
<url>https://www.eclipse.org/legal/epl-2.0/</url>
15+
</license>
16+
</licenses>
17+
<scm>
18+
<url>https://github.com/metosin/spec-tools</url>
19+
<connection>scm:git:git://github.com/metosin/spec-tools.git</connection>
20+
<developerConnection>scm:git:ssh://git@github.com/metosin/spec-tools.git</developerConnection>
21+
<tag>53a43a214549f8fe1f64c52cf982e346ac59beb2</tag>
22+
</scm>
23+
<build>
24+
<sourceDirectory>src</sourceDirectory>
25+
<testSourceDirectory>test/clj</testSourceDirectory>
26+
<resources>
27+
<resource>
28+
<directory>resources</directory>
29+
</resource>
30+
</resources>
31+
<testResources>
32+
<testResource>
33+
<directory>resources</directory>
34+
</testResource>
35+
</testResources>
36+
<directory>target</directory>
37+
<outputDirectory>target/classes</outputDirectory>
38+
<plugins>
39+
<plugin>
40+
<groupId>org.codehaus.mojo</groupId>
41+
<artifactId>build-helper-maven-plugin</artifactId>
42+
<version>1.7</version>
43+
<executions>
44+
<execution>
45+
<id>add-test-source</id>
46+
<phase>generate-test-sources</phase>
47+
<goals>
48+
<goal>add-test-source</goal>
49+
</goals>
50+
<configuration>
51+
<sources>
52+
<source>test/cljc</source>
53+
</sources>
54+
</configuration>
55+
</execution>
56+
</executions>
57+
</plugin>
58+
</plugins>
59+
</build>
60+
<repositories>
61+
<repository>
62+
<id>central</id>
63+
<url>https://repo1.maven.org/maven2/</url>
64+
<snapshots>
65+
<enabled>false</enabled>
66+
</snapshots>
67+
<releases>
68+
<enabled>true</enabled>
69+
</releases>
70+
</repository>
71+
<repository>
72+
<id>clojars</id>
73+
<url>https://repo.clojars.org/</url>
74+
<snapshots>
75+
<enabled>true</enabled>
76+
</snapshots>
77+
<releases>
78+
<enabled>true</enabled>
79+
</releases>
80+
</repository>
81+
</repositories>
82+
<dependencyManagement>
83+
<dependencies/>
84+
</dependencyManagement>
85+
<dependencies>
86+
<dependency>
87+
<groupId>org.clojure</groupId>
88+
<artifactId>spec.alpha</artifactId>
89+
<version>0.5.238</version>
90+
</dependency>
91+
<dependency>
92+
<groupId>org.clojure</groupId>
93+
<artifactId>clojure</artifactId>
94+
<version>1.11.3</version>
95+
<scope>test</scope>
96+
</dependency>
97+
<dependency>
98+
<groupId>org.clojure</groupId>
99+
<artifactId>clojurescript</artifactId>
100+
<version>1.11.132</version>
101+
<scope>test</scope>
102+
</dependency>
103+
<dependency>
104+
<groupId>criterium</groupId>
105+
<artifactId>criterium</artifactId>
106+
<version>0.4.6</version>
107+
<scope>test</scope>
108+
</dependency>
109+
<dependency>
110+
<groupId>prismatic</groupId>
111+
<artifactId>schema</artifactId>
112+
<version>1.4.1</version>
113+
<scope>test</scope>
114+
</dependency>
115+
<dependency>
116+
<groupId>org.clojure</groupId>
117+
<artifactId>test.check</artifactId>
118+
<version>1.1.1</version>
119+
<scope>test</scope>
120+
</dependency>
121+
<dependency>
122+
<groupId>org.clojure</groupId>
123+
<artifactId>tools.namespace</artifactId>
124+
<version>1.5.0</version>
125+
<scope>test</scope>
126+
</dependency>
127+
<dependency>
128+
<groupId>com.gfredericks</groupId>
129+
<artifactId>test.chuck</artifactId>
130+
<version>0.2.14</version>
131+
<scope>test</scope>
132+
</dependency>
133+
<dependency>
134+
<groupId>expound</groupId>
135+
<artifactId>expound</artifactId>
136+
<version>0.9.0</version>
137+
<scope>test</scope>
138+
</dependency>
139+
<dependency>
140+
<groupId>metosin</groupId>
141+
<artifactId>muuntaja</artifactId>
142+
<version>0.6.10</version>
143+
<scope>test</scope>
144+
</dependency>
145+
<dependency>
146+
<groupId>metosin</groupId>
147+
<artifactId>ring-swagger</artifactId>
148+
<version>1.0.0</version>
149+
<scope>test</scope>
150+
</dependency>
151+
<dependency>
152+
<groupId>metosin</groupId>
153+
<artifactId>jsonista</artifactId>
154+
<version>0.3.8</version>
155+
<scope>test</scope>
156+
</dependency>
157+
<dependency>
158+
<groupId>metosin</groupId>
159+
<artifactId>scjsv</artifactId>
160+
<version>0.6.2</version>
161+
<scope>test</scope>
162+
</dependency>
163+
</dependencies>
164+
</project>
165+
166+
<!-- This file was autogenerated by Leiningen.
167+
Please do not edit it directly; instead edit project.clj and regenerate it.
168+
It should not be considered canonical data. For more information see
169+
https://codeberg.org/leiningen/leiningen -->

project.clj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
(defproject metosin/spec-tools "0.10.5"
1+
(defproject metosin/spec-tools "0.10.7"
22
:description "Clojure(Script) tools for clojure.spec"
33
:url "https://github.com/metosin/spec-tools"
44
:license {:name "Eclipse Public License", :url "https://www.eclipse.org/legal/epl-2.0/"}
55
:test-paths ["test/clj" "test/cljc"]
66

77
:deploy-repositories [["releases" {:url "https://repo.clojars.org/"
8-
:username "metosinci"
9-
:password :env
10-
:sign-releases false}]]
8+
:sign-releases false
9+
:username :env/CLOJARS_USER
10+
:password :env/CLOJARS_DEPLOY_TOKEN}]]
1111

1212
:codox {:output-path "doc"
1313
:source-uri "https://github.com/metosin/spec-tools/{version}/{filepath}#L{line}"
@@ -16,9 +16,9 @@
1616
:scm {:name "git"
1717
:url "https://github.com/metosin/spec-tools"}
1818

19-
:dependencies [[org.clojure/spec.alpha "0.3.218"]]
19+
:dependencies [[org.clojure/spec.alpha "0.5.238"]]
2020

21-
:profiles {:dev {:plugins [[jonase/eastwood "1.4.0"]
21+
:profiles {:dev {:plugins [[jonase/eastwood "1.4.2"]
2222
[lein-tach "1.1.0"]
2323
[lein-doo "0.1.11"]
2424
[lein-cljsbuild "1.1.8"]
@@ -27,21 +27,21 @@
2727
[lein-pprint "1.3.2"]]
2828
:jvm-opts ^:replace ["-server"]
2929
;:global-vars {*warn-on-reflection* true}
30-
:dependencies [[org.clojure/clojure "1.11.1"]
31-
[org.clojure/clojurescript "1.11.60"]
30+
:dependencies [[org.clojure/clojure "1.11.3"]
31+
[org.clojure/clojurescript "1.11.132"]
3232
[criterium "0.4.6"]
3333
[prismatic/schema "1.4.1"]
3434
[org.clojure/test.check "1.1.1"]
35-
[org.clojure/tools.namespace "1.4.4"]
35+
[org.clojure/tools.namespace "1.5.0"]
3636
[com.gfredericks/test.chuck "0.2.14"]
3737
; com.bhauman/spell-spec library doesn't get any updates, so it has to be copied here
3838
; under spec-tools.spell-spec namespace in order to fix its bugs.
3939
; If the library gets updated with fixes it would be desirable to switch back to it.
4040
;[com.bhauman/spell-spec "0.1.1"]
4141
[expound "0.9.0"]
42-
[metosin/muuntaja "0.6.8"]
43-
[metosin/ring-swagger "0.26.2"]
44-
[metosin/jsonista "0.3.7"]
42+
[metosin/muuntaja "0.6.10"]
43+
[metosin/ring-swagger "1.0.0"]
44+
[metosin/jsonista "0.3.8"]
4545
[metosin/scjsv "0.6.2"]]}
4646
:perf {:jvm-opts ^:replace ["-server"]}}
4747
:aliases {"all" ["with-profile" "dev"]

0 commit comments

Comments
 (0)