Skip to content

Commit 8c1f76a

Browse files
Migrate to GitHub Actions (#30)
1 parent 88740ee commit 8c1f76a

File tree

9 files changed

+75
-72
lines changed

9 files changed

+75
-72
lines changed

.eslintrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 5
4+
},
5+
"extends": "eslint:recommended",
6+
"env": {
7+
"commonjs": true
8+
},
9+
"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"]
27+
}
28+
}

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: purescript-contrib/setup-purescript@main
16+
17+
- uses: actions/setup-node@v1
18+
with:
19+
node-version: "10"
20+
21+
- name: Install dependencies
22+
run: |
23+
npm install -g bower
24+
npm install
25+
bower install --production
26+
27+
- name: Build source
28+
run: npm run-script build
29+
30+
- name: Run tests
31+
run: |
32+
bower install
33+
npm run-script test --if-present

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/.*
22
!/.gitignore
3-
!/.jscsrc
4-
!/.jshintrc
5-
!/.travis.yml
3+
!/.eslintrc.json
4+
!/.github/
65
/bower_components/
76
/node_modules/
87
/output/

.jscsrc

Lines changed: 0 additions & 17 deletions
This file was deleted.

.jshintrc

Lines changed: 0 additions & 19 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# purescript-node-streams
22

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

67
A wrapper for Node's [Stream API](https://nodejs.org/api/stream.html).
78

89
## Installation
910

1011
```
11-
bower install purescript-node-streams
12+
spago install node-streams
1213
```
1314

1415
## Documentation

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
"private": true,
33
"scripts": {
44
"clean": "rimraf output && rimraf .pulp-cache",
5-
"build": "jshint src && jscs src && pulp build -- --censor-lib --strict",
5+
"build": "eslint src && pulp build -- --censor-lib --strict",
66
"test": "pulp test"
77
},
88
"devDependencies": {
9-
"jscs": "^3.0.7",
10-
"jshint": "^2.9.5",
11-
"pulp": "^12.2.0",
12-
"purescript-psa": "^0.6.0",
13-
"rimraf": "^2.6.2",
9+
"eslint": "^7.15.0",
10+
"pulp": "^15.0.0",
11+
"purescript-psa": "^0.8.0",
12+
"rimraf": "^3.0.2",
1413
"stream-buffers": "^3.0.2"
1514
}
1615
}

src/Node/Stream.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* global Buffer */
12
"use strict";
23

34
exports.undefined = undefined;
@@ -20,8 +21,9 @@ exports.readChunkImpl = function (Left) {
2021
} else {
2122
throw new Error(
2223
"Node.Stream.readChunkImpl: Unrecognised " +
23-
"chunk type; expected String or Buffer, got: " +
24-
chunk);
24+
"chunk type; expected String or Buffer, got: " +
25+
chunk
26+
);
2527
}
2628
};
2729
};

0 commit comments

Comments
 (0)