Skip to content

Commit 0e9e3eb

Browse files
committed
chore: publish 0.2.1 🎉
1 parent d031a0a commit 0e9e3eb

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

‎Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "package_json_schema"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
authors = ["Ifiok Jr. <[email protected]>"]
55
categories = ["encoding", "config"]
66
documentation = "https://docs.rs/package_json_schema"

‎changelog.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
## [Unreleased]
44

5-
> [Compare](https://github.com/ifiokjr/package_json_schema/compare/0.2.0...HEAD)
5+
> [Compare](https://github.com/ifiokjr/package_json_schema/compare/0.2.1...HEAD)
6+
7+
## 0.2.1
8+
9+
- Use the `Repository` enum in the `repository` field [#2](https://github.com/ifiokjr/package_json_schema/pull/2)
10+
- Update readme and crate documentation.
11+
12+
> [Compare](https://github.com/ifiokjr/package_json_schema/compare/0.2.0...0.2.1)
613
714
## 0.2.0
815

‎readme.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ You want to load a `package.json` file and interact with it as a struct.
3232
Add this line to the `[dependencies]` section of your `Cargo.toml`:
3333

3434
```toml
35-
package_json_schema = "0.2.0"
35+
package_json_schema = "0.2.1"
3636
```
3737

3838
If you would like to include validation then add the `validate` feature.
3939

4040
```toml
41-
package_json_schema = { version = "0.2.0", features = ["validate"] }
41+
package_json_schema = { version = "0.2.1", features = ["validate"] }
4242
```
4343

4444
This adds the `validator` crate as a dependency and adds the `.validate()` method to the `PackageJson` struct. The fields are validated according to the [JSON schema specification](https://json.schemastore.org/package.json).
@@ -55,7 +55,7 @@ use package_json_schema::PackageJson;
5555
let contents = r###"
5656
{
5757
"name": "my-package",
58-
"version": "0.2.0",
58+
"version": "0.0.1",
5959
"dependencies": {
6060
"@sveltejs/kit": "1.0.0-next.396"
6161
},
@@ -67,7 +67,7 @@ let contents = r###"
6767

6868
let package_json = PackageJson::try_from(contents).unwrap();
6969
assert_eq!(package_json.name.unwrap(), "my-package");
70-
assert_eq!(package_json.version.unwrap(), "0.2.0");
70+
assert_eq!(package_json.version.unwrap(), "0.0.1");
7171
```
7272

7373
This crate leaves it to the user to load the `package.json` content from the filesystem. Here is an example of loading the file contents and parsing the contents into a struct.
@@ -109,7 +109,7 @@ assert_eq!(
109109
To validate the `package.json` fields, enable the `validate` feature.
110110

111111
```toml
112-
package_json_schema = { version = "0.2.0", features = ["validate"] }
112+
package_json_schema = { version = "0.2.1", features = ["validate"] }
113113
```
114114

115115
And then use the `validate` method.

0 commit comments

Comments
 (0)