From 316102ab14e872a75f46ac1ddbb97a6a986f13c6 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Sun, 4 Jan 2015 23:53:28 +0800 Subject: [PATCH 1/3] Make build target the default target The top target is implicitly the default target, having this as *clean* is rather unothodox, usually it would be the executable or library target. --- Makefile | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 797d3f41a6..ee5cbe0098 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,22 @@ export NODE_ENV = test .PHONY: clean test test-cov test-clean lint test-travis test-spec test-browser publish bench build +build: + mkdir -p dist + + node bin/cache-templates + + node $(BROWSERIFY_CMD) -e lib/6to5/polyfill.js >dist/polyfill.js + node $(UGLIFY_CMD) dist/polyfill.js >dist/polyfill.min.js + + node $(BROWSERIFY_CMD) lib/6to5/browser.js -s to5 >dist/6to5.js + node $(UGLIFY_CMD) dist/6to5.js >dist/6to5.min.js + + node bin/6to5-runtime >dist/runtime.js + node $(UGLIFY_CMD) dist/runtime.js >dist/runtime.min.js + + rm -rf templates.json + clean: rm -rf coverage templates.json test/tmp dist @@ -45,22 +61,6 @@ test-browser: test -n "`which open`" && open test/browser.html -build: - mkdir -p dist - - node bin/cache-templates - - node $(BROWSERIFY_CMD) -e lib/6to5/polyfill.js >dist/polyfill.js - node $(UGLIFY_CMD) dist/polyfill.js >dist/polyfill.min.js - - node $(BROWSERIFY_CMD) lib/6to5/browser.js -s to5 >dist/6to5.js - node $(UGLIFY_CMD) dist/6to5.js >dist/6to5.min.js - - node bin/6to5-runtime >dist/runtime.js - node $(UGLIFY_CMD) dist/runtime.js >dist/runtime.min.js - - rm -rf templates.json - publish: git pull --rebase From 3b4c9c415ef94d09236dc2654694ea1924357b5c Mon Sep 17 00:00:00 2001 From: James Kyle Date: Sun, 4 Jan 2015 13:42:29 -0800 Subject: [PATCH 2/3] Make parent constructor check explicit when extending from null - fixes #386 --- .../transformation/templates/class-super-constructor-call.js | 2 +- .../es6-classes/super-class-id-member-expression/expected.js | 4 ++-- .../transformation/es6-classes/super-class/expected.js | 2 +- .../transformation/optional-proto-to-assign/class/expected.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/6to5/transformation/templates/class-super-constructor-call.js b/lib/6to5/transformation/templates/class-super-constructor-call.js index c50d3a50cc..c9b822f013 100644 --- a/lib/6to5/transformation/templates/class-super-constructor-call.js +++ b/lib/6to5/transformation/templates/class-super-constructor-call.js @@ -1,3 +1,3 @@ -if (SUPER_NAME) { +if (SUPER_NAME !== null) { SUPER_NAME.apply(this, arguments); } diff --git a/test/fixtures/transformation/es6-classes/super-class-id-member-expression/expected.js b/test/fixtures/transformation/es6-classes/super-class-id-member-expression/expected.js index 3e58ae4cf4..a3dc10057d 100644 --- a/test/fixtures/transformation/es6-classes/super-class-id-member-expression/expected.js +++ b/test/fixtures/transformation/es6-classes/super-class-id-member-expression/expected.js @@ -15,7 +15,7 @@ var _inherits = function (child, parent) { var BaseController = (function () { var _Chaplin$Controller = Chaplin.Controller; var BaseController = function BaseController() { - if (_Chaplin$Controller) { + if (_Chaplin$Controller !== null) { _Chaplin$Controller.apply(this, arguments); } }; @@ -28,7 +28,7 @@ var BaseController = (function () { var BaseController2 = (function () { var _Chaplin$Controller$Another = Chaplin.Controller.Another; var BaseController2 = function BaseController2() { - if (_Chaplin$Controller$Another) { + if (_Chaplin$Controller$Another !== null) { _Chaplin$Controller$Another.apply(this, arguments); } }; diff --git a/test/fixtures/transformation/es6-classes/super-class/expected.js b/test/fixtures/transformation/es6-classes/super-class/expected.js index d57ed0b72c..50b689e121 100644 --- a/test/fixtures/transformation/es6-classes/super-class/expected.js +++ b/test/fixtures/transformation/es6-classes/super-class/expected.js @@ -15,7 +15,7 @@ var _inherits = function (child, parent) { var Test = (function () { var _Foo = Foo; var Test = function Test() { - if (_Foo) { + if (_Foo !== null) { _Foo.apply(this, arguments); } }; diff --git a/test/fixtures/transformation/optional-proto-to-assign/class/expected.js b/test/fixtures/transformation/optional-proto-to-assign/class/expected.js index 2f4501d427..2af2a9b699 100644 --- a/test/fixtures/transformation/optional-proto-to-assign/class/expected.js +++ b/test/fixtures/transformation/optional-proto-to-assign/class/expected.js @@ -25,7 +25,7 @@ var _inherits = function (child, parent) { var Foo = (function () { var _Bar = Bar; var Foo = function Foo() { - if (_Bar) { + if (_Bar !== null) { _Bar.apply(this, arguments); } }; From 601b3d584f1ce5afda5c233303bdd8e548263dde Mon Sep 17 00:00:00 2001 From: James Kyle Date: Sun, 4 Jan 2015 14:41:17 -0800 Subject: [PATCH 3/3] Add tags to top of changelog --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fd8cbbcff..f3ebd52305 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog -Gaps between patch versions are faulty/broken releases. +> **Tags:** +> - [New Feature] +> - [Bug Fix] +> - [Spec Compliancy] +> - [Breaking Change] +> - [Documentation] + +_Note: Gaps between patch versions are faulty/broken releases._ ## 2.5.0