Skip to content

Commit

Permalink
feat: change package name to @swaggerexpert/json-api-merge (#1139)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: package name changed from json-api-merge to @swaggerexpert/json-api-merge
  • Loading branch information
char0n committed Jun 21, 2024
1 parent 9d462d0 commit 790af0a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
/es
/lib
/dist
/json-api-merge-*.*.*.tgz
/swaggerexpert-json-api-merge-*.*.*.tgz
/tmp-test-bundle.js.LICENSE.txt
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/CONTRIBUTING.md
/GOVERNANCE.md
/SECURITY.md
/json-api-merge-*.*.*.tgz
/swaggerexpert-json-api-merge-*.*.*.tgz

.eslintrc

6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to json-api-merge
# Contributing to @swaggerexpert/json-api-merge

As a contributor, here are the guidelines we would like you to follow:

Expand Down Expand Up @@ -91,7 +91,7 @@ To ensure consistency throughout the source code, keep these rules in mind as yo

We have very precise rules over how our git commit messages can be formatted. This leads to **more
readable messages** that are easy to follow when looking through the **project history**. But also,
we use the git commit messages to **generate the json-api-merge change log**.
we use the git commit messages to **generate the @swaggerexpert/json-api-merge change log**.

### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
Expand Down Expand Up @@ -184,4 +184,4 @@ A detailed explanation can be found in this [document][commit-message-format].

### Contributors

Thank you to all the people who have already contributed to json-api-merge!
Thank you to all the people who have already contributed to @swaggerexpert/json-api-merge!
32 changes: 13 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

# JSON API Merge

`json-api-merge` is a JSON:API specific redundant duplication algorithm for merging included resources into original data.
`@swaggerexpert/json-api-merge` is a JSON:API specific redundant duplication algorithm for merging included resources into original data.

## Getting Started

### Installation

```sh
npm i json-api-merge
npm i @swaggerexpert/json-api-merge
```
or
```sh
yarn add json-api-merge
yarn add @swaggerexpert/json-api-merge
```

### Usage
Expand Down Expand Up @@ -47,18 +47,18 @@ const jsonApiData = {
};
```

#### ES2O19
#### ES modules

```javascript
import jsonApiMerge from 'json-api-merge'
import jsonApiMerge from '@swaggerexpert/json-api-merge'

jsonApiMerge(jsonApiData.included, jsonApiData.data)
```

#### Node
#### CommonJS

```javascript
const jsonApiMerge = require('json-api-merge');
const jsonApiMerge = require('@swaggerexpert/json-api-merge');

jsonApiMerge(jsonApiData.included, jsonApiData.data);
```
Expand Down Expand Up @@ -328,7 +328,7 @@ This operation will generate following compound document with full linkage:
## Motivation

I was looking for a simple way how to merge the `included` into `data` without compromising data
structures. All other libraries that I tested were opionated about how the resulting merge should look like.
structures. All other libraries that I tested were opinionated about how the resulting merge should look like.
This library has no opinion and simply merged the `included` into `data`. It does nothing else.

## Contributing
Expand All @@ -353,11 +353,6 @@ If you want to contribute to this project, please consult the [CONTRIBUTING.md](
```


**Running code coverage numbers**
```sh
$ npm run coverage
```

**Running linter**

We're using [eslint](https://eslint.org/) and [airbnb codestyle](https://github.com/airbnb/javascript) rules with [prettier](https://prettier.io/) integrated as an eslint plugin.
Expand All @@ -368,12 +363,11 @@ We're using [eslint](https://eslint.org/) and [airbnb codestyle](https://github.

## Typescript support

Although json-api-merge is written in ES2019, we also support **Typescript**. When json-api-merge gets imported into a Typescript project, typings are automatically imported and used.
Although @swaggerexpert/json-api-merge is written in ES2019, we also support **Typescript**.
When @swaggerexpert/json-api-merge gets imported into a Typescript project, typings are automatically imported and used.

## Author

char0n (Vladimir Gorej)

vladimir.gorej@gmail.com

https://vladimirgorej.com/
char0n (Vladimír Gorej)
contact@swaggerexpert.com
https://swaggerexport.com/
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "json-api-merge",
"name": "@swaggerexpert/json-api-merge",
"description": "JSON:API specific redundant duplication algorithm for merging included resources into original data.",
"keywords": [
"json:api",
Expand All @@ -13,15 +13,15 @@
"license": "BSD-3-Clause",
"repository": {
"type": "git",
"url": "git://github.com/swaggerexpert/json-api-merge.git"
"url": "https://github.com/swaggerexpert/json-api-merge"
},
"engines": {
"node": ">=0.10.3"
},
"author": {
"name": "Vladimir Gorej",
"email": "vladimir.gorej@gmail.com",
"url": "https://vladimirgorej.com/"
"email": "contact@swaggerexpert.com",
"url": "https://swaggerexpert.com/"
},
"sideEffects": false,
"main": "./dist/node.js",
Expand Down

0 comments on commit 790af0a

Please sign in to comment.