Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

commonplace

Package Overview
Dependencies
Maintainers
7
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commonplace - npm Package Compare versions

Comparing version 0.4.2 to 0.4.22

12

lib/commonplace.js

@@ -177,3 +177,3 @@ var child_process = require('child_process');

var commonplace_src = path.resolve(__dirname, '..', 'src');
var local_src = path.resolve(process.cwd(), info.src_dir()); // src/hearth.
var local_src = path.resolve(process.cwd(), info.src_dir());

@@ -615,3 +615,10 @@ check_version(

}
read_init_js(almond_js.toString());
try {
almond_js = require('uglify-js').minify(
almond_js.toString(), {screw_ie8: true, fromString: true}).code;
} catch(e) {
console.error('Error during minification.', e);
return;
}
read_init_js(almond_js);
});

@@ -682,3 +689,2 @@ })();

// other files have been processed (because of the `imgurls.txt` file).
console.log( path.resolve(src_dir, 'media', 'css', 'splash.styl') )
fs.exists(path.resolve(src_dir, 'media', 'css', 'splash.styl'), function (exists) {

@@ -685,0 +691,0 @@ if (!exists) {

@@ -6,8 +6,3 @@ var fs = require('fs');

cwd = cwd || process.cwd();
var temp;
if (fs.existsSync(temp = path.resolve(cwd, 'hearth'))) {
return temp;
} else {
return path.resolve(cwd, 'src');
}
return path.resolve(cwd, 'src');
};

@@ -14,0 +9,0 @@

{
"name": "commonplace",
"version": "0.4.2",
"version": "0.4.22",
"preferGlobal": true,

@@ -5,0 +5,0 @@ "repository": {

@@ -41,6 +41,8 @@ define('builder',

function fire(el, event_name) {
var args = Array.prototype.slice.call(arguments, 2);
var e = document.createEvent('Event');
e.initEvent.apply(e, [event_name, true, false].concat(args));
function fire(el, event_name, data) {
var e = new CustomEvent(event_name, {
bubbles: true,
cancelable: false,
detail: data
});
el.dispatchEvent(e);

@@ -93,5 +95,8 @@ return e;

function trigger_fragment_loaded(id) {
fire(page, 'fragment_loaded', id || null);
function trigger_fragment_loaded(data) {
fire(page, 'fragment_loaded', data);
}
function trigger_fragment_load_failed(data) {
fire(page, 'fragment_load_failed', data);
}

@@ -109,3 +114,3 @@ // This pretends to be the nunjucks extension that does the magic.

} else {
request = pool.get(url);
request = pool.get(url, !!signature.nocache);
}

@@ -221,3 +226,3 @@

trigger_fragment_loaded(signature.id || null);
trigger_fragment_loaded({context: context, signature: signature});

@@ -234,2 +239,3 @@ }).fail(function(xhr, text, code, response) {

}
trigger_fragment_load_failed({context: context, signature: signature});
});

@@ -236,0 +242,0 @@ return request;

@@ -39,2 +39,3 @@ define('capabilities', ['settings'], function(settings) {

&& !!navigator.userAgent.match(/rv:32.0/)
&& settings.switches
&& settings.switches.indexOf('firefox-accounts') !== -1)

@@ -44,2 +45,3 @@ };

return (!static_caps.nativeFxA()
&& settings.switches
&& settings.switches.indexOf('firefox-accounts') !== -1);

@@ -46,0 +48,0 @@ };

@@ -23,2 +23,3 @@ define('helpers',

filters.bgurl = utils.bgurl;
filters.urlparams = utils.urlparams;

@@ -25,0 +26,0 @@ filters.urlunparam = utils.urlunparam;

@@ -34,3 +34,3 @@ define('navigation',

notification.notification({message: gettext('No internet connection')});
return false;
return !!settings.offline_capable;
}

@@ -197,2 +197,3 @@ return true;

href.substr(0, 7) === 'mailto:' ||
href.substr(0, 11) === 'javascript:' ||
href[0] === '#' ||

@@ -199,0 +200,0 @@ href.indexOf('?modified=') !== -1 ||

@@ -90,6 +90,6 @@ define('notification', ['defer', 'helpers', 'jquery', 'templates', 'z'], function(defer, helpers, $, nunjucks, z) {

confirmationEl.on('touchend click', '.yes', function(e) {
confirmationEl.on('touchend click', '.confirmation-yes', function(e) {
e.preventDefault();
confirmationDef.resolve();
}).on('touchend click', '.btn-cancel, .close', function(e) {
}).on('touchend click', '.confirmation-no, .close', function(e) {
e.preventDefault();

@@ -96,0 +96,0 @@ confirmationDef.reject();

@@ -167,5 +167,5 @@ define('requests',

function del(url) {
function del(url, data) {
console.log('DELETing', url);
return ajax('DELETE', url).done(function() {
return ajax('DELETE', url, data).done(function() {
console.log('DELETEd', url);

@@ -172,0 +172,0 @@ });

@@ -114,5 +114,7 @@ define('urls',

var media_url = settings.media_url;
if (media_url[media_url.length - 1] !== '/') {
// Media URL should end with trailing slash.
if (media_url.substr(-1) !== '/') {
media_url += '/';
}
// Path should not start with leading slash.
if (path[0] === '/') {

@@ -119,0 +121,0 @@ path = path.substr(1);

@@ -74,2 +74,6 @@ define('utils', ['jquery', 'l10n', 'underscore'], function($, l10n, _) {

function bgurl(url) {
return 'url(' + JSON.stringify(url) + ')';
}
function encodeURIComponent(uri) {

@@ -194,2 +198,3 @@ return window.encodeURIComponent(uri).replace(/%20/g, '+');

'baseurl': baseurl,
'bgurl': bgurl,
'browser': browser,

@@ -196,0 +201,0 @@ 'encodeURIComponent': encodeURIComponent,

@@ -8,3 +8,3 @@ define('z', ['jquery'], function($) {

page: $('#page'),
apps: {},
apps: [],
context: {},

@@ -11,0 +11,0 @@ spaceheater: !!document.body.getAttribute('data-spaceheater')

@@ -8,4 +8,4 @@ (function() {

'ga-IE', 'hr', 'hu', 'it', 'ja', 'ko', 'mk', 'nb-NO', 'nl', 'pa',
'pl', 'pt-BR',
'ro', 'ru', 'sk', 'sq', 'sr', 'sr-Latn', 'tr', 'zh-CN', 'zh-TW', 'dbg'
'pl', 'pt-BR', 'ro', 'ru', 'sk', 'sq', 'sr', 'sr-Latn', 'ta', 'tr',
'zh-CN', 'zh-TW', 'dbg'
];

@@ -12,0 +12,0 @@ var body_langs;

@@ -28,3 +28,3 @@ define('nunjucks.compat', ['nunjucks'], function(nunjucks) {

if (index === undefined) {
return obj.pop();
return this.pop();
}

@@ -31,0 +31,0 @@ if (index >= this.length || index < 0) {

@@ -69,2 +69,12 @@ (function() {

test('bgurl', function(done) {
eq_(utils.bgurl('http://foo/bar/seavan.png'),
'url("http://foo/bar/seavan.png")');
eq_(utils.bgurl('http://foo/bar/Sea "Seavan" Van.png'),
'url("http://foo/bar/Sea "Seavan" Van.png")');
eq_(utils.bgurl("http://foo/bar/Sea 'Seavan' Van.png"),
'url("http://foo/bar/Sea \'Seavan\' Van.png")');
done();
});
test('urlencode', function(done) {

@@ -71,0 +81,0 @@ eq_(utils.urlencode({a: 'b'}), 'a=b');

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc