git.iko.soy/rowtype-yoga/purescript-vault
on master help sign in
Update to contrib standards.
commit713fd521362c2833cea5f9ef3afb1e600164b903 authorNick Saunders <nick@saunde.rs> dateThu 9 Mar 2023, 07:50 (4 years ago) parent19bd946
15 files changed+230−16
.editorconfig+13 .github/ISSUE_TEMPLATE/bug-report.md+23 .github/ISSUE_TEMPLATE/change-request.md+24 .github/ISSUE_TEMPLATE/config.yml+8 .github/PULL_REQUEST_TEMPLATE.md+12 .github/workflows/ci.yml+34 .gitignore+9−8 CHANGELOG.md+13 CONTRIBUTING.md+3 README.md+44−8 docs/README.md+3 packages.dhall+5 shell.nix+28 spago.dhall+5 test.dhall+6
.editorconfignew file+13
@@ -0,0 +1,13 @@
1+# https://editorconfig.org
2+root = true
3+
4+[*]
5+indent_style = space
6+indent_size = 2
7+end_of_line = lf
8+charset = utf-8
9+trim_trailing_whitespace = true
10+insert_final_newline = true
11+
12+[*.md]
13+trim_trailing_whitespace = false
.github/ISSUE_TEMPLATE/bug-report.mdnew file+23
@@ -0,0 +1,23 @@
1+---
2+name: Bug report
3+about: Report an issue
4+title: ""
5+labels: bug
6+assignees: ""
7+---
8+
9+**Describe the bug**
10+
11+A clear and concise description of the bug.
12+
13+**To Reproduce**
14+
15+A minimal code example (preferably a runnable example on [Try PureScript](https://try.purescript.org)!) or steps to reproduce the issue.
16+
17+**Expected behavior**
18+
19+A clear and concise description of what you expected to happen.
20+
21+**Additional context**
22+
23+Add any other context about the problem here.
.github/ISSUE_TEMPLATE/change-request.mdnew file+24
@@ -0,0 +1,24 @@
1+---
2+name: Change request
3+about: Propose an improvement to this library
4+title: ""
5+labels: ""
6+assignees: ""
7+---
8+
9+**Is your change request related to a problem? Please describe.**
10+
11+A clear and concise description of the problem.
12+
13+Examples:
14+
15+- It's frustrating to have to [...]
16+- I was looking for a function to [...]
17+
18+**Describe the solution you'd like**
19+
20+A clear and concise description of what a good solution to you looks like, including any solutions you've already considered.
21+
22+**Additional context**
23+
24+Add any other context about the change request here.
.github/ISSUE_TEMPLATE/config.ymlnew file+8
@@ -0,0 +1,8 @@
1+blank_issues_enabled: false
2+contact_links:
3+ - name: PureScript Discourse
4+ url: https://discourse.purescript.org/
5+ about: Ask and answer questions on the PureScript discussion forum.
6+ - name: PureScript Discord
7+ url: https://purescript.org/chat
8+ about: Ask and answer questions on the PureScript chat.
.github/PULL_REQUEST_TEMPLATE.mdnew file+12
@@ -0,0 +1,12 @@
1+**Description of the change**
2+
3+Clearly and concisely describe the purpose of the pull request. If this PR relates to an existing issue or change proposal, please link to it. Include any other background context that would help reviewers understand the motivation for this PR.
4+
5+---
6+
7+**Checklist:**
8+
9+- [ ] Added the change to the changelog's "Unreleased" section with a link to this PR and your username
10+- [ ] Linked any existing issues or proposals that this pull request should close
11+- [ ] Updated or added relevant documentation in the README and/or documentation directory
12+- [ ] Added a test for the contribution (if applicable)
.github/workflows/ci.ymlnew file+34
@@ -0,0 +1,34 @@
1+name: CI
2+
3+on:
4+ push:
5+ branches: [master]
6+ pull_request:
7+ branches: [master]
8+
9+jobs:
10+ build:
11+ runs-on: ubuntu-latest
12+
13+ steps:
14+ - uses: actions/checkout@v3
15+
16+ - name: Set up a PureScript toolchain
17+ uses: purescript-contrib/setup-purescript@main
18+
19+ - name: Cache PureScript dependencies
20+ uses: actions/cache@v2
21+ with:
22+ key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
23+ path: |
24+ .spago
25+ output
26+
27+ - name: Install dependencies
28+ run: spago install
29+
30+ - name: Build source
31+ run: spago build --no-install --purs-args '--censor-lib --strict'
32+
33+ - name: Run tests
34+ run: spago -x test.dhall test
.gitignore+9−8
@@ -1,8 +1,9 @@
1−/bower_components/
2−/node_modules/
3−/.pulp-cache/
4−/output/
5−/generated-docs/
6−/.psc*
7−/.purs*
8−/.psa*
1+.*
2+!.gitignore
3+!.github
4+!.editorconfig
5+!.tidyrc.json
6+
7+output
8+generated-docs
9+bower_components
CHANGELOG.mdnew file+13
@@ -0,0 +1,13 @@
1+# Changelog
2+
3+Notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4+
5+## [Unreleased]
6+
7+Breaking changes:
8+
9+New features:
10+
11+Bugfixes:
12+
13+Other improvements:
CONTRIBUTING.mdnew file+3
@@ -0,0 +1,3 @@
1+# Contributing to Vault
2+
3+Thanks for your interest in contributing to `vault`! We welcome new contributions regardless of your level of experience or familiarity with PureScript.
README.md+44−8
@@ -1,20 +1,56 @@
1−### Vault
1+# Vault
22
3−A typed, persistent store for values of arbitrary types. This is a port of the haskell [Vault](https://github.com/HeinrichApfelmus/vault) library Heinrich Apfelmus.
3+[![CI](https://github.com/purescript-community/purescript-vault/workflows/CI/badge.svg?branch=master)](https://github.com/purescript-community/purescript-vault/actions?query=workflow%3ACI+branch%3Amaster)
4+[![Release](https://img.shields.io/github/release/purescript-community/purescript-vault.svg)](https://github.com/purescript-community/purescript-vault/releases)
5+[![Pursuit](https://pursuit.purescript.org/packages/purescript-vault/badge)](https://pursuit.purescript.org/packages/purescript-vault)
6+[![Maintainer: nsaunders](https://img.shields.io/badge/maintainer-nsaunders-teal.svg)](https://github.com/nsaunders)
47
5−Think of it as ```Map``` that can store for values of arbitrary types, but it's type-safe.
6−You can store of any types by creating ```Key a``` first, this key used to parameterized the
7−type you are going to store in vault.
8+A typed, persistent store for values of arbitrary types. This is a port of the haskell [Vault](https://github.com/HeinrichApfelmus/vault) library Heinrich Apfelmus.
89
9−In summary a vault API:
10+Think of it as Map that can store for values of arbitrary types, but it's type-safe. You can store of any types by creating Key a first, this key used to parameterized the type you are going to store in vault.
1011
11−```haskell
12+```purescript
1213data Vault
1314data Key a
1415
15−newKey :: forall e a. Eff (ref :: REF | e) (Key a)
16+newKey :: forall a. Effect (Key a)
1617empty :: Vault
1718lookup :: forall a. Key a -> Vault -> Maybe a
1819insert :: forall a. Key a -> a -> Vault -> Vault
1920delete :: forall a. Key a -> Vault -> Vault
2021```
22+
23+## Installation
24+
25+Install `vault` with [Spago](https://github.com/purescript/spago):
26+
27+```sh
28+spago install vault
29+```
30+
31+## Quick start
32+
33+The quick start hasn't been written yet (contributions are welcome!). The quick start covers a common, minimal use case for the library, whereas longer examples and tutorials are kept in the [docs directory](./docs).
34+
35+## Documentation
36+
37+`vault` documentation is stored in a few places:
38+
39+1. Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-vault).
40+2. Written documentation is kept in the [docs directory](./docs).
41+3. Usage examples can be found in [the test suite](./test).
42+
43+If you get stuck, there are several ways to get help:
44+
45+- [Open an issue](https://github.com/purescript-community/purescript-vault/issues) if you have encountered a bug or problem.
46+- Ask general questions on the [PureScript Discourse](https://discourse.purescript.org) forum or the [PureScript Discord](https://discord.com/invite/sMqwYUbvz6) chat.
47+
48+## Contributing
49+
50+You can contribute to `vault` in several ways:
51+
52+1. If you encounter a problem or have a question, please [open an issue](https://github.com/purescript-community/purescript-vault/issues). We'll do our best to work with you to resolve or answer it.
53+
54+2. If you would like to contribute code, tests, or documentation, please [read the contributor guide](./CONTRIBUTING.md). It's a short, helpful introduction to contributing to this library, including development instructions.
55+
56+3. If you have written a library, tutorial, guide, or other resource based on this package, please share it on the [PureScript Discourse](https://discourse.purescript.org)! Writing libraries and learning resources are a great way to help this library succeed.
docs/README.mdnew file+3
@@ -0,0 +1,3 @@
1+# Vault Documentation
2+
3+This directory contains documentation for `vault`. If you are interested in contributing new documentation, please read the [contributor guidelines](../CONTRIBUTING.md) and [What Nobody Tells You About Documentation](https://documentation.divio.com) for help getting started.
packages.dhallnew file+5
@@ -0,0 +1,5 @@
1+let upstream =
2+ https://github.com/purescript/package-sets/releases/download/psc-0.15.4-20221015/packages.dhall
3+ sha256:4949f9f5c3626ad6a83ea6b8615999043361f50905f736bc4b7795cba6251927
4+
5+in upstream
shell.nixnew file+28
@@ -0,0 +1,28 @@
1+let
2+ pkgs = import (builtins.fetchTarball {
3+ url = "https://github.com/NixOS/nixpkgs/archive/21.11.tar.gz";
4+ }) {};
5+
6+ # To update to a newer version of easy-purescript-nix:
7+ # 1. Obtain the commit hash <rev> via `curl https://api.github.com/repos/justinwoo/easy-purescript-nix/commits/master`.
8+ # 2. Obtain the sha256 hash <sha256> via `nix-prefetch-url --unpack https://github.com/justinwoo/easy-purescript-nix/archive/<rev>.tar.gz`.
9+ # 3. Update the <rev> and <sha256> below.
10+ pursPkgs = import (pkgs.fetchFromGitHub {
11+ owner = "justinwoo";
12+ repo = "easy-purescript-nix";
13+ rev = "ee51a6d459b8fecfcb10f24ca9728e649c6a9e00";
14+ sha256 = "1w4k6mcayyg6388na0cca5qx94sm99xn3na26x2w34jlyz3bwl3m";
15+ }) {inherit pkgs;};
16+in
17+ pkgs.stdenv.mkDerivation {
18+ name = "tecton";
19+ buildInputs = with pursPkgs; [
20+ purs
21+ spago
22+ pulp
23+ purs-tidy
24+
25+ pkgs.nodejs-16_x
26+ pkgs.nodePackages.bower
27+ ];
28+ }
spago.dhallnew file+5
@@ -0,0 +1,5 @@
1+{ name = "vault"
2+, dependencies = [ "effect", "functions", "maybe", "prelude", "refs" ]
3+, packages = ./packages.dhall
4+, sources = [ "src/**/*.purs" ]
5+}
test.dhallnew file+6
@@ -0,0 +1,6 @@
1+let conf = ./spago.dhall
2+
3+in conf // {
4+ sources = conf.sources # ["test/**/*.purs"],
5+ dependencies = conf.dependencies # ["console"]
6+}