Skip to content

Commit

Permalink
Upgrade packages with yarn upgrade-interactive
Browse files Browse the repository at this point in the history
Fix imports in Asset Manager
  • Loading branch information
Skrypt committed Feb 27, 2025
1 parent a2c7e5a commit 5436d1d
Show file tree
Hide file tree
Showing 21 changed files with 284 additions and 488 deletions.
1 change: 1 addition & 0 deletions .scripts/assets-manager/assetGroups.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { glob } from "glob";
import JSON5 from "json5";
import fs from "fs-extra";
import path from "path";
import process from "node:process";

import buildConfig from "./config.mjs";

Expand Down
2 changes: 2 additions & 0 deletions .scripts/assets-manager/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import { fileURLToPath } from "url";
import parseArgs from "minimist";
import _ from "lodash";
import prettyMilliseconds from 'pretty-ms';
import { Buffer } from 'buffer';
import buildConfig from "./config.mjs";
import clean from "./clean.mjs";
import getAllAssetGroups from "./assetGroups.mjs";
import process from 'node:process';

const startTime = performance.now();

Expand Down
1 change: 1 addition & 0 deletions .scripts/assets-manager/clean.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import chalk from "chalk";
import path from "path";
import fs from "fs-extra";
import process from "node:process";

export default async function clean(groups) {
console.log(chalk.redBright("Clean task called. This wipes all folders referenced as destinations of all groups. Waiting 3 seconds before starting."));
Expand Down
1 change: 1 addition & 0 deletions .scripts/assets-manager/config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import path from "path";
import chalk from "chalk";
import { pathToFileURL } from "url";
import process from "node:process";

const isWin = process.platform === "win32";
let pathToFile = path.join(process.cwd(), "build.config.mjs");
Expand Down
2 changes: 2 additions & 0 deletions .scripts/assets-manager/copy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { glob } from "glob";
import JSON5 from "json5";
import chalk from "chalk";
import path from "path";
import process from "node:process";
import { Buffer } from "buffer";

let action = process.argv[2];
const config = JSON5.parse(Buffer.from(process.argv[3], "base64").toString("utf-8"));
Expand Down
2 changes: 2 additions & 0 deletions .scripts/assets-manager/min.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { transform } from "lightningcss";
import postcss from "postcss";
import postcssRTLCSS from "postcss-rtlcss";
import { Mode, Source } from "postcss-rtlcss/options";
import process from "node:process";
import { Buffer } from "buffer";

let action = process.argv[2];
let mode = action === "build" ? "production" : "development";
Expand Down
6 changes: 3 additions & 3 deletions .scripts/assets-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"parcel": "2.13.3",
"parcel-config-vue2": "^0.1.3",
"parcel-transformer-vue2": "^0.1.7",
"postcss": "8.5.2",
"postcss": "8.5.3",
"postcss-rtlcss": "5.6.0",
"pretty-ms": "9.2.0",
"sass": "^1.84.0",
"vite": "^6.1.0",
"sass": "^1.85.1",
"vite": "^6.2.0",
"vue": "^3.5.13",
"vue-hot-reload-api": "^2.3.4",
"webpack": "^5.98.0",
Expand Down
7 changes: 4 additions & 3 deletions .scripts/assets-manager/parcel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { fileURLToPath } from "url";
import chalk from "chalk";
import _ from "lodash";
import buildConfig from "./config.mjs";
import process from "node:process";
import { Buffer } from "buffer";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down Expand Up @@ -54,15 +56,15 @@ async function runParcel(command, assetConfig) {
...options,
});

fs.remove(assetConfig.dest); // clean the destination folder
await fs.remove(assetConfig.dest); // clean the destination folder

