Commit Graph

14 Commits

Author SHA1 Message Date
harryadel
80e09739fd [ecmascript] Remove underscore 2022-10-22 07:44:38 +02:00
Jan Dvorak
2d918da3bd Regression test for #11662 2021-10-07 16:20:04 +02:00
Ben Newman
a69ba4904d Move meteorBabelHelpers to modules package, and restrict to legacy bundle. (#10596)
Should fix #10595.

Code from the application `node_modules` directory becomes part of the
`modules` package, so that it can be imported by any other package that
uses the module system, regardless of package load order.

Now that we compile code from `node_modules` using `babel-compiler` and
`meteor-babel` (#10585), `node_modules` code requires the same runtime
environment as any other Meteor JS code. For the most part, this need is
satisfied by the `@babel/runtime/helpers/...` modules, which are also
defined in the `modules` package because they come from `node_modules`.
However, in the legacy bundle, `meteorBabelHelpers.sanitizeForInObject` is
used to fix buggy for-in iteration in older Internet Explorers.

Thankfully, this extra helper code does not need to be included in the
modern or server bundles, but only in legacy code.
2019-06-25 13:08:38 -04:00
Ben Newman
eba781fd55 Tolerate non-enumerable .raw property in template tag function. 2018-01-22 18:07:55 -05:00
Ben Newman
49f9c7b087 Add failing ecmascript test-case of nested imports in class methods.
Thanks to @CaptainN for reporting this:
https://github.com/meteor/meteor/pull/9274#issuecomment-354870359
https://github.com/meteor/meteor/pull/9274#issuecomment-356988553

Only the `import { testExport as oyez } ...` in `method` is problematic
here, though I wanted to add some tests of class properties as well.
2018-01-11 20:17:07 -05:00
Ben Newman
2dcc10c2cc Avoid matching exact language falsy destructuring error. 2017-10-12 12:44:41 -04:00
Ben Newman
2b8199c76b Upgrade babel-compiler and ecmascript to Babel 7.
Specifically, as of this commit, Babel 7.0.0-beta.0.
2017-09-14 18:20:00 -04:00
Ben Newman
630c2595e6 Add a test that code after an await runs in a Fiber.
Part of #9002.
2017-08-10 18:58:42 -04:00
Ben Newman
4af283ebcf Fix ecmascript/runtime-tests.js to tolerate native behavior. 2017-07-21 16:14:43 -04:00
Ben Newman
3f3aac4fd1 Implement babel-runtime/helpers/slicedToArray, with tests.
Fixes #6076.
2016-01-25 15:17:54 -05:00
Ben Newman
4ca721c051 Add tests of Map and Set ...spread elements.
Closes #5980.
2016-01-21 17:33:28 -05:00
Ben Newman
a0c2ef5b49 Fix ecmascript tests after Babel 6 upgrade. 2016-01-21 17:33:28 -05:00
Ben Newman
ba0aa4d709 Avoid _.extend in IE8-sensitive ecmascript tests.
The underlying problem is that `es5-shim` polyfills `Array.prototype`
methods in IE8, but it can't actually make them non-enumerable, so
`_.extend` copies them, because it doesn't check `hasOwnProperty`.

This probably calls for a more general audit of for-in loops over objects
that could be Arrays, especially within underscore.
2015-07-24 16:54:16 -04:00
David Greenspan
d0c192a141 Bring babel-tests unit tests into ecmascript 2015-07-19 16:14:06 -07:00