v10: Update locations of npm dependencies (#12333)

* update new location of anime.js

* set new location of 'diff' and update to new global Diff vs JsDiff
This commit is contained in:
Jacob Overgaard
2022-05-03 11:49:01 +02:00
committed by GitHub
parent 4a635198f6
commit 250f99be3e
2 changed files with 6 additions and 6 deletions

View File

@@ -142,8 +142,8 @@ function dependencies() {
},
{
"name": "animejs",
"src": ["./node_modules/animejs/anime.min.js"],
"base": "./node_modules/animejs"
"src": ["./node_modules/animejs/lib/anime.min.js"],
"base": "./node_modules/animejs/lib"
},
{
"name": "bootstrap-social",
@@ -171,7 +171,7 @@ function dependencies() {
},
{
"name": "jsdiff",
"src": ["./node_modules/diff/dist/diff.min.js"],
"src": ["./node_modules/diff/dist/diff.js"],
"base": "./node_modules/diff/dist"
},
{

View File

@@ -57,7 +57,7 @@
});
// Load in diff library
assetsService.loadJs('lib/jsdiff/diff.min.js', $scope).then(function () {
assetsService.loadJs('lib/jsdiff/diff.js', $scope).then(function () {
getVersions().then(function(){
vm.loading = false;
@@ -148,7 +148,7 @@
vm.diff.properties = [];
// find diff in name
vm.diff.name = JsDiff.diffWords(currentVersion.name, previousVersion.name);
vm.diff.name = Diff.diffWords(currentVersion.name, previousVersion.name);
// extract all properties from the tabs and create new object for the diff
currentVersion.tabs.forEach(function (tab) {
@@ -192,7 +192,7 @@
const diffProperty = {
'alias': property.alias,
'label': property.label,
'diff': property.isObject ? JsDiff.diffJson(property.value, oldProperty.value) : JsDiff.diffWords(property.value, oldProperty.value),
'diff': property.isObject ? Diff.diffJson(property.value, oldProperty.value) : Diff.diffWords(property.value, oldProperty.value),
'isObject': property.isObject || oldProperty.isObject
};