Skip to content

Commit 49fb0aa

Browse files
committed
Move tests to src
1 parent 2e4514f commit 49fb0aa

13 files changed

Lines changed: 194 additions & 215 deletions

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = tab
6+
indent_size = 4
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.json]
12+
indent_size = 2

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"sourceType": "module",
99
"project": "./tsconfig.json"
1010
},
11-
"ignorePatterns": [ "lib/*", "coverage/*" ],
11+
"ignorePatterns": [ "dist/*", "coverage/*" ],
1212
"plugins": ["@typescript-eslint"],
1313
"rules": {
1414
"sort-imports": "error",

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
**/.DS_Store
33
/.idea
44
/dist
5-
/lib
65
/.yarn
76
.yarnrc.yml
87
.pnp.*
File renamed without changes.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# [Merge-Deep-TS](https://www.npmjs.com/package/merge-deep-ts)
22

33
<a href="https://www.npmjs.com/package/merge-deep-ts">![GitHub package.json version](https://img.shields.io/github/package-json/v/ichernetskii/merge-deep-ts?logo=npm)</a>
4-
<a href="https://www.npmjs.com/package/merge-deep-ts">![npm bundle size](https://img.shields.io/bundlephobia/minzip/merge-deep-ts)</a>
4+
<a href="https://bundlephobia.com/package/merge-deep-ts@latest">![npm bundle size](https://img.shields.io/bundlephobia/minzip/merge-deep-ts)</a>
55
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ichernetskii/merge-deep-ts/publish.yml)
6-
![Testspace pass ratio](https://img.shields.io/testspace/pass-ratio/ichernetskii/ichernetskii:merge-deep-ts/master?label=passed%20tests)
6+
<a href="https://ichernetskii.testspace.com/spaces/220047">![Testspace pass ratio](https://img.shields.io/testspace/pass-ratio/ichernetskii/ichernetskii:merge-deep-ts/master?label=passed%20tests)</a>
77
[![Coverage Status](https://coveralls.io/repos/github/ichernetskii/merge-deep-ts/badge.svg?branch=ci)](https://coveralls.io/github/ichernetskii/merge-deep-ts?branch=ci)
8-
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://img.shields.io/github/license/ichernetskii/merge-deep-ts)
8+
<a href="https://github.com/ichernetskii/merge-deep-ts/blob/master/LICENSE.md">[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://img.shields.io/github/license/ichernetskii/merge-deep-ts)</a>
99

1010
Deep fast merge JavaScript objects with circular references handling and TypeScript support
1111

@@ -241,7 +241,7 @@ Map {
241241
name => "Alex",
242242
age => 35
243243
}, {
244-
name => "John",
244+
name => "John",
245245
age => 42
246246
}]
247247
}

package.json

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,67 @@
11
{
22
"name": "merge-deep-ts",
3+
"version": "1.2.5",
34
"author": "Ilia Chernetskii <ichernetskii@gmail.com>",
4-
"homepage": "https://github.com/ichernetskii/merge-deep-ts",
5-
"repository": "ichernetskii/merge-deep-ts",
5+
"license": "MIT",
6+
"description": "Deep fast merge JavaScript objects with circular references handling and TypeScript support",
7+
"keywords": [
8+
"merge",
9+
"deep",
10+
"deepmerge",
11+
"objects",
12+
"circular",
13+
"extend",
14+
"union",
15+
"clone",
16+
"assign",
17+
"copy",
18+
"recursive",
19+
"ts merge",
20+
"ts-merge",
21+
"typescript merge",
22+
"typescript-merge"
23+
],
24+
"homepage": "https://github.com/ichernetskii/merge-deep-ts#readme",
25+
"repository": {
26+
"type": "git",
27+
"url": "https://github.com/ichernetskii/merge-deep-ts.git"
28+
},
629
"bugs": {
730
"url": "https://github.com/ichernetskii/merge-deep-ts/issues"
831
},
9-
"version": "1.2.4",
10-
"description": "Deep fast merge JavaScript objects with circular references handling and TypeScript support",
1132
"type": "module",
1233
"files": [
13-
"lib/**/*"
34+
"dist/**/*"
1435
],
1536
"exports": {
1637
".": {
17-
"import": "./lib/mjs/index.js",
18-
"require": "./lib/cjs/index.js",
19-
"types": "./lib/index.d.ts"
38+
"import": "./dist/mjs/index.js",
39+
"require": "./dist/cjs/index.js",
40+
"types": "./dist/index.d.ts"
2041
},
2142
"./package.json": "./package.json"
2243
},
23-
"module": "lib/mjs/index.js",
24-
"main": "lib/cjs/index.js",
25-
"types": "lib/index.d.ts",
44+
"module": "dist/mjs/index.js",
45+
"main": "dist/cjs/index.js",
46+
"types": "dist/index.d.ts",
2647
"scripts": {
27-
"build": "cpy 'src/[c,m]js/*' 'lib' && tsc --project tsconfig.mjs.json && tsc --project tsconfig.cjs.json",
48+
"build": "cpy 'src/[c,m]js/*' 'dist' && tsc --project tsconfig.mjs.json && tsc --project tsconfig.cjs.json",
2849
"test": "jest",
2950
"lint": "eslint .",
3051
"format": "eslint --fix .",
3152
"prepack": "yarn run build",
3253
"prepublish": "yarn run lint && yarn run test"
3354
},
34-
"keywords": [
35-
"merge",
36-
"deep",
37-
"deepmerge",
38-
"objects",
39-
"circular",
40-
"extend",
41-
"union",
42-
"clone",
43-
"copy",
44-
"recursive"
45-
],
46-
"license": "MIT",
4755
"devDependencies": {
4856
"@types/jest": "^29.5.1",
49-
"@types/node": "^20.1.1",
50-
"@typescript-eslint/eslint-plugin": "^5.59.5",
51-
"@typescript-eslint/parser": "^5.59.5",
57+
"@types/node": "^20.2.3",
58+
"@typescript-eslint/eslint-plugin": "^5.59.7",
59+
"@typescript-eslint/parser": "^5.59.7",
5260
"cpy-cli": "^4.2.0",
53-
"eslint": "^8.40.0",
61+
"eslint": "^8.41.0",
5462
"eslint-config-standard-with-typescript": "^34.0.1",
5563
"eslint-plugin-import": "^2.27.5",
56-
"eslint-plugin-n": "^15.7.0",
64+
"eslint-plugin-n": "^16.0.0",
5765
"eslint-plugin-promise": "^6.1.1",
5866
"jest": "^29.5.0",
5967
"jest-junit": "^16.0.0",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { type MergedObject } from "../src/types.js";
2-
import merge from "../src/index.js";
1+
import { type MergedObject } from "../types.js";
2+
import merge from "../index.js";
33

44
describe("merge-fast tests", () => {
55
it("should merge two objects", () => {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { type Equal, assert } from "../src/types.js";
2-
import { ERROR_NOT_ARRAY } from "../src/utils.js";
3-
import merge from "../src/index.js";
1+
import { type Equal, assert } from "../types.js";
2+
import { ERROR_NOT_ARRAY } from "../utils.js";
3+
import merge from "../index.js";
44

55
describe("TypeScript tests", () => {
66
it("should return right type", () => {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getCounter, getType } from "../src/utils.js";
2-
import { MergeableType } from "../src/types.js";
1+
import { getCounter, getType } from "../utils.js";
2+
import { MergeableType } from "../types.js";
33

44
describe("getCounter", () => {
55
it("should return counter", () => {

tsconfig.cjs.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"module": "CommonJS",
5-
"outDir": "./lib/cjs"
5+
"outDir": "./dist/cjs"
66
},
7-
"include": ["./src/**/*.ts"]
7+
"include": ["./src/**/*.ts"],
8+
"exclude": ["./**/*.spec.ts"]
89
}

0 commit comments

Comments
 (0)