Skip to content

Commit

Permalink
feat: first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokahler committed Oct 8, 2021
0 parents commit d427cda
Show file tree
Hide file tree
Showing 22 changed files with 18,884 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = (api) => {
switch (api.env()) {
case 'cjs': {
const targets = 'maintained node versions';
return {
targets,
presets: [
['@babel/preset-env', { targets }],
'@babel/preset-typescript',
],
plugins: [
'@babel/transform-runtime',
['polyfill-corejs3', { method: 'usage-pure' }],
],
};
}
default: {
return {
presets: [
['@babel/preset-env', { targets: 'maintained node versions' }],
'@babel/preset-typescript',
],
};
}
}
};
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "react-app",
"ignorePatterns": "**/{lib,dist,coverage}"
}
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test
on:
- pull_request

jobs:
release:
name: Test
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Run tests
run: npm t -- --coverage

- name: Run build
run: npm run build

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/node_modules
**/coverage
**/docs
**/dist
.DS_Store
13 changes: 13 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**/.github
/coverage
/docs
/scripts
/src
.babelrc
.eslintrc
.prettierrc
.releaserc.json
jest.config.js
rennovate.json
rollup.config.js
tsconfig.json
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Rico Kahler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# JSONMatch Patch

> A collection of patch utils that utilize [JSONMatch](https://github.com/sanity-io/go-jsonmatch)
> 🚨 Disclaimer: the bundle size is huge
>
> This package depends on [go-jsonmatch](https://github.com/sanity-io/go-jsonmatch) [compiled to javascript](https://github.com/ricokahler/jsonmatch-js) via GopherJS.
See here for more info on [JSONMatch](https://www.sanity.io/docs/json-match).

## Install

```
npm install @ricokahler/jsonmatch-patch
```

## API

[Check out the automated docs site](https://jsonmatch-patch.vercel.app/)
13 changes: 13 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @type {import('@jest/types').Config.ProjectConfig}
*/
const jestConfig = {
snapshotFormat: {
printBasicPrototype: false,
},
testMatch: ['**/src/*.test.ts'],
coveragePathIgnorePatterns: ['/(lib|dist|node_modules)/'],
transformIgnorePatterns: ['/(lib|dist|node_modules)/'],
};

module.exports = jestConfig;
Loading

1 comment on commit d427cda

@vercel
Copy link

@vercel vercel bot commented on d427cda Oct 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.