Merge branch 'release-1.4.3.x' into release-1.5

This commit is contained in:
Ben Newman
2017-03-17 19:13:27 -04:00
34 changed files with 918 additions and 493 deletions

View File

@@ -1,7 +1,46 @@
## v.NEXT
* The `meteor-babel` npm package has been upgraded to version 0.15.2,
with support for dynamic `import(...)` syntax.
* Running `meteor add dynamic-import` installs support for ECMAScript
[dynamic `import(...)`](https://github.com/tc39/proposal-dynamic-import),
a new language feature which allows for asynchronous module fetching
(sometimes referred to as "code splitting"). See this [blog
post](https://blog.meteor.com/meteor-1-5-react-loadable-f029a320e59c)
and [PR #8327](https://github.com/meteor/meteor/pull/8327) for more
information about how dynamic `import(...)` works in Meteor, and how to
use it in your applications.
## v1.4.3.3, TBD
* Thanks to the outstanding efforts of @sethmurphy18, the `minifier-js`
package now uses [Babili](https://github.com/babel/babili) instead of
[UglifyJS](https://github.com/mishoo/UglifyJS2), resolving numerous
long-standing bugs due to UglifyJS's poor support for ES2015+ syntax.
[Issue #8378](https://github.com/meteor/meteor/issues/8378)
[PR #8397](https://github.com/meteor/meteor/pull/8397)
* The `meteor-babel` npm package has been upgraded to version 0.18.0, and
`reify` has been upgraded to version 0.5.1, fixing several subtle bugs
introduced by Meteor 1.4.3 (see below), including
[issue #8461](https://github.com/meteor/meteor/issues/8461).
* The `reify` npm package has been upgraded to version 0.5.1.
* The Reify module compiler is now a Babel plugin, making it possible for
other custom Babel plugins configured in `.babelrc` or `package.json`
files to run before Reify, fixing bugs that resulted from running Reify
before other plugins in Meteor 1.4.3.
[Issue #8399](https://github.com/meteor/meteor/issues/8399)
[Issue #8422](https://github.com/meteor/meteor/issues/8422)
[`meteor-babel` issue #13](https://github.com/meteor/babel/issues/13)
* Two new `export ... from ...` syntax extensions are now supported:
```js
export * as namespace from "./module"
export def from "./module"
```
Read the ECMA262 proposals here:
* https://github.com/leebyron/ecmascript-export-ns-from
* https://github.com/leebyron/ecmascript-export-default-from
## v1.4.3.2, 2017-03-14

View File

@@ -5,11 +5,6 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.11.tgz",
"from": "acorn@>=4.0.5 <4.1.0"
},
"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"
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -21,8 +16,8 @@
"from": "ansi-styles@>=2.2.1 <3.0.0"
},
"ast-types": {
"version": "0.9.5",
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.5.tgz",
"version": "0.9.6",
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz",
"from": "ast-types@>=0.9.5 <0.10.0"
},
"babel-code-frame": {
@@ -31,14 +26,14 @@
"from": "babel-code-frame@>=6.22.0 <7.0.0"
},
"babel-core": {
"version": "6.23.1",
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.23.1.tgz",
"version": "6.24.0",
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.24.0.tgz",
"from": "babel-core@>=6.22.1 <7.0.0"
},
"babel-generator": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.23.0.tgz",
"from": "babel-generator@>=6.23.0 <7.0.0"
"version": "6.24.0",
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.24.0.tgz",
"from": "babel-generator@>=6.24.0 <7.0.0"
},
"babel-helper-builder-react-jsx": {
"version": "6.23.0",
@@ -55,6 +50,16 @@
"resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.23.0.tgz",
"from": "babel-helper-define-map@>=6.23.0 <7.0.0"
},
"babel-helper-evaluate-path": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.0.3.tgz",
"from": "babel-helper-evaluate-path@>=0.0.3 <0.0.4"
},
"babel-helper-flip-expressions": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.0.2.tgz",
"from": "babel-helper-flip-expressions@>=0.0.2 <0.0.3"
},
"babel-helper-function-name": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz",
@@ -70,6 +75,21 @@
"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"
},
"babel-helper-is-nodes-equiv": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz",
"from": "babel-helper-is-nodes-equiv@>=0.0.1 <0.0.2"
},
"babel-helper-is-void-0": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.0.1.tgz",
"from": "babel-helper-is-void-0@>=0.0.1 <0.0.2"
},
"babel-helper-mark-eval-scopes": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.0.3.tgz",
"from": "babel-helper-mark-eval-scopes@>=0.0.3 <0.0.4"
},
"babel-helper-optimise-call-expression": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.23.0.tgz",
@@ -80,11 +100,21 @@
"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"
},
"babel-helper-remove-or-void": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.0.1.tgz",
"from": "babel-helper-remove-or-void@>=0.0.1 <0.0.2"
},
"babel-helper-replace-supers": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.23.0.tgz",
"from": "babel-helper-replace-supers@>=6.23.0 <7.0.0"
},
"babel-helper-to-multiple-sequence-expressions": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.0.3.tgz",
"from": "babel-helper-to-multiple-sequence-expressions@>=0.0.3 <0.0.4"
},
"babel-helpers": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.23.0.tgz",
@@ -100,6 +130,70 @@
"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.22.0 <7.0.0"
},
"babel-plugin-minify-constant-folding": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.0.4.tgz",
"from": "babel-plugin-minify-constant-folding@>=0.0.4 <0.0.5",
"dependencies": {
"jsesc": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.4.0.tgz",
"from": "jsesc@>=2.4.0 <3.0.0"
}
}
},
"babel-plugin-minify-dead-code-elimination": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.1.4.tgz",
"from": "babel-plugin-minify-dead-code-elimination@>=0.1.3 <0.2.0"
},
"babel-plugin-minify-flip-comparisons": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.0.2.tgz",
"from": "babel-plugin-minify-flip-comparisons@>=0.0.2 <0.0.3"
},
"babel-plugin-minify-guarded-expressions": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.0.4.tgz",
"from": "babel-plugin-minify-guarded-expressions@>=0.0.4 <0.0.5"
},
"babel-plugin-minify-infinity": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.0.3.tgz",
"from": "babel-plugin-minify-infinity@>=0.0.3 <0.0.4"
},
"babel-plugin-minify-mangle-names": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.0.7.tgz",
"from": "babel-plugin-minify-mangle-names@>=0.0.7 <0.0.8",
"dependencies": {
"babel-helper-mark-eval-scopes": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.0.2.tgz",
"from": "babel-helper-mark-eval-scopes@>=0.0.2 <0.0.3"
}
}
},
"babel-plugin-minify-numeric-literals": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.0.1.tgz",
"from": "babel-plugin-minify-numeric-literals@>=0.0.1 <0.0.2"
},
"babel-plugin-minify-replace": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.0.1.tgz",
"from": "babel-plugin-minify-replace@>=0.0.1 <0.0.2"
},
"babel-plugin-minify-simplify": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.0.7.tgz",
"from": "babel-plugin-minify-simplify@>=0.0.7 <0.0.8"
},
"babel-plugin-minify-type-constructors": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.0.3.tgz",
"from": "babel-plugin-minify-type-constructors@>=0.0.3 <0.0.4"
},
"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",
@@ -176,10 +270,15 @@
"from": "babel-plugin-transform-es2015-literals@>=6.22.0 <7.0.0"
},
"babel-plugin-transform-es2015-modules-commonjs": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.23.0.tgz",
"version": "6.24.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.0.tgz",
"from": "babel-plugin-transform-es2015-modules-commonjs@>=6.22.0 <7.0.0"
},
"babel-plugin-transform-es2015-modules-reify": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-reify/-/babel-plugin-transform-es2015-modules-reify-0.5.0.tgz",
"from": "babel-plugin-transform-es2015-modules-reify@>=0.5.0 <0.6.0"
},
"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",
@@ -230,11 +329,36 @@
"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.22.0 <7.0.0"
},
"babel-plugin-transform-inline-consecutive-adds": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.0.2.tgz",
"from": "babel-plugin-transform-inline-consecutive-adds@>=0.0.2 <0.0.3"
},
"babel-plugin-transform-member-expression-literals": {
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.8.1.tgz",
"from": "babel-plugin-transform-member-expression-literals@>=6.8.1 <7.0.0"
},
"babel-plugin-transform-merge-sibling-variables": {
"version": "6.8.2",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.8.2.tgz",
"from": "babel-plugin-transform-merge-sibling-variables@>=6.8.2 <7.0.0"
},
"babel-plugin-transform-minify-booleans": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.8.0.tgz",
"from": "babel-plugin-transform-minify-booleans@>=6.8.0 <7.0.0"
},
"babel-plugin-transform-object-rest-spread": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz",
"from": "babel-plugin-transform-object-rest-spread@>=6.22.0 <7.0.0"
},
"babel-plugin-transform-property-literals": {
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.8.1.tgz",
"from": "babel-plugin-transform-property-literals@>=6.8.1 <7.0.0"
},
"babel-plugin-transform-react-display-name": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.23.0.tgz",
@@ -260,25 +384,60 @@
"resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.22.0.tgz",
"from": "babel-plugin-transform-regenerator@>=6.22.0 <7.0.0"
},
"babel-plugin-transform-regexp-constructors": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.0.5.tgz",
"from": "babel-plugin-transform-regexp-constructors@>=0.0.5 <0.0.6"
},
"babel-plugin-transform-remove-console": {
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.8.1.tgz",
"from": "babel-plugin-transform-remove-console@>=6.8.0 <7.0.0"
},
"babel-plugin-transform-remove-debugger": {
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.8.1.tgz",
"from": "babel-plugin-transform-remove-debugger@>=6.8.0 <7.0.0"
},
"babel-plugin-transform-remove-undefined": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.0.5.tgz",
"from": "babel-plugin-transform-remove-undefined@>=0.0.5 <0.0.6"
},
"babel-plugin-transform-runtime": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz",
"from": "babel-plugin-transform-runtime@>=6.22.0 <7.0.0"
},
"babel-plugin-transform-simplify-comparison-operators": {
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.8.1.tgz",
"from": "babel-plugin-transform-simplify-comparison-operators@>=6.8.1 <7.0.0"
},
"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"
},
"babel-plugin-transform-undefined-to-void": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.8.0.tgz",
"from": "babel-plugin-transform-undefined-to-void@>=6.8.0 <7.0.0"
},
"babel-preset-babili": {
"version": "0.0.11",
"resolved": "https://registry.npmjs.org/babel-preset-babili/-/babel-preset-babili-0.0.11.tgz",
"from": "babel-preset-babili@>=0.0.11 <0.0.12"
},
"babel-preset-flow": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz",
"from": "babel-preset-flow@>=6.23.0 <7.0.0"
},
"babel-preset-meteor": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-6.22.0.tgz",
"from": "babel-preset-meteor@6.22.0"
"version": "6.24.0",
"resolved": "https://registry.npmjs.org/babel-preset-meteor/-/babel-preset-meteor-6.24.0.tgz",
"from": "babel-preset-meteor@6.24.0"
},
"babel-preset-react": {
"version": "6.23.0",
@@ -286,13 +445,13 @@
"from": "babel-preset-react@>=6.22.0 <7.0.0"
},
"babel-register": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.23.0.tgz",
"from": "babel-register@>=6.23.0 <7.0.0"
"version": "6.24.0",
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.24.0.tgz",
"from": "babel-register@>=6.24.0 <7.0.0"
},
"babel-runtime": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.22.0.tgz",
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz",
"from": "babel-runtime@>=6.22.0 <7.0.0"
},
"babel-template": {
@@ -311,8 +470,8 @@
"from": "babel-types@>=6.22.0 <7.0.0"
},
"babylon": {
"version": "6.15.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.15.0.tgz",
"version": "6.16.1",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.16.1.tgz",
"from": "babylon@>=6.15.0 <7.0.0"
},
"balanced-match": {
@@ -346,8 +505,8 @@
"from": "core-js@>=2.4.0 <3.0.0"
},
"debug": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz",
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.3.tgz",
"from": "debug@>=2.1.1 <3.0.0"
},
"detect-indent": {
@@ -366,8 +525,8 @@
"from": "esutils@>=2.0.2 <3.0.0"
},
"globals": {
"version": "9.15.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-9.15.0.tgz",
"version": "9.16.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-9.16.0.tgz",
"from": "globals@>=9.0.0 <10.0.0"
},
"has-ansi": {
@@ -410,6 +569,16 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
"from": "lodash@>=4.17.4 <5.0.0"
},
"lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"from": "lodash.isplainobject@>=4.0.6 <5.0.0"
},
"lodash.some": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz",
"from": "lodash.some@>=4.6.0 <5.0.0"
},
"loose-envify": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
@@ -421,9 +590,9 @@
"from": "magic-string@>=0.19.0 <0.20.0"
},
"meteor-babel": {
"version": "0.15.2",
"resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-0.15.2.tgz",
"from": "meteor-babel@0.15.2"
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/meteor-babel/-/meteor-babel-0.18.0.tgz",
"from": "meteor-babel@0.18.0"
},
"meteor-babel-helpers": {
"version": "0.0.3",
@@ -481,8 +650,8 @@
"from": "regenerate@>=1.2.1 <2.0.0"
},
"regenerator-runtime": {
"version": "0.10.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz",
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz",
"from": "regenerator-runtime@>=0.10.0 <0.11.0"
},
"regenerator-transform": {
@@ -513,9 +682,9 @@
}
},
"reify": {
"version": "0.4.9",
"resolved": "https://registry.npmjs.org/reify/-/reify-0.4.9.tgz",
"from": "reify@>=0.4.8 <0.5.0"
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/reify/-/reify-0.5.3.tgz",
"from": "reify@>=0.5.1 <0.6.0"
},
"repeating": {
"version": "2.0.1",
@@ -533,8 +702,8 @@
"from": "source-map@>=0.5.0 <0.6.0"
},
"source-map-support": {
"version": "0.4.11",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.11.tgz",
"version": "0.4.13",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.13.tgz",
"from": "source-map-support@>=0.4.2 <0.5.0"
},
"strip-ansi": {

View File

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

View File

@@ -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.15.0-beta.11'
version: '6.19.0-beta.11'
});
Npm.depends({
'meteor-babel': '0.15.2'
'meteor-babel': '0.18.0'
});
Package.onUse(function (api) {

View File

@@ -1583,92 +1583,92 @@ _.extend(Server.prototype, {
});
},
call: function (name /*, arguments */) {
// if it's a function, the last argument is the result callback,
// not a parameter to the remote method.
var args = Array.prototype.slice.call(arguments, 1);
if (args.length && typeof args[args.length - 1] === "function")
call: function (name, ...args) {
if (args.length && typeof args[args.length - 1] === "function") {
// If it's a function, the last argument is the result callback, not
// a parameter to the remote method.
var callback = args.pop();
}
return this.apply(name, args, callback);
},
// @param options {Optional Object}
// @param callback {Optional Function}
apply: function (name, args, options, callback) {
var self = this;
// A version of the call method that always returns a Promise.
callAsync: function (name, ...args) {
return this.applyAsync(name, args);
},
apply: function (name, args, options, callback) {
// We were passed 3 arguments. They may be either (name, args, options)
// or (name, args, callback)
if (!callback && typeof options === 'function') {
if (! callback && typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
if (callback)
// It's not really necessary to do this, since we immediately
// run the callback in this fiber before returning, but we do it
// anyway for regularity.
// XXX improve error message (and how we report it)
callback = Meteor.bindEnvironment(
callback,
"delivering result of invoking '" + name + "'"
);
// Run the handler
var handler = self.method_handlers[name];
var exception;
if (!handler) {
exception = new Meteor.Error(404, `Method '${name}' not found`);
} else {
// If this is a method call from within another method, get the
// user state from the outer method, otherwise don't allow
// setUserId to be called
var userId = null;
var setUserId = function() {
throw new Error("Can't call setUserId on a server initiated method call");
};
var connection = null;
var currentInvocation = DDP._CurrentInvocation.get();
if (currentInvocation) {
userId = currentInvocation.userId;
setUserId = function(userId) {
currentInvocation.setUserId(userId);
};
connection = currentInvocation.connection;
}
var invocation = new DDPCommon.MethodInvocation({
isSimulation: false,
userId: userId,
setUserId: setUserId,
connection: connection,
randomSeed: DDPCommon.makeRpcSeed(currentInvocation, name)
});
try {
var result = DDP._CurrentInvocation.withValue(invocation, function () {
return maybeAuditArgumentChecks(
handler, invocation, EJSON.clone(args), "internal call to '" +
name + "'");
});
result = EJSON.clone(result);
} catch (e) {
exception = e;
}
options = options || {};
}
const promise = this.applyAsync(name, args, options);
// Return the result in whichever way the caller asked for it. Note that we
// do NOT block on the write fence in an analogous way to how the client
// blocks on the relevant data being visible, so you are NOT guaranteed that
// cursor observe callbacks have fired when your callback is invoked. (We
// can change this if there's a real use case.)
if (callback) {
callback(exception, result);
return undefined;
promise.then(
result => callback(undefined, result),
exception => callback(exception)
);
} else {
return promise.await();
}
if (exception)
throw exception;
return result;
},
// @param options {Optional Object}
applyAsync: function (name, args, options) {
// Run the handler
var handler = this.method_handlers[name];
if (! handler) {
return Promise.reject(
new Meteor.Error(404, `Method '${name}' not found`)
);
}
// If this is a method call from within another method, get the
// user state from the outer method, otherwise don't allow
// setUserId to be called
var userId = null;
var setUserId = function() {
throw new Error("Can't call setUserId on a server initiated method call");
};
var connection = null;
var currentInvocation = DDP._CurrentInvocation.get();
if (currentInvocation) {
userId = currentInvocation.userId;
setUserId = function(userId) {
currentInvocation.setUserId(userId);
};
connection = currentInvocation.connection;
}
var invocation = new DDPCommon.MethodInvocation({
isSimulation: false,
userId,
setUserId,
connection,
randomSeed: DDPCommon.makeRpcSeed(currentInvocation, name)
});
return new Promise(resolve => resolve(
DDP._CurrentInvocation.withValue(
invocation,
() => maybeAuditArgumentChecks(
handler, invocation, EJSON.clone(args),
"internal call to '" + name + "'"
)
)
)).then(EJSON.clone);
},
_urlForSession: function (sessionId) {

View File

@@ -266,6 +266,16 @@ Tinytest.addAsync(
)
);
const serverCallAsyncPromise = Meteor.server.callAsync(
"testResolvedPromise",
"Meteor.server.callAsync"
);
const serverApplyAsyncPromise = Meteor.server.applyAsync(
"testResolvedPromise",
["Meteor.server.applyAsync"]
);
const clientCallRejectedPromise = new Promise(resolve => {
clientConn.call(
"testRejectedPromise",
@@ -277,9 +287,13 @@ Tinytest.addAsync(
Promise.all([
clientCallPromise,
clientCallRejectedPromise,
serverCallAsyncPromise,
serverApplyAsyncPromise
]).then(results => test.equal(results, [
"clientConn.call with callback after waiting",
"[with callback raised Meteor.Error]",
"Meteor.server.callAsync after waiting",
"Meteor.server.applyAsync after waiting"
]), error => test.fail(error))
.then(onComplete);
})

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Meteor's latency-compensated distributed data server",
version: '1.3.13',
version: '1.3.14-beta.4',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'ecmascript',
version: '0.7.0-beta.11',
version: '0.8.0-beta.11',
summary: 'Compiler plugin that supports ES2015+ in all .js files',
documentation: 'README.md'
});

View File

@@ -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"
}
}
}

View File

@@ -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.

View File

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

View File

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

View File

@@ -0,0 +1,19 @@
Package.describe({
summary: 'Internal force-ssl common code.',
version: '1.0.14-beta.4'
});
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');
});

