Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: purescript-node/purescript-node-http
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: purescript-node/purescript-node-http
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
29 changes: 29 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": "eslint:recommended",
"env": {
"node": true
},
"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],
"quotes": [2, "double"],
"semi": [2, "always"]
}
}
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**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.

---

**Checklist:**

- [ ] Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
- [ ] Linked any existing issues or proposals that this pull request should close
- [ ] Updated or added relevant documentation
- [ ] Added a test for the contribution (if applicable)
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: purescript-contrib/setup-purescript@main
with:
purescript: "unstable"
purs-tidy: "latest"

- uses: actions/setup-node@v3
with:
node-version: "lts/*"

- name: Install dependencies
run: |
npm install -g bower
npm install
bower install --production
- name: Build source
run: npm run-script build

- name: Run tests
run: |
bower install
npm run-script test --if-present
- name: Check formatting
run: |
purs-tidy check src test
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/.*
!/.gitignore
!/.jscsrc
!/.jshintrc
!/.travis.yml
!/.eslintrc.json
!/.github/
/bower_components/
/node_modules/
/output/
package-lock.json
17 changes: 0 additions & 17 deletions .jscsrc

This file was deleted.

19 changes: 0 additions & 19 deletions .jshintrc

This file was deleted.

17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

142 changes: 142 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# 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:

## [v9.1.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v9.1.0) - 2023-08-01

