Bug 1388013 - Vendor jsmin via |mach vendor python|; r=ahal
authorDave Hunt <dhunt@mozilla.com>
Wed, 30 May 2018 13:07:32 +0100
changeset 474871 eccc5f4ea53eef6622349846b92fac0d396372da
parent 474870 b2cbe24032838b09781adeee59427c561c60b367
child 474872 317c77708b22d7086f9171ac8893d371c43b79f9
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1388013
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1388013 - Vendor jsmin via |mach vendor python|; r=ahal MozReview-Commit-ID: 197reaD9GdL
Pipfile
Pipfile.lock
third_party/python/jsmin/CHANGELOG.txt
third_party/python/jsmin/LICENSE.txt
third_party/python/jsmin/MANIFEST.in
third_party/python/jsmin/PKG-INFO
third_party/python/jsmin/README.rst
third_party/python/jsmin/jsmin/__init__.py
third_party/python/jsmin/jsmin/__main__.py
third_party/python/jsmin/setup.py
--- a/Pipfile
+++ b/Pipfile
@@ -6,11 +6,12 @@ name = "pypi"
 [dev-packages]
 
 [packages]
 pipenv = "==2018.5.18"
 virtualenv = "==15.2.0"
 six = "==1.10.0"
 attrs = "==18.1.0"
 pytest = "==3.2.5"
