Skip to content

Commit

Permalink
Overhaul everything
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynne committed Nov 10, 2023
1 parent fa2e77b commit 550e8b5
Show file tree
Hide file tree
Showing 8 changed files with 300 additions and 162 deletions.
1 change: 1 addition & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This project adopts Swift's code of conduct: https://www.swift.org/code-of-conduct/
15 changes: 15 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Contributing

This document covers how you can report any issues you find or contribute with bug fixes and new features.

## Reporting Issues

Go ahead and open a new issue [on the repo](https://github.com/gwynne/swift-semver/issues/new). The owners will be notified and we should get back to you shortly.

## Security Issues

If you discover a security issue, please follow [the security procedure](https://github.com/gwynne/swift-semver/security/policy). Please **do not** publicly report an issue until it has been fixed. The disclosure policy and timelines are availble in the policy document.

## Pull Requests

We are glad to accept and review pull requests for bug fixes and new features.
19 changes: 19 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Security Policy

## Supported Versions

At the time of this writing, no "stable" versions have yet been released, and support is provided only for the most recent tagged prerelease version.

Should this file not yet be updated after this project reaches 1.0, the support policy is to support the most recent major release only until and unless otherwise specified.

| Version | Supported |
| :-------: | :------------------: |
| - | - |

## Reporting a Vulnerability

This project asks that known and suspected vulnerabilities be privately and responsibly disclosed by [filling out a vulnerability report](https://github.com/gwynne/swift-semver/security/advisories/new) on Github[^1].

[^1]: See [Github's official documentation of the vulnerability report feature](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability) for additional privacy and safety details.

**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.**
32 changes: 29 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.7
// swift-tools-version:5.8
//===----------------------------------------------------------------------===//
//
// This source file is part of the swift-semver open source project
Expand All @@ -13,14 +13,40 @@
//===----------------------------------------------------------------------===//
import PackageDescription

let commonSwiftSettings: [PackageDescription.SwiftSetting] = [
// We deliberately choose to opt in to several upcoming language features.
.enableUpcomingFeature("ConciseMagicFile"),
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("BareSlashRegexLiterals"),
.enableExperimentalFeature("StrictConcurrency=complete"),
]

let package = Package(
name: "swift-semver",
platforms: [
.macOS(.v13),
.macCatalyst(.v16),
.iOS(.v16),
.watchOS(.v9),
.tvOS(.v16),
],
products: [
.library(name: "SwiftSemver", targets: ["SwiftSemver"]),
],
dependencies: [],
targets: [
.target(name: "SwiftSemver", dependencies: []),
.testTarget(name: "SwiftSemverTests", dependencies: [.target(name: "SwiftSemver")]),
.target(
name: "SwiftSemver",
dependencies: [],
swiftSettings: commonSwiftSettings
),
.testTarget(
name: "SwiftSemverTests",
dependencies: [
.target(name: "SwiftSemver"),
],
swiftSettings: commonSwiftSettings
),
]
)
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# SwiftSemver

<p align="center">
<a href="LICENSE"><img src="https://design.vapor.codes/images/mitlicense.svg" alt="MIT License"></a>
<a href="https://github.com/gwynne/swift-semver/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/gwynne/swift-semver/test.yml?event=push&amp;style=plastic&amp;logo=github&amp;label=tests&amp;logoColor=%23ccc" alt="Continuous Integration"></a>
<a href="https://codecov.io/github/gwynne/swift-semver"><img src="https://img.shields.io/codecov/c/github/gwynne/swift-semver?style=plastic&amp;logo=codecov&amp;label=coverage&amp;token=GB8LS6ELKA"></a>
<a href="https://swift.org"><img src="https://img.shields.io/badge/swift-5.8%2b-white?style=plastic&amp;logoColor=%23f07158&amp;labelColor=gray&amp;color=%23f07158&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI%2BPHBhdGggZD0iTSA2LDI0YyAtMywwIC02LC0zIC02LC02diAtMTJjIDAsLTMgMywtNiA2LC02aCAxMmMgMywwIDYsMyA2LDZ2IDEyYyAwLDMgLTMsNiAtNiw2eiIgZmlsbD0iI2YwNzE1OCIvPjxwYXRoIGQ9Ik0gMTMuNTUsMy40YyA0LjE1LDIuMzkgNi4zLDcuNTMgNS4zLDExLjUgMS45NSwyLjggMS42NSw1LjE3IDEuMzgsNC42NiAtMS4yLC0yLjMzIC0zLjMzLC0xLjQyIC00LjM3LC0wLjcxIC0zLjksMS44MSAtMTAuMTYsMC4xOCAtMTMuNDYsLTUuMDMgMi45OCwyLjIgNy4yLDMuMTUgMTAuMywxLjI1IC00LjYsLTMuNTcgLTguNSwtOS4xNyAtOC41LC05LjI4IDIuMjgsMi4xNSA1Ljk4LDQuODQgNy4zLDUuNzEgLTIuOCwtMy4xIC01LjMsLTYuNjUgLTUuMiwtNi42NSAyLjczLDIuNjggNS42Niw1LjIgOC45LDcuMiAwLjM3LC0wLjc5IDEuNDMsLTQuNDcgLTEuNjUsLTguNjV6IiBmaWxsPSJ3aGl0ZSIvPjwvc3ZnPg%3D%3D" alt="Swift 5.8+"></a>
</p>

A small library which provides a `SemanticVersion` type, containing a complete implementation of the grammar (both parsing and serialization) and precedence behaviors described by [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html).

0 comments on commit 550e8b5

Please sign in to comment.