Skip to content

Commit f478a66

Browse files
authored
Merge pull request #1005 from Patternslib/upgrade-supereasy
Upgrade supereasy
2 parents f5e91d5 + d3609a4 commit f478a66

File tree

7 files changed

+510
-336
lines changed

7 files changed

+510
-336
lines changed

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
"jquery-jcrop": "^0.9.13",
2222
"luxon": "^1.27.0",
2323
"masonry-layout": "^4.2.2",
24-
"moment": "^2.29.2",
24+
"moment": "^2.29.3",
2525
"moment-timezone": "^0.5.34",
2626
"photoswipe": "^4.1.3",
2727
"pikaday": "^1.8.0",
2828
"promise-polyfill": "^8.2.3",
2929
"screenfull": "^6.0.1",
3030
"select2": "^3.5.1",
31-
"showdown": "^2.0.3",
31+
"showdown": "^2.1.0",
3232
"showdown-prettify": "^1.3.0",
3333
"slick-carousel": "^1.8.1",
3434
"slides": "git+https://github.com/Patternslib/slides.git",
@@ -38,19 +38,19 @@
3838
"whatwg-fetch": "^3.4.0"
3939
},
4040
"devDependencies": {
41-
"@babel/core": "^7.17.9",
41+
"@babel/core": "^7.17.10",
4242
"@babel/eslint-parser": "^7.17.0",
4343
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
44-
"@babel/preset-env": "^7.16.11",
45-
"@commitlint/cli": "^16.2.3",
46-
"@commitlint/config-conventional": "^16.2.1",
44+
"@babel/preset-env": "^7.17.10",
45+
"@commitlint/cli": "^16.2.4",
46+
"@commitlint/config-conventional": "^16.2.4",
4747
"@release-it/conventional-changelog": "^4.3.0",
4848
"@testing-library/jest-dom": "^5.16.4",
49-
"babel-loader": "^8.2.4",
49+
"babel-loader": "^8.2.5",
5050
"copy-webpack-plugin": "^10.2.4",
51-
"core-js": "3.22.0",
51+
"core-js": "3.22.5",
5252
"css-loader": "^6.7.1",
53-
"eslint": "^8.13.0",
53+
"eslint": "^8.15.0",
5454
"eslint-config-prettier": "^8.5.0",
5555
"expose-loader": "^3.0.0",
5656
"husky": "^7.0.4",
@@ -59,19 +59,19 @@
5959
"inspectpack": "^4.7.1",
6060
"jest": "^27.5.1",
6161
"jest-raw-loader": "^1.0.1",
62-
"jest-watch-typeahead": "^1.0.0",
62+
"jest-watch-typeahead": "^1.1.0",
6363
"prettier": "^2.6.2",
6464
"regenerator-runtime": "^0.13.9",
6565
"release-it": "^14.14.2",
66-
"sass": "^1.50.0",
66+
"sass": "^1.51.0",
6767
"sass-loader": "^12.6.0",
6868
"style-loader": "^3.3.0",
6969
"terser-webpack-plugin": "^5.3.1",
7070
"timezone-mock": "^1.3.1",
71-
"webpack": "^5.72.0",
71+
"webpack": "^5.72.1",
7272
"webpack-bundle-analyzer": "^4.4.2",
7373
"webpack-cli": "^4.9.2",
74-
"webpack-dev-server": "^4.8.1",
74+
"webpack-dev-server": "^4.9.0",
7575
"webpack-modernizr-loader": "^5.0.0",
7676
"whybundled": "^2.0.0",
7777
"yarn": "^1.22.18"

src/pat/calendar/calendar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export default Base.extend({
157157
if (lang !== "en") {
158158
const locale = await import(`@fullcalendar/core/locales/${lang}.js`);
159159
config.locale = locale.default;
160-
console.log("loaded cal locale for " + lang);
160+
log.debug(`Loaded locale for ${lang}`);
161161
}
162162
if (this.options.first.day !== null) {
163163
config.firstDay = this.options.first.day;

src/pat/date-picker/date-picker.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ describe("pat-date-picker", function () {
561561

562562
it("works with pat-autosubmit", async () => {
563563
document.body.innerHTML = `
564-
<form class="pat-autosubmit">
564+
<form class="pat-autosubmit" onsubmit="return false;">
565565
<input name="date" type="date" class="pat-date-picker"/>
566566
</form>
567567
`;

src/pat/subform/subform.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe("subform base tests", function () {
77
describe("Triggering of the pattern", function () {
88
it("happens when a fieldset has the pat-subform class", function () {
99
var $form = $(
10-
"<form>" +
10+
'<form onsubmit="return false;">' +
1111
' <fieldset class="pat-subform">' +
1212
' <input type="text" name="q" placeholder="Search query"/>' +
1313
" </fieldset>" +
@@ -22,7 +22,7 @@ describe("subform base tests", function () {
2222
describe("Entering a return", function () {
2323
it("does nothing if the pat-autosubmit class is missing", function () {
2424
var $form = $(
25-
"<form>" +
25+
'<form onsubmit="return false;">' +
2626
' <fieldset class="pat-subform">' +
2727
' <input type="text" name="q" placeholder="Search query"/>' +
2828
" </fieldset>" +
@@ -41,7 +41,7 @@ describe("subform base tests", function () {
4141
});
4242
it("submits the subform when the pat-autosubmit class is present", function () {
4343
var $form = $(
44-
"<form>" +
44+
'<form onsubmit="return false;">' +
4545
' <fieldset class="pat-subform pat-autosubmit">' +
4646
' <input type="text" name="q" placeholder="Search query"/>' +
4747
" </fieldset>" +
@@ -60,7 +60,7 @@ describe("subform base tests", function () {
6060
});
6161
it("does not submit the parent autosubmit form when the pat-autosubmit class is present on both", function () {
6262
var $form = $(
63-
'<form class="pat-autosubmit">' +
63+
'<form class="pat-autosubmit" onsubmit="return false;">' +
6464
' <fieldset class="pat-subform pat-autosubmit">' +
6565
' <input type="text" name="q" placeholder="Search query"/>' +
6666
" </fieldset>" +

src/pat/validation/validation.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ describe("pat-validation", function () {
273273
// Buttons with ``formnovalidate`` should prevent validation.
274274

275275
document.body.innerHTML = `
276-
<form class="pat-validation">
276+
<form class="pat-validation" onsubmit="return false;">
277277
<input name="ok" required />
278278
<button formnovalidate>submit</button>
279279
</form>

src/setupTests.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import "core-js/stable";
99
import "regenerator-runtime/runtime";
1010

1111
import jquery from "jquery";
12-
global["$"] = global["jQuery"] = jquery;
12+
global.$ = global.jQuery = jquery;
1313

1414
jquery.expr.pseudos.visible = function () {
1515
// Fix jQuery ":visible" selector always returns false in JSDOM.
@@ -25,21 +25,17 @@ document.fullscreenEnabled = jest.fn();
2525
document.fullscreenchange = jest.fn();
2626
document.fullscreenerror = jest.fn();
2727

28-
// pat-subform
29-
// See https://github.com/jsdom/jsdom/issues/1937#issuecomment-461810980
30-
global["HTMLFormElement"].prototype.submit = () => {};
31-
3228
// resize-observer
33-
global["ResizeObserver"] = function () {
29+
global.ResizeObserver = function () {
3430
// Just do nothing for now...
3531
return { observe: () => {} };
3632
};
3733

3834
global.IntersectionObserver = class IntersectionObserver {
3935
constructor(callback) {
4036
this.callback = callback;
41-
if (! global.__patternslib_test_intersection_observers) {
42-
global.__patternslib_test_intersection_observers = [];
37+
if (!global.__patternslib_test_intersection_observers) {
38+
global.__patternslib_test_intersection_observers = [];
4339
}
4440
this._el = null;
4541
this._do_observe = false;
@@ -58,19 +54,21 @@ global.IntersectionObserver = class IntersectionObserver {
5854
this._do_observe = false;
5955
}
6056
takeRecords() {}
61-
_set_entry(is_intersecting=true) {
62-
if (! this._do_observe) {
57+
_set_entry(is_intersecting = true) {
58+
if (!this._do_observe) {
6359
return;
6460
}
65-
this.callback([{
66-
isIntersecting: is_intersecting,
67-
target: this._el,
68-
// entry.boundingClientRect
69-
// entry.intersectionRatio
70-
// entry.intersectionRect
71-
// entry.rootBounds
72-
// entry.time
73-
}])
61+
this.callback([
62+
{
63+
isIntersecting: is_intersecting,
64+
target: this._el,
65+
// entry.boundingClientRect
66+
// entry.intersectionRatio
67+
// entry.intersectionRect
68+
// entry.rootBounds
69+
// entry.time
70+
},
71+
]);
7472
this._cnt++;
7573
}
7674
};

0 commit comments

Comments
 (0)