Skip to content

Commit 4762c03

Browse files
authored
Routine maintenance 2023-07 (#38)
* Update deprecated script name * Update dependencies * Update scripts * Add GitHub workflow * Specify travis build * Remove travis deploy configuration * Run yarn docs
1 parent d0aa8a4 commit 4762c03

File tree

7 files changed

+4475
-5856
lines changed

7 files changed

+4475
-5856
lines changed

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
run-name: ${{ github.actor }} published a new release
3+
on:
4+
release:
5+
types: [published]
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out latest code
11+
uses: actions/checkout@v3
12+
- name: Set up node
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version: '18.x'
16+
registry-url: 'https://registry.npmjs.org'
17+
scope: '@launchpadlab'
18+
- name: Install dependencies
19+
run: HUSKY=0 yarn --frozen-lockfile
20+
- name: Publish package on NPM
21+
run: npm publish
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn run lint && yarn run docs && git add docs.md

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10
1+
18

.travis.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
language: node_js
2+
dist: focal
23
before_script:
34
- 'yarn lint'
45
notifications:
56
email: false
6-
deploy:
7-
provider: npm
8-
email: dev@launchpadlab.com
9-
api_key:
10-
secure: adaVgZMVHSiReV4NvO9CYkEbt72E2WXyk8H+q5s9hAnBx0/XU467fn9gM3E70BNo7TeI6W081r5wLXzKgnOnBkyLazHtV53o2HmP/eHZOpa8g9Be2qwxU0QQ4sQqnKxXQRg0CqaTo4zpJROWidT/DnvHDfzs+tuQr9apIgCdAT9GUVh2jmjvp4fC5ouA3u2WCih9rlgMbm+pmAHInL0rxyPuagJig1NKonvhAnsa7PZwGm0vEE79nFqCBABnf4ekRad+RDeuJ+ao5SH+9zJIWHtFP4u4GdFeZRUmOX5tPq/YcEBhEQ2PyoSRP+1tYFuMogOT97wSBQC4GSJhUSA47YxpDpWqVgT1fo1zhG/3/BXMwcT5Qv7fqtV7D0S8R9GLP9Z4Xfp6iGJ462Ivgds4nU5t1eWbNFHsuR3j+agAnUptVYroVpPjHE+M0CmgqSRaCz4Qt8JNcxO1JZncdmnHeeSHStckWk44+8FWvn6D8JVrP4fFNtbdqghjgsOOP5PTouVtc/R+j0p0raooLHUjyh26Rn7asPary1h7LPDlQBRgwGHWDDdgTORAhcDRYA/UywFq06WqtrJ2xat3TxBD2Qyh7TTSoEvBIJdHeRuB6F9R4+y+Wy31wabV+TaeG9a2aJrSKSFIKYQ3iv/dzV7dVkkf2NXGgFcp3NyiYRTA/ac=
11-
on:
12-
branch: master
13-
skip_cleanup: true

docs.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
### Table of Contents
44

5-
- [selectorForSlice][1]
6-
- [Parameters][2]
7-
- [Examples][3]
8-
- [setState][4]
9-
- [Parameters][5]
10-
- [Examples][6]
11-
- [unsetState][7]
12-
- [Parameters][8]
13-
- [Examples][9]
5+
* [selectorForSlice][1]
6+
* [Parameters][2]
7+
* [Examples][3]
8+
* [setState][4]
9+
* [Parameters][5]
10+
* [Examples][6]
11+
* [unsetState][7]
12+
* [Parameters][8]
13+
* [Examples][9]
1414

1515
## selectorForSlice
1616

1717
Given the path of a certain state slice, returns a function that can be used to create state selectors (helpful for `mapStateToProps()`).
1818

1919
### Parameters
2020

21-
- `slicePath` **[String][10]** Path to slice of state.
21+
* `slicePath` **[String][10]** Path to slice of state.
2222

2323
### Examples
2424

@@ -55,13 +55,13 @@ Returns **[Function][11]** A function that can be used to create state selectors
5555

5656
## setState
5757

58-
A helper function for creating simple "setter" reducers.
58+
A helper function for creating simple "setter" reducers.
5959
Given a path, it sets the state at that path to the payload of an action.
6060

6161
### Parameters
6262

63-
- `path` **[String][10]** Path to the part of the state that will be set
64-
- `transform` **[Function][11]** A function with arguments `(action, state, slice)` that can be used to transform the value that will be set. `slice` is the data, if any, that already exists in the state at `path`. The default transform function simply returns the action's payload. To set the state to a constant value, simply pass the value in place of the transform function.
63+
* `path` **[String][10]** Path to the part of the state that will be set
64+
* `transform` **[Function][11]** A function with arguments `(action, state, slice)` that can be used to transform the value that will be set. `slice` is the data, if any, that already exists in the state at `path`. The default transform function simply returns the action's payload. To set the state to a constant value, simply pass the value in place of the transform function.
6565

6666
### Examples
6767

@@ -92,7 +92,7 @@ Given a path, it calls lodash [unset ][12] on the state at that path.
9292

9393
### Parameters
9494

95-
- `path` **[String][10]** Path to the part of state to unset
95+
* `path` **[String][10]** Path to the part of state to unset
9696

9797
### Examples
9898

package.json

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@launchpadlab/lp-redux-utils",
3-
"version": "1.3.2",
3+
"version": "1.3.3",
44
"description": "redux helpers",
55
"main": "lib/index.js",
66
"scripts": {
@@ -10,8 +10,9 @@
1010
"clean": "rm -rf lib",
1111
"docs": "documentation build src/index.js -f md -o docs.md",
1212
"lint": "eslint src --max-warnings=0",
13-
"prepublish": "yarn run lint && yarn run clean && yarn run build",
14-
"test": "jest --coverage"
13+
"prepublishOnly": "yarn run lint",
14+
"test": "jest --coverage",
15+
"prepare": "husky install && yarn run clean && yarn run build"
1516
},
1617
"repository": "launchpadlab/lp-redux-utils",
1718
"homepage": "https://github.com/launchpadlab/lp-redux-utils",
@@ -30,25 +31,20 @@
3031
"lib/"
3132
],
3233
"devDependencies": {
33-
"@babel/cli": "^7.8.4",
34-
"@babel/core": "^7.8.4",
34+
"@babel/cli": "^7.22.9",
35+
"@babel/core": "^7.22.9",
3536
"@launchpadlab/babel-preset": "^2.1.1",
36-
"@launchpadlab/eslint-config": "^2.7.0",
37-
"documentation": "^12.1.4",
38-
"eslint": "^6.8.0",
39-
"husky": "^4.2.3",
40-
"jest": "^25.1.0",
37+
"@launchpadlab/eslint-config": "^3.0.1",
38+
"documentation": "^14.0.0",
39+
"eslint": "^8.0.0",
40+
"husky": "^8.0.0",
41+
"jest": "^29.0.0",
4142
"redux": "^4.0.0"
4243
},
4344
"dependencies": {
4445
"lodash": "^4.17.4"
4546
},
4647
"peerDependencies": {
4748
"redux": ">=2.0.0"
48-
},
49-
"husky": {
50-
"hooks": {
51-
"pre-commit": "yarn run docs && git add docs.md"
52-
}
5349
}
5450
}

0 commit comments

Comments
 (0)