Other improvements:
- Update `node-tls` to `v0.3.1` to fix conflicting transitive dep on `node-buffer` (#52 by @JordanMartinez)

## [v9.0.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v9.0.0) - 2023-08-01

Breaking changes:
- Update node libraries to latest releases (#48 by @JordanMartinez)
- Reimplement `http`/`https` bindings (#49, #50 by @JordanMartinez)

Other improvements:
- Fix flaky `upgrade` test (#50 by @JordanMartinez)
- Add links to Node's docs (#51 by @JordanMartinez)

## [v8.0.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v8.0.0) - 2022-04-29

Breaking changes:
- Update project and deps to PureScript v0.15.0 (#41 by @JordanMartinez, @sigma-andex)

## [v7.0.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v7.0.0) - 2022-04-28

Due to implementing a breaking change incorrectly, use v8.0.0 instead.

## [v6.0.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v6.0.0) - 2021-02-26

Breaking changes:
- Added support for PureScript 0.14 and dropped support for all previous versions (#31)

New features:
- Added `onUpgrade` to allow users to listen to and respond to HTTP upgrades (#33)

Other improvements:
- Migrated CI to GitHub Actions, updated installation instructions to use Spago, and migrated from `jshint` to `eslint` (#30)
- Added a changelog and pull request template (#34)

## [v5.0.2](https://github.com/purescript-node/purescript-node-http/releases/tag/v5.0.2) - 2019-07-24

- Relaxed upper bounds on `node-buffer`

## [v5.0.1](https://github.com/purescript-node/purescript-node-http/releases/tag/v5.0.1) - 2019-05-28

- Relaxed upper bounds on `foreign-object` and `options`

## [v5.0.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v5.0.0) - 2018-05-29

- Updated for 0.12

## [v4.2.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v4.2.0) - 2017-11-06

- Added `Node.HTTP.close` (@lpil)

## [v4.1.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v4.1.0) - 2017-08-02

- Added bindings to node's `https` module (@cprussin).

## [v4.0.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v4.0.0) - 2017-04-05

- Updated for 0.11 compiler (@anilanar)

## [v3.0.1](https://github.com/purescript-node/purescript-node-http/releases/tag/v3.0.1) - 2016-11-10

- Fixed an accidentally exported function (`listenImpl`).

## [v3.0.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v3.0.0) - 2016-11-10

- Allow specifying a hostname and backlog when calling `Node.HTTP.listen`
- Added `listenSocket`.

## [v2.0.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v2.0.0) - 2016-10-22

- Updated dependencies

## [v1.2.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v1.2.0) - 2016-09-06

- Added IP address family option (@kika)

## [v1.1.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v1.1.0) - 2016-08-14

- Separated headers and cookies to avoid type errors (@kika)

## [v1.0.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v1.0.0) - 2016-06-10

- Updated for 1.0/0.9.1

## [v0.4.1](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.4.1) - 2016-05-02

- Fixed license in bower.json for Pursuit

## [v0.4.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.4.0) - 2016-05-02

- Bump dependency on `purescript-node-streams`

## [v0.3.1](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.3.1) - 2016-02-28

- Added support for HTTPS (@hdgarrood)

## [v0.2.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.2.0) - 2016-01-12

- Bumped `streams` dependency (@hdgarrood)

## [v0.1.7](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.1.7) - 2015-11-12

- Added `setTimeout`

## [v0.1.5](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.1.5) - 2015-09-29

- Fixed type of `headers`.

## [v0.1.4](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.1.4) - 2015-09-28

- Added `requestFromURI`.

## [v0.1.3](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.1.3) - 2015-09-28

- Added client module.

## [v0.1.2](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.1.2) - 2015-09-23

- Fixed `bower.json`

## [v0.1.1](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.1.1) - 2015-09-23

- Deployed to Pursuit

## [v0.1.0](https://github.com/purescript-node/purescript-node-http/releases/tag/v0.1.0) - 2015-09-23

- Initial release
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# purescript-node-http

[![Latest release](http://img.shields.io/github/release/purescript-node/purescript-node-http.svg)](https://github.com/purescript/purescript-node-http/releases)
[![Build Status](https://travis-ci.org/purescript-node/purescript-node-http.svg?branch=master)](https://travis-ci.org/purescript-node/purescript-node-http)
[![Build status](https://github.com/purescript-node/purescript-node-http/workflows/CI/badge.svg?branch=master)](https://github.com/purescript-node/purescript-node-http/actions?query=workflow%3ACI+branch%3Amaster)
[![Pursuit](https://pursuit.purescript.org/packages/purescript-node-http/badge)](https://pursuit.purescript.org/packages/purescript-node-http)

A wrapper for Node's HTTP APIs.
A wrapper for Node's [HTTP](https://nodejs.org/dist/latest-v18.x/docs/api/http.html) and [HTTPS](https://nodejs.org/dist/latest-v18.x/docs/api/https.html) APIs.

## Installation

```
bower install purescript-node-http
spago install node-http
```

## Documentation
24 changes: 17 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
@@ -9,16 +9,26 @@
],
"repository": {
"type": "git",
"url": "git://github.com/purescript-node/purescript-node-http.git"
"url": "https://github.com/purescript-node/purescript-node-http.git"
},
"devDependencies": {
"purescript-console": "^2.0.0"
"purescript-console": "^6.0.0"
},
"dependencies": {
"purescript-maps": "^2.0.0",
"purescript-node-streams": "^2.0.0",
"purescript-node-url": "^2.0.0",
"purescript-options": "^2.0.0",
"purescript-unsafe-coerce": "^2.0.0"
"purescript-arraybuffer-types": "^3.0.2",
"purescript-contravariant": "^6.0.0",
"purescript-effect": "^4.0.0",
"purescript-foreign": "^7.0.0",
"purescript-foreign-object": "^4.0.0",
"purescript-maybe": "^6.0.0",
"purescript-node-buffer": "^9.0.0",
"purescript-node-net": "^5.1.0",
"purescript-node-streams": "^9.0.0",
"purescript-node-tls": "https://github.com/purescript-node/purescript-node-tls.git#^0.3.1",
"purescript-node-url": "^7.0.0",
"purescript-nullable": "^6.0.0",
"purescript-options": "^7.0.0",
"purescript-prelude": "^6.0.0",
"purescript-unsafe-coerce": "^6.0.0"
}
}
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -2,15 +2,13 @@
"private": true,
"scripts": {
"clean": "rimraf output && rimraf .pulp-cache",
"build": "jshint src && jscs src && pulp build --censor-lib --strict",
"test": "pulp build -I test"
"build": "eslint src && pulp build -- --censor-lib --strict",
"test": "pulp test -- --censor-lib"
},
"devDependencies": {
"jscs": "^3.0.7",
"jshint": "^2.9.4",
"pulp": "^9.0.1",
"purescript-psa": "^0.3.9",
"purescript": "^0.10.1",
"rimraf": "^2.5.4"
"eslint": "^7.15.0",
"pulp": "16.0.0-0",
"purescript-psa": "^0.8.2",
"rimraf": "^3.0.2"
}
}
Loading