Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
Features
~~~~~~~~

- Remove PhantomJS - we're using ChromeHeadless already.
- Simplify package.json and remove unused.
- Upgrade moment and moment-timezone.
- core/utils rebaseURL: Change a relative base url to an absolute URL using window.location.
- pat-push: New pattern for replacing html content on push events.
- pat-scroll-box: New pattern for scrolling detection. Replaces the previous "scroll detection" module.
Expand Down
7,372 changes: 1,714 additions & 5,658 deletions package-lock.json

Large diffs are not rendered by default.

45 changes: 9 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,9 @@
"url": "https://github.com/Patternslib/patterns.git"
},
"dependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@stomp/stompjs": "^5.4.4",
"chokidar": "^3.3.1",
"almond": "0.3.3",
"anythingslider": "git+https://github.com/fulv/AnythingSlider.git",
"babel-loader": "8.0.2",
"babel-plugin-dynamic-import-webpack": "^1.1.0",
"babel-polyfill": "^6.26.0",
"browserslist": "^4.5.4",
"caniuse-lite": "^1.0.0",
"clean-css": "^4.2.1",
"es6-promise-promise": "1.0.0",
"ev-emitter": "1.1.0",
"es6-promise-promise": "^1.0.0",
"fullcalendar": "2.9.1",
"google-code-prettify": "1.0.5",
"imagesloaded": "4.1.4",
Expand All @@ -38,16 +26,13 @@
"jquery-jcrop": "0.9.13",
"jquery-placeholder": "2.0.7",
"jquery.browser": "0.1.0",
"lodash": "^4.17.15",
"logging": "https://github.com/Patternslib/logging.git",
"masonry-layout": "4.2.0",
"modernizr": "^3.7.1",
"moment": "2.24.0",
"moment-timezone": "0.5.13",
"parsleyjs": "2.7.2",
"moment": "~2.27.0",
"moment-timezone": "~0.5.31",
"photoswipe": "4.1.3",
"pikaday": "^1.8.0",
"popper.js": "1.16.1",
"prefixfree": "1.0.0",
"promise-polyfill": "^8.1.0",
"screenfull": "^5.0.0",
Expand All @@ -58,22 +43,19 @@
"slides": "https://github.com/Patternslib/slides.git",
"spectrum-colorpicker": "1.8.0",
"stickyfilljs": "https://github.com/syslabcom/stickyfill.git",
"style-loader": "^0.23.1",
"text-loader": "0.0.1",
"tippy.js": "5.2.0",
"underscore": "1.9.1",
"validate.js": "0.11.1"
},
"devDependencies": {
"ajv": "^6.6.1",
"babel-plugin-syntax-dynamic-import": "6.18.0",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"babel-loader": "8.0.2",
"css-loader": "^3.0.0",
"duplicate-package-checker-webpack-plugin": "^3.0.0",
"exports-loader": "^0.7.0",
"expose-loader": "^0.7.5",
"fstream": "^1.0.12",
"generator-patternslib": "github:Patternslib/generator-patternslib#d8d06e0",
"html-webpack-plugin": "^3.2.0",
"imports-loader": "^0.8.0",
"jasmine": "^3.4.0",
"jasmine-core": "^3.4.0",
Expand All @@ -90,33 +72,24 @@
"karma-jasmine-html-reporter": "^1.4.2",
"karma-mocha-reporter": "^2.2.5",
"karma-opera-launcher": "^1.0.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-safari-launcher": "^1.0.0",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "^4.0.0-rc.5",
"mixin-deep": "^2.0.1",
"mustache": "3.0.0",
"node-gyp": "^4.0.0",
"node-sass": "^4.12.0",
"pegjs": "0.7.0",
"phantomjs-prebuilt": "^2.1.8",
"postinstall-build": "^5.0.1",
"puppeteer": "1.14.0",
"script-loader": "^0.7.2",
"set-value": "^3.0.1",
"tar": "^4.4.10",
"style-loader": "^0.23.1",
"text-loader": "0.0.1",
"uglifyjs-webpack-plugin": "^2.0.1",
"union-value": "^2.0.1",
"webpack": "^4.27.1",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.3.1",
"webpack-jasmine-html-runner-plugin": "^0.9.0",
"webpack-merge": "^4.1.2",
"webpack-modernizr-loader": "^5.0.0",
"webpack-visualizer-plugin": "^0.1.11",
"wrapper-webpack-plugin": "^2.0.0",
"yo": "^2.0.6"
"wrapper-webpack-plugin": "^2.0.0"
},
"scripts": {
"start": "NODE_ENV=development webpack-dev-server --config webpack/dev.config.js --open",
Expand Down
4 changes: 1 addition & 3 deletions src/pat/ajax/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ define(["pat-ajax"], function(pattern) {
var ajaxargs = $.ajax.calls.mostRecent().args[0];
expect(ajaxargs.url).toEqual("action.html");
expect(ajaxargs.method).toEqual("POST");
// Commenting this out because phantomjs doesn't support formdata
// https://github.com/ariya/phantomjs/issues/14867
//expect(ajaxargs.data.get('input1')).toContain("value1");
expect(ajaxargs.data.get('input1')).toContain("value1");
});

it("triggers ajax request on click submit", function() {
Expand Down
12 changes: 4 additions & 8 deletions src/pat/inject/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,11 +738,9 @@ define(["pat-inject", "pat-utils"], function(pattern, utils) {
pattern.init($form);
$form.trigger("submit");

//var ajaxargs = $.ajax.calls.mostRecent().args[0];
var ajaxargs = $.ajax.calls.mostRecent().args[0];
expect($.ajax).toHaveBeenCalled();
// Commenting this out because phantomjs doesn't support formdata
// https://github.com/ariya/phantomjs/issues/14867
//expect(ajaxargs.data.get('param')).toContain("somevalue");
expect(ajaxargs.data.get('param')).toContain("somevalue");
});
it("pass submit button value in ajax call as data", function() {
var $submit = $(
Expand All @@ -755,11 +753,9 @@ define(["pat-inject", "pat-utils"], function(pattern, utils) {
pattern.init($form);
$submit.trigger("click");

//var ajaxargs = $.ajax.calls.mostRecent().args[0];
var ajaxargs = $.ajax.calls.mostRecent().args[0];
expect($.ajax).toHaveBeenCalled();
// Commenting this out because phantomjs doesn't support formdata
// https://github.com/ariya/phantomjs/issues/14867
//expect(ajaxargs.data.get('submit')).toContain("label");
expect(ajaxargs.data.get('submit')).toContain("label");
});

describe("formaction attribute on submit buttons", function() {
Expand Down
11 changes: 3 additions & 8 deletions src/pat/tooltip/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,11 @@ define(["pat-tooltip", "pat-inject"], function(pattern, inject) {
setTimeout(function() {
expect(spy_show).toHaveBeenCalled();
expect(spy_execute).toHaveBeenCalled();
var $container = $el.data("patterns.tooltip.container");
// Content is fetched from ./tests/content.html#content
expect($container.text()).toBe("External content fetched via an HTTP request.");
}, 2000);

/* XXX: The ajax call works fine in the browser but not
* via PhantomJS. Will have to debug later.
*
var $container = $el.data("patterns.tooltip.container");
// Content is fetched from ./tests/content.html#content
expect($container.text()).toBe(
"External content fetched via an HTTP request.");
*/
});
});

Expand Down
2 changes: 1 addition & 1 deletion tests/specs/core/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(["pat-store"], function(store) {
describe("Core / store", function() {

describe("store API", function() {
it("PhantomJS supports storage", function() {
it("Supports storage", function() {
expect(store.supported).toBe(true);
});

Expand Down
3 changes: 1 addition & 2 deletions webpack/base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ module.exports = {
"targets": {
"browsers": ["last 2 versions", "ie >= 11"]
}
}]],
plugins: ["dynamic-import-webpack"]
}]]
}
},
{
Expand Down
6 changes: 1 addition & 5 deletions webpack/dev.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const merge = require('webpack-merge');
var baseConfig = require('./base.config.js');
var JasmineWebpackPlugin = require('jasmine-webpack-plugin');


module.exports = merge(baseConfig, {
Expand All @@ -10,8 +9,5 @@ module.exports = merge(baseConfig, {
contentBase: './',
port: '3001',
host: '0.0.0.0'
},
plugins: [
new JasmineWebpackPlugin(),
],
}
});
3 changes: 1 addition & 2 deletions webpack/karma.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ module.exports = function(config) {
},
babelPreprocessor: {
options: {
plugins: ['syntax-dynamic-import'],
presets: [["@babel/env", {
"targets": {
"browsers": ["last 2 versions", "ie >= 11"]
Expand Down Expand Up @@ -119,7 +118,7 @@ module.exports = function(config) {

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['MyCustomLauncher' /*,'PhantomJS','Firefox','Edge','ChromeCanary','Opera','IE','Safari'*/ ],
browsers: ['MyCustomLauncher' /*,'Firefox','Edge','ChromeCanary','Opera','IE','Safari'*/ ],


// Continuous Integration mode
Expand Down