Skip to content

Commit 35c422e

Browse files
Update according to Contributors library guidelines (#21)
1 parent 073214f commit 35c422e

16 files changed

+295
-106
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -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

.eslintrc.json

+24-23
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
{
2-
"parserOptions": {
3-
"ecmaVersion": 5
4-
},
2+
"env": { "browser": true, "commonjs": true },
53
"extends": "eslint:recommended",
6-
"env": {
7-
"commonjs": true
8-
},
4+
"parserOptions": { "ecmaVersion": 5 },
95
"rules": {
10-
"strict": [2, "global"],
11-
"block-scoped-var": 2,
12-
"consistent-return": 2,
13-
"eqeqeq": [2, "smart"],
14-
"guard-for-in": 2,
15-
"no-caller": 2,
16-
"no-extend-native": 2,
17-
"no-loop-func": 2,
18-
"no-new": 2,
19-
"no-param-reassign": 2,
20-
"no-return-assign": 2,
21-
"no-unused-expressions": 2,
22-
"no-use-before-define": 2,
23-
"radix": [2, "always"],
24-
"indent": [2, 2],
25-
"quotes": [2, "double"],
26-
"semi": [2, "always"]
6+
"block-scoped-var": "error",
7+
"consistent-return": "error",
8+
"eqeqeq": "error",
9+
"guard-for-in": "error",
10+
"no-bitwise": "error",
11+
"no-caller": "error",
12+
"no-extra-parens": "off",
13+
"no-extend-native": "error",
14+
"no-loop-func": "error",
15+
"no-new": "error",
16+
"no-param-reassign": "error",
17+
"no-return-assign": "error",
18+
"no-sequences": "error",
19+
"no-unused-expressions": "error",
20+
"no-use-before-define": "error",
21+
"no-undef": "error",
22+
"no-eq-null": "error",
23+
"radix": ["error", "always"],
24+
"indent": ["error", 2, { "SwitchCase": 1 }],
25+
"quotes": ["error", "double"],
26+
"semi": ["error", "always"],
27+
"strict": ["error", "global"]
2728
}
2829
}

.github/ISSUE_TEMPLATE/bug-report.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Bug report
3+
about: Report an issue
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of the bug.
11+
12+
**To Reproduce**
13+
A minimal code example (preferably a runnable example on [Try PureScript](https://try.purescript.org)!) or steps to reproduce the issue.
14+
15+
**Expected behavior**
16+
A clear and concise description of what you expected to happen.
17+
18+
**Additional context**
19+
Add any other context about the problem here.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
A clear and concise description of the problem.
11+
12+
Examples:
13+
14+
- It's frustrating to have to [...]
15+
- I was looking for a function to [...]
16+
17+
**Describe the solution you'd like**
18+
A clear and concise description of what a good solution to you looks like, including any solutions you've already considered.
19+
20+
**Additional context**
21+
Add any other context about the change request here.

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -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 here.
6+
- name: Functional Programming Slack
7+
url: https://functionalprogramming.slack.com
8+
about: For casual chat and questions (use https://fpchat-invite.herokuapp.com to join).

.github/PULL_REQUEST_TEMPLATE.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
**Description of the change**
2+
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.
3+
4+
---
5+
6+
**Checklist:**
7+
8+
- [ ] Added the change to the changelog's "Unreleased" section with a link to this PR and your username
9+
- [ ] Linked any existing issues or proposals that this pull request should close
10+
- [ ] Updated or added relevant documentation in the README and/or documentation directory
11+
- [ ] Added a test for the contribution (if applicable)

.github/workflows/ci.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up 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: Set up Node toolchain
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: "12.x"
31+
32+
- name: Cache NPM dependencies
33+
uses: actions/cache@v2
34+
env:
35+
cache-name: cache-node-modules
36+
with:
37+
path: ~/.npm
38+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
39+
restore-keys: |
40+
${{ runner.os }}-build-${{ env.cache-name }}-
41+
${{ runner.os }}-build-
42+
${{ runner.os }}-
43+
44+
- name: Install NPM dependencies
45+
run: npm install
46+
47+
- name: Build the project
48+
run: npm run build
49+
50+
- name: Run tests
51+
run: npm run test

.gitignore

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
/.*
2-
!/.gitignore
3-
!/.jshintrc
4-
!/.jscsrc
5-
!/.travis.yml
6-
/bower_components/
7-
/node_modules/
8-
/output/
1+
.*
2+
!.gitignore
3+
!.github
4+
!.editorconfig
5+
!.eslintrc.json
6+
7+
output
8+
generated-docs
9+
bower_components
10+
11+
node_modules
912
package-lock.json
13+
*.lock

.travis.yml

-17
This file was deleted.

CHANGELOG.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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:
14+
15+
## [v3.0.0](https://github.com/purescript-contrib/purescript-avar/releases/tag/v3.0.0) - 2018-05-25
16+
17+
- Updated for PureScript 0.12
18+
19+
## [v2.0.1](https://github.com/purescript-contrib/purescript-avar/releases/tag/v2.0.1) - 2017-09-20
20+
21+
- Fixes issue with `purs bundle` aggressively eliminating core functionality.
22+
23+
## [v2.0.0](https://github.com/purescript-contrib/purescript-avar/releases/tag/v2.0.0) - 2017-08-31
24+
25+
- Changed argument order
26+
- Added `AVarStatus` rather than just `isEmptyVar`.
27+
28+
## [v1.0.0](https://github.com/purescript-contrib/purescript-avar/releases/tag/v1.0.0) - 2017-07-18
29+
30+
- Initial release
31+

CONTRIBUTING.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Contributing to AVar
2+
3+
Thanks for your interest in contributing to `avar`! We welcome new contributions regardless of your level of experience or familiarity with PureScript.
4+
5+
Every library in the Contributors organization shares a simple handbook that helps new contributors get started. With that in mind, please [read the short contributing guide on purescript-contrib/governance](https://github.com/purescript-contrib/governance/blob/main/contributing.md) before contributing to this library.

README.md

+32-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,43 @@
1-
# purescript-avar
1+
# AVar
22

3-
[![Latest release](http://img.shields.io/github/release/slamdata/purescript-avar.svg)](https://github.com/slamdata/purescript-avar/releases)
4-
[![Build status](https://travis-ci.org/slamdata/purescript-avar.svg?branch=master)](https://travis-ci.org/slamdata/purescript-avar)
3+
[![CI](https://github.com/purescript-contrib/purescript-avar/workflows/CI/badge.svg?branch=main)](https://github.com/purescript-contrib/purescript-avar/actions?query=workflow%3ACI+branch%3Amain)
4+
[![Release](https://img.shields.io/github/release/purescript-contrib/purescript-avar.svg)](https://github.com/purescript-contrib/purescript-avar/releases)
5+
[![Pursuit](https://pursuit.purescript.org/packages/purescript-avar/badge)](https://pursuit.purescript.org/packages/purescript-avar)
6+
[![Maintainer: garyb](https://img.shields.io/badge/maintainer-garyb-teal.svg)](https://github.com/garyb)
7+
[![Maintainer: thomashoneyman](https://img.shields.io/badge/maintainer-thomashoneyman-teal.svg)](https://github.com/thomashoneyman)
58

69
Low-level interface for asynchronous variables.
710

811
## Installation
912

13+
Install `avar` with [Spago](https://github.com/purescript/spago):
14+
15+
```sh
16+
spago install avar
1017
```
11-
bower install purescript-avar
12-
```
18+
19+
## Quick start
20+
21+
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).
1322

1423
## Documentation
1524

16-
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-avar).
25+
`avar` documentation is stored in a few places:
26+
27+
1. Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-avar).
28+
2. Usage examples can be found in [the test suite](./test).
29+
30+
If you get stuck, there are several ways to get help:
31+
32+
- [Open an issue](https://github.com/purescript-contrib/purescript-avar/issues) if you have encountered a bug or problem.
33+
- [Search or start a thread on the PureScript Discourse](https://discourse.purescript.org) if you have general questions. You can also ask questions in the `#purescript` and `#purescript-beginners` channels on the [Functional Programming Slack](https://functionalprogramming.slack.com) ([invite link](https://fpchat-invite.herokuapp.com/)).
34+
35+
## Contributing
36+
37+
You can contribute to `avar` in several ways:
38+
39+
1. If you encounter a problem or have a question, please [open an issue](https://github.com/purescript-contrib/purescript-avar/issues). We'll do our best to work with you to resolve or answer it.
40+
41+
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.
1742

43+
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.

package.json

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
{
22
"private": true,
33
"scripts": {
4-
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "eslint src && pulp build -- --censor-lib --strict",
6-
"test": "pulp test"
4+
"build": "eslint src && spago build --purs-args '--censor-lib --strict'",
5+
"test": "spago test --no-install"
76
},
87
"devDependencies": {
9-
"eslint": "^4.19.1",
10-
"pulp": "^12.2.0",
11-
"purescript-psa": "^0.6.0",
12-
"purescript": "slamdata/node-purescript#0.12",
13-
"rimraf": "^2.6.2"
8+
"eslint": "^7.6.0",
9+
"purescript-psa": "^0.8.0"
1410
}
1511
}

packages.dhall

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
let upstream =
2+
https://github.com/purescript/package-sets/releases/download/psc-0.13.8-20200922/packages.dhall sha256:5edc9af74593eab8834d7e324e5868a3d258bbab75c5531d2eb770d4324a2900
3+
4+
in upstream

spago.dhall

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{ name = "avar"
2+
, dependencies =
3+
[ "aff"
4+
, "assert"
5+
, "console"
6+
, "effect"
7+
, "either"
8+
, "exceptions"
9+
, "functions"
10+
, "maybe"
11+
, "psci-support"
12+
, "refs"
13+
, "transformers"
14+
]
15+
, packages = ./packages.dhall
16+
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
17+
}

0 commit comments

Comments
 (0)