Skip to content

Commit

Permalink
feat: modernized project, bumps deps
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Aug 20, 2024
1 parent 0b28536 commit 47278be
Show file tree
Hide file tree
Showing 16 changed files with 91 additions and 7,892 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* text=auto
* text=auto eol=lf
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI
on:
- push
- pull_request
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
node_version:
- 18
- 20
name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
node_modules
coverage
.nyc_output
locales/
package-lock.json
yarn.lock

Thumbs.db
tmp/
temp/
*.lcov
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged && npm test
4 changes: 1 addition & 3 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module.exports = {
"*.md,!test/**/*.md": [
filenames => filenames.map(filename => `remark ${filename} -qfo`)
],
"*.md": filenames => filenames.map(filename => `remark ${filename} -qfo`),
'package.json': 'fixpack',
'*.js': 'xo --fix'
};
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
singleQuote: true,
bracketSpacing: true,
trailingComma: 'none'
};
3 changes: 3 additions & 0 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
plugins: ['preset-github']
};
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .xo-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
prettier: true,
space: true,
extends: ['xo-lass']
};
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# [**@ladjs/pick-original**](https://github.com/ladjs/pick-original)

[![build status](https://img.shields.io/travis/com/ladjs/pick-original.svg)](https://travis-ci.com/ladjs/pick-original)
[![code coverage](https://img.shields.io/codecov/c/github/ladjs/pick-original.svg)](https://codecov.io/gh/ladjs/pick-original)
[![build status](https://github.com/ladjs/pick-original/actions/workflows/ci.yml/badge.svg)](https://github.com/ladjs/pick-original/actions/workflows/ci.yml)
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://lass.js.org)
[![license](https://img.shields.io/github/license/ladjs/pick-original.svg)](LICENSE)
[![npm downloads](https://img.shields.io/npm/dt/@ladjs/pick-original.svg)](https://npm.im/@ladjs/pick-original)

> Transform an Object that was transformed to return only the original properties recursively picked if they are not undefined.
Expand All @@ -27,12 +25,6 @@
npm install @ladjs/pick-original
```

[yarn][]:

```sh
yarn add @ladjs/pick-original
```


## Usage

Expand All @@ -56,18 +48,16 @@ console.log(transformed);

## Contributors

| Name | Website |
| -------------- | -------------------------- |
| **Nick Baugh** | <http://niftylettuce.com/> |
| Name |
| ------------ |
| **Titanism** |


## License

[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com/)
[MIT](LICENSE) © Titanism


##
##

[npm]: https://www.npmjs.com/

[yarn]: https://yarnpkg.com/
79 changes: 25 additions & 54 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,39 @@
"name": "@ladjs/pick-original",
"description": "Transform an Object that was transformed to return only the original properties recursively picked if they are not undefined.",
"version": "1.0.0",
"author": "Nick Baugh <[email protected]> (http://niftylettuce.com/)",
"author": "Titanism",
"bugs": {
"url": "https://github.com/ladjs/pick-original/issues",
"email": "[email protected]"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
"url": "https://github.com/ladjs/pick-original/issues"
},
"contributors": [
"Nick Baugh <[email protected]> (http://niftylettuce.com/)"
"Titanism"
],
"dependencies": {
"@ladjs/node-dotify": "^3.0.0",
"lodash": "^4.17.20"
"lodash": "^4.17.21"
},
"devDependencies": {
"@commitlint/cli": "latest",
"@commitlint/config-conventional": "latest",
"ava": "latest",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"ava": "^5.3.1",
"bson-objectid": "^1.3.1",
"codecov": "latest",
"cross-env": "latest",
"eslint": "^7.14.0",
"eslint-config-xo-lass": "latest",
"fixpack": "latest",
"husky": "latest",
"lint-staged": "latest",
"nyc": "latest",
"remark-cli": "latest",
"remark-preset-github": "latest",
"xo": "^0.35.0"
"cross-env": "^7.0.3",
"eslint": "^8.49.0",
"eslint-config-xo-lass": "^2.0.1",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-node": "^11.1.0",
"fixpack": "^4.0.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
"nyc": "^17.0.0",
"remark-cli": "11.0.0",
"remark-preset-github": "^4.0.4",
"xo": "^0.56.0"
},
"engines": {
"node": ">=8.3"
"node": ">=18"
},
"homepage": "https://github.com/ladjs/pick-original",
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm test",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"keywords": [
"database",
"db",
Expand Down Expand Up @@ -101,33 +90,15 @@
"text"
]
},
"prettier": {
"singleQuote": true,
"bracketSpacing": true,
"trailingComma": "none"
},
"remarkConfig": {
"plugins": [
"preset-github"
]
},
"repository": {
"type": "git",
"url": "https://github.com/ladjs/pick-original"
},
"scripts": {
"ava": "cross-env NODE_ENV=test ava",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"lint": "xo && remark . -qfo",
"nyc": "cross-env NODE_ENV=test nyc ava",
"test": "yarn run lint && yarn run ava",
"test-coverage": "yarn run lint && yarn run nyc"
},
"xo": {
"prettier": true,
"space": true,
"extends": [
"xo-lass"
]
"lint": "xo --fix && remark . -qfo && fixpack",
"prepare": "husky install",
"pretest": "npm run lint",
"test": "npm run test-coverage",
"test-coverage": "cross-env NODE_ENV=test nyc ava"
}
}
1 change: 0 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const ObjectID = require('bson-objectid');
const test = require('ava');

const pickOriginal = require('..');

test('picks original', (t) => {
Expand Down
Loading

0 comments on commit 47278be

Please sign in to comment.