Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increment to v0.3.0, update changelog #31

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 44 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,48 @@ All notable changes to this project will be documented in this file. It uses the
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
"Semantic Versioning 2.0.0"

## [v0.3.0] — 2024-09-23

### ⚡ Improvements

* Designed experimental distribution [metadata schema] to be appended to v2
`META.json` by PGXN upon release. The object is in [JWS-JS] format, and
intended to sign the release user, date, URI, and one or more SHA digests
for the distribution zip file. The format is subject to change pending
expert review and approval of the [JWS-signing RFC].
* Created release JSON Schemas for [v1] and [v2] release validation. PGXN
Manager adds the v1 metadata to the distribution-supplied `META.json` so
that clients can validate downloads. In the future it will generate the v2
JWS-signed schema.
* Added the [release module], which extends the [dist module] to load loads
v1 and v2 spec files into read-only data structures, converts v1 metadata
to v2, and merges multiple files.

### 📔 Notes

* Renamed the meta module to the [dist module], since it handles
*distribution* metadata, and therefore better compliments the new [release
module], which handles *release* metadata.
* Removed the SHA-256 hash from the [v2 artifacts schema], leaving only
SHA-512.
* Replaced the `TryFrom<PathBuf>` trait in the [dist module] with a `load`
function. This is because one does not convert a file path into a struct,
but loads it into a struct. It also allows the argument to be of type
`AsRef<Path>`, which supports `Path`, `PathBuf`, or `String` arguments.
* The v1-v2 conversion in the [release module] does not sign the release
payload, as we are not doing any key signing, yet. For now it generates
random strings to satisfy JSON Schema validation.

[v0.3.0]: https://github.com/pgxn/meta/compare/v0.3.0...v0.3.0
[metadata schema]: https://github.com/pgxn/meta/blob/v0.3.0/schema/v2/pgxn-jws.schema.json
[dist module]: https://docs.rs/pgxn_meta/0.3.0/pgxn_meta/dist/
[release module]: https://docs.rs/pgxn_meta/0.3.0/pgxn_meta/release/
[JWS-JS]: https://datatracker.ietf.org/doc/html/draft-jones-json-web-signature-json-serialization-01
[JWS-signing RFC]: https://github.com/pgxn/rfcs/pull/5
[v1]: https://github.com/pgxn/meta/blob/v0.3.0/schema/v1/release.schema.json
[v2]: https://github.com/pgxn/meta/blob/v0.3.0/schema/v2/release.schema.json
[v2 artifacts schema]: https://github.com/pgxn/meta/blob/v0.3.0/schema/v2/artifacts.schema.json

## [v0.2.0] — 2024-09-12

### ⚡ Improvements
Expand All @@ -31,8 +73,8 @@ All notable changes to this project will be documented in this file. It uses the
* Updated the README example to use the [meta module] to load an object.

[v0.2.0]: https://github.com/pgxn/meta/compare/v0.1.0...v0.2.0
[meta module]: https://docs.rs/pgxn_meta/meta/
[valid module]: https://docs.rs/pgxn_meta/meta/
[meta module]: https://docs.rs/pgxn_meta/0.2.0/pgxn_meta/meta/
[valid module]: https://docs.rs/pgxn_meta/0.2.0/pgxn_meta/valid/
[pull request]: https://github.com/pgxn/rfcs/pull/3 "pgxn/rfcs#3 Meta Spec v2"

## [v0.1.0] — 2024-08-08
Expand Down
2 changes: 1 addition & 1 deletion 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 Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pgxn_meta"
version = "0.2.0"
version = "0.3.0"
description = "The PGXN distribution metadata specification"
repository = "https://github.com/pgxn/pgxn-meta-spec"
documentation = "https://docs.rs/pgxn_meta/"
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

The PGXN Meta [v1] and [v2] specs define the requirements for the metadata
file (`META.json`) file for [PGXN] source distribution packages. This project
provides Rust a crates for working with spec `META.json` files.
provides Rust a crates for working with spec `META.json` files, as well as
PGXN-generated release `META.json` files.

Crate Usage
-----------
Expand Down Expand Up @@ -58,7 +59,8 @@ See the [`pgxn_meta` docs on docs.rs] for complete details.
Installation
------------

There are several ways to install `pgxn_meta`.
There are several ways to install the `pgxn_meta` distribution `META.json`
validation CLI.

### `ubi`

Expand Down
2 changes: 1 addition & 1 deletion schema/v2/pgxn-jws.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pgxn.org/meta/v2/pgxn-jws.schema.json",
"title": "PGXN Release Metadata",
"description": "JSON Web Signature release metadata populated by PGXN. Structure defined by [JWS-JS](https://datatracker.ietf.org/doc/html/draft-jones-json-web-signature-json-serialization-01)",
"description": "JSON Web Signature release metadata populated by PGXN. Structure defined by [JWS-JS](https://datatracker.ietf.org/doc/html/draft-jones-json-web-signature-json-serialization-01). Subject to change pending expert review and approval of the [JWS-signing RFC](https://github.com/pgxn/rfcs/pull/5).",
"type": "object",
"properties": {
"headers": {
Expand Down
2 changes: 1 addition & 1 deletion src/dist/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
PGXN `META.json` validation and management.
PGXN distribution `META.json` validation and management.

This module provides interfaces to load, validate, and manipulate PGXN
distribution `META.json` files. It supports both the [v1] and [v2] specs.
Expand Down