Skip to content

Commit

Permalink
BUGFIX: Update and cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Ruff committed Sep 13, 2018
1 parent cfa3bc0 commit 5bf6db3
Show file tree
Hide file tree
Showing 10 changed files with 1,445 additions and 1,481 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[COMMIT_EDITMSG]
max_line_length = 0
15 changes: 6 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
node_modules
/node_modules/

# third party typings
flow-typed/npm
/flow-typed/

# compiled assets
dist
/dist/

# test results
coverage
/coverage/

# Ignore the symlink ".editorconfig" from the @immowelt/styleguide-javascript package.
.editorconfig

# Ignore the symlink ".prettierrc" from the @immowelt/styleguide-javascript package.
.prettierrc
# IDEs
/.idea/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8
v8.11.4
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 120,
"bracketSpacing": false,
"singleQuote": true,
"semi": true,
"overrides": [{
"files": "*.js",
"options": {
"parser": "flow"
}
}]
}
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ cache:
- node_modules
notifications:
email: false
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.6.0
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- yarn install
- yarn
script:
- yarn lint
- yarn test
- yarn build
after_success:
- npm run semantic-release
- yarn release
branches:
except:
- /^v\d+\.\d+\.\d+$/
50 changes: 10 additions & 40 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,31 @@
# Contributing

We are open and grateful for any contributions made by you!

## Reporting Issues
## Reporting issues

Before opening an issue, please make sure that your issue hasn't been already reported by using the search functionality of the [issue tracker](https://github.com/ImmoweltGroup/find-config-up/issues).

## Development