if (isWatching || isHosting) {
const parcelCacheFolder = options.cacheDir;
fs.rmSync(parcelCacheFolder, { recursive: true, force: true });

console.log(chalk.green("Deleted folder:"), chalk.gray(parcelCacheFolder));

const { unsubscribe } = await parcel.watch((err, event) => {
const { unsubscribe } = await parcel.watch((err) => {
if (err) {
throw err;
}
Expand All @@ -88,7 +90,6 @@ async function runParcel(command, assetConfig) {
console.log(err.diagnostics);
process.exit(1);
}
//process.exit(0);
}
}

Expand Down
2 changes: 2 additions & 0 deletions .scripts/assets-manager/sass.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import postcss from "postcss";
import postcssRTLCSS from "postcss-rtlcss";
import { Mode } from "postcss-rtlcss/options";
import chokidar from "chokidar";
import process from "node:process";
import { Buffer } from "buffer";

let action = process.argv[2];
let mode = action === "build" ? "production" : "development";
Expand Down
2 changes: 2 additions & 0 deletions .scripts/assets-manager/vite.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { build, createServer } from "vite";
import JSON5 from "json5";
import process from "node:process";
import { Buffer } from "buffer";

async function runVite(command, assetConfig) {
if (command === "build") {
Expand Down
2 changes: 2 additions & 0 deletions .scripts/assets-manager/webpack.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import webpack from "webpack";
import JSON5 from "json5";
import WebpackDevServer from "webpack-dev-server";
import process from "node:process";
import { Buffer } from "buffer";

const action = process.argv[2];
const assetConfig = JSON5.parse(Buffer.from(process.argv[3], "base64").toString("utf-8"));
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"@babel/core": "^7.22.11",
"@babel/preset-env": "^7.22.10",
"@babel/preset-flow": "7.22.5",
"@eslint/js": "^9.20.0",
"@eslint/js": "^9.21.0",
"@orchardcore/assets-manager": "workspace:^",
"@popperjs/core": "2.11.8",
"all-contributors-cli": "^6.26.1",
"bootstrap": "5.3.3",
"child_process": "^1.0.2",
"es6-promise": "4.2.8",
"eslint": "^9.20.1",
"eslint": "^9.21.0",
"eslint-plugin-vue": "^9.32.0",
"glob": "^11.0.1",
"globals": "^15.15.0",
Expand All @@ -60,12 +60,12 @@
"merge-stream": "2.0.0",
"npm-run-all": "^4.1.5",
"path-posix": "1.0.0",
"postcss": "8.5.2",
"postcss": "8.5.3",
"postcss-rtl": "^2.0.0",
"rtlcss": "4.3.0",
"source-map": "^0.7.4",
"typescript": "^5.7.3",
"typescript-eslint": "^8.24.0",
"vue-tsc": "^2.2.0"
"vue-tsc": "^2.2.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"null-loader": "^4.0.1",
"prop-types": "15.8.1",
"style-loader": "^3.3.3",
"ts-loader": "^9.4.4",
"ts-loader": "^9.5.2",
"typescript": "^5.7.3",
"webpack": "^5.98.0",
"webpack-cli": "^6.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"css-loader": "^6.8.1",
"null-loader": "^4.0.1",
"prop-types": "15.8.1",
"sass-loader": "^16.0.4",
"sass-loader": "^16.0.5",
"style-loader": "^3.3.3",
"ts-loader": "^9.4.4",
"ts-loader": "^9.5.2",
"typescript": "^5.7.3",
"webpack": "^5.98.0",
"webpack-cli": "^6.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@
"jquery-resizable-dom": "0.35.0",
"jquery.easing": "1.4.1",
"js-cookie": "3.0.5",
"monaco-editor": "^0.46.0",
"monaco-editor": "0.46.0",
"nestedSortable": "1.3.4",
"nouislider": "15.7.0",
"sortablejs": "^1.15.3",
"sortablejs": "1.15.3",
"trumbowyg": "2.28.0",
"vue": "2.6.14",
"vue-multiselect": "^2.1.6",
"vuedraggable": "^2.24.3"
},
"devDependencies": {
"typescript-json-schema": "^0.51.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**!
* Sortable 1.15.6
* Sortable 1.15.3
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
Expand Down Expand Up @@ -134,7 +134,7 @@
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

var version = "1.15.6";
var version = "1.15.3";

function userAgent(pattern) {
if (typeof window !== 'undefined' && window.navigator) {
Expand Down Expand Up @@ -1127,8 +1127,7 @@
x: 0,
y: 0
},
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && (!Safari || IOS),
supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
emptyInsertThreshold: 5
};
PluginManager.initializePlugins(this, el, defaults);
Expand Down Expand Up @@ -1239,7 +1238,7 @@
pluginEvent('filter', _this, {
evt: evt
});
preventOnFilter && evt.preventDefault();
preventOnFilter && evt.cancelable && evt.preventDefault();
return; // cancel dnd
}
} else if (filter) {
Expand All @@ -1261,7 +1260,7 @@
}
});
if (filter) {
preventOnFilter && evt.preventDefault();
preventOnFilter && evt.cancelable && evt.preventDefault();
return; // cancel dnd
}
}
Expand Down Expand Up @@ -1333,15 +1332,9 @@
on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
if (options.supportPointer) {
on(ownerDocument, 'pointerup', _this._onDrop);
// Native D&D triggers pointercancel
!this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);
} else {
on(ownerDocument, 'mouseup', _this._onDrop);
on(ownerDocument, 'touchend', _this._onDrop);
on(ownerDocument, 'touchcancel', _this._onDrop);
}
on(ownerDocument, 'mouseup', _this._onDrop);
on(ownerDocument, 'touchend', _this._onDrop);
on(ownerDocument, 'touchcancel', _this._onDrop);

