Skip to content

Commit 29c68f8

Browse files
update
1 parent 5e928e4 commit 29c68f8

File tree

19 files changed

+67
-86
lines changed

19 files changed

+67
-86
lines changed

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "@git-diff-view/cli",
44
"author": "MrWangJustToDo",
55
"license": "MIT",
6-
"version": "0.0.11",
6+
"version": "0.1.0",
77
"main": "index.mjs",
88
"type": "module",
99
"types": "index.d.ts",
@@ -50,7 +50,7 @@
5050
"cli diff component"
5151
],
5252
"dependencies": {
53-
"@git-diff-view/core": "^0.0.40",
53+
"@git-diff-view/core": "^0.1.0",
5454
"@types/hast": "^3.0.0",
5555
"chalk": "^5.6.2",
5656
"highlight.js": "^11.11.0",

packages/core/index.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ declare class File$1 {
2929
highlighterName?: DiffHighlighter["name"];
3030
highlighterType?: DiffHighlighter["type"];
3131
maxLineNumber: number;
32-
/**
33-
* @deprecated
34-
*/
35-
enableTemplate: boolean;
3632
static createInstance(data: File$1): File$1;
3733
constructor(row: string, lang: DiffHighlighterLang, fileName?: string);
3834
constructor(row: string, lang: string, fileName?: string);

packages/core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "@git-diff-view/core",
44
"author": "MrWangJustToDo",
55
"license": "MIT",
6-
"version": "0.0.40",
6+
"version": "0.1.0",
77
"main": "index.js",
88
"types": "index.d.ts",
99
"files": [
@@ -53,7 +53,7 @@
5353
"diff parse"
5454
],
5555
"dependencies": {
56-
"@git-diff-view/lowlight": "^0.0.40",
56+
"@git-diff-view/lowlight": "^0.1.0",
5757
"highlight.js": "^11.11.0",
5858
"lowlight": "^3.3.0",
5959
"fast-diff": "^1.3.0"

packages/core/src/diff-file.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,14 @@ export class DiffFile {
646646

647647
this.#highlighterType =
648648
this.#oldFileResult?.highlighterType || this.#newFileResult?.highlighterType || this.#highlighterType;
649+
650+
if (this.#oldFileResult?.highlighterName) {
651+
this.#oldFileSyntaxLines = this.#oldFileResult.syntaxFile;
652+
}
653+
654+
if (this.#newFileResult?.highlighterName) {
655+
this.#newFileSyntaxLines = this.#newFileResult.syntaxFile;
656+
}
649657
}
650658

651659
#composeSyntax({ registerHighlighter }: { registerHighlighter?: Omit<DiffHighlighter, "getHighlighterEngine"> }) {

packages/core/src/file.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ export class File {
5656

5757
maxLineNumber: number = 0;
5858

59-
/**
60-
* @deprecated
61-
*/
62-
enableTemplate: boolean = true;
63-
6459
static createInstance(data: File) {
6560
const file = new File(data?.raw, data?.lang, data?.fileName);
6661

packages/file/index.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ declare class File$1 {
2828
highlighterName?: DiffHighlighter["name"];
2929
highlighterType?: DiffHighlighter["type"];
3030
maxLineNumber: number;
31-
/**
32-
* @deprecated
33-
*/
34-
enableTemplate: boolean;
3531
static createInstance(data: File$1): File$1;
3632
constructor(row: string, lang: DiffHighlighterLang, fileName?: string);
3733
constructor(row: string, lang: string, fileName?: string);

packages/file/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "@git-diff-view/file",
44
"author": "MrWangJustToDo",
55
"license": "MIT",
6-
"version": "0.0.40",
6+
"version": "0.1.0",
77
"main": "index.js",
88
"types": "index.d.ts",
99
"files": [
@@ -53,7 +53,7 @@
5353
"diff parse"
5454
],
5555
"dependencies": {
56-
"@git-diff-view/core": "^0.0.40",
56+
"@git-diff-view/core": "^0.1.0",
5757
"diff": "^8.0.3",
5858
"highlight.js": "^11.11.0",
5959
"lowlight": "^3.3.0",

packages/lowlight/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "@git-diff-view/lowlight",
44
"author": "MrWangJustToDo",
55
"license": "MIT",
6-
"version": "0.0.40",
6+
"version": "0.1.0",
77
"main": "index.js",
88
"types": "index.d.ts",
99
"files": [

packages/react/index.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ declare class File$1 {
2828
highlighterName?: DiffHighlighter["name"];
2929
highlighterType?: DiffHighlighter["type"];
3030
maxLineNumber: number;
31-
/**
32-
* @deprecated
33-
*/
34-
enableTemplate: boolean;
3531
static createInstance(data: File$1): File$1;
3632
constructor(row: string, lang: DiffHighlighterLang, fileName?: string);
3733
constructor(row: string, lang: string, fileName?: string);

packages/react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "@git-diff-view/react",
44
"author": "MrWangJustToDo",
55
"license": "MIT",
6-
"version": "0.0.40",
6+
"version": "0.1.0",
77
"main": "index.js",
88
"types": "index.d.ts",
99
"files": [
@@ -67,7 +67,7 @@
6767
"react diff component"
6868
],
6969
"dependencies": {
70-
"@git-diff-view/core": "^0.0.40",
70+
"@git-diff-view/core": "^0.1.0",
7171
"@types/hast": "^3.0.0",
7272
"fast-diff": "^1.3.0",
7373
"highlight.js": "^11.11.0",

0 commit comments

Comments
 (0)