Skip to content

Commit 46ed809

Browse files
committed
2 parents 4551d47 + 3a320c4 commit 46ed809

File tree

9 files changed

+3333
-1419
lines changed

9 files changed

+3333
-1419
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
coverage
22
.nyc_output
33
node_modules
4+
.eslintcache
45

.npmignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ coverage
33
test
44
node_modules
55
.eslintrc
6-
.flowconfig
76
.travis.yml
7+
solano.yml
8+
.eslintcache
9+
.idea
10+
commitlint.config.js

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ cache:
55
notifications:
66
email: false
77
node_js:
8+
- '8'
89
- '7'
910
- '6'
10-
- '4'
11-
before_script:
12-
- npm prune
11+
install:
12+
- yarn install --ignore-engines --check-files --frozen-lockfile
1313
script:
14-
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
14+
- yarn run prepublishOnly
1515
after_success:
16-
- npm run semantic-release
16+
- npm run codecov
17+
- npm run travis-deploy-once "npm run semantic-release"
1718
branches:
1819
except:
1920
- /^v\d+\.\d+\.\d+$/

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# preserve-case
22

33
[![Build Status](https://travis-ci.org/jedwards1211/preserve-case.svg?branch=master)](https://travis-ci.org/jedwards1211/preserve-case)
4-
[![Coverage Status](https://coveralls.io/repos/github/jedwards1211/preserve-case/badge.svg?branch=master)](https://coveralls.io/github/jedwards1211/preserve-case?branch=master)
4+
[![Coverage Status](https://codecov.io/gh/jedwards1211/preserve-case/branch/master/graph/badge.svg)](https://codecov.io/gh/jedwards1211/preserve-case)
55
[![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)
66
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
77

@@ -65,4 +65,3 @@ a `RegExp` without the `g` (global) flag.
6565
## Acknowledgements
6666

6767
Thanks to Nathan Bubna for his [`case`](https://github.com/nbubna/Case) package, which powers `preserve-case`!
68-

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {extends: ['@jedwards1211/commitlint-config']}

package.json

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,22 @@
44
"description": "case-preserving string.replace",
55
"main": "lib/index.js",
66
"scripts": {
7-
"lint": "eslint lib test",
8-
"lint:fix": "eslint --fix lib test",
9-
"lint:watch": "esw --watch lib test",
7+
"lint": "eslint lib test --cache",
8+
"lint:fix": "eslint --fix lib test --cache",
9+
"lint:watch": "esw --watch lib test --cache",
1010
"flow": "flow",
1111
"flow:coverage": "for file in lib/**.js test/**.js; do echo $file; flow coverage $file; done",
1212
"flow:watch": "flow-watch -e js,js.flow,flowconfig --ignore node_modules/ --watch .flowconfig --watch lib/ --watch test/",
1313
"test": "NODE_ENV=production BABEL_ENV=test nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
1414
"test:watch": "mocha --watch $npm_package_config_mocha",
15-
"commitmsg": "validate-commit-msg",
15+
"codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",
16+
"commitmsg": "commitlint -e $GIT_PARAMS",
1617
"precommit": "npm run lint && flow",
1718
"prepush": "npm test",
18-
"prepublish": "npm run lint && flow && npm test",
19+
"prepublishOnly": "npm run lint && flow && npm test",
1920
"open:coverage": "open coverage/lcov-report/index.html",
20-
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
21+
"semantic-release": "semantic-release",
22+
"travis-deploy-once": "travis-deploy-once"
2123
},
2224
"config": {
2325
"mocha": "./test/**/*.js",
@@ -35,7 +37,14 @@
3537
"url": "https://github.com/jedwards1211/preserve-case.git"
3638
},
3739
"keywords": [
38-
"es5"
40+
"case-preserving",
41+
"preserve-case",
42+
"refactoring",
43+
"replace",
44+
"replace-text",
45+
"string-manipulation",
46+
"string-replace",
47+
"string-substitution"
3948
],
4049
"author": "Andy Edwards",
4150
"license": "MIT",
@@ -44,22 +53,27 @@
4453
},
4554
"homepage": "https://github.com/jedwards1211/preserve-case#readme",
4655
"devDependencies": {
56+
"@commitlint/cli": "^6.0.2",
57+
"@commitlint/config-conventional": "^6.0.2",
58+
"@jedwards1211/commitlint-config": "^1.0.0",
4759
"@jedwards1211/eslint-config-es5": "^1.0.0",
4860
"@jedwards1211/eslint-config-flow": "^1.0.0",
49-
"chai": "^3.5.0",
61+
"chai": "^4.1.2",
62+
"codecov": "^3.0.0",
5063
"copy": "^0.3.0",
5164
"coveralls": "^2.13.0",
5265
"eslint": "^3.18.0",
5366
"eslint-plugin-flowtype": "^2.30.4",
5467
"eslint-watch": "^3.0.1",
55-
"flow-bin": "^0.42.0",
68+
"flow-bin": "^0.69.0",
5669
"flow-watch": "^1.1.1",
57-
"husky": "^0.13.3",
70+
"husky": "^0.14.3",
5871
"istanbul": "^0.4.5",
59-
"mocha": "^3.2.0",
60-
"nyc": "^10.2.0",
72+
"mocha": "^5.0.0",
73+
"nyc": "^11.4.1",
6174
"rimraf": "^2.6.1",
62-
"semantic-release": "^6.3.6",
75+
"semantic-release": "^12.2.2",
76+
"travis-deploy-once": "^4.3.1",
6377
"validate-commit-msg": "^2.11.2"
6478
},
6579
"dependencies": {

renovate.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": [
3+
":separateMajorReleases",
4+
":combinePatchMinorReleases",
5+
":ignoreUnstable",
6+
":prImmediately",
7+
":renovatePrefix",
8+
":updateNotScheduled",
9+
":preserveSemverRanges",
10+
"smart-semantic-commits",
11+
":automergeDisabled",
12+
"group:monorepos"
13+
],
14+
"automerge": true,
15+
"major": {
16+
"automerge": false
17+
}
18+
}

solano.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
plan:
2+
- node_6
3+
- node_7
4+
- node_8
5+
profiles:
6+
node_6:
7+
nodejs:
8+
version: '6.11.5'
9+
node_7:
10+
nodejs:
11+
version: '7.10.1'
12+
node_8:
13+
nodejs:
14+
version: '8.9.0'
15+
16+
tool_config:
17+
git:
18+
version: '2.0.3'
19+
20+
environment:
21+
'CI': 'true'
22+
23+
hooks:
24+
pre_setup: |
25+
set -o errexit -o pipefail # Exit on error
26+
# Install yarn if it isn't already present
27+
if [ ! -d $HOME/.yarn ]; then
28+
wget https://yarnpkg.com/install.sh -O $TMPDIR/yarn-install.sh
29+
chmod +x $TMPDIR/yarn-install.sh
30+
bash $TMPDIR/yarn-install.sh --version 1.5.1
31+
fi
32+
mkdir -p $HOME/bin # Automatically in $PATH on workers
33+
ln -fs $HOME/.yarn/bin/yarn $HOME/bin/yarn
34+
yarn config set registry "https://registry.npmjs.org/"
35+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> $HOME/.npmrc
36+
echo "registry=https://registry.npmjs.org/" >> $HOME/.npmrc
37+
yarn install --ignore-engines --check-files --frozen-lockfile
38+
post_build: |
39+
# Only deploy if all tests have passed
40+
if [[ "passed" != "$TDDIUM_BUILD_STATUS" ]]; then
41+
echo "\$TDDIUM_BUILD_STATUS = $TDDIUM_BUILD_STATUS"
42+
echo "Will only deploy on passed builds"
43+
exit
44+
fi
45+
# Only deploy on 'node_8' profile
46+
if [[ "node_8" != "$SOLANO_PROFILE_NAME" ]]; then
47+
echo "Will only deploy on 'node_8' profile"
48+
exit
49+
fi
50+
# fetch tags
51+
git fetch origin 'refs/tags/*:refs/tags/*' -v
52+
npm run codecov && npm run semantic-release
53+
54+
tests:
55+
- yarn run prepublishOnly
56+
57+
cache:
58+
key_paths:
59+
- package.json
60+
- yarn.lock # to freeze packages installed by yarn
61+
save_paths:
62+
- REPO/node_modules # Repo's "local" cache
63+
- HOME/.yarn # Yarn's "global" cache
64+

0 commit comments

Comments
 (0)