-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cargo.toml: introduce a virtual workspace
This allows IDE Rust integration to work when the root of the repository is opened. Prior to this change, a developer would have to open cargo-insta to get code completion for that crate. This also causes `make lint` to run clippy over cargo-insta.
- Loading branch information
Showing
116 changed files
with
93 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,4 @@ | ||
[package] | ||
name = "insta" | ||
version = "1.33.0" | ||
license = "Apache-2.0" | ||
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"] | ||
description = "A snapshot testing library for Rust" | ||
edition = "2018" | ||
rust-version = "1.51.0" | ||
homepage = "https://insta.rs/" | ||
repository = "https://github.com/mitsuhiko/insta" | ||
keywords = ["snapshot", "testing", "jest", "approval"] | ||
readme = "README.md" | ||
exclude = [ | ||
"assets/*" | ||
] | ||
[workspace] | ||
members = ["cargo-insta", "insta"] | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
|
||
[features] | ||
default = ["colors"] | ||
|
||
# when the redactions feature is enabled values can be redacted in serialized | ||
# snapshots. | ||
redactions = ["pest", "pest_derive", "serde"] | ||
|
||
# Enables support for running filters on snapshot | ||
filters = ["regex"] | ||
|
||
# Glob support | ||
glob = ["walkdir", "globset"] | ||
|
||
# Color support | ||
colors = ["console"] | ||
|
||
# Serialization formats | ||
# TODO: This could be cleaner by using "dep:csv" without renaming the dep, but | ||
# this technique allows for a lower MSRV | ||
csv = ["dep_csv", "serde"] | ||
json = ["serde"] | ||
ron = ["dep_ron", "serde"] | ||
toml = ["dep_toml", "serde"] | ||
yaml = ["serde"] | ||
|
||
# internal feature exclusive to cargo-insta | ||
_cargo_insta_internal = [] | ||
|
||
[dependencies] | ||
dep_csv = { package = "csv", version = "=1.1.6", optional = true } | ||
console = { version = "0.15.4", optional = true, default-features = false } | ||
pest = { version = "2.1.3", optional = true } | ||
pest_derive = { version = "2.1.0", optional = true } | ||
dep_ron = { package = "ron", version = "0.7.1", optional = true } | ||
dep_toml = { package = "toml", version = "0.5.7", optional = true } | ||
globset = { version = "0.4.6", optional = true } | ||
walkdir = { version = "2.3.1", optional = true } | ||
similar = { version = "2.1.0", features = ["inline"] } | ||
regex = { version = "1.6.0", default-features = false, optional = true, features = ["std", "unicode"] } | ||
yaml-rust = "0.4.5" | ||
serde = { version = "1.0.117", optional = true } | ||
linked-hash-map = "0.5.6" | ||
lazy_static = "1.4.0" | ||
|
||
[dev-dependencies] | ||
serde = { version = "1.0.117", features = ["derive"] } | ||
similar-asserts = "1.4.2" | ||
resolver = "2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[package] | ||
name = "insta" | ||
version = "1.33.0" | ||
license = "Apache-2.0" | ||
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"] | ||
description = "A snapshot testing library for Rust" | ||
edition = "2018" | ||
rust-version = "1.51.0" | ||
homepage = "https://insta.rs/" | ||
repository = "https://github.com/mitsuhiko/insta" | ||
keywords = ["snapshot", "testing", "jest", "approval"] | ||
readme = "README.md" | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
|
||
[features] | ||
default = ["colors"] | ||
|
||
# when the redactions feature is enabled values can be redacted in serialized | ||
# snapshots. | ||
redactions = ["pest", "pest_derive", "serde"] | ||
|
||
# Enables support for running filters on snapshot | ||
filters = ["regex"] | ||
|
||
# Glob support | ||
glob = ["walkdir", "globset"] | ||
|
||
# Color support | ||
colors = ["console"] | ||
|
||
# Serialization formats | ||
# TODO: This could be cleaner by using "dep:csv" without renaming the dep, but | ||
# this technique allows for a lower MSRV | ||
csv = ["dep_csv", "serde"] | ||
json = ["serde"] | ||
ron = ["dep_ron", "serde"] | ||
toml = ["dep_toml", "serde"] | ||
yaml = ["serde"] | ||
|
||
# internal feature exclusive to cargo-insta | ||
_cargo_insta_internal = [] | ||
|
||
[dependencies] | ||
dep_csv = { package = "csv", version = "=1.1.6", optional = true } | ||
console = { version = "0.15.4", optional = true, default-features = false } | ||
pest = { version = "2.1.3", optional = true } | ||
pest_derive = { version = "2.1.0", optional = true } | ||
dep_ron = { package = "ron", version = "0.7.1", optional = true } | ||
dep_toml = { package = "toml", version = "0.5.7", optional = true } | ||
globset = { version = "0.4.6", optional = true } | ||
walkdir = { version = "2.3.1", optional = true } | ||
similar = { version = "2.1.0", features = ["inline"] } | ||
regex = { version = "1.6.0", default-features = false, optional = true, features = ["std", "unicode"] } | ||
yaml-rust = "0.4.5" | ||
serde = { version = "1.0.117", optional = true } | ||
linked-hash-map = "0.5.6" | ||
lazy_static = "1.4.0" | ||
|
||
[dev-dependencies] | ||
serde = { version = "1.0.117", features = ["derive"] } | ||
similar-asserts = "1.4.2" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
cd $SCRIPT_DIR/.. | ||
|
||
NEW_VERSION="${1}" | ||
|
||
echo "Bumping version: ${NEW_VERSION}" | ||
perl -pi -e "s/^version = \".*?\"/version = \"$NEW_VERSION\"/" Cargo.toml | ||
perl -pi -e "s/^version = \".*?\"/version = \"$NEW_VERSION\"/" insta/Cargo.toml | ||
perl -pi -e "s/^version = \".*?\"/version = \"$NEW_VERSION\"/" cargo-insta/Cargo.toml | ||
perl -pi -e "s/^(insta.*?)version = \".*?\"/\$1version = \"=$NEW_VERSION\"/" cargo-insta/Cargo.toml | ||
|
||
cd cargo-insta; cargo check | ||
cargo check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
cd $SCRIPT_DIR/.. | ||
|
||
cargo publish -p insta | ||
cd cargo-insta && cargo publish | ||
cargo publish -p insta-insta |