From 7f89a1d9e4586ed0242e946b3479256e9569d597 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 13 Sep 2020 20:17:53 -0700 Subject: [PATCH 1/8] Migrate project to Spago --- packages.dhall | 4 ++++ spago.dhall | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 packages.dhall create mode 100644 spago.dhall diff --git a/packages.dhall b/packages.dhall new file mode 100644 index 0000000..1f2cd01 --- /dev/null +++ b/packages.dhall @@ -0,0 +1,4 @@ +let upstream = + https://github.com/purescript/package-sets/releases/download/psc-0.13.8-20200911-2/packages.dhall sha256:872c06349ed9c8210be43982dc6466c2ca7c5c441129826bcb9bf3672938f16e + +in upstream diff --git a/spago.dhall b/spago.dhall new file mode 100644 index 0000000..dd8219d --- /dev/null +++ b/spago.dhall @@ -0,0 +1,6 @@ +{ name = "nullable" +, dependencies = + [ "assert", "console", "effect", "functions", "maybe", "psci-support" ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] +} From 7700f3a0e4feba9fc6e2f7b4111b975f0be76e4d Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 13 Sep 2020 20:17:53 -0700 Subject: [PATCH 2/8] Capitalize .github/ files --- .github/{contributing.md => CONTRIBUTING.md} | 0 .github/{pull_request_template.md => PULL_REQUEST_TEMPLATE.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/{contributing.md => CONTRIBUTING.md} (100%) rename .github/{pull_request_template.md => PULL_REQUEST_TEMPLATE.md} (100%) diff --git a/.github/contributing.md b/.github/CONTRIBUTING.md similarity index 100% rename from .github/contributing.md rename to .github/CONTRIBUTING.md diff --git a/.github/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from .github/pull_request_template.md rename to .github/PULL_REQUEST_TEMPLATE.md From 86dc44a6680f50b3bd29787fe655568d16fe24ae Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 13 Sep 2020 20:17:53 -0700 Subject: [PATCH 3/8] Remove old issue_template.md file --- .github/issue_template.md | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .github/issue_template.md diff --git a/.github/issue_template.md b/.github/issue_template.md deleted file mode 100644 index 3ab5ed6..0000000 --- a/.github/issue_template.md +++ /dev/null @@ -1,22 +0,0 @@ -## Pre-check - -* For help and support, try the [PureScript user forum](https://discourse.purescript.org) or the [functional programming Slack](https://functionalprogramming.slack.com) before opening an issue in the repository. -* For bug reports, do a quick search to ensure the bug has not yet been reported. -* For new feature requests, please remember to describe the feature you would like to see, why you need it, and how it might be implemented. -* Finally -- be nice and have fun! - ---- - -## Environment - -* PureScript **[version]** -* Pulp **[version]** -* `purescript-nullable` **[version]** - -## Current behavior - -Please include code samples, errors, steps to reproduce, and compiler output if appropriate. - -If possible, provide a sample minimal app or test case that reproduces the error. For visual bugs that are difficult to demonstrate in text, consider including a .gif using an app like [Recordit](http://www.recordit.co/). - -## Expected behavior From 0c9a09acbc6528e69391ed4df3248725368f761a Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 13 Sep 2020 20:23:21 -0700 Subject: [PATCH 4/8] Remove .travis.yml file --- .travis.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6da455e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -dist: trusty -sudo: required -node_js: stable -env: - - PATH=$HOME/purescript:$PATH -install: - - TAG=$(basename $(curl --location --silent --output /dev/null -w %{url_effective} https://github.com/purescript/purescript/releases/latest)) - - curl --location --output $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz - - tar -xvf $HOME/purescript.tar.gz -C $HOME/ - - chmod a+x $HOME/purescript - - npm install -g bower - - npm install - - bower install --production -script: - - npm run -s build - - bower install - - npm run -s test -after_success: - - >- - test $TRAVIS_TAG && - echo $GITHUB_TOKEN | pulp login && - echo y | pulp publish --no-push From 8fa08df9f4318f6b669f60d0612ea390e49b4b7a Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 13 Sep 2020 20:23:55 -0700 Subject: [PATCH 5/8] Run `contrib-updater --uses-js --maintainer paf31` --- .editorconfig | 13 ++++++ .eslintrc.json | 47 ++++++++++----------- .github/CONTRIBUTING.md | 52 ++---------------------- .github/ISSUE_TEMPLATE/bug-report.md | 19 +++++++++ .github/ISSUE_TEMPLATE/change-request.md | 21 ++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 ++++ .github/PULL_REQUEST_TEMPLATE.md | 20 ++++----- .github/workflows/ci.yml | 51 +++++++++++++++++++++++ .github/workflows/stale.yml | 23 +++++++++++ .gitignore | 20 ++++----- README.md | 45 +++++++++++++++----- backups/.github/CONTRIBUTING.md | 51 +++++++++++++++++++++++ backups/.github/PULL_REQUEST_TEMPLATE.md | 15 +++++++ backups/.github/workflows/ci.yml | 34 ++++++++++++++++ backups/.gitignore | 8 ++++ backups/README.md | 18 ++++++++ docs/CHANGELOG.md | 15 +++++++ docs/README.md | 3 ++ package.json | 11 ++--- 19 files changed, 359 insertions(+), 115 deletions(-) create mode 100644 .editorconfig create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/change-request.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/stale.yml create mode 100644 backups/.github/CONTRIBUTING.md create mode 100644 backups/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 backups/.github/workflows/ci.yml create mode 100644 backups/.gitignore create mode 100644 backups/README.md create mode 100644 docs/CHANGELOG.md create mode 100644 docs/README.md diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7c68b07 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# https://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.eslintrc.json b/.eslintrc.json index 39963d3..17f167d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,28 +1,29 @@ { - "parserOptions": { - "ecmaVersion": 5 - }, + "env": { "browser": true, "commonjs": true }, "extends": "eslint:recommended", - "env": { - "commonjs": true - }, + "parserOptions": { "ecmaVersion": 5 }, "rules": { - "strict": [2, "global"], - "block-scoped-var": 2, - "consistent-return": 2, - "eqeqeq": [2, "smart"], - "guard-for-in": 2, - "no-caller": 2, - "no-extend-native": 2, - "no-loop-func": 2, - "no-new": 2, - "no-param-reassign": 2, - "no-return-assign": 2, - "no-unused-expressions": 2, - "no-use-before-define": 2, - "radix": [2, "always"], - "indent": [2, 2, { "SwitchCase": 1 }], - "quotes": [2, "double"], - "semi": [2, "always"] + "block-scoped-var": "error", + "consistent-return": "error", + "eqeqeq": "error", + "guard-for-in": "error", + "no-bitwise": "error", + "no-caller": "error", + "no-extra-parens": "off", + "no-extend-native": "error", + "no-loop-func": "error", + "no-new": "error", + "no-param-reassign": "error", + "no-return-assign": "error", + "no-sequences": "error", + "no-unused-expressions": "error", + "no-use-before-define": "error", + "no-undef": "error", + "no-eq-null": "error", + "radix": ["error", "always"], + "indent": ["error", 2, { "SwitchCase": 1 }], + "quotes": ["error", "double"], + "semi": ["error", "always"], + "strict": ["error", "global"] } } diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index cc17d75..e4fe72e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,51 +1,5 @@ -# Contribution +# Contributing to Nullable -Thank you for contributing to `purescript-nullable`! +Thanks for your interest in contributing to `nullable`! We welcome new contributions regardless of your level of experience or familiarity with PureScript. -Following these guidelines helps ensure we're able to carefully consider your contribution and help you finalize your pull request. Your time (like ours) is valuable, and we try to at least provide constructive feedback on every contribution. - -### Contributions we love -`purescript-nullable` is an open-source library and we love to receive contributions. There are many ways you can contribute: - -* Help expand our test coverage -* Help fix open issues, even if that simply means adding a helpful comment -* Help push along open pull requests that need more work to be complete -* Improve or add new usage examples to better demonstrate how to use the library in real-world scenarios -* Update documentation and tutorials to be easier to understand, more comprehensive, and above all -- up to date! - -### Contributions we should discuss -Some contributions will take some discussion before we accept an update to the project. If your contribution includes one of the below examples (or seems to be reasonably similar), please consider reaching out to us before putting in a lot of work to build the feature. We're active on the [PureScript user forum](https://discourse.purescript.org) and the [functional programming Slack](https://functionalprogramming.slack.com/) community (new? [use this link to join](https://fpchat-invite.herokuapp.com/)!). For feature requests, feel free to open an issue with a tag. - -* New features and functions that will change the library's public API -* New tutorials (while we love seeing new tutorials, we won't always be able to feature them in the readme) - -# Ground Rules - -We have a small set of quality-of-life guidelines for contributing to `purescript-nullable`. These include: - -* All pull requests must pass continuous integration. -* If you are adding new functionality, you should provide tests and documentation for your code. If you're fixing an existing bug, please provide a failing test case your patch solves. -* If possible, please avoid requiring new dependencies. - -### Filing issues -If you have a general question about the project, it's best to ask on the [PureScript user forum](https://discourse.purescript.org) or the [functional programming Slack](https://functionalprogramming.slack.com/) than to open a new issue. If you have run into a bug in the project, then please do open an issue! When you do, we ask that you follow a few steps which are outlined in our issues template. The gist of it is here: - -* Verify the problem is indeed with `purescript-nullable` (not with Pulp, Bower, or PureScript); -* Record what versions you are using for PureScript and `purescript-nullable` -* Describe the issue with steps to reproduce (as much as you are able). A minimal reproducible example is the absolute best case scenario. - -We promise to address the issue as soon as we can. - -### Suggesting features or enhancements -We love to hear about ways we could make better. If you're wishing for a feature that doesn't exist in `purescript-nullable`, you're probably not alone; there are bound to be others with similar needs. Please feel free to open an issue on GitHub that describes: - -* the feature you would like to see -* why you need it -* how it should work - -We promise to review your issue, but we aren't always able to accommodate all requests. It helps if you're able to contribute to the implementation, too! - -### Code reviews -The core team looks at pull requests weekly, at which point we will review your code, ensure it meets our ground rules and fits with the philosophy of the project, and -- if necessary -- provide constructive feedback. As soon as at least one member of the team has signed off on your pull request, we will merge your contribution. - -If you opened a pull request and we need to ask a few questions, we expect responses within a month. After that we may close the pull request if it isn't showing any activity to keep things manageable. +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. diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..b79b995 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,19 @@ +--- +name: Bug report +about: Report an issue +title: "" +labels: bug +assignees: "" +--- + +**Describe the bug** +A clear and concise description of the bug. + +**To Reproduce** +A minimal code example (preferably a runnable example on [Try PureScript](https://try.purescript.org)!) or steps to reproduce the issue. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/change-request.md b/.github/ISSUE_TEMPLATE/change-request.md new file mode 100644 index 0000000..a2ee685 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/change-request.md @@ -0,0 +1,21 @@ +--- +name: Change request +about: Propose an improvement to this library +title: "" +labels: "" +assignees: "" +--- + +**Is your change request related to a problem? Please describe.** +A clear and concise description of the problem. + +Examples: + +- It's frustrating to have to [...] +- I was looking for a function to [...] + +**Describe the solution you'd like** +A clear and concise description of what a good solution to you looks like, including any solutions you've already considered. + +**Additional context** +Add any other context about the change request here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..c47a263 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: PureScript Discourse + url: https://discourse.purescript.org/ + about: Ask and answer questions here. + - name: Functional Programming Slack + url: https://functionalprogramming.slack.com + about: For casual chat and questions (use https://fpchat-invite.herokuapp.com to join). diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7c16360..d8780f7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,15 +1,11 @@ -## What does this pull request do? +**Description of the change** +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. -Please describe the purpose of the pull request, including any background context and links to related issues. If this introduces a large change to the project, please describe what you have implemented. +--- -## Where should the reviewer start? +**Checklist:** -Help save the reviewer time by highlighting the most important sections of code. - -## How should this be manually tested? - -If this is a new feature, you should provide new test coverage. If it fixes an existing bug, you should provide a failing test case this change fixes. Other than automated testing, what manual tests can the reviewer perform to verify your work? - -## Other Notes: - -Does the project documentation need to be updated? Should we introduce a new example, or update any existing examples? Does this PR require any other follow-up tasks? +- [ ] Added the change to the changelog's "Unreleased" section with a link to this PR and your username +- [ ] Linked any existing issues or proposals that this pull request should close +- [ ] Updated or added relevant documentation in the README and/or documentation directory +- [ ] Added a test for the contribution (if applicable) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0b3ca67 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up PureScript toolchain + uses: purescript-contrib/setup-purescript@main + + - name: Cache PureScript dependencies + uses: actions/cache@v2 + with: + key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }} + path: | + .spago + output + + - name: Set up Node toolchain + uses: actions/setup-node@v1 + with: + node-version: "12.x" + + - name: Cache NPM dependencies + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install NPM dependencies + run: npm install + + - name: Build the project + run: npm run build + + - name: Run tests + run: npm run test diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..002dae8 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,23 @@ +name: "Stale" + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + env: + days-until-stale: 60 + days-until-close: 14 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "This issue is stale because it has been open for ${{ env.days-until-stale }} days with no activity. Remove the stale label or comment to keep this issue open. Otherwise, this issue will be closed in ${{ env.days-until-close }} days." + stale-pr-message: "This pull request is stale because it has been open for ${{ env.days-until-stale }} days with no activity. Remove the stale label or comment to keep this pull request open. Otherwise, this pull request will be closed in ${{ env.days-until-close }} days." + days-before-stale: ${{ env.days-until-stale }} + days-before-close: ${{ env.days-until-close }} + stale-issue-label: "stale" + stale-pr-label: "stale" + exempt-pr-labels: "breaking change" diff --git a/.gitignore b/.gitignore index 52587f6..5a54e2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,13 @@ -/.* -!/.gitignore -!/.github -!/.travis.yml +.* +!.gitignore +!.github +!.editorconfig +!.eslintrc.json -# Dependencies -bower_components -node_modules - -# Generated files output generated-docs +bower_components -# Lockfiles +node_modules package-lock.json *.lock - -# Extra files -!/.eslintrc.json diff --git a/README.md b/README.md index 88e8d0b..34caa0d 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,43 @@ -# purescript-nullable +# Nullable -[![Latest release](http://img.shields.io/github/release/purescript-contrib/purescript-nullable.svg)](https://github.com/purescript-contrib/purescript-nullable/releases) -[![Build status](https://travis-ci.org/purescript-contrib/purescript-nullable.svg?branch=master)](https://travis-ci.org/purescript-contrib/purescript-nullable) -[![Pursuit](http://pursuit.purescript.org/packages/purescript-nullable/badge)](http://pursuit.purescript.org/packages/purescript-nullable/) -[![Maintainer: paf31](https://img.shields.io/badge/maintainer-paf31-lightgrey.svg)](http://github.com/paf31) +[![CI](https://github.com/purescript-contrib/purescript-nullable/workflows/CI/badge.svg?branch=main)](https://github.com/purescript-contrib/purescript-nullable/actions?query=workflow%3ACI+branch%3Amain) +[![Release](https://img.shields.io/github/release/purescript-contrib/purescript-nullable.svg)](https://github.com/purescript-contrib/purescript-nullable/releases) +[![Pursuit](https://pursuit.purescript.org/packages/purescript-nullable/badge)](https://pursuit.purescript.org/packages/purescript-nullable) +[![Maintainer: paf31](https://img.shields.io/badge/maintainer-paf31-teal.svg)](https://github.com/paf31) -A library for dealing with null values in foreign libraries. +The library summary hasn't been written yet (contributions are welcome!). The library summary describes the library's purpose in one to three sentences. -## Installing +## Installation - bower i purescript-nullable +Install `nullable` with [Spago](https://github.com/purescript/spago): -- [Module Documentation](https://pursuit.purescript.org/packages/purescript-nullable) +```sh +spago install nullable +``` + +## Quick start + +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.) + +## Documentation + +`nullable` documentation is stored in a few places: + +1. Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-nullable). +2. Written documentation and [the changelog](./docs/CHANGELOG.md) are kept in [the docs directory](./docs). +3. Usage examples can be found in [the test suite](./test). + +If you get stuck, there are several ways to get help: + +- [Open an issue](https://github.com/purescript-contrib/purescript-nullable/issues) if you have encountered a bug or problem. +- [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/)). ## Contributing -Read the [contribution guidelines](https://github.com/purescript-contrib/purescript-nullable/blob/master/.github/contributing.md) to get started and see helpful related resources. +You can contribute to `nullable` in several ways: + +1. If you encounter a problem or have a question, please [open an issue](https://github.com/purescript-contrib/purescript-nullable/issues). We'll do our best to work with you to resolve or answer it. + +2. If you would like to contribute code, tests, or documentation, please [read the contributor guide](./.github/CONTRIBUTING.md). It's a short, helpful introduction to contributing to this library, including development instructions. + +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. diff --git a/backups/.github/CONTRIBUTING.md b/backups/.github/CONTRIBUTING.md new file mode 100644 index 0000000..cc17d75 --- /dev/null +++ b/backups/.github/CONTRIBUTING.md @@ -0,0 +1,51 @@ +# Contribution + +Thank you for contributing to `purescript-nullable`! + +Following these guidelines helps ensure we're able to carefully consider your contribution and help you finalize your pull request. Your time (like ours) is valuable, and we try to at least provide constructive feedback on every contribution. + +### Contributions we love +`purescript-nullable` is an open-source library and we love to receive contributions. There are many ways you can contribute: + +* Help expand our test coverage +* Help fix open issues, even if that simply means adding a helpful comment +* Help push along open pull requests that need more work to be complete +* Improve or add new usage examples to better demonstrate how to use the library in real-world scenarios +* Update documentation and tutorials to be easier to understand, more comprehensive, and above all -- up to date! + +### Contributions we should discuss +Some contributions will take some discussion before we accept an update to the project. If your contribution includes one of the below examples (or seems to be reasonably similar), please consider reaching out to us before putting in a lot of work to build the feature. We're active on the [PureScript user forum](https://discourse.purescript.org) and the [functional programming Slack](https://functionalprogramming.slack.com/) community (new? [use this link to join](https://fpchat-invite.herokuapp.com/)!). For feature requests, feel free to open an issue with a tag. + +* New features and functions that will change the library's public API +* New tutorials (while we love seeing new tutorials, we won't always be able to feature them in the readme) + +# Ground Rules + +We have a small set of quality-of-life guidelines for contributing to `purescript-nullable`. These include: + +* All pull requests must pass continuous integration. +* If you are adding new functionality, you should provide tests and documentation for your code. If you're fixing an existing bug, please provide a failing test case your patch solves. +* If possible, please avoid requiring new dependencies. + +### Filing issues +If you have a general question about the project, it's best to ask on the [PureScript user forum](https://discourse.purescript.org) or the [functional programming Slack](https://functionalprogramming.slack.com/) than to open a new issue. If you have run into a bug in the project, then please do open an issue! When you do, we ask that you follow a few steps which are outlined in our issues template. The gist of it is here: + +* Verify the problem is indeed with `purescript-nullable` (not with Pulp, Bower, or PureScript); +* Record what versions you are using for PureScript and `purescript-nullable` +* Describe the issue with steps to reproduce (as much as you are able). A minimal reproducible example is the absolute best case scenario. + +We promise to address the issue as soon as we can. + +### Suggesting features or enhancements +We love to hear about ways we could make better. If you're wishing for a feature that doesn't exist in `purescript-nullable`, you're probably not alone; there are bound to be others with similar needs. Please feel free to open an issue on GitHub that describes: + +* the feature you would like to see +* why you need it +* how it should work + +We promise to review your issue, but we aren't always able to accommodate all requests. It helps if you're able to contribute to the implementation, too! + +### Code reviews +The core team looks at pull requests weekly, at which point we will review your code, ensure it meets our ground rules and fits with the philosophy of the project, and -- if necessary -- provide constructive feedback. As soon as at least one member of the team has signed off on your pull request, we will merge your contribution. + +If you opened a pull request and we need to ask a few questions, we expect responses within a month. After that we may close the pull request if it isn't showing any activity to keep things manageable. diff --git a/backups/.github/PULL_REQUEST_TEMPLATE.md b/backups/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..7c16360 --- /dev/null +++ b/backups/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,15 @@ +## What does this pull request do? + +Please describe the purpose of the pull request, including any background context and links to related issues. If this introduces a large change to the project, please describe what you have implemented. + +## Where should the reviewer start? + +Help save the reviewer time by highlighting the most important sections of code. + +## How should this be manually tested? + +If this is a new feature, you should provide new test coverage. If it fixes an existing bug, you should provide a failing test case this change fixes. Other than automated testing, what manual tests can the reviewer perform to verify your work? + +## Other Notes: + +Does the project documentation need to be updated? Should we introduce a new example, or update any existing examples? Does this PR require any other follow-up tasks? diff --git a/backups/.github/workflows/ci.yml b/backups/.github/workflows/ci.yml new file mode 100644 index 0000000..6b0550f --- /dev/null +++ b/backups/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up a PureScript toolchain + uses: purescript-contrib/setup-purescript@main + + - name: Cache PureScript dependencies + uses: actions/cache@v2 + with: + key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }} + path: | + .spago + output + + - name: Install dependencies + run: spago install + + - name: Build source + run: spago build --no-install --purs-args '--censor-lib --strict' + + - name: Run tests + run: spago test --no-install diff --git a/backups/.gitignore b/backups/.gitignore new file mode 100644 index 0000000..7bca306 --- /dev/null +++ b/backups/.gitignore @@ -0,0 +1,8 @@ +.* +!.gitignore +!.github +!.editorconfig + +output +generated-docs +bower_components diff --git a/backups/README.md b/backups/README.md new file mode 100644 index 0000000..88e8d0b --- /dev/null +++ b/backups/README.md @@ -0,0 +1,18 @@ +# purescript-nullable + +[![Latest release](http://img.shields.io/github/release/purescript-contrib/purescript-nullable.svg)](https://github.com/purescript-contrib/purescript-nullable/releases) +[![Build status](https://travis-ci.org/purescript-contrib/purescript-nullable.svg?branch=master)](https://travis-ci.org/purescript-contrib/purescript-nullable) +[![Pursuit](http://pursuit.purescript.org/packages/purescript-nullable/badge)](http://pursuit.purescript.org/packages/purescript-nullable/) +[![Maintainer: paf31](https://img.shields.io/badge/maintainer-paf31-lightgrey.svg)](http://github.com/paf31) + +A library for dealing with null values in foreign libraries. + +## Installing + + bower i purescript-nullable + +- [Module Documentation](https://pursuit.purescript.org/packages/purescript-nullable) + +## Contributing + +Read the [contribution guidelines](https://github.com/purescript-contrib/purescript-nullable/blob/master/.github/contributing.md) to get started and see helpful related resources. diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md new file mode 100644 index 0000000..bb34d86 --- /dev/null +++ b/docs/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +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). + +## [Unreleased] + +Breaking changes (😱!!!): + +New features: + +Bugfixes: + +Other improvements: + +## [0.0.0] - 2020-01-01 diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..1d30f7c --- /dev/null +++ b/docs/README.md @@ -0,0 +1,3 @@ +# Nullable Documentation + +This directory contains documentation for `nullable`. If you are interested in contributing new documentation, please read the [contributor guidelines](../.github/CONTRIBUTING.md) and [What Nobody Tells You About Documentation](https://documentation.divio.com) for help getting started. diff --git a/package.json b/package.json index e8321db..ad3ecca 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,10 @@ { "private": true, "scripts": { - "postinstall": "bower install", - "clean": "rimraf output && rimraf .pulp-cache", - "build": "eslint src && pulp build -- --censor-lib --strict", - "test": "pulp test" + "build": "eslint src && spago build --purs-args '--censor-lib --strict'", + "test": "spago test --no-install" }, "devDependencies": { - "eslint": "^6.8.0", - "pulp": "^14.0.0", - "purescript-psa": "^0.7.3", - "rimraf": "^3.0.2" + "eslint": "^7.6.0" } } From 4121113613bf133ee67531d7233a021ddfa1af8d Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 13 Sep 2020 20:25:00 -0700 Subject: [PATCH 6/8] Remove backups folder --- backups/.github/CONTRIBUTING.md | 51 ------------------------ backups/.github/PULL_REQUEST_TEMPLATE.md | 15 ------- backups/.github/workflows/ci.yml | 34 ---------------- backups/.gitignore | 8 ---- backups/README.md | 18 --------- 5 files changed, 126 deletions(-) delete mode 100644 backups/.github/CONTRIBUTING.md delete mode 100644 backups/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 backups/.github/workflows/ci.yml delete mode 100644 backups/.gitignore delete mode 100644 backups/README.md diff --git a/backups/.github/CONTRIBUTING.md b/backups/.github/CONTRIBUTING.md deleted file mode 100644 index cc17d75..0000000 --- a/backups/.github/CONTRIBUTING.md +++ /dev/null @@ -1,51 +0,0 @@ -# Contribution - -Thank you for contributing to `purescript-nullable`! - -Following these guidelines helps ensure we're able to carefully consider your contribution and help you finalize your pull request. Your time (like ours) is valuable, and we try to at least provide constructive feedback on every contribution. - -### Contributions we love -`purescript-nullable` is an open-source library and we love to receive contributions. There are many ways you can contribute: - -* Help expand our test coverage -* Help fix open issues, even if that simply means adding a helpful comment -* Help push along open pull requests that need more work to be complete -* Improve or add new usage examples to better demonstrate how to use the library in real-world scenarios -* Update documentation and tutorials to be easier to understand, more comprehensive, and above all -- up to date! - -### Contributions we should discuss -Some contributions will take some discussion before we accept an update to the project. If your contribution includes one of the below examples (or seems to be reasonably similar), please consider reaching out to us before putting in a lot of work to build the feature. We're active on the [PureScript user forum](https://discourse.purescript.org) and the [functional programming Slack](https://functionalprogramming.slack.com/) community (new? [use this link to join](https://fpchat-invite.herokuapp.com/)!). For feature requests, feel free to open an issue with a tag. - -* New features and functions that will change the library's public API -* New tutorials (while we love seeing new tutorials, we won't always be able to feature them in the readme) - -# Ground Rules - -We have a small set of quality-of-life guidelines for contributing to `purescript-nullable`. These include: - -* All pull requests must pass continuous integration. -* If you are adding new functionality, you should provide tests and documentation for your code. If you're fixing an existing bug, please provide a failing test case your patch solves. -* If possible, please avoid requiring new dependencies. - -### Filing issues -If you have a general question about the project, it's best to ask on the [PureScript user forum](https://discourse.purescript.org) or the [functional programming Slack](https://functionalprogramming.slack.com/) than to open a new issue. If you have run into a bug in the project, then please do open an issue! When you do, we ask that you follow a few steps which are outlined in our issues template. The gist of it is here: - -* Verify the problem is indeed with `purescript-nullable` (not with Pulp, Bower, or PureScript); -* Record what versions you are using for PureScript and `purescript-nullable` -* Describe the issue with steps to reproduce (as much as you are able). A minimal reproducible example is the absolute best case scenario. - -We promise to address the issue as soon as we can. - -### Suggesting features or enhancements -We love to hear about ways we could make better. If you're wishing for a feature that doesn't exist in `purescript-nullable`, you're probably not alone; there are bound to be others with similar needs. Please feel free to open an issue on GitHub that describes: - -* the feature you would like to see -* why you need it -* how it should work - -We promise to review your issue, but we aren't always able to accommodate all requests. It helps if you're able to contribute to the implementation, too! - -### Code reviews -The core team looks at pull requests weekly, at which point we will review your code, ensure it meets our ground rules and fits with the philosophy of the project, and -- if necessary -- provide constructive feedback. As soon as at least one member of the team has signed off on your pull request, we will merge your contribution. - -If you opened a pull request and we need to ask a few questions, we expect responses within a month. After that we may close the pull request if it isn't showing any activity to keep things manageable. diff --git a/backups/.github/PULL_REQUEST_TEMPLATE.md b/backups/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 7c16360..0000000 --- a/backups/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,15 +0,0 @@ -## What does this pull request do? - -Please describe the purpose of the pull request, including any background context and links to related issues. If this introduces a large change to the project, please describe what you have implemented. - -## Where should the reviewer start? - -Help save the reviewer time by highlighting the most important sections of code. - -## How should this be manually tested? - -If this is a new feature, you should provide new test coverage. If it fixes an existing bug, you should provide a failing test case this change fixes. Other than automated testing, what manual tests can the reviewer perform to verify your work? - -## Other Notes: - -Does the project documentation need to be updated? Should we introduce a new example, or update any existing examples? Does this PR require any other follow-up tasks? diff --git a/backups/.github/workflows/ci.yml b/backups/.github/workflows/ci.yml deleted file mode 100644 index 6b0550f..0000000 --- a/backups/.github/workflows/ci.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: CI - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up a PureScript toolchain - uses: purescript-contrib/setup-purescript@main - - - name: Cache PureScript dependencies - uses: actions/cache@v2 - with: - key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }} - path: | - .spago - output - - - name: Install dependencies - run: spago install - - - name: Build source - run: spago build --no-install --purs-args '--censor-lib --strict' - - - name: Run tests - run: spago test --no-install diff --git a/backups/.gitignore b/backups/.gitignore deleted file mode 100644 index 7bca306..0000000 --- a/backups/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.* -!.gitignore -!.github -!.editorconfig - -output -generated-docs -bower_components diff --git a/backups/README.md b/backups/README.md deleted file mode 100644 index 88e8d0b..0000000 --- a/backups/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# purescript-nullable - -[![Latest release](http://img.shields.io/github/release/purescript-contrib/purescript-nullable.svg)](https://github.com/purescript-contrib/purescript-nullable/releases) -[![Build status](https://travis-ci.org/purescript-contrib/purescript-nullable.svg?branch=master)](https://travis-ci.org/purescript-contrib/purescript-nullable) -[![Pursuit](http://pursuit.purescript.org/packages/purescript-nullable/badge)](http://pursuit.purescript.org/packages/purescript-nullable/) -[![Maintainer: paf31](https://img.shields.io/badge/maintainer-paf31-lightgrey.svg)](http://github.com/paf31) - -A library for dealing with null values in foreign libraries. - -## Installing - - bower i purescript-nullable - -- [Module Documentation](https://pursuit.purescript.org/packages/purescript-nullable) - -## Contributing - -Read the [contribution guidelines](https://github.com/purescript-contrib/purescript-nullable/blob/master/.github/contributing.md) to get started and see helpful related resources. From 4e89af0e7dbc65ff2f18ed5b22fec672c09c160b Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 13 Sep 2020 20:50:38 -0700 Subject: [PATCH 7/8] Fix readme: use previous summary --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 34caa0d..74073e3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Pursuit](https://pursuit.purescript.org/packages/purescript-nullable/badge)](https://pursuit.purescript.org/packages/purescript-nullable) [![Maintainer: paf31](https://img.shields.io/badge/maintainer-paf31-teal.svg)](https://github.com/paf31) -The library summary hasn't been written yet (contributions are welcome!). The library summary describes the library's purpose in one to three sentences. +A library for dealing with null values in foreign libraries. ## Installation From e20d50676ed826ea4fb6fcd5c54846061c4b8f9f Mon Sep 17 00:00:00 2001 From: "Thomas R. Honeyman" Date: Mon, 14 Sep 2020 18:14:27 -0700 Subject: [PATCH 8/8] Allow comparison to undefined in FFI --- src/Data/Nullable.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Data/Nullable.js b/src/Data/Nullable.js index 27f72bc..35039cf 100644 --- a/src/Data/Nullable.js +++ b/src/Data/Nullable.js @@ -1,3 +1,5 @@ +/* eslint-disable no-eq-null, eqeqeq */ + "use strict"; exports["null"] = null;