Commit Graph

22496 Commits

Author SHA1 Message Date
Ben Newman
60355ae0e3 Bump package versions for 1.9.2-rc.1 release. release/METEOR@1.9.2-rc.1 2020-02-19 18:21:35 -05:00
Ben Newman
ec60e66ef9 Bump $BUNDLE_VERSION to 12.16.1.1 before rebuilding dev bundle. 2020-02-19 15:32:59 -05:00
Ben Newman
c81738fbb3 Update meteor-babel to version 7.8.2 and typescript to 3.7.5. 2020-02-19 15:20:20 -05:00
filipenevola
dad91bd581 Bump package versions for 1.9.2-rc.0 release 2020-02-19 16:15:37 -04:00
Ben Newman
924c748ecc Avoid bailing out with module.useNode() for ESM modules.
On the server, Meteor attempts to avoid bundling node_modules code by
replacing entry point modules with a stub that calls module.useNode() (see
packages/modules-runtime/server.js). This trick allows evaluating server
node_modules natively in Node.js, faithfully preserving all Node-specific
behaviors, such as module.id being an absolute file system path, the
__dirname and __filename variables, the ability to import binary .node
modules, and so on.

However, starting in Node.js 12.16.0 (Meteor 1.9.1+), modules evaluated
natively by Node are considered ECMAScript modules (ESM) if the closest
package.json file has "type": "module" (or has an .mjs file extension).
This poses a problem for the module.useNode() trick, because ESM modules
cannot be imported synchronously using require (which is currently how
module.useNode() works).

To work around this new error, this commit checks package.json for "type":
"module" in ImportScanner#shouldUseNode to determine whether it's safe to
use the module.useNode() trick.

The good news is that ESM modules don't have access to nearly as many
Node.js-specific quirks: no module, require, or exports variables; no
__dirname, no __filename; no ability to import JSON or other non-ESM file
types (at least right now). So it seems somewhat less important for ESM
code (compared to CommonJS code) to bail out into native Node.js execution
using module.useNode(). In other words, bundling server code should not
affect its execution in nearly as many cases, if that code is ESM rather
than legacy CommonJS.