View File

@@ -1,20 +1,25 @@
# force-ssl
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/force-ssl) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/force-ssl)
***
This package, part of [Webapp](https://github.com/meteor/meteor/tree/master/packages/webapp), causes
Meteor to redirect insecure connections (HTTP) to a secure URL
(HTTPS). Use this package to ensure that communication to the server
is always encrypted to protect users from active spoofing attacks.
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/force-ssl) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/force-ssl)
## Purpose
This package, part of
[Webapp](https://github.com/meteor/meteor/tree/master/packages/webapp),
causes Meteor to redirect insecure connections (HTTP) to a secure URL
(HTTPS). Use this package to ensure that communication to the server 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

View File

@@ -0,0 +1 @@
Object.assign(Meteor.absoluteUrl.defaultOptions, { secure: true });

View File

@@ -1 +0,0 @@
_.extend(Meteor.absoluteUrl.defaultOptions, {secure: true});

View File

@@ -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

View File

@@ -1,18 +1,19 @@
Package.describe({
summary: "Require this application to use HTTPS",
version: "1.0.13",
version: "1.0.14-beta.4",
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

View File

@@ -2,14 +2,14 @@
Package.describe({
summary: "Markdown-to-HTML processor",
version: "1.0.11"
version: "1.0.12"
});
Package.onUse(function (api) {
api.addFiles("showdown.js");
api.export('Showdown');
api.use("templating", "client", {weak: true});
api.use("templating@1.3.1", "client", {weak: true});
api.addFiles('template-integration.js', 'client');
});

View File

@@ -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"
}
}
}

