aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Expand)Author
2014-04-13add sourceMappingUrl to output in node module...If options.outSourceMap is specified the sourceMappingURL comment should be appended to the output stream OiNutter
2014-04-13Fix sourceMapIncludeSources exception in Node API...https://github.com/mishoo/UglifyJS2/issues/459ebednarz
2014-01-09added hasOwnProperty check to avoid warningsArtemy Tregubenko
2014-01-09Added support for sourcesContent property of source mapArtemy Tregubenko
2014-01-07Support SpiderMonkey AST in UglifyJS.minify. Fix #393.Mihai Bazon
2013-06-28Reset the base54 counters every time minify is called....Close #229 Mihai Bazon
2013-02-10Allow inSourceMap to be a generated JSON source map instead of just a file nameDevon Govett
2013-01-04Support `output`, `mangle` and `compress` options to `UglifyJS.minify`....Close #57 Close #86 Close #33 Mihai Bazon
2012-11-05discard the hack that worked around the deprecation warning...(since the source-map module no longer uses require.js) refs #9 Mihai Bazon
2012-10-25test for fs.existsSyncMihai Bazon
2012-10-20Merge branch 'master' of github.com:mishoo/UglifyJS2Mihai Bazon
2012-10-20alternate hack to disable deprecation warning...ref #9, close #20 Mihai Bazon
2012-10-19Add sourceRoot option to minifySergej Tatarincev
2012-10-18add fromString argument to `UglifyJS.minify` (allows to pass the source...code, instead of file names, as first argument). close #17 Mihai Bazon
2012-10-11disable warnings by default in `minify` (pass warnings: true to enable)...close #11 Mihai Bazon
2012-10-09add `--ast-help`...displays a rather cruel description of the AST classes, derived directly from the node definitions. Mihai Bazon
2012-10-09Fix nodejs minify without inSourceMap exception...When inSourceMap is omitted fs.readFile throws exception. Fixed version calls fs.readFile only when inSourceMap argument is present Sergej Tatarincev
2012-10-08fix `inSourceMap` in `minify` (should read the file)Mihai Bazon
2012-10-08add simple API wrapper: UglifyJS.minify...(refs #7) Mihai Bazon
2012-10-08added --self to easily get a browser-runnable version of UglifyJSMihai Bazon
2012-10-03define AST_Node.from_mozilla_ast(ast)...returns an UglifyJS2 AST given a Mozilla AST. Still needs some work to do (need to create specific nodes like AST_SymbolRef, AST_SymbolLambda etc. instead of base AST_Symbol, in order for the mangler/compressor to work properly) Mihai Bazon
2012-10-02discard annoying nodejs warningMihai Bazon
2012-09-22tree transformer api (WIP)Mihai Bazon
2012-09-07always keep declarations found in unreachable code...a few more tests and some cleanups. Mihai Bazon
2012-08-29started support for generating source maps (WIP)...plugged in @fitzgen's source-map library Mihai Bazon
2012-08-22wrote more of the compressor and added some testsMihai Bazon
2012-08-21cleaned up some mess and started the actual compressorMihai Bazon
2012-08-21some reorganization...(moved pretty much everything that relates to scope in scope.js, added a module for NodeJS that can be used with require() and exports everything.) Mihai Bazon
y-no-space match-ghc-foo)) ;; There may be no final newline terminating a property. (define test-cabal-no-final-newline "name: foo version: 1.0.0 homepage: http://test.org synopsis: synopsis description: description license: BSD3 executable cabal build-depends: HTTP >= 4000.2.5 && < 4000.3, mtl >= 2.0 && < 3") (test-expect-fail 1) (test-assert "hackage->guix-package test without final newline" (eval-test-with-cabal test-cabal-no-final-newline match-ghc-foo)) ;; Make sure internal libraries will not be part of the dependencies, ;; ignore case. (define test-cabal-internal-library-ignored "name: foo version: 1.0.0 homepage: http://test.org synopsis: synopsis description: description license: BSD3 executable cabal build-depends: HTTP >= 4000.2.5 && < 4000.3, internAl library internaL build-depends: mtl >= 2.0 && < 3 ") (test-assert "hackage->guix-package test internal libraries are ignored" (eval-test-with-cabal test-cabal-internal-library-ignored match-ghc-foo)) ;; Check if-elif-else statements (define test-cabal-if "name: foo version: 1.0.0 homepage: http://test.org synopsis: synopsis description: description license: BSD3 library if os(first) Build-depends: ghc-c ") (define test-cabal-else "name: foo version: 1.0.0 homepage: http://test.org synopsis: synopsis description: description license: BSD3 library if os(first) Build-depends: ghc-a else Build-depends: ghc-c ") (define test-cabal-elif "name: foo version: 1.0.0 homepage: http://test.org synopsis: synopsis description: description license: BSD3 library if os(first) Build-depends: ghc-a elif os(second) Build-depends: ghc-b elif os(guix) Build-depends: ghc-c elif os(third) Build-depends: ghc-d else Build-depends: ghc-e ") ;; Try the same with different bracket styles (define test-cabal-elif-brackets "name: foo version: 1.0.0 homepage: http://test.org synopsis: synopsis description: description license: BSD3 library if os(first) { Build-depends: ghc-a } elif os(second) Build-depends: ghc-b elif os(guix) { Build-depends: ghc-c } elif os(third) { Build-depends: ghc-d } elif os(fourth) { Build-depends: ghc-d } else Build-depends: ghc-e ") (define-package-matcher match-ghc-elif ('package ('name "ghc-foo") ('version "1.0.0") ('source ('origin ('method 'url-fetch) ('uri ('hackage-uri "foo" 'version)) ('sha256 ('base32 (? string? hash))))) ('build-system 'haskell-build-system) ('properties '(quote ((upstream-name . "foo")))) ('inputs ('list 'ghc-c)) ('home-page "http://test.org") ('synopsis (? string?)) ('description (? string?)) ('license 'license:bsd-3))) (test-assert "hackage->guix-package test lonely if statement" (eval-test-with-cabal test-cabal-else match-ghc-elif #:cabal-environment '(("os" . "guix")))) (test-assert "hackage->guix-package test else statement" (eval-test-with-cabal test-cabal-else match-ghc-elif #:cabal-environment '(("os" . "guix")))) (test-assert "hackage->guix-package test elif statement" (eval-test-with-cabal test-cabal-elif match-ghc-elif #:cabal-environment '(("os" . "guix")))) (test-assert "hackage->guix-package test elif statement with brackets" (eval-test-with-cabal test-cabal-elif-brackets match-ghc-elif #:cabal-environment '(("os" . "guix")))) ;; Check Hackage Cabal revisions. (define test-cabal-revision "name: foo version: 1.0.0 x-revision: 2 homepage: http://test.org synopsis: synopsis description: description license: BSD3 executable cabal build-depends: HTTP >= 4000.2.5 && < 4000.3, mtl >= 2.0 && < 3 ") (define-package-matcher match-ghc-foo-revision ('package ('name "ghc-foo") ('version "1.0.0") ('source ('origin ('method 'url-fetch) ('uri ('hackage-uri "foo" 'version)) ('sha256 ('base32 (? string? hash))))) ('build-system 'haskell-build-system) ('properties '(quote ((upstream-name . "foo")))) ('inputs ('list 'ghc-http)) ('arguments ('quasiquote ('#:cabal-revision ("2" "0xxd88fb659f0krljidbvvmkh9ppjnx83j0nqzx8whcg4n5qbyng")))) ('home-page "http://test.org") ('synopsis (? string?)) ('description (? string?)) ('license 'license:bsd-3))) (test-assert "hackage->guix-package test cabal revision" (eval-test-with-cabal test-cabal-revision match-ghc-foo-revision)) (test-assert "read-cabal test 1" (match (call-with-input-string test-read-cabal-1 read-cabal) ((("name" ("test-me")) ('section 'library #f (('if ('flag "base4point8") (("build-depends" ("base >= 4.8 && < 5"))) (('if ('flag "base4") (("build-depends" ("base >= 4 && < 4.8"))) (('if ('flag "base3") (("build-depends" ("base >= 3 && < 4"))) (("build-depends" ("base < 3")))))))) ('if ('or ('flag "base4point8") ('and ('flag "base4") ('flag "base3"))) (("build-depends" ("random"))) ()) ("build-depends" ("containers")) ("exposed-modules" ("Test.QuickCheck.Exception"))))) #t) (x (pk 'fail x #f)))) (test-assert "read-cabal test: if brackets on the same line" (match (call-with-input-string test-read-cabal-2 read-cabal) ((("name" ("test-me")) ('section 'common "defaults" (('if ('os "foobar") (("cc-options" ("-DBARBAZ "))) ())))) #t) (x (pk 'fail x #f)))) (test-expect-fail 1) (test-assert "read-cabal test: property brackets on new line" (match (call-with-input-string test-read-cabal-brackets-newline read-cabal) ((("name" ("test-me")) ('section 'common "defaults" (("build-depends" ("foobar , barbaz"))))) #t) (x (pk 'fail x #f)))) (test-assert "read-cabal test: library name" (match (call-with-input-string test-read-cabal-library-name read-cabal) ((("name" ("test-me")) ('section 'library "foobar" (("build-depends" ("foo, bar")))) ('section 'library #f (("build-depends" ("bar, baz"))))) #t) (x (pk 'fail x #f)))) (define test-cabal-import "name: foo version: 1.0.0 homepage: http://test.org synopsis: synopsis description: description license: BSD3 common commons build-depends: HTTP >= 4000.2.5 && < 4000.3, mtl >= 2.0 && < 3 executable cabal import: commons ") (define-package-matcher match-ghc-foo-import ('package ('name "ghc-foo") ('version "1.0.0") ('source ('origin ('method 'url-fetch) ('uri ('hackage-uri "foo" 'version)) ('sha256 ('base32 (? string? hash))))) ('build-system 'haskell-build-system) ('properties '(quote ((upstream-name . "foo")))) ('inputs ('list 'ghc-http)) ('home-page "http://test.org") ('synopsis (? string?)) ('description (? string?)) ('license 'license:bsd-3))) (test-assert "hackage->guix-package test cabal import" (eval-test-with-cabal test-cabal-import match-ghc-foo-import)) (define test-cabal-multiple-imports "name: foo version: 1.0.0 homepage: http://test.org synopsis: synopsis description: description license: BSD3 common commons build-depends: HTTP >= 4000.2.5 && < 4000.3, mtl >= 2.0 && < 3 common others build-depends: base == 4.16.*, stm-chans == 3.0.* executable cabal import: commons , others ") (define-package-matcher match-ghc-foo-multiple-imports ('package ('name "ghc-foo") ('version "1.0.0") ('source ('origin ('method 'url-fetch) ('uri ('hackage-uri "foo" 'version)) ('sha256 ('base32 (? string? hash))))) ('build-system 'haskell-build-system) ('properties '(quote ((upstream-name . "foo")))) ('inputs ('list 'ghc-http 'ghc-stm-chans)) ('home-page "http://test.org") ('synopsis (? string?)) ('description (? string?)) ('license 'license:bsd-3))) (test-assert "hackage->guix-package test cabal multiple imports" (eval-test-with-cabal test-cabal-multiple-imports match-ghc-foo-multiple-imports)) (test-end "hackage")