// Make dragEl draggable (must be before delay for FireFox)
if (FireFox && this.nativeDraggable) {
Expand All @@ -1361,14 +1354,9 @@
// If the user moves the pointer or let go the click or touch
// before the delay has been reached:
// disable the delayed drag
if (options.supportPointer) {
on(ownerDocument, 'pointerup', _this._disableDelayedDrag);
on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);
} else {
on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
on(ownerDocument, 'touchend', _this._disableDelayedDrag);
on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
}
on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
on(ownerDocument, 'touchend', _this._disableDelayedDrag);
on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
Expand All @@ -1394,8 +1382,6 @@
off(ownerDocument, 'mouseup', this._disableDelayedDrag);
off(ownerDocument, 'touchend', this._disableDelayedDrag);
off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
off(ownerDocument, 'pointerup', this._disableDelayedDrag);
off(ownerDocument, 'pointercancel', this._disableDelayedDrag);
off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
Expand All @@ -1416,6 +1402,7 @@
}
try {
if (document.selection) {
// Timeout neccessary for IE9
_nextTick(function () {
document.selection.empty();
});
Expand Down Expand Up @@ -1637,7 +1624,6 @@
_this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
on(document, 'selectstart', _this);
moved = true;
window.getSelection().removeAllRanges();
if (Safari) {
css(document.body, 'user-select', 'none');
}
Expand Down Expand Up @@ -1909,7 +1895,6 @@
off(ownerDocument, 'mouseup', this._onDrop);
off(ownerDocument, 'touchend', this._onDrop);
off(ownerDocument, 'pointerup', this._onDrop);
off(ownerDocument, 'pointercancel', this._onDrop);
off(ownerDocument, 'touchcancel', this._onDrop);
off(document, 'selectstart', this);
},
Expand Down Expand Up @@ -3100,38 +3085,28 @@
var lastIndex = index(lastMultiDragSelect),
currentIndex = index(dragEl$1);
if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
(function () {
// Must include lastMultiDragSelect (select it), in case modified selection from no selection
// (but previous selection existed)
var n, i;
if (currentIndex > lastIndex) {
i = lastIndex;
n = currentIndex;
} else {
i = currentIndex;
n = lastIndex + 1;
}
var filter = options.filter;
for (; i < n; i++) {
if (~multiDragElements.indexOf(children[i])) continue;
// Check if element is draggable
if (!closest(children[i], options.draggable, parentEl, false)) continue;
// Check if element is filtered
var filtered = filter && (typeof filter === 'function' ? filter.call(sortable, evt, children[i], sortable) : filter.split(',').some(function (criteria) {
return closest(children[i], criteria.trim(), parentEl, false);
}));
if (filtered) continue;
toggleClass(children[i], options.selectedClass, true);
multiDragElements.push(children[i]);
dispatchEvent({
sortable: sortable,
rootEl: rootEl,
name: 'select',
targetEl: children[i],
originalEvent: evt
});
}
})();
// Must include lastMultiDragSelect (select it), in case modified selection from no selection
// (but previous selection existed)
var n, i;
if (currentIndex > lastIndex) {
i = lastIndex;
n = currentIndex;
} else {
i = currentIndex;
n = lastIndex + 1;
}
for (; i < n; i++) {
if (~multiDragElements.indexOf(children[i])) continue;
toggleClass(children[i], options.selectedClass, true);
multiDragElements.push(children[i]);
dispatchEvent({
sortable: sortable,
rootEl: rootEl,
name: 'select',
targetEl: children[i],
originalEvent: evt
});
}
}
} else {
lastMultiDragSelect = dragEl$1;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"browser-sync": "2.27.9",
"chokidar": "4.0.3",
"concurrently": "9.1.2",
"postcss": "8.5.2",
"prettier": "3.5.1",
"postcss": "8.5.3",
"prettier": "3.5.2",
"pug": "3.0.3",
"sass": "1.84.0",
"sass": "1.85.1",
"shelljs": "0.8.5",
"upath": "2.0.1"
}
Expand Down
Loading

0 comments on commit 5436d1d

Please sign in to comment.