View File

@@ -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 <https://github.com/mishoo/UglifyJS2#the-simple-way> and
// <http://lisperator.net/uglifyjs/codegen> 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' +
'};');
});

View File

@@ -1,2 +1 @@
UglifyJS = Npm.require('uglify-js');
UglifyJSMinify = UglifyJS.minify;
meteorBabelMinify = Babel.minify;

View File

@@ -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-beta.4"
});
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');
});

View File

@@ -11,8 +11,8 @@
"from": "acorn-es7-plugin@>=1.1.0 <1.2.0"
},
"ast-types": {
"version": "0.9.5",
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.5.tgz",
"version": "0.9.6",
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz",
"from": "ast-types@>=0.9.5 <0.10.0"
},
"magic-string": {
@@ -21,9 +21,9 @@
"from": "magic-string@>=0.19.0 <0.20.0"
},
"reify": {
"version": "0.4.9",
"resolved": "https://registry.npmjs.org/reify/-/reify-0.4.9.tgz",
"from": "reify@0.4.9"
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/reify/-/reify-0.5.1.tgz",
"from": "reify@0.5.1"
},
"vlq": {
"version": "0.2.1",

View File

@@ -1,12 +1,12 @@
Package.describe({
name: "modules",
version: "0.8.0-beta.11",
version: "0.9.0-beta.11",
summary: "CommonJS module system",
documentation: "README.md"
});
Npm.depends({
reify: "0.4.9"
reify: "0.5.1"
});
Package.onUse(function(api) {

View File

@@ -1,23 +1,20 @@
Package.describe({
name: 'standard-minifier-js',
version: '1.2.3',
version: '2.0.0-beta.4',
summary: 'Standard javascript minifiers used with Meteor apps by default.',
documentation: 'README.md'
documentation: 'README.md',
});
Package.registerBuildPlugin({
name: "minifyStdJS",
use: [
'minifier-js'
'minifier-js',
],
sources: [
'plugin/minify-js.js'
]
'plugin/minify-js.js',
],
});
Package.onUse(function(api) {
api.use('isobuild:minifier-plugin@1.0.0');
});
Package.onTest(function(api) {
});

View File

@@ -1,14 +1,14 @@
Plugin.registerMinifier({
extensions: ["js"],
archMatching: "web"
extensions: ['js'],
archMatching: 'web'
}, function () {
var minifier = new UglifyJSMinifier();
var minifier = new MeteorBabelMinifier();
return minifier;
});
function UglifyJSMinifier () {};
function MeteorBabelMinifier () {};
UglifyJSMinifier.prototype.processFilesForBundle = function (files, options) {
MeteorBabelMinifier.prototype.processFilesForBundle = function(files, options) {
var mode = options.minifyMode;
// don't minify anything for development
@@ -17,96 +17,92 @@ UglifyJSMinifier.prototype.processFilesForBundle = function (files, options) {
file.addJavaScript({
data: file.getContentsAsBuffer(),
sourceMap: file.getSourceMap(),
path: file.getPathInBundle()
path: file.getPathInBundle(),
});
});
return;
}
var minifyOptions = {
fromString: true,
compress: {
drop_debugger: false,
unused: false,
dead_code: false
}
};
function maybeThrowMinifyErrorBySourceFile(error, file) {
var minifierErrorRegex = /\(line: (\d+), col: (\d+), pos: (\d+)\)/;
var parseError = minifierErrorRegex.exec(error.toString());
var minifierErrorRegex = /^(.*?)\s?\((\d+):(\d+)\)$/;
var parseError = minifierErrorRegex.exec(error.message);
if (parseError) {
var lineErrorMessage = parseError[0];
var lineErrorLineNumber = parseError[1];
if (!parseError) {
// If we were unable to parse it, just let the usual error handling work.
return;
}
var parseErrorContentIndex = lineErrorLineNumber - 1;
var lineErrorMessage = parseError[1];
var lineErrorLineNumber = parseError[2];
// Unlikely, since we have a multi-line fixed header in this file.
if (parseErrorContentIndex < 0) {
return;
}
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
/////////////////////////////////////////
What we're parsing looks like this:
Btw, the above code is intentionally not newer ECMAScript so
we don't break ourselves.
/////////////////////////////////////////
// //
// 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);
var contents = file.getContentsAsString().split(/\n/);
var lineContent = contents[parseErrorContentIndex];
// The line didn't match at all? Let's just not try.
if (!lineSrcLineParts) {
return;
}
// 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);
var lineSrcLineContent = lineSrcLineParts[1];
var lineSrcLineNumber = lineSrcLineParts[2];
// The line didn't match at all? Let's just not try.
if (!lineSrcLineParts) {
return;
}
// Count backward from the failed line to find the filename.
for (var c = parseErrorContentIndex - 1; c >= 0; c--) {
var sourceLine = contents[c];
var lineSrcLineContent = lineSrcLineParts[1];
var lineSrcLineNumber = lineSrcLineParts[2];
// If the line is a boatload of slashes, we're in the right place.
if (/^\/\/\/{6,}$/.test(sourceLine)) {
// Count backward from the failed line to find the filename.
for (var c = parseErrorContentIndex - 1; c >= 0; c--) {
var sourceLine = contents[c];
// If 4 lines back is the same exact line, we've found the framing.
if (contents[c - 4] === sourceLine) {
// If the line is a boatload of slashes, we're in the right place.
if (/^\/\/\/{6,}$/.test(sourceLine)) {
// So in that case, 2 lines back is the file path.
var parseErrorPath = contents[c - 2]
.substring(3)
.replace(/\s+\/\//, "");
// If 4 lines back is the same exact line, we've found the framing.
if (contents[c - 4] === sourceLine) {
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"
);
// So in that case, 2 lines back is the file path.
var parseErrorPath = contents[c - 2]
.substring(3)
.replace(/\s+\/\//, "");
throw minError;
}
var minError = new Error(
"Babili minification error " +
"within " + file.getPathInBundle() + ":\n" +
parseErrorPath +
(lineSrcLineNumber ? ", line " + lineSrcLineNumber : "") + "\n" +
"\n" +
lineErrorMessage + ":\n" +
"\n" +
lineSrcLineContent + "\n"
);
throw minError;
}
}
}
@@ -114,32 +110,33 @@ UglifyJSMinifier.prototype.processFilesForBundle = function (files, options) {
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();
// Don't reminify *.min.js.
if (/\.min\.js$/.test(file.getPathInBundle())) {
allJs += file.getContentsAsString();
} else {
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;
}
} 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';
allJs += minified.code;
}
allJs += '\n\n';
Plugin.nudge();
});
Plugin.nudge();
});
if (files.length) {
files[0].addJavaScript({ data: allJs });

View File

@@ -1,12 +1,13 @@
Package.describe({
name: 'standard-minifiers',
version: '1.0.6',
version: '1.1.0-beta.4',
summary: 'Standard minifiers used with Meteor apps by default.',
documentation: 'README.md'
});
Package.onUse(function(api) {
api.imply(['standard-minifier-css','standard-minifier-js']);
api.imply([
'standard-minifier-css',
'standard-minifier-js'
]);
});
Package.onTest(function(api) {});

View File

@@ -14,7 +14,7 @@ var packageJson = {
npm: "4.3.0",
"node-gyp": "3.5.0",
"node-pre-gyp": "0.6.33",
"meteor-babel": "0.15.2",
"meteor-babel": "0.18.0",
"meteor-promise": "0.8.0",
fibers: "1.0.15",
promise: "7.1.1",

View File

@@ -4,23 +4,23 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
meteor-base@1.0.4 # Packages every Meteor app needs to have
mobile-experience@1.0.4 # Packages for a great mobile UX
mongo@1.1.15 # The database Meteor supports right now
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
session@1.1.7 # Client-side reactive dictionary for your app
jquery@1.11.10 # Helpful client-side library
tracker@1.1.2 # Meteor's client-side reactive programming library
meteor-base # Packages every Meteor app needs to have
mobile-experience # Packages for a great mobile UX
mongo # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views
session # Client-side reactive dictionary for your app
jquery # Helpful client-side library
tracker # Meteor's client-side reactive programming library
es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers.
ecmascript@0.6.3 # Enable ECMAScript2015+ syntax in app code
es5-shim # ECMAScript 5 compatibility for older browsers.
ecmascript # Enable ECMAScript2015+ syntax in app code
coffeescript@1.11.1_4
coffeescript
modules-test-package
dispatch:mocha-phantomjs
dispatch:mocha-browser
standard-minifier-css@1.3.3
standard-minifier-js@1.2.2
standard-minifier-css
standard-minifier-js
client-only-ecmascript
modules-test-plugin
shell-server@0.2.2
shell-server

View File

@@ -1,81 +0,0 @@
allow-deny@1.0.5
autoupdate@1.3.12
babel-compiler@6.14.1
babel-runtime@1.0.1
base64@1.0.10
binary-heap@1.0.10
blaze@2.3.0
blaze-html-templates@1.1.0
blaze-tools@1.0.10
boilerplate-generator@1.0.11
caching-compiler@1.1.9
caching-html-compiler@1.1.0
callback-hook@1.0.10
check@1.2.4
client-only-ecmascript@0.0.1
coffeescript@1.11.1_4
ddp@1.2.5
ddp-client@1.3.3
ddp-common@1.2.8
ddp-server@1.3.13
deps@1.0.12
diff-sequence@1.0.7
dispatch:mocha-browser@0.0.3
dispatch:mocha-core@0.0.2
dispatch:mocha-phantomjs@0.1.5
dispatch:phantomjs-tests@0.0.7
ecmascript@0.6.3
ecmascript-runtime@0.3.15
ejson@1.0.13
es5-shim@4.6.15
fastclick@1.0.13
geojson-utils@1.0.10
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.2.11
id-map@1.0.9
jquery@1.11.10
launch-screen@1.1.1
livedata@1.0.18
logging@1.1.17
meteor@1.6.1
meteor-base@1.0.4
minifier-css@1.2.16
minifier-js@1.2.17
minimongo@1.0.20
mobile-experience@1.0.4
mobile-status-bar@1.0.14
modules@0.7.9
modules-runtime@0.7.9
modules-test-package@0.0.1
modules-test-plugin@0.0.1
mongo@1.1.15
mongo-id@1.0.6
npm-mongo@2.2.16_1
observe-sequence@1.0.15
ordered-dict@1.0.9
practicalmeteor:mocha-core@0.1.4
promise@0.8.8
random@1.0.10
reactive-dict@1.1.8
reactive-var@1.0.11
reload@1.1.11
retry@1.0.9
routepolicy@1.0.12
session@1.1.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
templating@1.3.0
templating-compiler@1.3.0
templating-runtime@1.3.0
templating-tools@1.1.0
tracker@1.1.2
ui@1.0.12
underscore@1.0.10
url@1.1.0
webapp@1.3.13
webapp-hashing@1.0.9