Compare commits
1 Commits
feat-permi
...
fix-trace
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f4e89ae0c |
21
CHANGELOG.md
21
CHANGELOG.md
@@ -1,24 +1,3 @@
|
||||
## [5.1.4](https://github.com/wickedest/Mergely/compare/v5.1.3...v5.1.4) (2024-05-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* removed accidental change that enabled code display modes (e.g. javascript, python, html) ([692d01f](https://github.com/wickedest/Mergely/commit/692d01f1653ae8f1163a2c6228f457549086b75d))
|
||||
|
||||
## [5.1.3](https://github.com/wickedest/Mergely/compare/v5.1.2...v5.1.3) (2024-05-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **chore:** updated deps ([#195](https://github.com/wickedest/Mergely/issues/195)) ([c4c6e8a](https://github.com/wickedest/Mergely/commit/c4c6e8abd8f02762d5803774789673f76a95e932))
|
||||
|
||||
## [5.1.2](https://github.com/wickedest/Mergely/compare/v5.1.1...v5.1.2) (2024-05-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* trace only when debug enabled ([#194](https://github.com/wickedest/Mergely/issues/194)) ([60d18f8](https://github.com/wickedest/Mergely/commit/60d18f8d5c0df349b4806b2e8a6c0f79d9f8074e))
|
||||
|
||||
## [5.1.1](https://github.com/wickedest/Mergely/compare/v5.1.0...v5.1.1) (2024-03-11)
|
||||
|
||||
|
||||
|
||||
8926
package-lock.json
generated
8926
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mergely",
|
||||
"version": "5.1.4",
|
||||
"version": "5.1.1",
|
||||
"description": "A javascript UI for diff/merge",
|
||||
"license": "(GPL-3.0 OR LGPL-3.0 OR MPL-1.1 OR SEE LICENSE IN LICENSE)",
|
||||
"author": {
|
||||
@@ -57,7 +57,7 @@
|
||||
"karma-sourcemap-loader": "^0.4.0",
|
||||
"karma-webpack": "^5.0.0",
|
||||
"mocha": "^9.1.4",
|
||||
"semantic-release": "^21.1.2",
|
||||
"semantic-release": "^21.0.1",
|
||||
"simple-mock": "^0.8.0",
|
||||
"standard-version": "^9.3.2",
|
||||
"style-loader": "^3.3.1",
|
||||
|
||||
@@ -2,6 +2,11 @@ const CodeMirror = require('codemirror');
|
||||
require('codemirror/addon/search/searchcursor.js');
|
||||
require('codemirror/addon/selection/mark-selection.js');
|
||||
require('codemirror/lib/codemirror.css');
|
||||
require('codemirror/mode/go/go.js');
|
||||
require('codemirror/mode/javascript/javascript.js');
|
||||
require('codemirror/mode/htmlmixed/htmlmixed.js');
|
||||
require('codemirror/mode/markdown/markdown.js');
|
||||
require('codemirror/mode/python/python.js');
|
||||
|
||||
const dom = require('./dom.js');
|
||||
const VDoc = require('./vdoc');
|
||||
@@ -65,6 +70,7 @@ CodeMirrorDiffView.prototype.unbind = function() {
|
||||
this.el.removeChild(this.el.lastChild);
|
||||
}
|
||||
if (this._origEl) {
|
||||
this.el.style = this._origEl.style;
|
||||
this.el.className = this._origEl.className;
|
||||
}
|
||||
this._unbound = true;
|
||||
@@ -256,17 +262,16 @@ CodeMirrorDiffView.prototype.resize = function() {
|
||||
|
||||
CodeMirrorDiffView.prototype.bind = function(container) {
|
||||
this.trace('api#bind', container);
|
||||
this._origEl = {
|
||||
style: container.style,
|
||||
className: container.className
|
||||
};
|
||||
const el = dom.getMergelyContainer({ clazz: container.className });
|
||||
const computedStyle = window.getComputedStyle(container);
|
||||
if (!el.style.height
|
||||
&& (!computedStyle.height || computedStyle.height === '0px')
|
||||
) {
|
||||
if (!computedStyle.height || computedStyle.height === '0px') {
|
||||
throw new Error(
|
||||
`The element "${container.id}" requires an explicit height`);
|
||||
}
|
||||
this._origEl = {
|
||||
className: container.className
|
||||
};
|
||||
this.id = `${container.id}`;
|
||||
this.lhsId = `${container.id}-lhs`;
|
||||
this.rhsId = `${container.id}-rhs`;
|
||||
@@ -753,9 +758,6 @@ CodeMirrorDiffView.prototype._set_top_offset = function (side) {
|
||||
// this is the distance from the top of the screen to the top of the
|
||||
// content of the first codemirror editor
|
||||
const topnode = this._queryElement('.CodeMirror-measure');
|
||||
if (!topnode.offsetParent) {
|
||||
return false;
|
||||
}
|
||||
const top_offset = topnode.offsetParent.offsetTop + 4;
|
||||
|
||||
// restore editor's scroll position
|
||||
|
||||
@@ -46,9 +46,7 @@ class Mergely {
|
||||
}
|
||||
|
||||
const computedStyle = window.getComputedStyle(element);
|
||||
if (!element.style.height
|
||||
&& (!computedStyle.height || computedStyle.height === '0px')
|
||||
) {
|
||||
if (!computedStyle.height || computedStyle.height === '0px') {
|
||||
throw new Error(
|
||||
`The element "${selector}" requires an explicit height`);
|
||||
}
|
||||
|
||||
@@ -15,10 +15,6 @@ module.exports = (mode) => {
|
||||
...webpackDevConfig.output,
|
||||
path: path.join(__dirname, 'lib'),
|
||||
filename: './[name].js',
|
||||
library: {
|
||||
name: 'mergely',
|
||||
type: 'umd',
|
||||
}
|
||||
},
|
||||
optimization: {
|
||||
minimize: true,
|
||||
|
||||
Reference in New Issue
Block a user