v-code-diff
Advanced tools
Comparing version
{ | ||
"name": "v-code-diff", | ||
"version": "1.7.2", | ||
"version": "1.8.0", | ||
"description": "template component for vue-demi, can dev and build", | ||
@@ -53,3 +53,3 @@ "exports": { | ||
"diff-match-patch": "^1.0.5", | ||
"highlight.js": "^11.6.0", | ||
"highlight.js": "^11.9.0", | ||
"vue-demi": "^0.13.11" | ||
@@ -62,2 +62,3 @@ }, | ||
"@types/node": "^18.11.18", | ||
"@vueuse/core": "^10.6.1", | ||
"bumpp": "^8.2.1", | ||
@@ -64,0 +65,0 @@ "eslint": "^8.45.0", |
@@ -20,5 +20,5 @@ # v-code-diff | ||
* [vue-diff](https://github.com/hoiheart/vue-diff) | ||
* [vue-code-diff](https://github.com/ddchef/vue-code-diff) | ||
* Github Code Diff | ||
- [vue-diff](https://github.com/hoiheart/vue-diff) | ||
- [vue-code-diff](https://github.com/ddchef/vue-code-diff) | ||
- Github Code Diff | ||
@@ -107,3 +107,3 @@ ## Contents | ||
| | npm | cdn | | ||
|--------|-----|--------------------------------------------------------------------------------| | ||
| ------ | --- | ------------------------------------------------------------------------------ | | ||
| vue2 | | [vue2-cdn](https://stackblitz.com/edit/v-code-diff-vue2-cdn?file=index.html) | | ||
@@ -115,20 +115,22 @@ | vue2.7 | | [vue27-cdn](https://stackblitz.com/edit/v-code-diff-vue27-cdn?file=index.html) | | ||
| Prop | Description | Type | Optional Values | Default Value | | ||
|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|---------------------------|---------------| | ||
| language | Code language, such as typescript, defaults to plain text. [View all supported languages](https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md) | string | - | plaintext | | ||
| oldString | Old string | string | - | - | | ||
| newString | New string | string | - | - | | ||
| context | The number of lines to separate different parts so that they are not hidden | number | - | 10 | | ||
| outputFormat | Display mode | string | line-by-line,side-by-side | line-by-line | | ||
| diffStyle | Difference style, word-level differences or letter-level differences | string | word, char | word | | ||
| trim | Remove blank characters at the beginning and end of the string | boolean | - | false | | ||
| noDiffLineFeed | Don't diff Windows line feed (CRLF) and Linux line feed (LF) | boolean | - | false | | ||
| maxHeight | Maximum height of component, for example: 300px | string | - | undefined | | ||
| filename | Filename | string | - | undefined | | ||
| Prop | Description | Type | Optional Values | Default Value | | ||
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------------------------- | ------------- | | ||
| language | Code language, such as typescript, defaults to plain text. [View all supported languages](https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md) | string | - | plaintext | | ||
| oldString | Old string | string | - | - | | ||
| newString | New string | string | - | - | | ||
| context | The number of lines to separate different parts so that they are not hidden | number | - | 10 | | ||
| outputFormat | Display mode | string | line-by-line,side-by-side | line-by-line | | ||
| diffStyle | Difference style, word-level differences or letter-level differences | string | word, char | word | | ||
| trim | Remove blank characters at the beginning and end of the string | boolean | - | false | | ||
| noDiffLineFeed | Don't diff Windows line feed (CRLF) and Linux line feed (LF) | boolean | - | false | | ||
| maxHeight | Maximum height of component, for example: 300px | string | - | undefined | | ||
| filename | Filename | string | - | undefined | | ||
| newFilename | New filename | string | - | undefined | | ||
| theme | Add dark mode | ThemeType | light , dark | 'light' | | ||
## Events | ||
| Name | Description | Type | | ||
|------|------------------------------|---------------------------------------------------------------------------------| | ||
| diff | triggers when diff finished | (result: {stat: { isChanged: boolean, addNum: number, delNum: number}}) => void | | ||
| Name | Description | Type | | ||
| ---- | --------------------------- | ------------------------------------------------------------------------------- | | ||
| diff | triggers when diff finished | (result: {stat: { isChanged: boolean, addNum: number, delNum: number}}) => void | | ||
@@ -140,11 +142,11 @@ ## Extend languages | ||
* plaintext | ||
* xml/html | ||
* javascript | ||
* json | ||
* yaml | ||
* python | ||
* java | ||
* bash | ||
* sql | ||
- plaintext | ||
- xml/html | ||
- javascript | ||
- json | ||
- yaml | ||
- python | ||
- java | ||
- bash | ||
- sql | ||
@@ -172,12 +174,14 @@ If the language you need is not included, you can manually import the relevant language highlighting module. | ||
* In the 1.x version, language recognition and highlighting will no longer be automatically performed, you need to | ||
- In the 1.x version, language recognition and highlighting will no longer be automatically performed, you need to | ||
manually specify the language type, such as language="python", if not specified, it will default to plaintext | ||
and will not be highlighted. | ||
* In the 1.x version, due to the fact that rendering and highlighting are performed at the same time, the component | ||
- In the 1.x version, due to the fact that rendering and highlighting are performed at the same time, the component | ||
events | ||
have been removed. | ||
* In the 1.x version, the following component properties (Prop) have been changed: | ||
* highlight - removed | ||
* drawFileList - removed | ||
* fileName - rename to "filename" | ||
- In the 1.x version, the following component properties (Prop) have been changed: | ||
- highlight - removed | ||
- drawFileList - removed | ||
- fileName - rename to "filename" | ||
- newFilename - new | ||
- theme - new | ||
@@ -192,3 +196,3 @@ Below is a detailed comparison of the two versions, you can refer to it to complete the migration. | ||
| Event Name | Change Status | | ||
|---------------|--------------------| | ||
| ------------- | ------------------ | | ||
| before-render | No longer provided | | ||
@@ -200,16 +204,18 @@ | after-render | No longer provided | | ||
| Prop | Description | Change Status | | ||
|------------------------|-----------------------------------------------------------------------------|-------------------------------------------------| | ||
| highlight | Control code highlighting | Removed in version 1.x | | ||
| ---------------------- | --------------------------------------------------------------------------- | ----------------------------------------------- | | ||
| highlight | Control code highlighting | Removed in version 1.x | | ||
| language | Code language | None | | ||
| oldString | Old string | None | | ||
| newString | New string | None | | ||
| newString | New string | None | | ||
| context | The number of lines to separate different parts so that they are not hidden | None | | ||
| output-format | Display mode | None | | ||
| diffStyle | Difference style, word-level differences or letter-level differences | None | | ||
| drawFileList | Display file comparison list | Removed in version 1.x | | ||
| renderNothingWhenEmpty | Do not render when there is no comparison | Removed in version 1.x | | ||
| fileName | File name | To be determined, not under development | | ||
| isShowNoChange | Display source code when there is no comparison | Removed as it became the default in version 1.x | | ||
| trim | Remove blank characters at the beginning and end of the string | None | | ||
| drawFileList | Display file comparison list | Removed in version 1.x | | ||
| renderNothingWhenEmpty | Do not render when there is no comparison | Removed in version 1.x | | ||
| fileName | File name | To be determined, not under development | | ||
| newFilename | | New in version 1. To be determined, not under development | | ||
| isShowNoChange | Display source code when there is no comparison | Removed as it became the default in version 1.x | | ||
| trim | Remove blank characters at the beginning and end of the string | None | | ||
| noDiffLineFeed | Don't diff Windows line feed (CRLF) and Linux line feed (LF) | None | | ||
| theme | Add dark mode | New in version 1 | | ||
@@ -216,0 +222,0 @@ ## Star History |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1424621
20.47%19878
5.25%218
2.83%17
6.25%Updated