Visit the [issue tracker](https://github.com/ImmoweltGroup/find-config-up/issues) to find a list of open issues that are easy to pick up or need some love.

Fork, then clone the repo:
```
git clone https://github.com/your-username/find-config-up.git
```

### Building
Running the `build` task will transpile the code and move all flow annotations into separate files.
```
yarn run build
```

### Testing, Type-Checking with Flow and Linting
To run the tests:
```
yarn run test
```

To continuously watch and run the unit-tests, execute the following:
```
yarn run jest:watch
```

To perform linting with `eslint`, run the following:
```
yarn run lint
```

To perform a single check of the types with `flow`, run the following:
```
yarn run flow
```

### New Features
### New features

Please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept.

## Commit guidelines and semantic release
## Commit guideline

Our repositories make great use of [semantic-release](https://github.com/semantic-release/semantic-release). This tool automatically creates releases once the code is pushed to our `master` branch and the commits signal a release-worthy CI run.

All commits must contain a prefix of one of the following values, e.g.

| Prefix | Description | Release type |
| ------------- | --------------- | ------------- |
| `!!!` | Breaking change | Major |
| `BREAKING` | Breaking change | Major |
| `FEATURE` | Feature | Minor |
| `BUGFIX` | Bugfix | Patch |
| `SECURITY` | Security change | Patch |
| `TASK` | Other changes | No release |

So in case you want to submit a bugfix, you should execute `git commit -m "BUGFIX: A short description of what this commit solves - solves #21"` where `21` is the issue number of the bug you fix.
| `SECURITY` | Dependencies | Patch |

## Submitting Changes

Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ Resolve your packages configuration from a `.*rc` or `package.json` file with a

## Install

```sh
$ npm install find-config-up
```

or

```sh
$ yarn add find-config-up
```

## API

#### Getting started

```js
const findConfigUp = require('find-config-up');

Expand All @@ -45,20 +41,27 @@ const findConfigUp = require('find-config-up');
```

#### Options

##### `rawConfigFileName: string` (Optional)

The file name of your preffered `.rc` file, e.g. `.babelrc`, which should be resolved up the file-system tree.

##### `packageJsonProperty: string`

The property name which should be resolved in the `package.json` files up the file-system tree.

##### `defaults: Object`

The defaults which will be recursively merged with the results from the file-system.

##### `cwd: string` (Optional)

A custom current working directory, falls back to `process.cwd()`.

## Contributing

See the `CONTRIBUTING.md` file at the root of the repository.

## Licensing

See the `LICENSE` file at the root of the repository.
79 changes: 42 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
"author": "Immonet dev team <aegaeon@immonet.de> (https://immonet.de)",
"license": "MIT",
"description": "Resolve your packages configuration from a .*rc or package.json with a given property up the file-tree.",
"main": "./dist/",
"main": "dist",
"engines": {
"node": ">=8.8.0"
"node": ">=8.11.4",
"yarn": ">=1.6.0"
},
"files": [
"dist"
],
"keywords": [
"find",
"up",
Expand All @@ -23,60 +27,61 @@
"parse"
],
"scripts": {
"test": "yarn run lint && yarn run flow && yarn run jest:coverage",
"lint": "eslint src",
"jest": "jest",
"jest:watch": "yarn run jest -- --watch",
"jest:coverage": "yarn run jest -- --coverage",
"build:clean": "rimraf dist",
"build:babel": "babel src --out-dir dist --ignore spec.js",
"build:flow": "flow-copy-source -v src dist --ignore='*.spec.js'",
"build": "yarn run build:babel && yarn run build:flow",
"dev": "nodemon --quiet --watch src --exec 'yarn run build'",
"test": "jest",
"clean": "rimraf dist",
"build": "babel src --out-dir dist --ignore spec.js && flow-copy-source -v src dist --ignore='*.spec.js'",
"dev": "nodemon --quiet -w src -x 'yarn build'",
"flow": "flow",
"flow-typed": "flow-typed",
"flow-typed-install": "flow-typed install --ignoreDeps=peer --overwrite",
"prepare": "yarn run flow-typed-install || true",
"prepublishOnly": "yarn run build",
"precommit": "lint-staged && npm test",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"lint-staged": {
"src/**/*.{js,json,css}": [
"prettier --write",
"git add"
]
"prepare": "yarn flow-typed-install || true",
"lint": "eslint src",
"prettier": "prettier --write src/**/*.js",
"release": "semantic-release"
},
"dependencies": {
"find-up": "^2.1.0",
"lodash": "^4.17.4"
"find-up": "3.0.0",
"lodash.merge": "4.6.1"
},
"devDependencies": {
"@immowelt/babel-preset-immowelt-node": "1.1.0",
"@immowelt/eslint-config-immowelt-react": "2.0.4",
"@immowelt/jest-preset-node": "1.0.1",
"@immowelt/styleguide-javascript": "1.0.11",
"@inkdpixels/commit-analyzer": "1.0.1",
"@inkdpixels/release-notes-generator": "1.0.1",
"@immowelt/babel-preset-immowelt-node": "1.1.1",
"@immowelt/eslint-config-immowelt-react": "2.1.1",
"@immowelt/jest-preset-node": "1.1.1",
"babel-cli": "6.26.0",
"eslint": "5.5.0",
"flow-bin": "0.80.0",
"flow-copy-source": "1.3.0",
"flow-copy-source": "2.0.2",
"flow-typed": "2.5.1",
"husky": "0.14.3",
"jest": "22.4.4",
"lint-staged": "6.1.1",
"jest": "23.6.0",
"mock-fs": "4.7.0",
"prettier": "1.14.2",
"rimraf": "2.6.2",
"semantic-release": "^8.2.0"
"semantic-release": "13.4.1"
},
"jest": {
"preset": "@immowelt/jest-preset-node"
},
"publishConfig": {
"access": "public"
},
"release": {
"analyzeCommits": "@inkdpixels/commit-analyzer",
"generateNotes": "@inkdpixels/release-notes-generator"
"analyzeCommits": {
"releaseRules": [
{
"type": "BREAKING",
"release": "major"
},
{
"type": "FEATURE",
"release": "minor"
},
{
"type": "BUGFIX",
"release": "patch"
}
]
},
"branch": "master"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type OptionsType = {
cwd?: string
};

const merge = require('lodash/merge');
const merge = require('lodash.merge');
const utils = require('./utils.js');

async function findConfigUp(options: OptionsType): Promise<any> {
Expand Down
Loading

0 comments on commit 5bf6db3

Please sign in to comment.