Hello community,
here is the log from the commit of package perl-Mojolicious-Plugin-AssetPack
for openSUSE:Factory checked in at 2017-05-24 16:47:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-AssetPack (Old)
and /work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious-Plugin-AssetPack"
Wed May 24 16:47:18 2017 rev:31 rq:495804 version:1.43
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Mojolicious-Plugin-AssetPack/perl-Mojolicious-Plugin-AssetPack.changes
2017-05-03 15:57:22.794618425 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Mojolicious-Plugin-AssetPack.new/perl-Mojolicious-Plugin-AssetPack.changes
2017-05-24 16:47:19.720229294 +0200
@@ -1,0 +2,10 @@
+Tue May 16 06:12:27 UTC 2017 - [email protected]
+
+- updated to 1.43
+ see /usr/share/doc/packages/perl-Mojolicious-Plugin-AssetPack/Changes
+
+ 1.43 2017-05-12T14:38:02+0200
+ - Fix not escaping Vuejs template code
+ - Less verbose logging when processing assets
+
+-------------------------------------------------------------------
Old:
----
Mojolicious-Plugin-AssetPack-1.42.tar.gz
New:
----
Mojolicious-Plugin-AssetPack-1.43.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Mojolicious-Plugin-AssetPack.spec ++++++
--- /var/tmp/diff_new_pack.xjGNci/_old 2017-05-24 16:47:20.472123422 +0200
+++ /var/tmp/diff_new_pack.xjGNci/_new 2017-05-24 16:47:20.472123422 +0200
@@ -17,7 +17,7 @@
Name: perl-Mojolicious-Plugin-AssetPack
-Version: 1.42
+Version: 1.43
Release: 0
%define cpan_name Mojolicious-Plugin-AssetPack
Summary: Compress and convert css, less, sass, javascript and
coffeescript files
++++++ Mojolicious-Plugin-AssetPack-1.42.tar.gz ->
Mojolicious-Plugin-AssetPack-1.43.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.42/Changes
new/Mojolicious-Plugin-AssetPack-1.43/Changes
--- old/Mojolicious-Plugin-AssetPack-1.42/Changes 2017-04-29
14:23:37.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.43/Changes 2017-05-12
14:38:02.000000000 +0200
@@ -1,5 +1,9 @@
Revision history for perl distribution Mojolicious-Plugin-AssetPack
+1.43 2017-05-12T14:38:02+0200
+ - Fix not escaping Vuejs template code
+ - Less verbose logging when processing assets
+
1.42 2017-04-29T14:23:37+0200
- Fix missing use lib '.' in register.t #124
- Add fetching of source maps to "Fetch" pipe #117
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.42/META.json
new/Mojolicious-Plugin-AssetPack-1.43/META.json
--- old/Mojolicious-Plugin-AssetPack-1.42/META.json 2017-04-29
14:23:38.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.43/META.json 2017-05-12
14:38:03.000000000 +0200
@@ -48,6 +48,6 @@
"url" :
"https://github.com/jhthorsen/mojolicious-plugin-assetpack.git"
}
},
- "version" : "1.42",
- "x_serialization_backend" : "JSON::PP version 2.27300"
+ "version" : "1.43",
+ "x_serialization_backend" : "JSON::PP version 2.27300_01"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.42/META.yml
new/Mojolicious-Plugin-AssetPack-1.43/META.yml
--- old/Mojolicious-Plugin-AssetPack-1.42/META.yml 2017-04-29
14:23:38.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.43/META.yml 2017-05-12
14:38:03.000000000 +0200
@@ -25,5 +25,5 @@
bugtracker: https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues
homepage: https://github.com/jhthorsen/mojolicious-plugin-assetpack
repository: https://github.com/jhthorsen/mojolicious-plugin-assetpack.git
-version: '1.42'
+version: '1.43'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.42/Makefile.PL
new/Mojolicious-Plugin-AssetPack-1.43/Makefile.PL
--- old/Mojolicious-Plugin-AssetPack-1.42/Makefile.PL 2017-04-29
14:23:37.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.43/Makefile.PL 2017-05-12
14:38:02.000000000 +0200
@@ -6,7 +6,7 @@
LICENSE => 'artistic_2',
ABSTRACT_FROM => 'lib/Mojolicious/Plugin/AssetPack.pm',
VERSION_FROM => 'lib/Mojolicious/Plugin/AssetPack.pm',
- EXE_FILES => [qw()],
+ EXE_FILES => [qw( )],
META_MERGE => {
resources => {
bugtracker =>
'https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.42/README
new/Mojolicious-Plugin-AssetPack-1.43/README
--- old/Mojolicious-Plugin-AssetPack-1.42/README 2017-04-29
14:23:37.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.43/README 2017-05-12
14:38:02.000000000 +0200
@@ -3,7 +3,7 @@
javascript and coffeescript files
VERSION
- 1.42
+ 1.43
SYNOPSIS
Application
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-Plugin-AssetPack-1.42/lib/Mojolicious/Plugin/AssetPack/Pipe/Vuejs.pm
new/Mojolicious-Plugin-AssetPack-1.43/lib/Mojolicious/Plugin/AssetPack/Pipe/Vuejs.pm
---
old/Mojolicious-Plugin-AssetPack-1.42/lib/Mojolicious/Plugin/AssetPack/Pipe/Vuejs.pm
2016-08-10 19:07:47.000000000 +0200
+++
new/Mojolicious-Plugin-AssetPack-1.43/lib/Mojolicious/Plugin/AssetPack/Pipe/Vuejs.pm
2017-05-12 14:37:49.000000000 +0200
@@ -1,6 +1,5 @@
package Mojolicious::Plugin::AssetPack::Pipe::Vuejs;
use Mojo::Base 'Mojolicious::Plugin::AssetPack::Pipe';
-use Mojo::DOM;
sub process {
my ($self, $assets) = @_;
@@ -11,28 +10,27 @@
my ($asset, $index) = @_;
return unless $asset->format eq 'vue';
- my $vue = Mojo::DOM->new($asset->content);
- my $js = sprintf 'Vue.component("%s", {', $asset->name;
- my %elem;
-
- $vue->children->each(sub { $elem{$_->tag} = $_->content; });
-
- if ($elem{script}) {
- $elem{script} =~ s!^(.*)\s?module\.exports\s*=\s*\{!!s;
- $js = "$1$js" if $1;
- $elem{script} =~ s!\s*\}\s*;?\s*$!!s;
- $js .= $elem{script};
+ my $vue = sprintf 'Vue.component("%s", {', $asset->name;
+ my ($script, $template);
+
+ if ($asset->content =~ m!<script[^>]*>(.+)</script>!s) {
+ $script = $1;
+ $vue = "$1$vue" if $script =~ s!^(.*)\s?module\.exports\s*=\s*\{!!s;
+ $script =~ s!\s*\}\s*;?\s*$!!s;
+ $vue .= $script;
}
- if ($elem{template}) {
- $elem{template} =~ s!"!\\"!g; # escape all double quotes
- $elem{template} =~ s!^\s*!!s;
- $elem{template} =~ s!\r?\n!\\n!g;
- $js .= qq',\n' if $elem{script};
- $js .= qq' template: "$elem{template}"';
+
+ if ($asset->content =~ m!<template[^>]*>(.+)</template>!s) {
+ $template = $1;
+ $template =~ s!"!\\"!g; # escape all double quotes
+ $template =~ s!^\s*!!s;
+ $template =~ s!\r?\n!\\n!g;
+ $vue .= qq',\n' if $script;
+ $vue .= qq' template: "$template"';
}
- $js = Mojo::Util::encode('UTF-8', "(function(){$js})})();");
- $asset->content($js)->format('js');
+ $vue = Mojo::Util::encode('UTF-8', "(function(){$vue})})();");
+ $asset->content($vue)->format('js');
}
);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-Plugin-AssetPack-1.42/lib/Mojolicious/Plugin/AssetPack.pm
new/Mojolicious-Plugin-AssetPack-1.43/lib/Mojolicious/Plugin/AssetPack.pm
--- old/Mojolicious-Plugin-AssetPack-1.42/lib/Mojolicious/Plugin/AssetPack.pm
2017-04-29 14:23:37.000000000 +0200
+++ new/Mojolicious-Plugin-AssetPack-1.43/lib/Mojolicious/Plugin/AssetPack.pm
2017-05-12 14:38:02.000000000 +0200
@@ -6,7 +6,7 @@
use Mojolicious::Plugin::AssetPack::Store;
use Mojolicious::Plugin::AssetPack::Util qw(diag has_ro load_module DEBUG);
-our $VERSION = '1.42';
+our $VERSION = '1.43';
my %TAG_TEMPLATE;
$TAG_TEMPLATE{css} = [qw(link rel stylesheet href)];
@@ -168,7 +168,7 @@
}
my @checksum = map { $_->checksum } @$assets;
- $self->_app->log->debug(qq(Processed asset "$topic". [@checksum]));
+ $self->_app->log->debug(qq(Processed asset "$topic". [@checksum])) if DEBUG;
$self->{by_checksum}{$_->checksum} = $_ for @$assets;
$self->{by_topic}{$topic} = $assets;
$self;
@@ -277,7 +277,7 @@
=head1 VERSION
-1.42
+1.43
=head1 SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-Plugin-AssetPack-1.42/t/vuejs.t
new/Mojolicious-Plugin-AssetPack-1.43/t/vuejs.t
--- old/Mojolicious-Plugin-AssetPack-1.42/t/vuejs.t 2016-11-14
19:55:19.000000000 +0100
+++ new/Mojolicious-Plugin-AssetPack-1.43/t/vuejs.t 2017-05-12
14:37:49.000000000 +0200
@@ -14,7 +14,8 @@
->content_like(qr[\Q)})();\E], 'ends with calling function')
->content_like(qr[\Qvar initial = false;\E], 'var initial')
->content_like(qr[\QVue.component("example"\E.*data:.*methods:.*template:.*\);]s,
'vue')
- ->content_like(qr[\Q\"loading\"\E], 'quotes espcaped in template');
+ ->content_like(qr[\Q\"loading\"\E], 'quotes espcaped in template')
+ ->content_unlike(qr["loading"]);
done_testing;