Skip to content

Commit

Permalink
feat: upgrade everything and remove CJS/UMD entries
Browse files Browse the repository at this point in the history
Closes #41, Closes #70

BREAKING CHANGE: If you're using the CJS module format, you now have to get `matchSorter` from the `default` property.
  • Loading branch information
Kent C. Dodds committed Jul 19, 2019
1 parent 2c9a471 commit fe94fc6
Show file tree
Hide file tree
Showing 14 changed files with 58 additions and 183 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ never done that before, that's great! Check this free short video tutorial to
learn how: http://kcd.im/pull-request
-->

* `match-sorter` version:
* `node` version:
* `npm` (or `yarn`) version:
- `match-sorter` version:
- `node` version:
- `npm` (or `yarn`) version:

Relevant code or config

Expand Down
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ merge of your pull request!

<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->

* [ ] Documentation
* [ ] Tests
* [ ] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
* [ ] Added myself to contributors table <!-- this is optional, see the contributing guidelines for instructions -->
- [ ] Documentation
- [ ] Tests
- [ ] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
- [ ] Added myself to contributors table <!-- this is optional, see the contributing guidelines for instructions -->

<!-- feel free to add additional comments -->
27 changes: 0 additions & 27 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,12 @@ Thanks for being willing to contribute!
> branch. Whenever you want to update your version of `master`, do a regular
> `git pull`.
## Add yourself as a contributor

This project follows the [all contributors][all-contributors] specification.
To add yourself to the table of contributors on the `README.md`, please use the
automated script as part of your PR:

```console
npm run add-contributor
```

Follow the prompt and commit `.all-contributorsrc` and `README.md` in the PR.
If you've already added yourself to the list and are making
a new type of contribution, you can run it again and select the added
contribution type.

## Committing and Pushing changes

Please make sure to run the tests before you commit your changes. You can run
`npm run test:update` which will update any snapshots that need updating.
Make sure to include those changes (if they exist) in your commit.

### opt into git hooks

There are git hooks set up with this project that are automatically installed
when you install dependencies. They're really handy, but are turned off by
default (so as to not hinder new contributors). You can opt into these by
creating a file called `.opt-in` at the root of the project and putting this
inside:

```
pre-commit
```

## Help needed

Please checkout the [the open issues][issues]
Expand Down
49 changes: 30 additions & 19 deletions README.md

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions other/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand Down
4 changes: 2 additions & 2 deletions other/EXAMPLES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Examples

* [With React-Select](https://jsbin.com/vewoka/edit?js,output)
* [Basic example](https://jsbin.com/bihepe/edit?html,js,console)
- [Basic example](https://codesandbox.io/s/inspiring-voice-4msg5)
- [With Downshift](https://codesandbox.io/s/react-codesandbox-jnuq8)
13 changes: 0 additions & 13 deletions other/ROADMAP.md

This file was deleted.

66 changes: 0 additions & 66 deletions other/__tests__/dist-test.js

This file was deleted.

5 changes: 0 additions & 5 deletions other/jest.config.js

This file was deleted.

19 changes: 8 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@
"version": "0.0.0-semantically-released",
"description": "Simple, expected, and deterministic best-match sorting of an array in JavaScript",
"main": "dist/match-sorter.cjs.js",
"jsnext:main": "dist/match-sorter.esm.js",
"module": "dist/match-sorter.esm.js",
"scripts": {
"add-contributor": "kcd-scripts contributors add",
"build": "kcd-scripts build --bundle --environment BUILD_NAME:matchSorter",
"lint": "kcd-scripts lint",
"test": "kcd-scripts test",
"test:cover": "kcd-scripts test --coverage",
"test:update": "npm run test:cover -s -- --updateSnapshot",
"test:build": "kcd-scripts test --config other/jest.config.js --no-watch",
"build-and-test": "npm run build -s && npm run test:build -s",
"validate": "kcd-scripts validate lint,build-and-test,test:cover",
"setup": "npm install && npm run validate",
"precommit": "kcd-scripts precommit"
"validate": "kcd-scripts validate",
"setup": "npm install && npm run validate"
},
"files": [
"dist"
Expand All @@ -30,14 +25,16 @@
],
"author": "Kent C. Dodds <[email protected]> (http://kentcdodds.com/)",
"license": "MIT",
"bundledDependencies": [
"remove-accents"
],
"dependencies": {
"remove-accents": "0.4.2"
},
"devDependencies": {
"kcd-scripts": "^0.38.1"
"kcd-scripts": "^1.5.2"
},
"husky": {
"hooks": {
"pre-commit": "kcd-scripts pre-commit"
}
},
"eslintConfig": {
"extends": [
Expand Down
3 changes: 0 additions & 3 deletions src/__tests__/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// have to disable eslint for the next line because we have to
// do weird things to make things work with UMD
// eslint-disable-next-line import/default,import/named
import matchSorter, {rankings} from '../'

const tests = {
Expand Down
16 changes: 0 additions & 16 deletions src/cjs-entry.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @name match-sorter
* @license MIT license.
* @copyright (c) 2017 Kent C. Dodds
* @copyright (c) 2019 Kent C. Dodds
* @author Kent C. Dodds <[email protected]>
*/
import removeAccents from 'remove-accents'
Expand Down
3 changes: 0 additions & 3 deletions src/umd-entry.js

This file was deleted.

0 comments on commit fe94fc6

Please sign in to comment.