If this good news turns out to be overly optimistic, we can consider using
a different kind of bailout stub that's capable of importing ESM using
dynamic import(). For now, making sure we avoid bailing out for ESM code
like @babel/runtime/helpers/esm/* is the priority.
2020-02-19 15:24:42 -04:00
Ben Newman
9c852da695 Make optimisticLookupPackageJson return array of package.json objects.
Commit 646fa4e3ee fixed #10547 by
restricting optimisticLookupPackageJson to package.json files with a
"name" property, which effectively skipped over intermediate package.json
files with additional properties.

However, in Node.js 12.16.0 (Meteor 1.9.1+), modules evaluated natively by
Node are considered ECMAScript modules if the closest package.json file
has "type": "module" (or has an .mjs file extension). This poses a problem
for the module.useNode() trick (see packages/modules-runtime/server.js),
because ESM modules cannot be imported using require.

For example, recent versions of the @babel/runtime package have a
@babel/runtime/helpers/esm/package.json file for the ESM versions of its
helpers (which specifies "type": "module"), but that package.json file
does not have a "name" property, because it is not the root package.json
file representing the entire @babel/runtime package.

I considered making the "name" restriction configurable, but that would
have fragmented the caching of optimisticLookupPackageJson. Instead, I
made it return an array of all potentially relevant package.json objects,
which can be safely cached.

This means that the caller has to iterate over the array, but there is
only one call site for this function (in tools/isobuild/package-source.js)
right now, so that wasn't too much work.
2020-02-19 15:24:42 -04:00
Ben Newman
0743289ff3 Add History.md section for Meteor 1.9.2. 2020-02-19 14:16:05 -05:00
filipenevola
0c7c2a6731 Bump $BUNDLE_VERSION to 12.16.1.0 before rebuilding dev bundle. 2020-02-19 14:39:41 -04:00
filipenevola
0132191dcd Bump Node version to 12.16.1 2020-02-19 14:39:26 -04:00
Filipe Névola
17eb5ba846 Merge pull request #10922 from meteor/release-1.9.1
Release 1.9.1
2020-02-19 07:13:13 -04:00
filipenevola
2a8f8d3c80 Bump package versions for 1.9.1 release release/METEOR@1.9.1 2020-02-18 21:06:07 -04:00
filipenevola
1b1e9cd4af Bump package versions for 1.9.1-rc.1 release release/METEOR@1.9.1-rc.1 2020-02-18 14:40:27 -04:00
filipenevola
eb527fded2 Bump $BUNDLE_VERSION to 12.16.0.0 before rebuilding dev bundle. 2020-02-18 14:37:43 -04:00
filipenevola
29c243fb6d V8 updated to v7.8 in History 2020-02-18 14:10:10 -04:00
filipenevola
268d8ff7f6 Adjusts 1.9 release date in History 2020-02-18 14:10:10 -04:00
filipenevola
68a85d78e7 Bump package versions for 1.9.1-rc.0 release 2020-02-18 14:10:10 -04:00
Ben Newman
2809237355 Merge pull request #10527 from meteor/release-1.9
Release 1.9 (Node.js 12) 🚀 
2020-01-08 19:54:51 -05:00
Ben Newman
2257bdcc46 Update the release date for Meteor 1.9 in History.md.
[no ci]
2020-01-08 19:38:23 -05:00
filipenevola
39cc07472f Bump package versions for the official 1.9 release. 🎉 release/METEOR@1.9 2020-01-08 18:18:03 -05:00
Ben Newman
863c5fa87f Bump Circle CI cache keys to fix spurious Babel error. 2020-01-08 17:36:33 -05:00
filipenevola
f6b4b099a5 Adds Galaxy hosting URL when creating new Meteor apps 2020-01-08 17:28:47 -05:00
Ben Newman
80b4e4d1c2 Bump package versions for 1.9-rc.3 release. release/METEOR@1.9-rc.3 2020-01-07 21:06:10 -05:00
Ben Newman
fbf69e3217 Bump $BUNDLE_VERSION to 12.14.0.4 before rebuilding dev bundle. 2020-01-07 20:37:15 -05:00
Ben Newman
da11c28ed4 Use the official fibers@4.0.3 release.
This includes https://github.com/laverdet/node-fibers/pull/429, fixing the
CPU spikes reported and discussed here: https://github.com/meteor/meteor/pull/10527#issuecomment-567982128

Using an official fibers release rather than a GitHub URL is preferable
because it doesn't require building fibers from source when deploying a
Meteor app to production, and also doesn't rely on GitHub being
operational, though of course it does rely on other networked services
like npm.
2020-01-07 20:31:28 -05:00
filipenevola
8bf018f19b Merge branch 'devel' into release-1.9 2020-01-07 10:52:48 -05:00
Ben Newman
cb58f9af85 Require Node.js 12 when running Meteor 1.9 apps.
We haven't always updated this minimum version when we've changed the
Node.js version bundled with Meteor, which is fine because most deployment
strategies (including Galaxy) use the right version of Node.js
automatically. With Meteor 1.9 and Node.js 12.14.0, however, it seems
important that we make absolutely sure new Meteor apps are not getting run
in production with an end-of-life'd version of Node.js (v8).
2020-01-02 11:38:21 -05:00
Ben Newman
4ce94e8b1f Bump package versions for 1.9-rc.2 release. release/METEOR@1.9-rc.2 2020-01-02 11:01:25 -05:00
Ben Newman
cdf2064b23 Bump $BUNDLE_VERSION to 12.14.0.3 before rebuilding dev bundle. 2020-01-02 10:47:15 -05:00
Ben Newman
77429d6ef5 Use fork of fibers that avoids AdjustAmountOfExternalAllocatedMemory.
https://github.com/laverdet/node-fibers/pull/429#issuecomment-570245398
2020-01-02 10:46:41 -05:00
Ben Newman
ed214002e0 Bump package versions for 1.9-rc.1 release.
This release contains a potential mitigation for the excessive garbage
collection discussed here: https://github.com/meteor/meteor/pull/10527#issuecomment-567982128
release/METEOR@1.9-rc.1
2019-12-30 12:11:46 -05:00
Ben Newman
2984648476 Bump $BUNDLE_VERSION to 12.14.0.2 before rebuilding dev bundle. 2019-12-30 12:05:49 -05:00
Ben Newman
04d13dc87a Use fork of fibers package that triggers GC less often.
Apparently calling v8::Isolate::AdjustAmountOfExternalAllocatedMemory
frequently results in lots of wasted CPU cycles on garbage collection, per
discussion here: meteor/meteor#10527 (comment)

This fix was inspired by marudor/libxmljs2#22, which seems to have
addressed nodejs/node#30995.

Another project that benefitted from adjusting external allocated memory
less often: mapnik/node-mapnik#136
2019-12-30 11:44:48 -05:00
filipenevola
096641b084 Bump ejson package version to 1.1.1 ejson@1.1.1 2019-12-20 08:15:27 -04:00
filipenevola
0fd5614def Bump ejson package version to 1.1.1 2019-12-20 08:15:08 -04:00
Filipe Névola
1cab191ac4 Improve EJSON package (#10830)
Improve `EJSON` package
2019-12-20 08:07:42 -04:00
Ben Newman
811a56a83f Differentiate initFromPackageDir by package name in METEOR_PROFILE output.
Might help with debugging this SQLite performance problem reported by
@heschong: https://github.com/meteor/meteor/issues/10800#issuecomment-567599306
2019-12-19 13:39:12 -05:00
Ben Newman
852ef132c2 Discuss jquery changes in the Migration Steps for Meteor 1.8.3. 2019-12-19 13:24:39 -05:00
Ben Newman
e48dbc6d1c Bump package versions for 1.9-rc.0 release. 🎉
With Node.js 8.x nearing end-of-life status at the end of this year, and
Node.js 12 now in LTS, we think it makes sense to finalize Meteor 1.9
sooner rather than later, and continue working to take advantage of all
the great features of Node 12 in future 1.9.x releases.

As usual, the meaning of "release candidate" is that we can still fix bugs
before the final release, but there will be no new features added.
release/METEOR@1.9-rc.0
2019-12-19 09:11:29 -05:00
filipenevola
c687f01afe Merge remote-tracking branch 'lamhieu-vk/ImproveEJSONPackage' into feature/improve-ejson 2019-12-19 09:42:10 -04:00
Ben Newman
49a2fe3bae Merge branch 'devel' into release-1.9 2019-12-18 21:55:50 -05:00
Ben Newman
1f28e56557 Merge branch 'master' into devel 2019-12-18 21:51:55 -05:00
Ben Newman
a2ffede5cc Merge pull request #10825 from meteor/release-1.8.3
Release 1.8.3
2019-12-18 21:51:04 -05:00
Ben Newman
18b4b633fe Bump package versions for the official 1.8.3 release. release/METEOR@1.8.3 2019-12-18 18:32:16 -05:00
Ben Newman
a05a5b70e8 Set release date for Meteor 1.8.3 in History.md. 2019-12-18 18:30:42 -05:00
Christian Klaussner
92013e3486 Remove multiple restart feature (#10345) 2019-12-18 17:56:54 -05:00
Ben Newman
2e56080541 Bump package versions for 1.8.3-rc.2 release. release/METEOR@1.8.3-rc.2 2019-12-18 17:09:43 -05:00
Ben Newman
67a35473d1 Automatically use Meteor jquery package with test-in-browser.
When we run 'meteor test-packages' as part of our Circle CI test rotation,
we happen to be testing the Meteor `jquery` package along with all of our
other packages, so it has a chance to define `window.jQuery` globally, so
everything seems to work.

However, if you run `test-packages` with a subset of packages that does
not include or depend on `jquery`, there will be errors in the browser
console about `jQuery` not being defined, because the `test-in-browser`
package depends on `blaze`, which implicitly depends on `jquery`.
2019-12-18 16:37:05 -05:00
Ben Newman
6b646c6a8f Merge branch 'release-1.8.3' into release-1.9 2019-12-18 16:23:31 -05:00
Ben Newman
a8ca0a5d65 Mention jquery deduplication in History.md. 2019-12-18 16:09:06 -05:00
Ben Newman
fede16c147 Bump package versions for 1.8.3-rc.1 release. release/METEOR@1.8.3-rc.1 2019-12-18 15:10:22 -05:00