Update diff-dom package to 3.1.0

Since it moved to ES Modules in version 2.3.1,
diff-dom stopped including the `diffDOM.js` file
in its NPM package.

We don't do any kind of bundling in our build yet,
just concatenation of our scripts and some
minification of the results so we can't take
advantage of this yet.

The `diffDOM.js` file is still available in the
Github release so this moves to referencing that
in the `package.json` instead, until we start
using a bundler.

I opened an issue to check this is what the author
intended:

https://github.com/fiduswriter/diffDOM/issues/84

The latest version also adds Rollup as a peer
dependency.
This commit is contained in:
Tom Byers
2019-04-03 16:02:23 +01:00
parent 05f3cb6797
commit 01b97986f6
3 changed files with 6 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
"use strict";
var queues = {};
var dd = new diffDOM();
var dd = new diffDOM.DiffDOM();
var getRenderer = $component => response => dd.apply(
$component.get(0),

View File

@@ -96,7 +96,7 @@ const javascripts = () => {
paths.npm + 'hogan.js/dist/hogan-3.0.2.js',
paths.npm + 'jquery/dist/jquery.min.js',
paths.npm + 'query-command-supported/dist/queryCommandSupported.min.js',
paths.npm + 'diff-dom/diffDOM.js',
paths.npm + 'diff-dom/browser/diffDOM.js',
paths.npm + 'timeago/jquery.timeago.js',
paths.npm + 'textarea-caret/index.js'
]))

View File

@@ -20,7 +20,7 @@
"dependencies": {
"@babel/core": "7.4.0",
"@babel/preset-env": "7.4.2",
"diff-dom": "2.3.1",
"diff-dom": "https://github.com/fiduswriter/diffDOM/archive/v3.1.0.tar.gz",
"govuk-elements-sass": "3.1.2",
"govuk_frontend_toolkit": "7.2.0",
"govuk_template_jinja": "0.24.0",
@@ -46,5 +46,8 @@
"gulp-sass-lint": "1.4.0",
"jshint": "2.10.2",
"jshint-stylish": "2.2.1"
},
"peerDependencies": {
"rollup": "1.10.0"
}
}