r37074 - in /trunk/libjavascript-beautifier-perl: Build.PL Changes MANIFEST META.yml Makefile.PL bin/js_beatify.pl bin/js_beautify.pl debian/changelog lib/JavaScript/Beautifier.pm t/01-javascript-beauty.t

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Mon Jun 1 02:52:38 UTC 2009


Author: ryan52-guest
Date: Mon Jun  1 02:52:29 2009
New Revision: 37074

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=37074
Log:
New upstream release

Added:
    trunk/libjavascript-beautifier-perl/bin/js_beautify.pl
      - copied unchanged from r37073, branches/upstream/libjavascript-beautifier-perl/current/bin/js_beautify.pl
Removed:
    trunk/libjavascript-beautifier-perl/bin/js_beatify.pl
Modified:
    trunk/libjavascript-beautifier-perl/Build.PL
    trunk/libjavascript-beautifier-perl/Changes
    trunk/libjavascript-beautifier-perl/MANIFEST
    trunk/libjavascript-beautifier-perl/META.yml
    trunk/libjavascript-beautifier-perl/Makefile.PL
    trunk/libjavascript-beautifier-perl/debian/changelog
    trunk/libjavascript-beautifier-perl/lib/JavaScript/Beautifier.pm
    trunk/libjavascript-beautifier-perl/t/01-javascript-beauty.t

Modified: trunk/libjavascript-beautifier-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-beautifier-perl/Build.PL?rev=37074&op=diff
==============================================================================
--- trunk/libjavascript-beautifier-perl/Build.PL (original)
+++ trunk/libjavascript-beautifier-perl/Build.PL Mon Jun  1 02:52:29 2009
@@ -1,22 +1,22 @@
-use strict;
-use warnings;
-use Module::Build;
-
-my $builder = Module::Build->new(
-    module_name         => 'JavaScript::Beautifier',
-    license             => 'perl',
-    dist_author         => 'Fayland Lam <fayland at gmail.com>',
-    dist_version_from   => 'lib/JavaScript/Beautifier.pm',
-    build_requires => {
-        'Test::More' => 0,
-        'Getopt::Long' => 0,
-        'Pod::Usage' => 0,
-    },
-    add_to_cleanup      => [ 'JavaScript-Beautifier-*' ],
-    create_makefile_pl => 'traditional',
-    script_files => [
-        'bin/js_beatify.pl',
-    ],
-);
-
-$builder->create_build_script();
+use strict;
+use warnings;
+use Module::Build;
+
+my $builder = Module::Build->new(
+    module_name         => 'JavaScript::Beautifier',
+    license             => 'perl',
+    dist_author         => 'Fayland Lam <fayland at gmail.com>',
+    dist_version_from   => 'lib/JavaScript/Beautifier.pm',
+    build_requires => {
+        'Test::More' => 0,
+        'Getopt::Long' => 0,
+        'Pod::Usage' => 0,
+    },
+    add_to_cleanup      => [ 'JavaScript-Beautifier-*' ],
+    create_makefile_pl => 'traditional',
+    script_files => [
+        'bin/js_beautify.pl',
+    ],
+);
+
+$builder->create_build_script();

Modified: trunk/libjavascript-beautifier-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-beautifier-perl/Changes?rev=37074&op=diff
==============================================================================
--- trunk/libjavascript-beautifier-perl/Changes (original)
+++ trunk/libjavascript-beautifier-perl/Changes Mon Jun  1 02:52:29 2009
@@ -1,4 +1,7 @@
 Revision history for JavaScript-Beautifier
+
+0.09    2009.06.01
+        Strip trailing newlines, minor support for <!--
 
 0.08    2009.05.13
         bin/js_beatify.pl

Modified: trunk/libjavascript-beautifier-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-beautifier-perl/MANIFEST?rev=37074&op=diff
==============================================================================
--- trunk/libjavascript-beautifier-perl/MANIFEST (original)
+++ trunk/libjavascript-beautifier-perl/MANIFEST Mon Jun  1 02:52:29 2009
@@ -1,11 +1,11 @@
-bin/js_beatify.pl
+bin/js_beautify.pl
 Build.PL
 Changes
 lib/JavaScript/Beautifier.pm
 Makefile.PL
 MANIFEST			This list of files
+META.yml
 README
 t/00-load.t
 t/01-javascript-beauty.t
 t/pod.t
-META.yml

Modified: trunk/libjavascript-beautifier-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-beautifier-perl/META.yml?rev=37074&op=diff
==============================================================================
--- trunk/libjavascript-beautifier-perl/META.yml (original)
+++ trunk/libjavascript-beautifier-perl/META.yml Mon Jun  1 02:52:29 2009
@@ -1,6 +1,6 @@
 ---
 name: JavaScript-Beautifier
-version: 0.08
+version: 0.09
 author:
   - 'Fayland Lam <fayland at gmail.com>'
 abstract: Beautify Javascript (beautifier for javascript)
@@ -14,8 +14,8 @@
 provides:
   JavaScript::Beautifier:
     file: lib/JavaScript/Beautifier.pm
-    version: 0.08
-generated_by: Module::Build version 0.31012
+    version: 0.09
+generated_by: Module::Build version 0.33
 meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.2.html
