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 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 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); } };