1
0
mirror of synced 2025-12-18 04:57:57 +08:00

Compare commits

...

2 Commits
4.2.0 ... 4.2.1

Author SHA1 Message Date
Jamie Peabody
e38cd50037 bump 2020-10-15 20:47:22 +01:00
Jamie Peabody
85b02add89 chore: updated dependencies 2020-10-15 20:46:11 +01:00
6 changed files with 77 additions and 56 deletions

View File

@@ -1,5 +1,8 @@
# Changes # Changes
## 4.2.1:
* chore: updated dependencies, cleared security issues
## 4.2.0: ## 4.2.0:
* minor: added new option `ignoreaccents` to ignore accented characters. * minor: added new option `ignoreaccents` to ignore accented characters.

View File

@@ -53,11 +53,13 @@ module.exports = function(config) {
} }
}, },
plugins: [ plugins: [
new CopyWebpackPlugin([{ new CopyWebpackPlugin({
patterns: [{
from: 'src/mergely.css', from: 'src/mergely.css',
to: 'mergely.css', to: 'mergely.css',
toType: 'file' toType: 'file'
}]) }]
})
] ]
}, },
webpackServer: { webpackServer: {

View File

@@ -1,6 +1,6 @@
{ {
"name": "mergely", "name": "mergely",
"version": "4.2.0", "version": "4.2.1",
"description": "A javascript UI for diff/merge", "description": "A javascript UI for diff/merge",
"directories": { "directories": {
"doc": "doc", "doc": "doc",
@@ -36,34 +36,33 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.1.6", "@babel/core": "^7.1.6",
"@babel/preset-env": "^7.1.6", "@babel/preset-env": "^7.1.6",
"@webpack-cli/init": "^0.1.2", "@webpack-cli/init": "^1.0.1",
"babel-loader": "^8.0.4", "babel-loader": "^8.0.4",
"babel-plugin-syntax-dynamic-import": "^6.18.0", "babel-plugin-syntax-dynamic-import": "^6.18.0",
"chai": "^4.1.2", "chai": "^4.1.2",
"codemirror": "^5.50.2", "codemirror": "^5.50.2",
"copy-webpack-plugin": "^4.6.0", "copy-webpack-plugin": "^6.2.1",
"css-loader": "^0.28.11", "css-loader": "^5.0.0",
"file-loader": "^1.1.5", "file-loader": "^6.1.1",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^4.5.0",
"image-webpack-loader": "^3.4.2", "image-webpack-loader": "^7.0.1",
"jquery": "^3.2.1", "jquery": "^3.5.1",
"karma": "^3.1.1", "karma": "^5.2.3",
"karma-chai": "^0.1.0", "karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0", "karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^1.3.0", "karma-coverage-istanbul-reporter": "^1.3.0",
"karma-mocha": "^1.3.0", "karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5", "karma-mocha-reporter": "^2.2.5",
"karma-webpack": "^2.0.9", "karma-webpack": "^4.0.2",
"mocha": "^4.0.1", "mocha": "^8.1.3",
"style-loader": "^0.23.0", "style-loader": "^2.0.0",
"uglifyjs-webpack-plugin": "^2.0.1", "webpack": "^4.44.2",
"webpack": "^4.20.2", "webpack-cli": "^4.0.0",
"webpack-cli": "^3.1.2", "webpack-dev-server": "^3.11.0"
"webpack-dev-server": "^3.1.9"
}, },
"scripts": { "scripts": {
"build": "rm -rf lib && webpack --config ./webpack.prod.js", "build": "rm -rf lib && webpack --config ./webpack.prod.js",
"start": "webpack-dev-server -w --debug --progress --colors --config ./webpack.dev.js --content-base ./dist --inline --hot --host 0.0.0.0", "start": "webpack serve --config webpack.dev.js",
"test": "karma start", "test": "karma start",
"test:chrome": "karma start --browsers Chrome --singleRun=false" "test:chrome": "karma start --browsers Chrome --singleRun=false"
} }

View File

@@ -586,6 +586,7 @@ describe('mergely', function () {
done(); done();
}); });
}); });
});
it('should not be vulnerable to XSS', function (done) { it('should not be vulnerable to XSS', function (done) {
function initXSS(options) { function initXSS(options) {
@@ -611,5 +612,24 @@ describe('mergely', function () {
done(); done();
}); });
}); });
it('should ignore accented characters', function (done) {
$(document).ready(() => {
const editor = init({
height: 100,
license: 'lgpl-separate-notice',
ignoreaccents: true,
lhs: (setValue) => setValue('comunicação'),
rhs: (setValue) => setValue('comunicacao')
});
const { mergely } = $('#mergely');
$('#mergely').on('updated', () => {
console.log('updated');
const diff = $('#mergely').mergely('diff');;
expect(diff).to.equal('');
done();
});
});
}); });
}); });

View File

@@ -19,10 +19,7 @@ module.exports = {
}, { }, {
test: /\.css$/, test: /\.css$/,
use: [{ use: [{
loader: 'style-loader', loader: 'style-loader'
options: {
sourceMap: true
}
}, { }, {
loader: 'css-loader' loader: 'css-loader'
}] }]
@@ -69,11 +66,9 @@ module.exports = {
test: /[\\/]node_modules[\\/]/ test: /[\\/]node_modules[\\/]/
} }
}, },
chunks: 'async', chunks: 'async',
minChunks: 1, minChunks: 1,
minSize: 30000, minSize: 30000
name: true
} }
} }
} }

View File

@@ -29,10 +29,12 @@ module.exports = {
CodeMirror: 'CodeMirror' CodeMirror: 'CodeMirror'
}, },
plugins: [ plugins: [
new CopyWebpackPlugin([{ new CopyWebpackPlugin({
patterns: [{
from: 'src/mergely.css', from: 'src/mergely.css',
to: 'mergely.css', to: 'mergely.css',
toType: 'file' toType: 'file'
}]) }]
})
] ]
}; };