-  version: 1.2
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4

Modified: trunk/libjavascript-beautifier-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-beautifier-perl/Makefile.PL?rev=37074&op=diff
==============================================================================
--- trunk/libjavascript-beautifier-perl/Makefile.PL (original)
+++ trunk/libjavascript-beautifier-perl/Makefile.PL Mon Jun  1 02:52:29 2009
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.31012
+# Note: this file was auto-generated by Module::Build::Compat version 0.33
 use ExtUtils::MakeMaker;
 WriteMakefile
 (
@@ -11,7 +11,8 @@
                          },
           'INSTALLDIRS' => 'site',
           'EXE_FILES' => [
-                           'bin/js_beatify.pl'
-                         ]
+                           'bin/js_beautify.pl'
+                         ],
+          'PL_FILES' => {}
         )
 ;

Modified: trunk/libjavascript-beautifier-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-beautifier-perl/debian/changelog?rev=37074&op=diff
==============================================================================
--- trunk/libjavascript-beautifier-perl/debian/changelog (original)
+++ trunk/libjavascript-beautifier-perl/debian/changelog Mon Jun  1 02:52:29 2009
@@ -1,3 +1,9 @@
+libjavascript-beautifier-perl (0.09-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Ryan Niebur <ryanryan52 at gmail.com>  Sun, 31 May 2009 19:52:21 -0700
+
 libjavascript-beautifier-perl (0.08-1) unstable; urgency=low
 
   * Initial Release. (Closes: #531140)

Modified: trunk/libjavascript-beautifier-perl/lib/JavaScript/Beautifier.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-beautifier-perl/lib/JavaScript/Beautifier.pm?rev=37074&op=diff
==============================================================================
--- trunk/libjavascript-beautifier-perl/lib/JavaScript/Beautifier.pm (original)
+++ trunk/libjavascript-beautifier-perl/lib/JavaScript/Beautifier.pm Mon Jun  1 02:52:29 2009
@@ -3,7 +3,7 @@
 use warnings;
 use strict;
 
-our $VERSION = '0.08';
+our $VERSION = '0.09';
 our $AUTHORITY = 'cpan:FAYLAND';
 
 use base 'Exporter';
@@ -16,6 +16,7 @@
 my @whitespace = split('', "\n\r\t ");
 my @wordchar   = split('', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$');
 my @digits     = split('', '0123456789');
+# <!-- is a special case (ok, it's a minor hack actually)
 my @punct      = split(' ', '+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! !! , : ? ^ ^= |= ::');
 # words which should always start on new line.
 my @line_starter = split(',', 'continue,try,throw,return,var,if,switch,case,default,for,while,break,function');
@@ -313,7 +314,9 @@
         $last_text = $token_text;
     }
     
-    return join('', @output);
+    my $output = join('', @output);
+    $output =~ s/\n+$//;
+    return $output;
 }
 
 sub trim_output {
@@ -524,6 +527,11 @@
         }
     }
     
+    if ($c eq '<' && join('', @input[0..3]) eq '<!--') {
+        $parser_pos += 3;
+        return ['<!--', 'TK_COMMENT'];
+    }
+    
     if ( grep { $c eq $_ } @punct ) {
          while ( $parser_pos < scalar @input && (grep { $c . $input[$parser_pos] eq $_ } @punct) ) {
              $c .= $input[$parser_pos];

Modified: trunk/libjavascript-beautifier-perl/t/01-javascript-beauty.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-beautifier-perl/t/01-javascript-beauty.t?rev=37074&op=diff
==============================================================================
--- trunk/libjavascript-beautifier-perl/t/01-javascript-beauty.t (original)
+++ trunk/libjavascript-beautifier-perl/t/01-javascript-beauty.t Mon Jun  1 02:52:29 2009
@@ -56,9 +56,9 @@
     [ 'a = 1e-10', "a = 1e-10" ],
     [ 'a = e - 10', "a = e - 10" ],
     [ 'a = 11-10', "a = 11 - 10" ],
-    [ "a = 1;// comment\n", "a = 1; // comment\n" ],
-    [ "a = 1; // comment\n", "a = 1; // comment\n" ],
-    [ "a = 1;\n // comment\n", "a = 1;\n// comment\n" ],
+    [ "a = 1;// comment\n", "a = 1; // comment" ],
+    [ "a = 1; // comment\n", "a = 1; // comment" ],
+    [ "a = 1;\n // comment\n", "a = 1;\n// comment" ],
  
     [ "if\n(a)\nb()", "if (a) b()" ], # test for proper newline removal
  
@@ -81,6 +81,8 @@
     [ "{a:#1#}", "{\n    a: #1#\n}" ],
     [ "{a:#1", "{\n    a: #1" ], # incomplete
     [ "{a:#", "{\n    a: #" ], # incomplete
+
+    ["<!--\nvoid();\n// -->", "<!--\nvoid();\n// -->"],
 
     [ "a=/regexp", "a = /regexp" ], # incomplete regexp
     [ "{a:#1=[],b:#1#,c:#999999#}", "{\n    a: #1=[],\n    b: #1#,\n    c: #999999#\n}" ],




More information about the Pkg-perl-cvs-commits mailing list