Skip to content

Commit 92512a0

Browse files
Jeong-jjblack7375
authored andcommitted
Chore: publish package
- mincho-js/mincho#38 - Fix: rename declare module name
1 parent 3bd6cea commit 92512a0

File tree

4 files changed

+49
-53
lines changed

4 files changed

+49
-53
lines changed

README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# pretify-deep-diff
32

43
A utility to prettify the results of `deep-diff` with emojis and localization support.
@@ -16,40 +15,38 @@ npm install pretify-deep-diff
1615
Here's an example of how to use `pretify-deep-diff`:
1716

1817
```javascript
19-
const diff = require('deep-diff');
20-
const pretifyDeepDiff = require('pretify-deep-diff');
18+
const diff = require("deep-diff");
19+
const pretifyDeepDiff = require("pretify-deep-diff");
2120

2221
const lhs = {
23-
name: 'John',
24-
age: 30,
25-
pets: ['dog', 'cat'],
26-
address: {
27-
city: 'Chicago',
28-
street: 'Main St'
29-
}
22+
name: "John",
23+
age: 30,
24+
pets: ["dog", "cat"],
25+
address: {
26+
city: "Chicago",
27+
street: "Main St",
28+
},
3029
};
3130

3231
const rhs = {
33-
name: 'Jane',
34-
age: 31,
35-
pets: ['dog', 'parrot'],
36-
city: 'New York'
32+
name: "Jane",
33+
age: 31,
34+
pets: ["dog", "parrot"],
35+
city: "New York",
3736
};
3837

3938
const changes = diff(lhs, rhs);
4039

41-
console.log(pretifyDeepDiff(changes, { locale: 'ru' }));
40+
console.log(pretifyDeepDiff(changes, { locale: "ru" }));
4241
```
4342

4443
### Output
4544

4645
```text
4746
Добавлено:
4847
➕ Добавлено: city = "New York"
49-
5048
❌ Удалено:
5149
❌ Удалено: address
52-
5350
✏️ Изменено:
5451
✏️ Изменено: name с "John" на "Jane"
5552
✏️ Изменено: age с 30 на 31

index.d.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
declare module 'pretify-deep-diff' {
2-
interface Options {
3-
locale?: 'en' | 'ru';
4-
customTexts?: {
5-
added?: string;
6-
deleted?: string;
7-
edited?: string;
8-
arrayChange?: string;
9-
addedTitle?: string;
10-
deletedTitle?: string;
11-
editedTitle?: string;
12-
arrayChangeTitle?: string;
13-
};
14-
}
1+
declare module "@mincho-js/pretify-deep-diff" {
2+
interface Options {
3+
locale?: "en" | "ru";
4+
customTexts?: {
5+
added?: string;
6+
deleted?: string;
7+
edited?: string;
8+
arrayChange?: string;
9+
addedTitle?: string;
10+
deletedTitle?: string;
11+
editedTitle?: string;
12+
arrayChangeTitle?: string;
13+
};
14+
}
1515

16-
interface Change {
17-
kind: 'N' | 'D' | 'E' | 'A';
18-
path?: (string | number)[];
19-
lhs?: any;
20-
rhs?: any;
21-
index?: number;
22-
item?: Change;
23-
}
16+
interface Change {
17+
kind: "N" | "D" | "E" | "A";
18+
path?: (string | number)[];
19+
lhs?: any;
20+
rhs?: any;
21+
index?: number;
22+
item?: Change;
23+
}
2424

25-
function pretifyDeepDiff(changes: Change[], options?: Options): string;
25+
function pretifyDeepDiff(changes: Change[], options?: Options): string;
2626

27-
export = pretifyDeepDiff;
28-
}
27+
export = pretifyDeepDiff;
28+
}

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
{
2-
"name": "pretify-deep-diff",
3-
"version": "1.0.1",
2+
"name": "@mincho-js/pretify-deep-diff",
3+
"version": "1.0.5",
44
"description": "A utility to prettify the results of deep-diff with emojis and localization support.",
55
"main": "index.js",
66
"types": "index.d.ts",
77
"scripts": {
88
"test": "node test.js"
99
},
10-
1110
"dependencies": {
1211
"deep-diff": "^1.0.2",
13-
"pretify-deep-diff": "^1.0.0"
12+
"@mincho-js/pretify-deep-diff": "^1.0.5"
1413
},
1514
"repository": {
1615
"type": "git",
17-
"url": "git+https://github.com/whoekage/pretify-deep-diff.git"
16+
"url": "git+https://github.com/mincho-js/pretify-deep-diff.git"
1817
},
1918
"keywords": [
2019
"deep-diff",
@@ -27,7 +26,7 @@
2726
"author": "sharkaev.ph@gmail.com",
2827
"license": "MIT",
2928
"bugs": {
30-
"url": "https://github.com/whoekage/pretify-deep-diff/issues"
29+
"url": "https://github.com/mincho-js/pretify-deep-diff/issues"
3130
},
32-
"homepage": "https://github.com/whoekage/pretify-deep-diff#readme"
31+
"homepage": "https://github.com/mincho-js/pretify-deep-diff#readme"
3332
}

0 commit comments

Comments
 (0)