+jsmin = "==2.1.0"
 
 [requires]
 python_version = "2.7"
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,12 +1,12 @@
 {
     "_meta": {
         "hash": {
-            "sha256": "cfd63f783e0107d8c5ebc5f17ee5c6644825657a4504e5529ceaabb293837659"
+            "sha256": "706dd858cb4e07dbccf7f3e6f129ac5b50c9906bcd6083e4fb09e9869b379d5e"
         },
         "pipfile-spec": 6,
         "requires": {
             "python_version": "2.7"
         },
         "sources": [
             {
                 "name": "pypi",
@@ -26,16 +26,23 @@
         },
         "certifi": {
             "hashes": [
                 "sha256:13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7",
                 "sha256:9fa520c1bacfb634fa7af20a76bcbd3d5fb390481724c597da32c719a7dca4b0"
             ],
             "version": "==2018.4.16"
         },
+        "jsmin": {
+            "hashes": [
+                "sha256:5d07bf0251a4128e5e8e8eef603849b6b5741c337bff087731a248f9cc774f56"
+            ],
+            "index": "pypi",
+            "version": "==2.1.0"
+        },
         "pipenv": {
             "hashes": [
                 "sha256:04b9a8b02a3ff12a5502b335850cfdb192adcfd1d6bbdb7a7c47cae9ab9ddece",
                 "sha256:e96d5bfa6822a17b2200d455aa5f9002c14361c50df1b1e51921479d7c09e741"
             ],
             "index": "pypi",
             "version": "==2018.5.18"
         },
new file mode 100644
--- /dev/null
+++ b/third_party/python/jsmin/CHANGELOG.txt
@@ -0,0 +1,11 @@
+Changelog
+=========
+
+v2.1.0 (2014-12-24) Tikitu de Jager
+-----------------------------------
+
+    * First changelog entries; see README.rst for prior contributors.
+
+    * Expose quote_chars parameter to provide just enough unofficial Harmony
+    support to be useful.
+
new file mode 100644
--- /dev/null
+++ b/third_party/python/jsmin/LICENSE.txt
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Dave St.Germain
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
new file mode 100644
--- /dev/null
+++ b/third_party/python/jsmin/MANIFEST.in
@@ -0,0 +1,1 @@
+include *.txt
new file mode 100644
--- /dev/null
+++ b/third_party/python/jsmin/PKG-INFO
@@ -0,0 +1,117 @@
+Metadata-Version: 1.1
+Name: jsmin
+Version: 2.1.0
+Summary: JavaScript minifier.
+PLEASE UPDATE TO VERSION >= 2.0.6. Older versions have a serious bug related to comments.
+Home-page: https://bitbucket.org/dcs/jsmin/
+Author: Tikitu de Jager
+Author-email: tikitu+jsmin@logophile.org
+License: MIT License
+Description: =====
+        jsmin
+        =====
+        
+        JavaScript minifier.
+        
+        Usage
+        =====
+        
+        .. code:: python
+        
+         from jsmin import jsmin
+         with open('myfile.js') as js_file:
+             minified = jsmin(js_file.read())
+        
+        You can run it as a commandline tool also::
+        
+          python -m jsmin myfile.js
+        
+        As yet, ``jsmin`` makes no attempt to be compatible with
+        `ECMAScript 6 / ES.next / Harmony <http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts>`_.
+        If you're using it on Harmony code, though, you might find the ``quote_chars``
+        parameter useful:
+        
+        .. code:: python
+        
+         from jsmin import jsmin
+         with open('myfile.js') as js_file:
+             minified = jsmin(js_file.read(), quote_chars="'\"`")
+        
+        
+        Where to get it
+        ===============
+        
+        * install the package `from pypi <https://pypi.python.org/pypi/jsmin/>`_
+        * get the latest release `from the stable branch on bitbucket <https://bitbucket.org/dcs/jsmin/branch/stable>`_
+        * get the development version `from the default branch on bitbucket <https://bitbucket.org/dcs/jsmin/branch/default>`_
+        
+        Contributing
+        ============
+        
+        `Issues <https://bitbucket.org/dcs/jsmin/issues>`_ and `Pull requests <https://bitbucket.org/dcs/jsmin/pull-requests>`_
+        will be gratefully received on Bitbucket. Pull requests on github are great too, but the issue tracker lives on
+        bitbucket.
+        
+        If possible, please make separate pull requests for tests and for code: tests will be committed on the stable branch
+        (which tracks the latest released version) while code will go to default by, erm, default.
+        
+        Unless you request otherwise, your Bitbucket identity will be added to the contributor's list below; if you prefer a
+        different name feel free to add it in your pull request instead. (If you prefer not to be mentioned you'll have to let
+        the maintainer know somehow.)
+        
+        Build/test status
+        =================
+        
+        Both default and stable branches are tested with Travis: https://travis-ci.org/tikitu/jsmin
+        
+        Stable (latest released version plus any new tests) is tested against CPython 2.6, 2.7, 3.2, and 3.3.
+        Currently:
+        
+        .. image:: https://travis-ci.org/tikitu/jsmin.png?branch=ghstable
+        
+        If stable is failing that means there's a new test that fails on *the latest released version on pypi*, with no fix yet
+        released.
+        
+        Default (development version, might be ahead of latest released version) is tested against CPython 2.6, 2.7, 3.2, and
+        3.3. Currently:
+        
+        .. image:: https://travis-ci.org/tikitu/jsmin.png?branch=master
+        
+        If default is failing don't use it, but as long as stable is passing the pypi release should be ok.
+        
+        Contributors (chronological commit order)
+        =========================================
+        
+        * `Dave St.Germain <https://bitbucket.org/dcs>`_ (original author)
+        * `Hans weltar <https://bitbucket.org/hansweltar>`_
+        * `Tikitu de Jager <mailto:tikitu+jsmin@logophile.org>`_ (current maintainer)
+        * https://bitbucket.org/rennat
+        * `Nick Alexander <https://bitbucket.org/ncalexan>`_
+        
+        Changelog
+        =========
+        
+        v2.1.0 (2014-12-24) Tikitu de Jager
+        -----------------------------------
+        
+            * First changelog entries; see README.rst for prior contributors.
+        
+            * Expose quote_chars parameter to provide just enough unofficial Harmony
+            support to be useful.
+        
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
+Classifier: Topic :: Software Development :: Pre-processors
+Classifier: Topic :: Text Processing :: Filters
new file mode 100644
--- /dev/null
+++ b/third_party/python/jsmin/README.rst
@@ -0,0 +1,80 @@
+=====
+jsmin
+=====
+
+JavaScript minifier.
+
+Usage
+=====
+
+.. code:: python
+
+ from jsmin import jsmin
+ with open('myfile.js') as js_file:
+     minified = jsmin(js_file.read())
+
+You can run it as a commandline tool also::
+
+  python -m jsmin myfile.js
+
+As yet, ``jsmin`` makes no attempt to be compatible with
+`ECMAScript 6 / ES.next / Harmony <http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts>`_.
+If you're using it on Harmony code, though, you might find the ``quote_chars``
+parameter useful:
+
+.. code:: python
+
+ from jsmin import jsmin
+ with open('myfile.js') as js_file:
+     minified = jsmin(js_file.read(), quote_chars="'\"`")
+
+
+Where to get it
+===============
+
+* install the package `from pypi <https://pypi.python.org/pypi/jsmin/>`_
+* get the latest release `from the stable branch on bitbucket <https://bitbucket.org/dcs/jsmin/branch/stable>`_
+* get the development version `from the default branch on bitbucket <https://bitbucket.org/dcs/jsmin/branch/default>`_
+
+Contributing
+============
+
+`Issues <https://bitbucket.org/dcs/jsmin/issues>`_ and `Pull requests <https://bitbucket.org/dcs/jsmin/pull-requests>`_
+will be gratefully received on Bitbucket. Pull requests on github are great too, but the issue tracker lives on
+bitbucket.
+
+If possible, please make separate pull requests for tests and for code: tests will be committed on the stable branch
+(which tracks the latest released version) while code will go to default by, erm, default.
+
+Unless you request otherwise, your Bitbucket identity will be added to the contributor's list below; if you prefer a
+different name feel free to add it in your pull request instead. (If you prefer not to be mentioned you'll have to let
+the maintainer know somehow.)
+
+Build/test status
+=================
+
+Both default and stable branches are tested with Travis: https://travis-ci.org/tikitu/jsmin
+
+Stable (latest released version plus any new tests) is tested against CPython 2.6, 2.7, 3.2, and 3.3.
+Currently:
+
+.. image:: https://travis-ci.org/tikitu/jsmin.png?branch=ghstable
+
+If stable is failing that means there's a new test that fails on *the latest released version on pypi*, with no fix yet
+released.
+
+Default (development version, might be ahead of latest released version) is tested against CPython 2.6, 2.7, 3.2, and
+3.3. Currently:
+
+.. image:: https://travis-ci.org/tikitu/jsmin.png?branch=master
+
+If default is failing don't use it, but as long as stable is passing the pypi release should be ok.
+
+Contributors (chronological commit order)
+=========================================
+
+* `Dave St.Germain <https://bitbucket.org/dcs>`_ (original author)
+* `Hans weltar <https://bitbucket.org/hansweltar>`_
+* `Tikitu de Jager <mailto:tikitu+jsmin@logophile.org>`_ (current maintainer)
+* https://bitbucket.org/rennat
+* `Nick Alexander <https://bitbucket.org/ncalexan>`_
--- a/third_party/python/jsmin/jsmin/__init__.py
+++ b/third_party/python/jsmin/jsmin/__init__.py
@@ -32,17 +32,17 @@ else:
     import StringIO
     try:
         import cStringIO
     except ImportError:
         cStringIO = None
 
 
 __all__ = ['jsmin', 'JavascriptMinify']
-__version__ = '2.0.11'
+__version__ = '2.1.0'
 
 
 def jsmin(js, **kwargs):
     """
     returns a minified version of the javascript string
     """
     if not is_3:        
         if cStringIO and not isinstance(js, unicode):
new file mode 100644
--- /dev/null
+++ b/third_party/python/jsmin/jsmin/__main__.py
@@ -0,0 +1,10 @@
+import sys, os, glob
+from jsmin import JavascriptMinify
+
+for f in sys.argv[1:]:
+    with open(f, 'r') as js:
+        minifier = JavascriptMinify(js, sys.stdout)
+        minifier.minify()
+    sys.stdout.write('\n')
+    
+    
--- a/third_party/python/jsmin/setup.py
+++ b/third_party/python/jsmin/setup.py
@@ -4,22 +4,27 @@ import os, sys, re
 
 os.environ['COPYFILE_DISABLE'] = 'true'  # this disables including resource forks in tar files on os x
 
 
 extra = {}
 if sys.version_info >= (3,0):
     extra['use_2to3'] = True
 
+
+def long_description():
+    return open('README.rst').read() + '\n' + open('CHANGELOG.txt').read()
+
+
 setup(
     name="jsmin",
     version=re.search(r'__version__ = ["\']([^"\']+)', open('jsmin/__init__.py').read()).group(1),
     packages=['jsmin'],
     description='JavaScript minifier.\nPLEASE UPDATE TO VERSION >= 2.0.6. Older versions have a serious bug related to comments.',
-    long_description=open('README.rst').read(),
+    long_description=long_description(),
     author='Dave St.Germain',
     author_email='dave@st.germa.in',
     maintainer='Tikitu de Jager',
     maintainer_email='tikitu+jsmin@logophile.org',
     test_suite='jsmin.test.JsTests',
     license='MIT License',
     url='https://bitbucket.org/dcs/jsmin/',
     classifiers=[