Skip to content

Commit 6eb3616

Browse files
committed
build(semantic-release): Test with travis, auto package publishing
1 parent ab6e8df commit 6eb3616

File tree

6 files changed

+1728
-47
lines changed

6 files changed

+1728
-47
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,7 @@ node_modules
4040

4141
# Transpiled code
4242
/es
43-
/lib
43+
/lib
44+
45+
coverage
46+
.nyc_output

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
sudo: false
2+
language: node_js
3+
cache:
4+
yarn: true
5+
directories:
6+
- node_modules
7+
notifications:
8+
email: true
9+
node_js:
10+
- "7"
11+
script:
12+
- yarn run coverage
13+
- yarn run build
14+
after_success:
15+
- 'curl -Lo travis_after_all.py https://git.io/travis_after_all'
16+
- python travis_after_all.py
17+
- export $(cat .to_export_back) &> /dev/null
18+
- if [[ "$TRAVIS_JOB_NUMBER" == *.1 && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then bash <(curl -s https://codecov.io/bash); fi
19+
- if [[ "$TRAVIS_JOB_NUMBER" == *.1 && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then npm run semantic-release; fi
20+
branches:
21+
except:
22+
- /^v\d+\.\d+\.\d+$/

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
## master
1+
## 0.0.0-semantically-released (March 04, 2017)
2+
This package publishing automated by [semantic-release](https://github.com/semantic-release/semantic-release).
3+
[Changelog](https://github.com/nodkz/react-relay-network-layer/releases) is generated automatically and can be found here: https://github.com/nodkz/react-relay-network-layer/releases
24

35
## 1.4.0 (February 06, 2017)
46
- feat(Mutation): Add support to multiple files upload [relay#586](https://github.com/facebook/relay/issues/586). #38 (thanks to @giautm)
57
- fix(Auth middleware): Only first request that failed during tokenRefresh was retries. #37 (thanks to @alexxv)
6-
- chore(Packages): Update dev packages. Add yarn.
8+
- chore(Packages): Update dev packages. Add yarn.
79

810
## 1.3.9 (December 30, 2016)
911
- Auth middleware: when client makes multiples relay requests with expired token, we only need to refresh token once for those requests. #32 (thanks to @alexxv)

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ ReactRelayNetworkLayer
22
======================
33
[![](https://img.shields.io/npm/v/react-relay-network-layer.svg)](https://www.npmjs.com/package/react-relay-network-layer)
44
[![npm](https://img.shields.io/npm/dt/react-relay-network-layer.svg)](https://www.npmjs.com/package/react-relay-network-layer)
5+
[![Travis](https://img.shields.io/travis/nodkz/react-relay-network-layer.svg?maxAge=2592000)](https://travis-ci.org/nodkz/react-relay-network-layer)
6+
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
7+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
58

69
The `ReactRelayNetworkLayer` is a [Relay Network Layer](https://facebook.github.io/relay/docs/guides-network-layer.html)
710
with query batching and middleware support.

package.json

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-relay-network-layer",
3-
"version": "1.4.0",
3+
"version": "0.0.0-semantically-released",
44
"description": "Network Layer for React Relay and Express (Batch Queries, AuthToken, Logging, Retry)",
55
"files": [
66
"es",
@@ -10,7 +10,7 @@
1010
"jsnext:main": "es/index.js",
1111
"repository": {
1212
"type": "git",
13-
"url": "git+https://github.com/nodkz/react-relay-network-layer.git"
13+
"url": "https://github.com/nodkz/react-relay-network-layer.git"
1414
},
1515
"keywords": [
1616
"relay",
@@ -38,20 +38,41 @@
3838
"babel-register": "^6.23.0",
3939
"chai": "^3.5.0",
4040
"chai-as-promised": "^6.0.0",
41+
"cz-conventional-changelog": "^2.0.0",
4142
"eslint": "^3.17.0",
4243
"eslint-config-airbnb-base": "^11.1.1",
4344
"eslint-module-utils": "^2.0.0",
4445
"eslint-plugin-import": "^2.2.0",
4546
"fetch-mock": "^5.9.4",
4647
"mocha": "^3.1.1",
47-
"rimraf": "^2.6.1"
48+
"nyc": "^10.1.2",
49+
"rimraf": "^2.6.1",
50+
"semantic-release": "^6.3.2"
51+
},
52+
"config": {
53+
"commitizen": {
54+
"path": "./node_modules/cz-conventional-changelog"
55+
}
56+
},
57+
"nyc": {
58+
"exclude": [
59+
"**/tests/**",
60+
"resources",
61+
"node_modules"
62+
],
63+
"reporter": [
64+
"lcov",
65+
"text"
66+
]
4867
},
4968
"scripts": {
5069
"build": "npm run build-lib && npm run build-es",
5170
"build-lib": "rimraf lib && BABEL_ENV=lib babel src -d lib",
5271
"build-es": "rimraf es && BABEL_ENV=es babel src -d es",
5372
"lint": "eslint src test *.js",
5473
"prepublish": "npm run test && npm run build",
55-
"test": "npm run lint && BABEL_ENV=lib mocha --require test/mocha-bootload --compilers js:babel-register test/*.test.js"
74+
"coverage": "nyc npm run test",
75+
"test": "npm run lint && BABEL_ENV=lib mocha --require test/mocha-bootload --compilers js:babel-register test/*.test.js",
76+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
5677
}
5778
}

0 commit comments

Comments
 (0)