Skip to content

Commit 33844f7

Browse files
committed
feat: modernize package
BREAKING CHANGE: The minimum supported Node.js version is now v16.
1 parent b7cda79 commit 33844f7

12 files changed

Lines changed: 112 additions & 27 deletions

File tree

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* text=auto
1+
* text=auto eol=lf

.github/renovate.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"local>kenany/renovate-config",
5+
":assignAndReview(kenany)"
6+
]
7+
}

.github/workflows/nodejs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: nodejs
2+
on: [pull_request, push]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
5+
cancel-in-progress: true
6+
jobs:
7+
build:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
node-version: [16, 18, 20]
12+
os: [ubuntu-latest, windows-latest, macOS-latest]
13+
steps:
14+
- name: Node.js ${{ matrix.node-version }}
15+
uses: actions/setup-node@v3.6.0
16+
with:
17+
node-version: ${{ matrix.node-version }}
18+
- name: Update npm
19+
run: |
20+
npm install -g npm
21+
npm --version
22+
- uses: actions/checkout@v3.5.2
23+
- name: Install dependencies
24+
uses: bahmutov/npm-install@v1.8.29
25+
with:
26+
useLockFile: false
27+
- run: npm ls
28+
- name: Test
29+
run: npm test

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
name: release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/setup-node@v2.5.1
12+
with:
13+
node-version: 20
14+
- name: Update npm
15+
run: |
16+
npm install -g npm
17+
npm --version
18+
- uses: actions/checkout@v3.5.2
19+
- name: Install dependencies
20+
uses: bahmutov/npm-install@v1.8.29
21+
with:
22+
useLockFile: false
23+
- name: Release
24+
run: npm run release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock = false

.releaserc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/changelog",
6+
"@semantic-release/github",
7+
"@semantic-release/npm",
8+
"@semantic-release/git"
9+
],
10+
"preset": "conventionalcommits",
11+
"tagFormat": "${version}"
12+
}

.travis.yml

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

LICENSE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2013–2014 Kenan Yildirim <http://kenany.me/>
1+
Copyright 2013–2023 Kenan Yildirim <http://kenany.me/>
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of
44
this software and associated documentation files (the "Software"), to deal in
@@ -15,4 +15,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
1515
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
1616
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1717
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
# caps-rate
22

3-
[![Build Status](https://travis-ci.org/nwitch/caps-rate.svg?branch=master)](https://travis-ci.org/nwitch/caps-rate)
4-
[![Dependency Status](https://gemnasium.com/nwitch/caps-rate.svg)](https://gemnasium.com/nwitch/caps-rate)
5-
63
Get how much a string IS YELLING.
74

85
## Example
96

107
``` javascript
11-
var caps = require('caps-rate');
8+
const caps = require('caps-rate');
129

1310
caps('hello WORLD');
1411
// => 0.45454545454545453
@@ -23,9 +20,9 @@ $ npm install caps-rate
2320
## API
2421

2522
``` javascript
26-
var caps = require('caps-rate');
23+
const caps = require('caps-rate');
2724
```
2825

2926
### caps(value)
3027

31-
Returns how frequently caps are used in `value`.
28+
Returns how frequently caps are used in `value`.

0 commit comments

Comments
 (0)