Skip to content

Commit

Permalink
Bump insta from 1.9.0 to 1.17.1 (#531)
Browse files Browse the repository at this point in the history
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.9.0 to 1.17.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md">insta's changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to insta and cargo-insta are documented here.</p>
<h2>0.17.1</h2>
<ul>
<li>Added support for nextest. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/242">#242</a>)</li>
<li>Resolved an issue where inline snapshot tests in doctests refused to
work. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/252">#252</a>)</li>
</ul>
<h2>0.17.0</h2>
<ul>
<li>Fixed an issue in <code>cargo-insta</code> where sometimes accepting inline snapshots
would crash with an out of bounds panic.</li>
<li>Added new <code>filters</code> feature. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/245">#245</a>)</li>
<li>Disallow unnamed snapshots in doctests. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/246">#246</a>)</li>
<li><code>with_settings!</code> macro now inherits the former settings rather than resetting. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/249">#249</a>)</li>
<li>Added support for <code>Settings::bind_to_scope</code> and deprecated
<code>Settings::bind_to_thread</code>. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/250">#250</a>)</li>
<li>Added support for <code>minimal-versions</code> builds.</li>
</ul>
<h2>1.16.0</h2>
<ul>
<li>Added <code>--no-quiet</code>/<code>-Q</code> flag to <code>cargo insta test</code> to suppress the
quiet flag. This works around limitations with custom test harnesses
such as cucumber.</li>
<li>Update RON to 0.7.1.</li>
<li>Improved ergonomics around <code>with_settings!</code>. It's now a perfect match to
the settings object's setter methods.</li>
<li>Added <code>description</code> and <code>info</code> to snapshots. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/239">#239</a>)</li>
<li>Added <code>omit_expression</code> setting. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/239">#239</a>)</li>
<li>Added improved support for running insta from doctests. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/243">#243</a>)</li>
</ul>
<h2>1.15.0</h2>
<ul>
<li>Bump minimum version of Rust to 1.56.1. This was done because the used
serde-yaml dependency no longer supports older versions of Rust.</li>
</ul>
<h2>1.14.1</h2>
<ul>
<li>Update uuid crate to 1.0.0. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/228">#228</a>)</li>
<li>Use inline block format also for strings of form <code>&quot;foo\n&quot;</code>. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/225">#225</a>)</li>
</ul>
<h2>1.14.0</h2>
<ul>
<li>Fixed a bug that caused insta to panic if inline snapshot assertions
moved since the time of the snapshot creation. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/220">#220</a>)</li>
<li><code>cargo insta test</code> now returns non zero status code when snapshots
are left for review. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/222">#222</a>)</li>
<li>Assertion failures now mention <code>cargo insta test</code>. (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/223">#223</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/mitsuhiko/insta/commit/7332f0c1b2fca09cacdda3943f42887165ff1446"><code>7332f0c</code></a> 1.17.1</li>
<li><a href="https://github.com/mitsuhiko/insta/commit/c552ebe20174c38afa91325635c03c68b73b0ed8"><code>c552ebe</code></a> Resolve an issue where inline snapshot tests refused to work in doctests (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/253">#253</a>)</li>
<li><a href="https://github.com/mitsuhiko/insta/commit/df1503943db46d4ffda7b36ad778887929a6e240"><code>df15039</code></a> Added changelog entry</li>
<li><a href="https://github.com/mitsuhiko/insta/commit/6f000827d5c00f85061dde0ead3e7db2f171ffd9"><code>6f00082</code></a> Experimental support for NEXTEST_RUN_ID (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/251">#251</a>)</li>
<li><a href="https://github.com/mitsuhiko/insta/commit/66b57ddb3e55309ca621b46aab5a707f82c2f09c"><code>66b57dd</code></a> 1.17.0</li>
<li><a href="https://github.com/mitsuhiko/insta/commit/a340d45a3abae6b30c66b60029c367d19edf0ab3"><code>a340d45</code></a> Added changelog entry for minimal-versions</li>
<li><a href="https://github.com/mitsuhiko/insta/commit/175b55529f6d2fc0b8543320942a30399d9240f7"><code>175b555</code></a> Added changelog entries</li>
<li><a href="https://github.com/mitsuhiko/insta/commit/ab34053e38954fcfcb42b495ad7d26b467ac3902"><code>ab34053</code></a> Add support for Settings::bind_to_scope (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/250">#250</a>)</li>
<li><a href="https://github.com/mitsuhiko/insta/commit/c73c42ebf8ac073bc6c15ab2f88213e3ffac7647"><code>c73c42e</code></a> Inherit settings in with_settings! (<a href="https://github-redirect.dependabot.com/mitsuhiko/insta/issues/249">#249</a>)</li>
<li><a href="https://github.com/mitsuhiko/insta/commit/74159c048ff54ca29ddab403212c515a854eca3c"><code>74159c0</code></a> Update console for cargo-insta</li>
<li>Additional commits viewable in <a href="https://github.com/mitsuhiko/insta/compare/1.9.0...1.17.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=insta&package-manager=cargo&previous-version=1.9.0&new-version=1.17.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: Graeme Coupar <grambo@grambo.me.uk>
  • Loading branch information
dependabot[bot] and obmarg committed Aug 2, 2022
1 parent e8f1381 commit 3f6ee88
Show file tree
Hide file tree
Showing 96 changed files with 198 additions and 284 deletions.
27 changes: 10 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cynic-codegen/Cargo.toml
Expand Up @@ -28,6 +28,6 @@ once_cell = "1.9.0"

[dev-dependencies]
assert_matches = "1.4.0"
insta = "1.9"
insta = "1.17"
maplit = "1.0.2"
rstest = "0.11.0"
Expand Up @@ -2,7 +2,6 @@
source: cynic-codegen/src/enum_derive/mod.rs
assertion_line: 390
expression: "format_code(format!(\"{}\", tokens))"

---
#[automatically_derived]
impl ::cynic::Enum for States {
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 32
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"

---
Ok(
[
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 32
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"

---
Ok(
[
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 52
assertion_line: 59
expression: "analyse(literals, field, None, Span::call_site()).map(|o| o.arguments)"

---
Err(
Errors {
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 32
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"

---
Ok(
[
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1,8 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"
---
Ok(
[],
)
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 32
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"

---
Ok(
[
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 32
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"

---
Ok(
[
Expand Down
@@ -0,0 +1,14 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"
---
Err(
Errors {
errors: [
Error(
"missing fields - filters",
),
],
},
)
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 32
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"

---
Ok(
[
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 32
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"

---
Ok(
[
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 32
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"

---
Ok(
[
Expand Down
@@ -0,0 +1,14 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"
---
Err(
Errors {
errors: [
Error(
"no such field",
),
],
},
)
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/arguments/tests.rs
assertion_line: 32
assertion_line: 36
expression: "analyse(literals, field, Some(&format_ident!(\"MyArguments\").into()),\n Span::call_site()).map(|o| o.arguments)"

---
Ok(
[
Expand Down
45 changes: 26 additions & 19 deletions cynic-codegen/src/fragment_derive/arguments/tests.rs
Expand Up @@ -7,19 +7,23 @@ use crate::schema::{parse_schema, types::Type, Schema};
use super::{analyse::analyse, parsing::CynicArguments};

#[rstest]
#[case::scalars("someScalarParams", parse_quote! { anInt: 1, aFloat: 3, anId: "hello" })]
#[case::missing_nullable_scalars("someNullableScalarParams", parse_quote! { anInt: 1 })]
#[case::empty_nullable_args("someNullableScalarParams", parse_quote! {})]
#[case::a_list_of_strings("filteredBooks", parse_quote! { filters: { authors: ["Charles Stross", "Ann Leckie"] } })]
#[case::list_wrapping("filteredBooks", parse_quote! { filters: { authors: "Ann Leckie" } })]
#[case::an_enum("filteredBooks", parse_quote! { filters: { state: "PUBLISHED" } })]
#[case::variable_in_object("filteredBooks", parse_quote! { filters: { state: $aVariable } })]
#[case::top_level_variable("filteredBooks", parse_quote! { filters: $aVaraible })]
#[case::top_level_variable("filteredBooks", parse_quote! { filters: $aVaraible, optionalFilters: $anotherVar })]
#[case::boolean_scalar("someNullableScalarParams", parse_quote! { aBool: true })]
#[case::missing_parameter("filteredBooks", parse_quote! {})]
#[case::unknown_parameter("someNullableScalarParams", parse_quote! { unknown: "hello" })]
fn test_analyse(#[case] field: &str, #[case] literals: CynicArguments) {
#[case::scalars("scalars", "someScalarParams", parse_quote! { anInt: 1, aFloat: 3, anId: "hello" })]
#[case::missing_nullable_scalars("missing_nullable_scalars", "someNullableScalarParams", parse_quote! { anInt: 1 })]
#[case::empty_nullable_args("empty_nullable_args", "someNullableScalarParams", parse_quote! {})]
#[case::a_list_of_strings("a_list_of_strings", "filteredBooks", parse_quote! { filters: { authors: ["Charles Stross", "Ann Leckie"] } })]
#[case::list_wrapping("list_wrapping", "filteredBooks", parse_quote! { filters: { authors: "Ann Leckie" } })]
#[case::an_enum("an_enum", "filteredBooks", parse_quote! { filters: { state: "PUBLISHED" } })]
#[case::variable_in_object("variable_in_object", "filteredBooks", parse_quote! { filters: { state: $aVariable } })]
#[case::top_level_variable("top_level_variable", "filteredBooks", parse_quote! { filters: $aVaraible })]
#[case::top_level_variables("top_level_variables", "filteredBooks", parse_quote! { filters: $aVaraible, optionalFilters: $anotherVar })]
#[case::boolean_scalar("boolean_scalar", "someNullableScalarParams", parse_quote! { aBool: true })]
#[case::missing_parameter("missing_parameter", "filteredBooks", parse_quote! {})]
#[case::unknown_parameter("unknown_parameter", "someNullableScalarParams", parse_quote! { unknown: "hello" })]
fn test_analyse(
#[case] snapshot_name: &str,
#[case] field: &str,
#[case] literals: CynicArguments,
) {
use quote::format_ident;

let schema_doc = parse_schema(SCHEMA).unwrap();
Expand All @@ -29,13 +33,16 @@ fn test_analyse(#[case] field: &str, #[case] literals: CynicArguments) {

let literals = literals.arguments.into_iter().collect::<Vec<_>>();

insta::assert_debug_snapshot!(analyse(
literals,
field,
Some(&format_ident!("MyArguments").into()),
Span::call_site()
insta::assert_debug_snapshot!(
snapshot_name,
analyse(
literals,
field,
Some(&format_ident!("MyArguments").into()),
Span::call_site()
)
.map(|o| o.arguments)
)
.map(|o| o.arguments))
}

#[test]
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/tests.rs
assertion_line: 94
assertion_line: 114
expression: "format_code(format!(\"{}\", tokens))"

---
#[automatically_derived]
impl<'de> ::cynic::QueryFragment<'de> for MyQuery {
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/tests.rs
assertion_line: 94
assertion_line: 114
expression: "format_code(format!(\"{}\", tokens))"

---
#[automatically_derived]
impl<'de> ::cynic::QueryFragment<'de> for MyQuery {
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/tests.rs
assertion_line: 94
assertion_line: 114
expression: "format_code(format!(\"{}\", tokens))"

---
#[automatically_derived]
impl<'de> ::cynic::QueryFragment<'de> for Film {
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/tests.rs
assertion_line: 94
assertion_line: 114
expression: "format_code(format!(\"{}\", tokens))"

---
#[automatically_derived]
impl<'de> ::cynic::QueryFragment<'de> for MyQuery {
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/tests.rs
assertion_line: 94
assertion_line: 114
expression: "format_code(format!(\"{}\", tokens))"

---
#[automatically_derived]
impl<'de> ::cynic::QueryFragment<'de> for BlogPostOutput {
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/tests.rs
assertion_line: 85
assertion_line: 114
expression: "format_code(format!(\"{}\", tokens))"

---
#[automatically_derived]
impl<'de> ::cynic::QueryFragment<'de> for Film {
Expand Down
@@ -1,8 +1,7 @@
---
source: cynic-codegen/src/fragment_derive/tests.rs
assertion_line: 94
assertion_line: 114
expression: "format_code(format!(\"{}\", tokens))"

---
#[automatically_derived]
impl<'de> ::cynic::QueryFragment<'de> for MyQuery {
Expand Down

0 comments on commit 3f6ee88

Please sign in to comment.