From be88d7772a1b80637505c8bd082a7b8abe3c749c Mon Sep 17 00:00:00 2001 From: Seth Murphy Date: Tue, 28 Feb 2017 16:12:21 -0500 Subject: [PATCH 01/10] Rebased off meteor/devel --- .../.npm/package/npm-shrinkwrap.json | 671 +++++++++++------- packages/babel-compiler/babel.js | 6 + packages/babel-compiler/package.js | 4 +- packages/minifier-js/.npm/package/.gitignore | 1 - packages/minifier-js/.npm/package/README | 7 - .../.npm/package/npm-shrinkwrap.json | 94 --- packages/minifier-js/beautify-tests.js | 16 - packages/minifier-js/minifier.js | 3 +- packages/minifier-js/package.js | 22 +- packages/standard-minifier-js/package.js | 8 +- .../standard-minifier-js/plugin/minify-js.js | 167 +---- tools/tests/apps/modules/.meteor/packages | 2 +- tools/tests/apps/modules/.meteor/versions | 6 +- 13 files changed, 476 insertions(+), 531 deletions(-) delete mode 100644 packages/minifier-js/.npm/package/.gitignore delete mode 100644 packages/minifier-js/.npm/package/README delete mode 100644 packages/minifier-js/.npm/package/npm-shrinkwrap.json delete mode 100644 packages/minifier-js/beautify-tests.js diff --git a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json index af2504af8a..d9040106f2 100644 --- a/packages/babel-compiler/.npm/package/npm-shrinkwrap.json +++ b/packages/babel-compiler/.npm/package/npm-shrinkwrap.json @@ -2,550 +2,727 @@ "dependencies": { "acorn": { "version": "4.0.11", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz", - "from": "acorn@>=4.0.5 <4.1.0" + "from": "acorn@>=4.0.5 <4.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz" }, "acorn-es7-plugin": { "version": "1.1.5", - "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.5.tgz", - "from": "acorn-es7-plugin@>=1.1.0 <1.2.0" + "from": "acorn-es7-plugin@>=1.1.0 <1.2.0", + "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.5.tgz" }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "from": "ansi-regex@>=2.0.0 <3.0.0" + "from": "ansi-regex@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" }, "ansi-styles": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "from": "ansi-styles@>=2.2.1 <3.0.0" + "from": "ansi-styles@>=2.2.1 <3.0.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" }, "ast-types": { "version": "0.9.5", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.5.tgz", - "from": "ast-types@>=0.9.5 <0.10.0" + "from": "ast-types@>=0.9.5 <0.10.0", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.5.tgz" }, "babel-code-frame": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", - "from": "babel-code-frame@>=6.22.0 <7.0.0" + "from": "babel-code-frame@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz" }, "babel-core": { - "version": "6.22.1", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.22.1.tgz", - "from": "babel-core@>=6.18.2 <7.0.0" + "version": "6.23.1", + "from": "babel-core@>=6.22.1 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.23.1.tgz" }, "babel-generator": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.22.0.tgz", - "from": "babel-generator@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-generator@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.23.0.tgz" }, "babel-helper-builder-react-jsx": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.22.0.tgz", - "from": "babel-helper-builder-react-jsx@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-helper-builder-react-jsx@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.23.0.tgz" }, "babel-helper-call-delegate": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz", - "from": "babel-helper-call-delegate@>=6.22.0 <7.0.0" + "from": "babel-helper-call-delegate@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz" }, "babel-helper-define-map": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.22.0.tgz", - "from": "babel-helper-define-map@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-helper-define-map@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.23.0.tgz" + }, + "babel-helper-evaluate-path": { + "version": "0.0.3", + "from": "babel-helper-evaluate-path@>=0.0.3 <0.0.4", + "resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.0.3.tgz" + }, + "babel-helper-flip-expressions": { + "version": "0.0.2", + "from": "babel-helper-flip-expressions@>=0.0.2 <0.0.3", + "resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.0.2.tgz" }, "babel-helper-function-name": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.22.0.tgz", - "from": "babel-helper-function-name@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-helper-function-name@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz" }, "babel-helper-get-function-arity": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.22.0.tgz", - "from": "babel-helper-get-function-arity@>=6.22.0 <7.0.0" + "from": "babel-helper-get-function-arity@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.22.0.tgz" }, "babel-helper-hoist-variables": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.22.0.tgz", - "from": "babel-helper-hoist-variables@>=6.22.0 <7.0.0" + "from": "babel-helper-hoist-variables@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.22.0.tgz" + }, + "babel-helper-is-nodes-equiv": { + "version": "0.0.1", + "from": "babel-helper-is-nodes-equiv@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz" + }, + "babel-helper-is-void-0": { + "version": "0.0.1", + "from": "babel-helper-is-void-0@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.0.1.tgz" + }, + "babel-helper-mark-eval-scopes": { + "version": "0.0.2", + "from": "babel-helper-mark-eval-scopes@>=0.0.2 <0.0.3", + "resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.0.2.tgz" }, "babel-helper-optimise-call-expression": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.22.0.tgz", - "from": "babel-helper-optimise-call-expression@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-helper-optimise-call-expression@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.23.0.tgz" }, "babel-helper-regex": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.22.0.tgz", - "from": "babel-helper-regex@>=6.22.0 <7.0.0" + "from": "babel-helper-regex@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.22.0.tgz" + }, + "babel-helper-remove-or-void": { + "version": "0.0.1", + "from": "babel-helper-remove-or-void@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.0.1.tgz" }, "babel-helper-replace-supers": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.22.0.tgz", - "from": "babel-helper-replace-supers@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-helper-replace-supers@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.23.0.tgz" + }, + "babel-helper-to-multiple-sequence-expressions": { + "version": "0.0.3", + "from": "babel-helper-to-multiple-sequence-expressions@>=0.0.3 <0.0.4", + "resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.0.3.tgz" }, "babel-helpers": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.22.0.tgz", - "from": "babel-helpers@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-helpers@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.23.0.tgz" }, "babel-messages": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.22.0.tgz", - "from": "babel-messages@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-messages@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz" }, "babel-plugin-check-es2015-constants": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "from": "babel-plugin-check-es2015-constants@>=6.8.0 <7.0.0" + "from": "babel-plugin-check-es2015-constants@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz" + }, + "babel-plugin-minify-constant-folding": { + "version": "0.0.4", + "from": "babel-plugin-minify-constant-folding@>=0.0.4 <0.0.5", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.0.4.tgz", + "dependencies": { + "jsesc": { + "version": "2.4.0", + "from": "jsesc@>=2.4.0 <3.0.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.4.0.tgz" + } + } + }, + "babel-plugin-minify-dead-code-elimination": { + "version": "0.1.3", + "from": "babel-plugin-minify-dead-code-elimination@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.1.3.tgz" + }, + "babel-plugin-minify-flip-comparisons": { + "version": "0.0.2", + "from": "babel-plugin-minify-flip-comparisons@>=0.0.2 <0.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.0.2.tgz" + }, + "babel-plugin-minify-guarded-expressions": { + "version": "0.0.4", + "from": "babel-plugin-minify-guarded-expressions@>=0.0.4 <0.0.5", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.0.4.tgz" + }, + "babel-plugin-minify-infinity": { + "version": "0.0.3", + "from": "babel-plugin-minify-infinity@>=0.0.3 <0.0.4", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.0.3.tgz" + }, + "babel-plugin-minify-mangle-names": { + "version": "0.0.7", + "from": "babel-plugin-minify-mangle-names@>=0.0.7 <0.0.8", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.0.7.tgz" + }, + "babel-plugin-minify-numeric-literals": { + "version": "0.0.1", + "from": "babel-plugin-minify-numeric-literals@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.0.1.tgz" + }, + "babel-plugin-minify-replace": { + "version": "0.0.1", + "from": "babel-plugin-minify-replace@>=0.0.1 <0.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.0.1.tgz" + }, + "babel-plugin-minify-simplify": { + "version": "0.0.7", + "from": "babel-plugin-minify-simplify@>=0.0.7 <0.0.8", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.0.7.tgz" + }, + "babel-plugin-minify-type-constructors": { + "version": "0.0.3", + "from": "babel-plugin-minify-type-constructors@>=0.0.3 <0.0.4", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.0.3.tgz" }, "babel-plugin-syntax-async-functions": { "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "from": "babel-plugin-syntax-async-functions@>=6.13.0 <7.0.0" + "from": "babel-plugin-syntax-async-functions@>=6.13.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz" }, "babel-plugin-syntax-async-generators": { "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", - "from": "babel-plugin-syntax-async-generators@>=6.13.0 <7.0.0" + "from": "babel-plugin-syntax-async-generators@>=6.13.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz" + }, + "babel-plugin-syntax-dynamic-import": { + "version": "6.18.0", + "from": "babel-plugin-syntax-dynamic-import@>=6.18.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz" }, "babel-plugin-syntax-flow": { "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", - "from": "babel-plugin-syntax-flow@>=6.13.0 <7.0.0" + "from": "babel-plugin-syntax-flow@>=6.18.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz" }, "babel-plugin-syntax-jsx": { "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", - "from": "babel-plugin-syntax-jsx@>=6.3.13 <7.0.0" + "from": "babel-plugin-syntax-jsx@>=6.3.13 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz" }, "babel-plugin-syntax-object-rest-spread": { "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "from": "babel-plugin-syntax-object-rest-spread@>=6.13.0 <7.0.0" + "from": "babel-plugin-syntax-object-rest-spread@>=6.13.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz" }, "babel-plugin-syntax-trailing-function-commas": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "from": "babel-plugin-syntax-trailing-function-commas@>=6.13.0 <7.0.0" + "from": "babel-plugin-syntax-trailing-function-commas@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz" }, "babel-plugin-transform-es2015-arrow-functions": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-arrow-functions@>=6.8.0 <7.0.0" + "from": "babel-plugin-transform-es2015-arrow-functions@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz" }, "babel-plugin-transform-es2015-block-scoped-functions": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-block-scoped-functions@>=6.8.0 <7.0.0" + "from": "babel-plugin-transform-es2015-block-scoped-functions@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz" }, "babel-plugin-transform-es2015-block-scoping": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-block-scoping@>=6.15.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-es2015-block-scoping@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.23.0.tgz" }, "babel-plugin-transform-es2015-classes": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-classes@>=6.14.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-es2015-classes@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.23.0.tgz" }, "babel-plugin-transform-es2015-computed-properties": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-computed-properties@>=6.8.0 <7.0.0" + "from": "babel-plugin-transform-es2015-computed-properties@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.22.0.tgz" }, "babel-plugin-transform-es2015-destructuring": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-destructuring@>=6.16.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-es2015-destructuring@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz" }, "babel-plugin-transform-es2015-for-of": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-for-of@>=6.8.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-es2015-for-of@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz" }, "babel-plugin-transform-es2015-literals": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-literals@>=6.8.0 <7.0.0" + "from": "babel-plugin-transform-es2015-literals@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz" }, "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-modules-commonjs@>=6.18.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-es2015-modules-commonjs@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.23.0.tgz" }, "babel-plugin-transform-es2015-object-super": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-object-super@>=6.8.0 <7.0.0" + "from": "babel-plugin-transform-es2015-object-super@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.22.0.tgz" }, "babel-plugin-transform-es2015-parameters": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-parameters@>=6.17.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-es2015-parameters@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.23.0.tgz" }, "babel-plugin-transform-es2015-shorthand-properties": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-shorthand-properties@>=6.8.0 <7.0.0" + "from": "babel-plugin-transform-es2015-shorthand-properties@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.22.0.tgz" }, "babel-plugin-transform-es2015-spread": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-spread@>=6.8.0 <7.0.0" + "from": "babel-plugin-transform-es2015-spread@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz" }, "babel-plugin-transform-es2015-sticky-regex": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-sticky-regex@>=6.8.0 <7.0.0" + "from": "babel-plugin-transform-es2015-sticky-regex@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.22.0.tgz" }, "babel-plugin-transform-es2015-template-literals": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-template-literals@>=6.8.0 <7.0.0" + "from": "babel-plugin-transform-es2015-template-literals@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz" }, "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-typeof-symbol@>=6.8.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-es2015-typeof-symbol@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz" }, "babel-plugin-transform-es2015-unicode-regex": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.22.0.tgz", - "from": "babel-plugin-transform-es2015-unicode-regex@>=6.11.0 <7.0.0" + "from": "babel-plugin-transform-es2015-unicode-regex@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.22.0.tgz" }, "babel-plugin-transform-es3-property-literals": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es3-property-literals/-/babel-plugin-transform-es3-property-literals-6.22.0.tgz", - "from": "babel-plugin-transform-es3-property-literals@>=6.8.0 <7.0.0" + "from": "babel-plugin-transform-es3-property-literals@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es3-property-literals/-/babel-plugin-transform-es3-property-literals-6.22.0.tgz" }, "babel-plugin-transform-flow-strip-types": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", - "from": "babel-plugin-transform-flow-strip-types@>=6.14.0 <7.0.0" + "from": "babel-plugin-transform-flow-strip-types@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz" + }, + "babel-plugin-transform-inline-consecutive-adds": { + "version": "0.0.2", + "from": "babel-plugin-transform-inline-consecutive-adds@>=0.0.2 <0.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.0.2.tgz" + }, + "babel-plugin-transform-member-expression-literals": { + "version": "6.8.1", + "from": "babel-plugin-transform-member-expression-literals@>=6.8.1 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.8.1.tgz" + }, + "babel-plugin-transform-merge-sibling-variables": { + "version": "6.8.2", + "from": "babel-plugin-transform-merge-sibling-variables@>=6.8.2 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.8.2.tgz" + }, + "babel-plugin-transform-minify-booleans": { + "version": "6.8.0", + "from": "babel-plugin-transform-minify-booleans@>=6.8.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.8.0.tgz" }, "babel-plugin-transform-object-rest-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.22.0.tgz", - "from": "babel-plugin-transform-object-rest-spread@>=6.16.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-object-rest-spread@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz" + }, + "babel-plugin-transform-property-literals": { + "version": "6.8.1", + "from": "babel-plugin-transform-property-literals@>=6.8.1 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.8.1.tgz" }, "babel-plugin-transform-react-display-name": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.22.0.tgz", - "from": "babel-plugin-transform-react-display-name@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-react-display-name@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.23.0.tgz" }, "babel-plugin-transform-react-jsx": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.22.0.tgz", - "from": "babel-plugin-transform-react-jsx@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-react-jsx@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.23.0.tgz" }, "babel-plugin-transform-react-jsx-self": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz", - "from": "babel-plugin-transform-react-jsx-self@>=6.22.0 <7.0.0" + "from": "babel-plugin-transform-react-jsx-self@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz" }, "babel-plugin-transform-react-jsx-source": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz", - "from": "babel-plugin-transform-react-jsx-source@>=6.22.0 <7.0.0" + "from": "babel-plugin-transform-react-jsx-source@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz" }, "babel-plugin-transform-regenerator": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.22.0.tgz", - "from": "babel-plugin-transform-regenerator@>=6.16.1 <7.0.0" + "from": "babel-plugin-transform-regenerator@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.22.0.tgz" + }, + "babel-plugin-transform-regexp-constructors": { + "version": "0.0.5", + "from": "babel-plugin-transform-regexp-constructors@>=0.0.5 <0.0.6", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.0.5.tgz" + }, + "babel-plugin-transform-remove-console": { + "version": "6.8.0", + "from": "babel-plugin-transform-remove-console@>=6.8.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.8.0.tgz" + }, + "babel-plugin-transform-remove-debugger": { + "version": "6.8.0", + "from": "babel-plugin-transform-remove-debugger@>=6.8.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.8.0.tgz" + }, + "babel-plugin-transform-remove-undefined": { + "version": "0.0.5", + "from": "babel-plugin-transform-remove-undefined@>=0.0.5 <0.0.6", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.0.5.tgz" }, "babel-plugin-transform-runtime": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.22.0.tgz", - "from": "babel-plugin-transform-runtime@>=6.15.0 <7.0.0" + "version": "6.23.0", + "from": "babel-plugin-transform-runtime@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz" + }, + "babel-plugin-transform-simplify-comparison-operators": { + "version": "6.8.1", + "from": "babel-plugin-transform-simplify-comparison-operators@>=6.8.1 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.8.1.tgz" }, "babel-plugin-transform-strict-mode": { "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.22.0.tgz", - "from": "babel-plugin-transform-strict-mode@>=6.22.0 <7.0.0" + "from": "babel-plugin-transform-strict-mode@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.22.0.tgz" + }, + "babel-plugin-transform-undefined-to-void": { + "version": "6.8.0", + "from": "babel-plugin-transform-undefined-to-void@>=6.8.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.8.0.tgz" + }, + "babel-preset-babili": { + "version": "0.0.11", + "from": "babel-preset-babili@>=0.0.11 <0.0.12", + "resolved": "https://registry.npmjs.org/babel-preset-babili/-/babel-preset-babili-0.0.11.tgz" + }, + "babel-preset-flow": { + "version": "6.23.0", + "from": "babel-preset-flow@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz" }, "babel-preset-meteor": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-6.14.0.tgz", - "from": "babel-preset-meteor@6.14.0" + "version": "6.22.0", + "from": "babel-preset-meteor@6.22.0", + "resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-6.22.0.tgz" }, "babel-preset-react": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.22.0.tgz", - "from": "babel-preset-react@>=6.16.0 <7.0.0" + "version": "6.23.0", + "from": "babel-preset-react@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.23.0.tgz" }, "babel-register": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.22.0.tgz", - "from": "babel-register@>=6.22.0 <7.0.0" + "version": "6.23.0", + "from": "babel-register@>=6.23.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.23.0.tgz" }, "babel-runtime": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.22.0.tgz", - "from": "babel-runtime@>=6.18.0 <7.0.0" + "version": "6.23.0", + "from": "babel-runtime@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz" }, "babel-template": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.22.0.tgz", - "from": "babel-template@>=6.16.0 <7.0.0" + "version": "6.23.0", + "from": "babel-template@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.23.0.tgz" }, "babel-traverse": { - "version": "6.22.1", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.22.1.tgz", - "from": "babel-traverse@>=6.18.0 <7.0.0" + "version": "6.23.1", + "from": "babel-traverse@>=6.22.1 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.23.1.tgz" }, "babel-types": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.22.0.tgz", - "from": "babel-types@>=6.18.0 <7.0.0" + "version": "6.23.0", + "from": "babel-types@>=6.22.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.23.0.tgz" }, "babylon": { "version": "6.15.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.15.0.tgz", - "from": "babylon@>=6.13.1 <7.0.0" + "from": "babylon@>=6.15.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.15.0.tgz" }, "balanced-match": { "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "from": "balanced-match@>=0.4.1 <0.5.0" + "from": "balanced-match@>=0.4.1 <0.5.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" }, "brace-expansion": { "version": "1.1.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", - "from": "brace-expansion@>=1.0.0 <2.0.0" + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "from": "chalk@>=1.1.0 <2.0.0" + "from": "chalk@>=1.1.0 <2.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "from": "concat-map@0.0.1" + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" }, "convert-source-map": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.4.0.tgz", - "from": "convert-source-map@>=1.3.0 <2.0.0" + "from": "convert-source-map@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.4.0.tgz" }, "core-js": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", - "from": "core-js@>=2.4.0 <3.0.0" + "from": "core-js@>=2.4.0 <3.0.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz" }, "debug": { "version": "2.6.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz", - "from": "debug@>=2.1.1 <3.0.0" + "from": "debug@>=2.1.1 <3.0.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz" }, "detect-indent": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "from": "detect-indent@>=4.0.0 <5.0.0" + "from": "detect-indent@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz" }, "escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "from": "escape-string-regexp@>=1.0.2 <2.0.0" + "from": "escape-string-regexp@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" }, "esutils": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "from": "esutils@>=2.0.2 <3.0.0" + "from": "esutils@>=2.0.2 <3.0.0", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" }, "globals": { - "version": "9.14.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.14.0.tgz", - "from": "globals@>=9.0.0 <10.0.0" + "version": "9.16.0", + "from": "globals@>=9.0.0 <10.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.16.0.tgz" }, "has-ansi": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "from": "has-ansi@>=2.0.0 <3.0.0" + "from": "has-ansi@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" }, "home-or-tmp": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "from": "home-or-tmp@>=2.0.0 <3.0.0" + "from": "home-or-tmp@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz" }, "invariant": { "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "from": "invariant@>=2.2.0 <3.0.0" + "from": "invariant@>=2.2.0 <3.0.0", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz" }, "is-finite": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "from": "is-finite@>=1.0.0 <2.0.0" + "from": "is-finite@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz" }, "js-tokens": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz", - "from": "js-tokens@>=3.0.0 <4.0.0" + "from": "js-tokens@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz" }, "jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "from": "jsesc@>=1.3.0 <2.0.0" + "from": "jsesc@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz" }, "json5": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "from": "json5@>=0.5.0 <0.6.0" + "from": "json5@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz" }, "lodash": { "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "from": "lodash@>=4.16.4 <5.0.0" + "from": "lodash@>=4.17.4 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "from": "lodash.isplainobject@>=4.0.6 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" + }, + "lodash.some": { + "version": "4.6.0", + "from": "lodash.some@>=4.6.0 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz" }, "loose-envify": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "from": "loose-envify@>=1.0.0 <2.0.0" + "from": "loose-envify@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz" }, "magic-string": { "version": "0.19.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.19.0.tgz", - "from": "magic-string@>=0.19.0 <0.20.0" + "from": "magic-string@>=0.19.0 <0.20.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.19.0.tgz" }, "meteor-babel": { - "version": "0.14.4", - "resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-0.14.4.tgz", - "from": "meteor-babel@0.14.4" + "version": "0.16.0", + "from": "git+https://github.com/eagerestwolf/babel.git", + "resolved": "git+https://github.com/eagerestwolf/babel.git#master" }, "meteor-babel-helpers": { "version": "0.0.3", - "resolved": "https://registry.npmjs.org/meteor-babel-helpers/-/meteor-babel-helpers-0.0.3.tgz", - "from": "meteor-babel-helpers@0.0.3" + "from": "meteor-babel-helpers@0.0.3", + "resolved": "https://registry.npmjs.org/meteor-babel-helpers/-/meteor-babel-helpers-0.0.3.tgz" }, "minimatch": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", - "from": "minimatch@>=3.0.2 <4.0.0" + "from": "minimatch@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz" }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "from": "minimist@0.0.8" + "from": "minimist@0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "from": "mkdirp@>=0.5.1 <0.6.0" + "from": "mkdirp@>=0.5.1 <0.6.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" }, "ms": { "version": "0.7.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", - "from": "ms@0.7.2" + "from": "ms@0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz" }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "from": "number-is-nan@>=1.0.0 <2.0.0" + "from": "number-is-nan@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "from": "os-homedir@>=1.0.0 <2.0.0" + "from": "os-homedir@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "from": "os-tmpdir@>=1.0.1 <2.0.0" + "from": "os-tmpdir@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "from": "path-is-absolute@>=1.0.0 <2.0.0" + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" }, "private": { "version": "0.1.7", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", - "from": "private@>=0.1.6 <0.2.0" + "from": "private@>=0.1.6 <0.2.0", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz" }, "regenerate": { "version": "1.3.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz", - "from": "regenerate@>=1.2.1 <2.0.0" + "from": "regenerate@>=1.2.1 <2.0.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz" }, "regenerator-runtime": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz", - "from": "regenerator-runtime@>=0.10.0 <0.11.0" + "version": "0.10.3", + "from": "regenerator-runtime@>=0.10.0 <0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz" }, "regenerator-transform": { "version": "0.9.8", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.8.tgz", - "from": "regenerator-transform@0.9.8" + "from": "regenerator-transform@0.9.8", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.8.tgz" }, "regexpu-core": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "from": "regexpu-core@>=2.0.0 <3.0.0" + "from": "regexpu-core@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz" }, "regjsgen": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "from": "regjsgen@>=0.2.0 <0.3.0" + "from": "regjsgen@>=0.2.0 <0.3.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz" }, "regjsparser": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", "from": "regjsparser@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "from": "jsesc@>=0.5.0 <0.6.0" + "from": "jsesc@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" } } }, "reify": { "version": "0.4.9", - "resolved": "https://registry.npmjs.org/reify/-/reify-0.4.9.tgz", - "from": "reify@>=0.4.8 <0.5.0" + "from": "reify@>=0.4.8 <0.5.0", + "resolved": "https://registry.npmjs.org/reify/-/reify-0.4.9.tgz" }, "repeating": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "from": "repeating@>=2.0.0 <3.0.0" + "from": "repeating@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz" }, "slash": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "from": "slash@>=1.0.0 <2.0.0" + "from": "slash@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz" }, "source-map": { "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "from": "source-map@>=0.5.0 <0.6.0" + "from": "source-map@>=0.5.0 <0.6.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" }, "source-map-support": { "version": "0.4.11", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.11.tgz", - "from": "source-map-support@>=0.4.2 <0.5.0" + "from": "source-map-support@>=0.4.2 <0.5.0", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.11.tgz" }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "from": "strip-ansi@>=3.0.0 <4.0.0" + "from": "strip-ansi@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" }, "supports-color": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "from": "supports-color@>=2.0.0 <3.0.0" + "from": "supports-color@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" }, "to-fast-properties": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.2.tgz", - "from": "to-fast-properties@>=1.0.1 <2.0.0" + "from": "to-fast-properties@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.2.tgz" + }, + "trim-right": { + "version": "1.0.1", + "from": "trim-right@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz" }, "vlq": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.1.tgz", - "from": "vlq@>=0.2.1 <0.3.0" + "from": "vlq@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.1.tgz" } } } diff --git a/packages/babel-compiler/babel.js b/packages/babel-compiler/babel.js index fc20af1d6e..ac518d1034 100644 --- a/packages/babel-compiler/babel.js +++ b/packages/babel-compiler/babel.js @@ -29,5 +29,11 @@ Babel = { setCacheDir: function (cacheDir) { Npm.require('meteor-babel').setCacheDir(cacheDir); + }, + + minify: function(source, options) { + var meteorBabel = Npm.require('meteor-babel'); + var options = options || meteorBabel.getMinifierOptions(); + return meteorBabel.minify(source, options); } }; diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 55a8e53f8f..46642c208c 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -6,11 +6,11 @@ Package.describe({ // isn't possible because you can't publish a non-recommended // release with package versions that don't have a pre-release // identifier at the end (eg, -dev) - version: '6.14.1' + version: '6.15.0' }); Npm.depends({ - 'meteor-babel': '0.14.4' + 'meteor-babel': 'git+https://github.com/eagerestwolf/babel#master' }); Package.onUse(function (api) { diff --git a/packages/minifier-js/.npm/package/.gitignore b/packages/minifier-js/.npm/package/.gitignore deleted file mode 100644 index 3c3629e647..0000000000 --- a/packages/minifier-js/.npm/package/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/packages/minifier-js/.npm/package/README b/packages/minifier-js/.npm/package/README deleted file mode 100644 index 3d492553a4..0000000000 --- a/packages/minifier-js/.npm/package/README +++ /dev/null @@ -1,7 +0,0 @@ -This directory and the files immediately inside it are automatically generated -when you change this package's NPM dependencies. Commit the files in this -directory (npm-shrinkwrap.json, .gitignore, and this README) to source control -so that others run the same versions of sub-dependencies. - -You should NOT check in the node_modules directory that Meteor automatically -creates; if you are using git, the .gitignore file tells git to ignore it. diff --git a/packages/minifier-js/.npm/package/npm-shrinkwrap.json b/packages/minifier-js/.npm/package/npm-shrinkwrap.json deleted file mode 100644 index e5204dc869..0000000000 --- a/packages/minifier-js/.npm/package/npm-shrinkwrap.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "dependencies": { - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "from": "align-text@>=0.1.3 <0.2.0" - }, - "async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "from": "async@>=0.2.6 <0.3.0" - }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "from": "camelcase@>=1.0.2 <2.0.0" - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "from": "center-align@>=0.1.1 <0.2.0" - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "from": "cliui@>=2.1.0 <3.0.0" - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "from": "decamelize@>=1.0.0 <2.0.0" - }, - "is-buffer": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz", - "from": "is-buffer@>=1.0.2 <2.0.0" - }, - "kind-of": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz", - "from": "kind-of@>=3.0.2 <4.0.0" - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "from": "lazy-cache@>=1.0.3 <2.0.0" - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "from": "longest@>=1.0.1 <2.0.0" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "from": "repeat-string@>=1.5.2 <2.0.0" - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "from": "right-align@>=0.1.1 <0.2.0" - }, - "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "from": "source-map@>=0.5.1 <0.6.0" - }, - "uglify-js": { - "version": "2.7.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz", - "from": "uglify-js@2.7.5" - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "from": "uglify-to-browserify@>=1.0.0 <1.1.0" - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "from": "window-size@0.1.0" - }, - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "from": "wordwrap@0.0.2" - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "from": "yargs@>=3.10.0 <3.11.0" - } - } -} diff --git a/packages/minifier-js/beautify-tests.js b/packages/minifier-js/beautify-tests.js deleted file mode 100644 index 05eca60ddb..0000000000 --- a/packages/minifier-js/beautify-tests.js +++ /dev/null @@ -1,16 +0,0 @@ - -// The UglifyJSMinify API can also be used for beautification. Test that it -// behaves as expected. - -Tinytest.add('minifier-js - uglify beautify', function (test) { - // See and - // for the API we're calling. - test.equal(UglifyJSMinify('one = function () { return 1; };', - { fromString: true, - output: { beautify: true, - indent_level: 2, - width: 80 } }).code, - 'one = function() {\n' + - ' return 1;\n' + - '};'); -}); diff --git a/packages/minifier-js/minifier.js b/packages/minifier-js/minifier.js index 942d6126ae..2fc7f565bf 100644 --- a/packages/minifier-js/minifier.js +++ b/packages/minifier-js/minifier.js @@ -1,2 +1 @@ -UglifyJS = Npm.require('uglify-js'); -UglifyJSMinify = UglifyJS.minify; \ No newline at end of file +meteorBabelMinify = Babel.minify; \ No newline at end of file diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index b741592858..4abf7fef00 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,26 +1,10 @@ Package.describe({ summary: "JavaScript minifier", - version: "1.2.18" -}); - -Npm.depends({ - "uglify-js": "2.7.5" -}); - -Npm.strip({ - "uglify-js": ["test/"] + version: "2.0.0" }); Package.onUse(function (api) { - api.export(['UglifyJSMinify', 'UglifyJS']); + api.use('babel-compiler'); + api.export(['meteorBabelMinify']); api.addFiles(['minifier.js'], 'server'); }); - -Package.onTest(function (api) { - api.use('minifier-js', 'server'); - api.use('tinytest'); - - api.addFiles([ - 'beautify-tests.js', - ], 'server'); -}); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 736b1d27d1..eacf255121 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '1.2.3', + version: '2.0.0', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md' }); @@ -8,7 +8,8 @@ Package.describe({ Package.registerBuildPlugin({ name: "minifyStdJS", use: [ - 'minifier-js@1.2.18' + 'minifier-js', + 'ecmascript' ], sources: [ 'plugin/minify-js.js' @@ -18,6 +19,3 @@ Package.registerBuildPlugin({ Package.onUse(function(api) { api.use('isobuild:minifier-plugin@1.0.0'); }); - -Package.onTest(function(api) { -}); diff --git a/packages/standard-minifier-js/plugin/minify-js.js b/packages/standard-minifier-js/plugin/minify-js.js index c1ff32c96b..465188ae90 100644 --- a/packages/standard-minifier-js/plugin/minify-js.js +++ b/packages/standard-minifier-js/plugin/minify-js.js @@ -1,147 +1,46 @@ +'use strict'; + Plugin.registerMinifier({ - extensions: ["js"], - archMatching: "web" + extensions: ['js'], + archMatching: 'web' }, function () { - var minifier = new UglifyJSMinifier(); + var minifier = new meteorBabelMinifier(); return minifier; }); -function UglifyJSMinifier () {}; +class meteorBabelMinifier { + constructor() {} -UglifyJSMinifier.prototype.processFilesForBundle = function (files, options) { - var mode = options.minifyMode; + processFilesForBundle(files, options) { + let mode = options.minifyMode; - // don't minify anything for development - if (mode === 'development') { - files.forEach(function (file) { - file.addJavaScript({ - data: file.getContentsAsBuffer(), - sourceMap: file.getSourceMap(), - path: file.getPathInBundle() + // don't minify anything for development + if (mode === 'development') { + files.forEach(function (file) { + file.addJavaScript({ + data: file.getContentsAsBuffer(), + sourceMap: file.getSourceMap(), + path: file.getPathInBundle() + }); }); - }); - return; - } - - var minifyOptions = { - fromString: true, - compress: { - drop_debugger: false, - unused: false, - dead_code: false + return; } - }; - function maybeThrowMinifyErrorBySourceFile(error, file) { - var minifierErrorRegex = /\(line: (\d+), col: (\d+), pos: (\d+)\)/; - var parseError = minifierErrorRegex.exec(error.toString()); - - if (parseError) { - var lineErrorMessage = parseError[0]; - var lineErrorLineNumber = parseError[1]; - - var parseErrorContentIndex = lineErrorLineNumber - 1; - - // Unlikely, since we have a multi-line fixed header in this file. - if (parseErrorContentIndex < 0) { - return; - } - - /* - - What we're parsing looks like this: - - ///////////////////////////////////////// - // // - // path/to/file.js // - // // - ///////////////////////////////////////// - // 1 - var illegalECMAScript = true; // 2 - // 3 - ///////////////////////////////////////// - - Btw, the above code is intentionally not newer ECMAScript so - we don't break ourselves. - - */ - - var contents = file.getContentsAsString().split(/\n/); - var lineContent = contents[parseErrorContentIndex]; - - // Try to grab the line number, which sometimes doesn't exist on - // line, abnormally-long lines in a larger block. - var lineSrcLineParts = /^(.*?)(?:\s*\/\/ (\d+))?$/.exec(lineContent); - - // The line didn't match at all? Let's just not try. - if (!lineSrcLineParts) { - return; - } - - var lineSrcLineContent = lineSrcLineParts[1]; - var lineSrcLineNumber = lineSrcLineParts[2]; - - // Count backward from the failed line to find the filename. - for (var c = parseErrorContentIndex - 1; c >= 0; c--) { - var sourceLine = contents[c]; - - // If the line is a boatload of slashes, we're in the right place. - if (/^\/\/\/{6,}$/.test(sourceLine)) { - - // If 4 lines back is the same exact line, we've found the framing. - if (contents[c - 4] === sourceLine) { - - // So in that case, 2 lines back is the file path. - var parseErrorPath = contents[c - 2] - .substring(3) - .replace(/\s+\/\//, ""); - - var minError = new Error( - "UglifyJS minification error: \n\n" + - error.message + " at " + parseErrorPath + - (lineSrcLineNumber ? " line " + lineSrcLineNumber + "\n\n" : "") + - " within " + file.getPathInBundle() + " " + - lineErrorMessage + ":\n\n" + - lineSrcLineContent + "\n" - ); - - throw minError; - } + var allJs = ''; + files.forEach(function (file) { + // Don't reminify *.min.js. + if (/\.min\.js$/.test(file.getPathInBundle())) { + allJs += file.getContentsAsString(); + } else { + allJs += meteorBabelMinify(file.getContentsAsString()).code; } - } + allJs += '\n\n'; + + Plugin.nudge(); + }); + + if (files.length) { + files[0].addJavaScript({ data: allJs }); } } - - var allJs = ''; - files.forEach(function (file) { - // Don't reminify *.min.js. - if (/\.min\.js$/.test(file.getPathInBundle())) { - allJs += file.getContentsAsString(); - } else { - var minified; - try { - minified = UglifyJSMinify(file.getContentsAsString(), minifyOptions); - if (!(minified && typeof minified.code === "string")) { - throw new Error(); - } - } catch (err) { - var filePath = file.getPathInBundle(); - - // Try to catch the ugly Uglify error. - maybeThrowMinifyErrorBySourceFile(err, file); - - err.message += " while minifying " + filePath; - throw err; - } - - allJs += minified.code; - } - allJs += '\n\n'; - - Plugin.nudge(); - }); - - if (files.length) { - files[0].addJavaScript({ data: allJs }); - } -}; +} diff --git a/tools/tests/apps/modules/.meteor/packages b/tools/tests/apps/modules/.meteor/packages index de346a8de7..0713ff4409 100644 --- a/tools/tests/apps/modules/.meteor/packages +++ b/tools/tests/apps/modules/.meteor/packages @@ -20,7 +20,7 @@ modules-test-package dispatch:mocha-phantomjs dispatch:mocha-browser standard-minifier-css@1.3.3 -standard-minifier-js@1.2.2 +standard-minifier-js@2.0.0 client-only-ecmascript modules-test-plugin shell-server@0.2.2 diff --git a/tools/tests/apps/modules/.meteor/versions b/tools/tests/apps/modules/.meteor/versions index 07fcfdc84e..a3a570fa9b 100644 --- a/tools/tests/apps/modules/.meteor/versions +++ b/tools/tests/apps/modules/.meteor/versions @@ -1,6 +1,6 @@ allow-deny@1.0.5 autoupdate@1.3.12 -babel-compiler@6.14.1 +babel-compiler@6.15.0 babel-runtime@1.0.1 base64@1.0.10 binary-heap@1.0.10 @@ -42,7 +42,7 @@ logging@1.1.17 meteor@1.6.1 meteor-base@1.0.4 minifier-css@1.2.16 -minifier-js@1.2.17 +minifier-js@2.0.0 minimongo@1.0.20 mobile-experience@1.0.4 mobile-status-bar@1.0.14 @@ -68,7 +68,7 @@ shell-server@0.2.2 spacebars@1.0.13 spacebars-compiler@1.1.0 standard-minifier-css@1.3.3 -standard-minifier-js@1.2.2 +standard-minifier-js@2.0.0 templating@1.3.0 templating-compiler@1.3.0 templating-runtime@1.3.0 From 10cfe7e47b57fc9e84f83f2b89744ca59deebf27 Mon Sep 17 00:00:00 2001 From: Seth Murphy Date: Tue, 28 Feb 2017 16:51:00 -0500 Subject: [PATCH 02/10] Cleaned up code and added settings noop method --- packages/minifier-js/package.js | 2 +- packages/standard-minifier-js/package.js | 10 +++++----- packages/standard-minifier-js/plugin/minify-js.js | 4 +++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 4abf7fef00..3eae720a86 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -4,7 +4,7 @@ Package.describe({ }); Package.onUse(function (api) { - api.use('babel-compiler'); + api.use('babel-compiler@6.15.0'); api.export(['meteorBabelMinify']); api.addFiles(['minifier.js'], 'server'); }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index eacf255121..76aa2186e7 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -2,18 +2,18 @@ Package.describe({ name: 'standard-minifier-js', version: '2.0.0', summary: 'Standard javascript minifiers used with Meteor apps by default.', - documentation: 'README.md' + documentation: 'README.md', }); Package.registerBuildPlugin({ name: "minifyStdJS", use: [ - 'minifier-js', - 'ecmascript' + 'minifier-js@2.0.0', + 'ecmascript@0.6.3', ], sources: [ - 'plugin/minify-js.js' - ] + 'plugin/minify-js.js', + ], }); Package.onUse(function(api) { diff --git a/packages/standard-minifier-js/plugin/minify-js.js b/packages/standard-minifier-js/plugin/minify-js.js index 465188ae90..fe58a62e86 100644 --- a/packages/standard-minifier-js/plugin/minify-js.js +++ b/packages/standard-minifier-js/plugin/minify-js.js @@ -11,6 +11,8 @@ Plugin.registerMinifier({ class meteorBabelMinifier { constructor() {} + settings() {} + processFilesForBundle(files, options) { let mode = options.minifyMode; @@ -20,7 +22,7 @@ class meteorBabelMinifier { file.addJavaScript({ data: file.getContentsAsBuffer(), sourceMap: file.getSourceMap(), - path: file.getPathInBundle() + path: file.getPathInBundle(), }); }); return; From 8f041369ae877b884be2e0a44f358b662578d6dd Mon Sep 17 00:00:00 2001 From: Seth Murphy Date: Wed, 8 Mar 2017 18:01:25 -0500 Subject: [PATCH 03/10] Updated babel-compiler to use meteor-babel from npm --- packages/babel-compiler/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 46642c208c..7b4e1b3ed4 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -10,7 +10,7 @@ Package.describe({ }); Npm.depends({ - 'meteor-babel': 'git+https://github.com/eagerestwolf/babel#master' + 'meteor-babel': '0.16.0' }); Package.onUse(function (api) { From 36b4fae9e51eea2a25fb25ab26742940ffe1bfd7 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Fri, 10 Mar 2017 14:48:01 +0200 Subject: [PATCH 04/10] Add links to `Development.md` from `Contributing.md`. Many aspects regarding contribution of code can be better explained in the new `Development.md` so provide links to those relevant parts. Follows up on https://github.com/meteor/meteor/pull/8267 --- Contributing.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Contributing.md b/Contributing.md index a7bb33399c..c4db02a8a4 100644 --- a/Contributing.md +++ b/Contributing.md @@ -209,6 +209,10 @@ We have found that writing software to meet both these standards at the same time is hard but incredibly rewarding. We hope you come to feel the same way. +### Understanding the core + +For more information about how to work with Meteor core, take a look at the [Development](Development.md) document which explains many important details, including how to [run from a checkout](Development.md#running-from-a-git-checkout), [run tests](Development.md#tests), and more. + ### Proposing your change You'll have the best chance of getting a change into core if you can build consensus in the community for it. Start by creating a well specified feature request as a Github issue. @@ -237,9 +241,10 @@ these guidelines: * Include tests that prove your code works. - * Follow the - [MDG style guide](https://guide.meteor.com/code-style.html#javascript) - for code and commit messages. + * Follow appropriate style for + [code contributions](Development.md#code-style) + and + [commit messages](Development.md#commit-messages) * Be sure your author field in git is properly filled out with your full name and email address so we can credit you. From 34da752c7cc0a7e02713a8bd4f56dfc38b510aa0 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Mon, 13 Mar 2017 14:47:23 +0200 Subject: [PATCH 05/10] Use 'minifier-babili' branch of 'blaze' repository. This points the `blaze` submodule in the Meteor repository to: https://github.com/meteor/blaze/tree/minifier-babili This `minifier-babili` branch excludes new HTML5 tests which are failing on PhantomJS, namely, the HTML5 tests which were added by: https://github.com/meteor/blaze/commit/04db0d40cef726cac73736629c164d404a39d54d While I believe the `VIDEO` tests are the most problematic, there is nothing about the tests themselves which are lacking. In fact, the tests do run successfully on the Blaze repository and the changes have actually been released for a number of months on Blaze itself, however the submodule in Meteor hasn't been updated until now. Meteor only uses `blaze` for generating templates in the `boilerplate-generator` package and doesn't utilize the HTML5 in question, nor is Meteor responsible for Blaze testing anymore. Ultimately, our `test-in-console` needs to be updated to use another option aside from PhantomJS, but I don't believe that should hold up releasing this Babili minifier which solves a number of issues in meteor/meteor#8378. --- packages/non-core/blaze | 2 +- packages/standard-minifier-js/package.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/non-core/blaze b/packages/non-core/blaze index 637dac5914..0ded311a13 160000 --- a/packages/non-core/blaze +++ b/packages/non-core/blaze @@ -1 +1 @@ -Subproject commit 637dac59146e74e2d384e8ea15b4cb7a8cb67896 +Subproject commit 0ded311a13bd0cf0fbf8e19574156cdb7e5ed220 diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 9e03e9e085..227cdf2a1f 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -8,8 +8,7 @@ Package.describe({ Package.registerBuildPlugin({ name: "minifyStdJS", use: [ - 'minifier-js', - 'ecmascript', + 'minifier-js@2.0.0', ], sources: [ 'plugin/minify-js.js', From 735cb17903bfa5b8be3d69ec7767246a036ea4b8 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Mon, 13 Mar 2017 14:48:21 +0200 Subject: [PATCH 06/10] Prefer non-ES6 in order to avoid including `ecmascript`. The `ecmascript` package, when `use`'d in a compiler, is included in the build of the package, thus increasing the size. For this simple package I'm not sure the benefits will actually be worth it. --- .../standard-minifier-js/plugin/minify-js.js | 64 +++++++++---------- 1 file changed, 29 insertions(+), 35 deletions(-) diff --git a/packages/standard-minifier-js/plugin/minify-js.js b/packages/standard-minifier-js/plugin/minify-js.js index fe58a62e86..18ba055120 100644 --- a/packages/standard-minifier-js/plugin/minify-js.js +++ b/packages/standard-minifier-js/plugin/minify-js.js @@ -1,5 +1,3 @@ -'use strict'; - Plugin.registerMinifier({ extensions: ['js'], archMatching: 'web' @@ -8,41 +6,37 @@ Plugin.registerMinifier({ return minifier; }); -class meteorBabelMinifier { - constructor() {} +function meteorBabelMinifier () {}; - settings() {} +meteorBabelMinifier.prototype.processFilesForBundle = function(files, options) { + var mode = options.minifyMode; - processFilesForBundle(files, options) { - let mode = options.minifyMode; - - // don't minify anything for development - if (mode === 'development') { - files.forEach(function (file) { - file.addJavaScript({ - data: file.getContentsAsBuffer(), - sourceMap: file.getSourceMap(), - path: file.getPathInBundle(), - }); - }); - return; - } - - var allJs = ''; + // don't minify anything for development + if (mode === 'development') { files.forEach(function (file) { - // Don't reminify *.min.js. - if (/\.min\.js$/.test(file.getPathInBundle())) { - allJs += file.getContentsAsString(); - } else { - allJs += meteorBabelMinify(file.getContentsAsString()).code; - } - allJs += '\n\n'; - - Plugin.nudge(); + file.addJavaScript({ + data: file.getContentsAsBuffer(), + sourceMap: file.getSourceMap(), + path: file.getPathInBundle(), }); - - if (files.length) { - files[0].addJavaScript({ data: allJs }); - } + }); + return; } -} + + var allJs = ''; + files.forEach(function (file) { + // Don't reminify *.min.js. + if (/\.min\.js$/.test(file.getPathInBundle())) { + allJs += file.getContentsAsString(); + } else { + allJs += meteorBabelMinify(file.getContentsAsString()).code; + } + allJs += '\n\n'; + + Plugin.nudge(); + }); + + if (files.length) { + files[0].addJavaScript({ data: allJs }); + } +}; From 486ce486a7a97d5c67534165d48441af808c8eec Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Mon, 13 Mar 2017 17:39:20 +0200 Subject: [PATCH 07/10] Ensure errors the minifier encounters are easy to understand. While Babili is much better about handling modern ECMAScript constructs than its UglifyJS predecessor, it may still be possible for an error to occur during minification. To account for that unlikely situation, and to preserve the code already written to assist in that situation, this implements an error re-throw in a similar fashion to that of 1a380f5532a95236eb066d44398d9a9c7b34b37f. --- .../standard-minifier-js/plugin/minify-js.js | 104 +++++++++++++++++- 1 file changed, 103 insertions(+), 1 deletion(-) diff --git a/packages/standard-minifier-js/plugin/minify-js.js b/packages/standard-minifier-js/plugin/minify-js.js index 18ba055120..f0300a161f 100644 --- a/packages/standard-minifier-js/plugin/minify-js.js +++ b/packages/standard-minifier-js/plugin/minify-js.js @@ -23,13 +23,115 @@ meteorBabelMinifier.prototype.processFilesForBundle = function(files, options) { return; } + function maybeThrowMinifyErrorBySourceFile(error, file) { + var minifierErrorRegex = /^(.*?)\s?\((\d+):(\d+)\)$/; + var parseError = minifierErrorRegex.exec(error.message); + + if (!parseError) { + // If we were unable to parse it, just let the usual error handling work. + return; + } + + var lineErrorMessage = parseError[1]; + var lineErrorLineNumber = parseError[2]; + + var parseErrorContentIndex = lineErrorLineNumber - 1; + + // Unlikely, since we have a multi-line fixed header in this file. + if (parseErrorContentIndex < 0) { + return; + } + + /* + + What we're parsing looks like this: + + ///////////////////////////////////////// + // // + // path/to/file.js // + // // + ///////////////////////////////////////// + // 1 + var illegalECMAScript = true; // 2 + // 3 + ///////////////////////////////////////// + + Btw, the above code is intentionally not newer ECMAScript so + we don't break ourselves. + + */ + + var contents = file.getContentsAsString().split(/\n/); + var lineContent = contents[parseErrorContentIndex]; + + // Try to grab the line number, which sometimes doesn't exist on + // line, abnormally-long lines in a larger block. + var lineSrcLineParts = /^(.*?)(?:\s*\/\/ (\d+))?$/.exec(lineContent); + + // The line didn't match at all? Let's just not try. + if (!lineSrcLineParts) { + return; + } + + var lineSrcLineContent = lineSrcLineParts[1]; + var lineSrcLineNumber = lineSrcLineParts[2]; + + // Count backward from the failed line to find the filename. + for (var c = parseErrorContentIndex - 1; c >= 0; c--) { + var sourceLine = contents[c]; + + // If the line is a boatload of slashes, we're in the right place. + if (/^\/\/\/{6,}$/.test(sourceLine)) { + + // If 4 lines back is the same exact line, we've found the framing. + if (contents[c - 4] === sourceLine) { + + // So in that case, 2 lines back is the file path. + var parseErrorPath = contents[c - 2] + .substring(3) + .replace(/\s+\/\//, ""); + + var minError = new Error( + "Babili minification error " + + "within " + file.getPathInBundle() + ":\n" + + parseErrorPath + + (lineSrcLineNumber ? ", line " + lineSrcLineNumber : "") + "\n" + + "\n" + + lineErrorMessage + ":\n" + + "\n" + + lineSrcLineContent + "\n" + ); + + throw minError; + } + } + } + } + var allJs = ''; files.forEach(function (file) { // Don't reminify *.min.js. if (/\.min\.js$/.test(file.getPathInBundle())) { allJs += file.getContentsAsString(); } else { - allJs += meteorBabelMinify(file.getContentsAsString()).code; + var minified; + + try { + minified = meteorBabelMinify(file.getContentsAsString()); + + if (!(minified && typeof minified.code === "string")) { + throw new Error(); + } + } catch (err) { + var filePath = file.getPathInBundle(); + + maybeThrowMinifyErrorBySourceFile(err, file); + + err.message += " while minifying " + filePath; + throw err; + } + + allJs += minified.code; } allJs += '\n\n'; From 67fff9fa4d5bd364c4677015eefa54df128b7be1 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Tue, 14 Mar 2017 18:37:49 +0200 Subject: [PATCH 08/10] Add release date for 1.4.3.2 to `History.md`. --- History.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/History.md b/History.md index 2e80891038..a7ae881960 100644 --- a/History.md +++ b/History.md @@ -1,6 +1,6 @@ ## v.NEXT -## v1.4.3.2, TBD +## v1.4.3.2, 2017-03-14 * Node has been upgraded to version 4.8.0. From 7bc2b7ce5f508c2f67f1711a804b5c3f72a8f052 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Wed, 15 Mar 2017 11:18:37 -0400 Subject: [PATCH 09/10] Capitalize MeteorBabelMinifier. --- packages/standard-minifier-js/plugin/minify-js.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/standard-minifier-js/plugin/minify-js.js b/packages/standard-minifier-js/plugin/minify-js.js index f0300a161f..c1d699c6b2 100644 --- a/packages/standard-minifier-js/plugin/minify-js.js +++ b/packages/standard-minifier-js/plugin/minify-js.js @@ -2,13 +2,13 @@ Plugin.registerMinifier({ extensions: ['js'], archMatching: 'web' }, function () { - var minifier = new meteorBabelMinifier(); + var minifier = new MeteorBabelMinifier(); return minifier; }); -function meteorBabelMinifier () {}; +function MeteorBabelMinifier () {}; -meteorBabelMinifier.prototype.processFilesForBundle = function(files, options) { +MeteorBabelMinifier.prototype.processFilesForBundle = function(files, options) { var mode = options.minifyMode; // don't minify anything for development From 987b921f34bb8748a06b881d5b189967c28d3c9b Mon Sep 17 00:00:00 2001 From: Hugh Willson Date: Wed, 15 Mar 2017 11:47:12 -0400 Subject: [PATCH 10/10] Adjusted force-ssl to work with the forwarded header (RFC 7239). (#8440) * Adjusted force-ssl to work with the forwarded header (RFC 7239). * Fixed invalid Object.assign call. --- .../force-ssl-common/.npm/package/.gitignore | 1 + packages/force-ssl-common/.npm/package/README | 7 + .../.npm/package/npm-shrinkwrap.json | 254 ++++++++++++++++++ packages/force-ssl-common/README.md | 5 + packages/force-ssl-common/force_ssl_common.js | 32 +++ packages/force-ssl-common/force_ssl_tests.js | 112 ++++++++ packages/force-ssl-common/package.js | 19 ++ packages/force-ssl/README.md | 12 +- packages/force-ssl/force_ssl_both.js | 1 + packages/force-ssl/force_ssl_common.js | 1 - packages/force-ssl/force_ssl_server.js | 32 +-- packages/force-ssl/package.js | 9 +- 12 files changed, 450 insertions(+), 35 deletions(-) create mode 100644 packages/force-ssl-common/.npm/package/.gitignore create mode 100644 packages/force-ssl-common/.npm/package/README create mode 100644 packages/force-ssl-common/.npm/package/npm-shrinkwrap.json create mode 100644 packages/force-ssl-common/README.md create mode 100644 packages/force-ssl-common/force_ssl_common.js create mode 100644 packages/force-ssl-common/force_ssl_tests.js create mode 100644 packages/force-ssl-common/package.js create mode 100644 packages/force-ssl/force_ssl_both.js delete mode 100644 packages/force-ssl/force_ssl_common.js diff --git a/packages/force-ssl-common/.npm/package/.gitignore b/packages/force-ssl-common/.npm/package/.gitignore new file mode 100644 index 0000000000..3c3629e647 --- /dev/null +++ b/packages/force-ssl-common/.npm/package/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/force-ssl-common/.npm/package/README b/packages/force-ssl-common/.npm/package/README new file mode 100644 index 0000000000..3d492553a4 --- /dev/null +++ b/packages/force-ssl-common/.npm/package/README @@ -0,0 +1,7 @@ +This directory and the files immediately inside it are automatically generated +when you change this package's NPM dependencies. Commit the files in this +directory (npm-shrinkwrap.json, .gitignore, and this README) to source control +so that others run the same versions of sub-dependencies. + +You should NOT check in the node_modules directory that Meteor automatically +creates; if you are using git, the .gitignore file tells git to ignore it. diff --git a/packages/force-ssl-common/.npm/package/npm-shrinkwrap.json b/packages/force-ssl-common/.npm/package/npm-shrinkwrap.json new file mode 100644 index 0000000000..c38d2816a4 --- /dev/null +++ b/packages/force-ssl-common/.npm/package/npm-shrinkwrap.json @@ -0,0 +1,254 @@ +{ + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "from": "arr-diff@>=2.0.0 <3.0.0" + }, + "arr-flatten": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz", + "from": "arr-flatten@>=1.0.1 <2.0.0" + }, + "arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "from": "arr-map@>=2.0.0 <3.0.0" + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "from": "array-unique@>=0.2.1 <0.3.0" + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "from": "braces@>=1.8.2 <2.0.0" + }, + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "from": "commander@>=2.8.1 <3.0.0" + }, + "debug": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz", + "from": "debug@>=2.2.0 <3.0.0" + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "from": "deep-equal@>=1.0.1 <2.0.0" + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "from": "expand-brackets@>=0.1.4 <0.2.0" + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "from": "expand-range@>=1.8.1 <2.0.0" + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "from": "extglob@>=0.3.1 <0.4.0" + }, + "filename-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz", + "from": "filename-regex@>=2.0.0 <3.0.0" + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "from": "fill-range@>=2.1.0 <3.0.0" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "from": "for-in@>=1.0.1 <2.0.0" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "from": "for-own@>=0.1.4 <0.2.0" + }, + "forwarded-http": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/forwarded-http/-/forwarded-http-0.3.0.tgz", + "from": "forwarded-http@0.3.0" + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "from": "glob-base@>=0.3.0 <0.4.0" + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "from": "glob-parent@>=2.0.0 <3.0.0" + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "from": "graceful-readlink@>=1.0.0" + }, + "ip": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/ip/-/ip-0.3.3.tgz", + "from": "ip@>=0.3.2 <0.4.0" + }, + "ip-filter": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ip-filter/-/ip-filter-1.0.2.tgz", + "from": "ip-filter@>=1.0.0 <2.0.0" + }, + "ip-port-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ip-port-regex/-/ip-port-regex-1.0.0.tgz", + "from": "ip-port-regex@>=1.0.0 <2.0.0" + }, + "ip-regex": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-1.0.3.tgz", + "from": "ip-regex@>=1.0.3 <2.0.0" + }, + "is-arguments": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.2.tgz", + "from": "is-arguments@>=1.0.2 <2.0.0" + }, + "is-buffer": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz", + "from": "is-buffer@>=1.0.2 <2.0.0" + }, + "is-dotfile": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz", + "from": "is-dotfile@>=1.0.0 <2.0.0" + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "from": "is-equal-shallow@>=0.1.3 <0.2.0" + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "from": "is-extendable@>=0.1.1 <0.2.0" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "from": "is-extglob@>=1.0.0 <2.0.0" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "from": "is-glob@>=2.0.1 <3.0.0" + }, + "is-match": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/is-match/-/is-match-0.4.1.tgz", + "from": "is-match@>=0.4.0 <0.5.0" + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "from": "is-number@>=2.1.0 <3.0.0" + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "from": "is-posix-bracket@>=0.1.0 <0.2.0" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "from": "is-primitive@>=2.0.0 <3.0.0" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "from": "isarray@1.0.0" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "from": "isobject@>=2.0.0 <3.0.0" + }, + "kind-of": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz", + "from": "kind-of@>=3.0.2 <4.0.0" + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "from": "lazy-cache@>=1.0.3 <2.0.0" + }, + "make-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.0.tgz", + "from": "make-iterator@>=1.0.0 <2.0.0" + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "from": "micromatch@>=2.3.7 <3.0.0" + }, + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "from": "ms@0.7.2" + }, + "normalize-path": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz", + "from": "normalize-path@>=2.0.1 <3.0.0" + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "from": "object.omit@>=2.0.0 <3.0.0" + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "from": "parse-glob@>=3.0.4 <4.0.0" + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "from": "preserve@>=0.2.0 <0.3.0" + }, + "randomatic": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz", + "from": "randomatic@>=1.1.3 <2.0.0" + }, + "regex-cache": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "from": "regex-cache@>=0.4.2 <0.5.0" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "from": "repeat-element@>=1.1.2 <2.0.0" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "from": "repeat-string@>=1.5.2 <2.0.0" + }, + "to-file-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-file-path/-/to-file-path-1.0.0.tgz", + "from": "to-file-path@>=1.0.0 <2.0.0" + } + } +} diff --git a/packages/force-ssl-common/README.md b/packages/force-ssl-common/README.md new file mode 100644 index 0000000000..a0309c3510 --- /dev/null +++ b/packages/force-ssl-common/README.md @@ -0,0 +1,5 @@ +# force-ssl-common +[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/force-ssl-common) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/force-ssl-common) +*** + +This is an internal Meteor package. diff --git a/packages/force-ssl-common/force_ssl_common.js b/packages/force-ssl-common/force_ssl_common.js new file mode 100644 index 0000000000..e01afd099a --- /dev/null +++ b/packages/force-ssl-common/force_ssl_common.js @@ -0,0 +1,32 @@ +import forwarded from 'forwarded-http'; + +// Determine if the connection is only over localhost. Both we +// received it on localhost, and all proxies involved received on +// localhost (supports "forwarded" and "x-forwarded-for"). +const isLocalConnection = (req) => { + const localhostRegexp = /^\s*(127\.0\.0\.1|\[?::1\]?)\s*$/; + const request = Object.create(req); + request.connection = Object.assign( + {}, + req.connection, + { remoteAddress: req.connection.remoteAddress || req.socket.remoteAddress } + ); + const forwardedParams = forwarded(request); + let isLocal = true; + Object.keys(forwardedParams.for).forEach((forKey) => { + if (!localhostRegexp.test(forKey)) { + isLocal = false; + } + }); + return isLocal; +}; + +// Determine if the connection was over SSL at any point. Either we +// received it as SSL, or a proxy did and translated it for us. +const isSslConnection = (req) => { + const forwardedParams = forwarded(req); + return req.connection.pair + || forwardedParams.proto && forwardedParams.proto.indexOf('https') !== -1; +}; + +export { isLocalConnection, isSslConnection }; diff --git a/packages/force-ssl-common/force_ssl_tests.js b/packages/force-ssl-common/force_ssl_tests.js new file mode 100644 index 0000000000..256400e393 --- /dev/null +++ b/packages/force-ssl-common/force_ssl_tests.js @@ -0,0 +1,112 @@ +import { isLocalConnection, isSslConnection } from './force_ssl_common'; +import http from 'http'; + +Tinytest.add('force-ssl - check for a local connection', function (test) { + const req = new http.IncomingMessage(); + req.connection = { remoteAddress: null }; + req.socket = { remoteAddress: null }; + + // Remote address check (connection) + + ['127.0.0.1', '::1'].forEach((ip) => { + req.connection.remoteAddress = ip; + test.isTrue(isLocalConnection(req), 'Is a local connection'); + }); + + ['1.2.3.4', '2001:0db8:0000:0042:0000:8a2e:0370:7334'].forEach((ip) => { + req.connection.remoteAddress = ip; + test.isFalse(isLocalConnection(req), 'Not a local connection'); + }); + + // Remote address check (socket) + + ['127.0.0.1', '::1'].forEach((ip) => { + req.connection = {}; + req.socket.remoteAddress = ip; + test.isTrue(isLocalConnection(req), 'Is a local connection'); + }); + + ['1.2.3.4', '2001:0db8:0000:0042:0000:8a2e:0370:7334'].forEach((ip) => { + req.connection = {}; + req.socket.remoteAddress = ip; + test.isFalse(isLocalConnection(req), 'Not a local connection'); + }); + + // Header check + + const localHeaders = [ + { + name: 'forwarded', + value: 'for=127.0.0.1; proto=http', + ip: '127.0.0.1', + }, + { + name: 'forwarded', + value: 'for="[::1]"; proto=http', + ip: '::1', + }, + { + name: 'x-forwarded-for', + value: '127.0.0.1', + ip: '127.0.0.1', + }, + ]; + localHeaders.forEach((header) => { + req.connection.remoteAddress = header.ip; + req.headers[header.name] = header.value; + test.isTrue(isLocalConnection(req), 'Is a local connection'); + }); + + const remoteHeaders = [ + { + name: 'forwarded', + value: 'for=1.2.3.4; proto=http', + ip: '1.2.3.4', + }, + { + name: 'forwarded', + value: 'for=1.2.3.4; proto=http', + ip: '127.0.0.1', + }, + { + name: 'forwarded', + value: 'for="[2001:0db8:0000:0042:0000:8a2e:0370:7334]"; proto=http', + ip: '2001:0db8:0000:0042:0000:8a2e:0370:7334', + }, + { + name: 'x-forwarded-for', + value: '1.2.3.4', + ip: '1.2.3.4', + }, + { + name: 'x-forwarded-for', + value: '2001:0db8:0000:0042:0000:8a2e:0370:7334', + ip: '2001:0db8:0000:0042:0000:8a2e:0370:7334', + }, + ]; + remoteHeaders.forEach((header) => { + req.connection.remoteAddress = header.ip; + req.headers[header.name] = header.value; + test.isFalse(isLocalConnection(req), 'Not a local connection'); + }); +}); + +Tinytest.add('force-ssl - check for an SSL based connection', function (test) { + const req = new http.IncomingMessage(); + + req.connection = { pair: {} }; + test.isTrue(isSslConnection(req), 'Is an SSL based connection'); + + req.connection = {}; + req.headers = { forwarded: 'for=127.0.0.1; proto=https' }; + test.isTrue(isSslConnection(req), 'Is an SSL based connection'); + + req.headers = { 'x-forwarded-proto': 'https' }; + test.isTrue(isSslConnection(req), 'Is an SSL based connection'); + + req.headers = { forwarded: 'for=127.0.0.1; proto=http' }; + test.isFalse(isSslConnection(req), 'Is not an SSL based connection'); + + req.headers = { 'x-forwarded-proto': 'http' }; + test.isFalse(isSslConnection(req), 'Is not an SSL based connection'); +}); diff --git a/packages/force-ssl-common/package.js b/packages/force-ssl-common/package.js new file mode 100644 index 0000000000..fda41c4f54 --- /dev/null +++ b/packages/force-ssl-common/package.js @@ -0,0 +1,19 @@ +Package.describe({ + summary: 'Internal force-ssl common code.', + version: '1.0.14' +}); + +Npm.depends({ + 'forwarded-http': '0.3.0' +}); + +Package.onUse(function (api) { + api.use('ecmascript'); + api.mainModule('force_ssl_common.js', 'server'); +}); + +Package.onTest(function (api) { + api.use('ecmascript'); + api.use('tinytest'); + api.mainModule('force_ssl_tests.js', 'server'); +}); diff --git a/packages/force-ssl/README.md b/packages/force-ssl/README.md index 723f509afc..144ecd9edf 100644 --- a/packages/force-ssl/README.md +++ b/packages/force-ssl/README.md @@ -9,12 +9,14 @@ is always encrypted to protect users from active spoofing attacks. Meteor bundles (i.e. `meteor build`) do not include an HTTPS server or certificate. A proxy server that terminates SSL in front of a Meteor -bundle must set the standard `x-forwarded-proto` header for this package to work. +bundle must set the `x-forwarded-proto` or `forwarded` +([RFC 7239](https://tools.ietf.org/html/rfc7239)) header for this package to +work. -The `x-forwarded-proto` header is used to determine if the connection arrived -over HTTPS and a heuristic is used to guess if it's running in development. To -simplify development, unencrypted connections from `localhost` are always -accepted over HTTP. +The `x-forwarded-proto` or `forwarded` header is used to determine if the +connection arrived over HTTPS and a heuristic is used to guess if it's running +in development. To simplify development, unencrypted connections from +`localhost` are always accepted over HTTP. We recommend this package only for deployment platforms that do not have their own ability to force SSL. If you're deploying with diff --git a/packages/force-ssl/force_ssl_both.js b/packages/force-ssl/force_ssl_both.js new file mode 100644 index 0000000000..86e1bd0714 --- /dev/null +++ b/packages/force-ssl/force_ssl_both.js @@ -0,0 +1 @@ +Object.assign(Meteor.absoluteUrl.defaultOptions, { secure: true }); diff --git a/packages/force-ssl/force_ssl_common.js b/packages/force-ssl/force_ssl_common.js deleted file mode 100644 index 00b121f8b4..0000000000 --- a/packages/force-ssl/force_ssl_common.js +++ /dev/null @@ -1 +0,0 @@ -_.extend(Meteor.absoluteUrl.defaultOptions, {secure: true}); diff --git a/packages/force-ssl/force_ssl_server.js b/packages/force-ssl/force_ssl_server.js index b050a172fc..6c31cc6217 100644 --- a/packages/force-ssl/force_ssl_server.js +++ b/packages/force-ssl/force_ssl_server.js @@ -1,4 +1,5 @@ var url = Npm.require("url"); +import { isLocalConnection, isSslConnection } from 'meteor/force-ssl-common'; // Unfortunately we can't use a connect middleware here since // sockjs installs itself prior to all existing listeners @@ -16,29 +17,10 @@ httpServer.addListener('request', function (req, res) { // localhost (development mode). // // Note: someone could trick us into serving over non-ssl by setting - // x-forwarded-for or x-forwarded-proto. Not much we can do there if - // we still want to operate behind proxies. + // x-forwarded-for, x-forwarded-proto, forwarded, etc. Not much we can do + // there if we still want to operate behind proxies. - var remoteAddress = - req.connection.remoteAddress || req.socket.remoteAddress; - // Determine if the connection is only over localhost. Both we - // received it on localhost, and all proxies involved received on - // localhost. - var localhostRegexp = /^\s*(127\.0\.0\.1|::1)\s*$/; - var isLocal = ( - localhostRegexp.test(remoteAddress) && - (!req.headers['x-forwarded-for'] || - _.all(req.headers['x-forwarded-for'].split(','), function (x) { - return localhostRegexp.test(x); - }))); - - // Determine if the connection was over SSL at any point. Either we - // received it as SSL, or a proxy did and translated it for us. - var isSsl = req.connection.pair || - (req.headers['x-forwarded-proto'] && - req.headers['x-forwarded-proto'].indexOf('https') !== -1); - - if (!isLocal && !isSsl) { + if (!isLocalConnection(req) && !isSslConnection(req)) { // connection is not cool. send a 302 redirect! var host = url.parse(Meteor.absoluteUrl()).hostname; @@ -57,7 +39,7 @@ httpServer.addListener('request', function (req, res) { // connection is OK. Proceed normally. var args = arguments; - _.each(oldHttpServerListeners, function(oldListener) { + oldHttpServerListeners.forEach((oldListener) => { oldListener.apply(httpServer, args); }); }); @@ -67,8 +49,8 @@ httpServer.addListener('request', function (req, res) { // // Websockets come in via the 'upgrade' request. We can override this, // however the problem is we're not sure if the websocket is actually -// encrypted. We don't get x-forwarded-for or x-forwarded-proto on -// websockets. It's possible the 'sec-websocket-origin' header does +// encrypted. We don't get x-forwarded-for, x-forwarded-proto, forwarded, etc. +// on websockets. It's possible the 'sec-websocket-origin' header does // what we want, but that's not clear. // // For now, this package allows raw unencrypted DDP connections over diff --git a/packages/force-ssl/package.js b/packages/force-ssl/package.js index 76f2e6a095..bc9c4bf6ed 100644 --- a/packages/force-ssl/package.js +++ b/packages/force-ssl/package.js @@ -1,18 +1,19 @@ Package.describe({ summary: "Require this application to use HTTPS", - version: "1.0.13", + version: "1.0.14", prodOnly: true }); Package.onUse(function (api) { + api.use('ecmascript'); api.use('webapp', 'server'); - api.use('underscore'); // make sure we come after livedata, so we load after the sockjs // server has been instantiated. api.use('ddp', 'server'); + api.use('force-ssl-common', 'server'); - api.addFiles('force_ssl_common.js', ['client', 'server']); - api.addFiles('force_ssl_server.js', 'server'); + api.mainModule('force_ssl_both.js', ['client', 'server']); + api.mainModule('force_ssl_server.js', 'server'); // Another thing we could do is add a force_ssl_client.js file that // makes sure document.location.protocol is 'https'. If it detected