Commit Graph

7398 Commits

Author SHA1 Message Date
filipenevola
23b8bd142e Updates skel-typescript
- meteor create --typescript app now uses useTracker hook instead of withTracker HOC, it also uses function components instead of classes
2020-02-28 16:05:38 -04:00
filipenevola
356f0a4d79 Updates skel-react
- meteor create --react app now uses useTracker hook instead of withTracker HOC, it also uses function components instead of classes
2020-02-28 15:44:01 -04:00
Ben Newman
a467255d9c Use IPC message to handle .reload command in meteor shell.
I considered using a nonzero process.exit code, but I didn't want to run
any risk of reusing a meaningful code, and the accepted range of codes
unfortunately does not include parseInt("reload", 36), or 1657112629.

Should fix #10934.
2020-02-26 12:13:48 -05:00
Ben Newman
8939f93d86 Merge branch 'devel' into release-1.10 2020-02-25 18:53:50 -05:00
Brian Mulhall
c68757a52c remove the xmlbuilder isopack and all references to it in the code 2020-02-25 15:44:44 -05:00
Brian Mulhall
65799b23ae Update the builder.js file to use the xmlbuilder2 node package directly, and no longer by importing the isopackxmlbuilder 2020-02-25 15:44:43 -05:00
Brian Mulhall
20bc926f05 update the builder.js to use the xmlbuilder2's api instead of the xmlbuilder api.
updates are made to account for the following api changes

1.) raw is no longer used by xmlbuilder2
2.) element has been shortened to ele
3.) the create function signature/definition has changed compared to xmlbuilder
2020-02-25 15:44:43 -05:00
Filipe Névola
e31f390237 Merge branch 'release-1.10' into devel 2020-02-25 15:42:03 -04:00
cyrille
a72ee88a0e Merge branch 'devel' of https://github.com/meteor/meteor into devel 2020-02-25 13:08:52 +01:00
filipenevola
dfef2c3641 Drops support for Windows 32-bit as MongoDB no longer supports it 2020-02-21 19:21:12 -04:00
filipenevola
94b79bfb03 Merge branch 'devel' into release-1.10 2020-02-21 16:47:30 -04:00
Filipe Névola
cb6c663f1c Merge branch 'devel' into error-page-syntax-highlighting 2020-02-21 16:42:55 -04:00
Ben Newman
150d387b44 Merge branch 'master' into devel 2020-02-20 11:24:20 -05:00
cyrille
53dff3f174 remove useless slash in path 2020-02-20 10:09:35 +01:00
cyrille
1e4288f1f9 Merge branch 'devel' of https://github.com/meteor/meteor into devel 2020-02-20 09:44:09 +01: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
87bc54fb9f 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 13:25:22 -05:00
Ben Newman
290e084cab 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 13:14:47 -05:00
Ben Newman
fc2bdd6ddf Attempt to fix @babel/runtime/helpers/esm/* import test.
CircleCI tests will fail for this commit, since these changes do not
address the problem that the module.useNode() stub imports the ESM code
using require. I will fix the tests properly in a later commit.
2020-02-19 13:13:32 -05:00
Ben Newman
b6320119d4 Update @babel/* dependencies of modules test app. 2020-02-19 11:07:29 -05:00
Ben Newman
8ff7eed55c Merge branch 'devel' into release-1.10 2020-02-19 09:41:44 -05:00
claudiosdc
924b5e8c3c Improve Node.js built-in modules detection to fix #10892 (#10896) 2020-02-07 17:45:20 -05:00
Ben Newman
6f083942b8 Merge branch 'devel' into release-1.10 2020-02-01 14:16:56 -05:00
Ben Newman
b3b5fee25f Add missing lazyFinalizer parameter to InputFile#addHtml.
Fixes #10883.
2020-02-01 13:47:47 -05:00
Seba Kerckhof
28d898dd0b Merge branch 'devel' into error-page-syntax-highlighting 2020-01-23 16:52:52 +01:00
Christian Klaussner
daa8e98923 Make sure source map consumer exists before destroying it. (#10874) 2020-01-17 10:32:15 -05:00
Ben Newman
80cb6451e9 Merge branch 'devel' into release-1.10 2020-01-16 13:03:32 -05:00
Ben Newman
4fe8af4193 Use require("meteor-babel/register").excludeFile.
The excludeFile API was introduced in meteor-babel@7.8.1:
bfded57377

Modules that are evaluated before meteor-babel/register is configured
should not be transformed by meteor-babel, even if they are imported again
later, after meteor-babel/register has been configured.

If my analysis is correct, this change should prevent the dreaded

  Must export a default export when using ES6 modules.

error, as seen most recently in
https://travis-ci.org/meteor/meteor/builds/638030190
and https://circleci.com/gh/meteor/meteor/40863.
2020-01-16 12:33:54 -05:00
Ben Newman
8c022eaced Restore webapp changes that were intended for Meteor 1.10.
Revert "Bump webapp version to 1.8.2, with same content as 1.8.0."
This reverts commit 20d2a9b4a4.

Revert "Revert changes to webapp package since version 1.8.0."
This reverts commit 7a6ee9e129.
2020-01-16 11:26:54 -05:00
Ben Newman
7a6ee9e129 Revert changes to webapp package since version 1.8.0.
We accidentally published changes to webapp that should have been
restricted to Meteor 1.10 as part of the 1.8.1 version. This commit
reverts commits to packages/webapp since Meteor 1.9, so that we can
republish the 1.8.0 content as version 1.8.2. We will then bump the webapp
version to 1.9.0 on the release-1.10 branch and publish the new content
only on that branch.

Revert "Allow to exclude web architectures in development mode (#10824)"
This reverts commit a205967186.

Revert "Updates cordova-plugin-meteor-webapp to 1.7.1"
This reverts commit a1e4d27822.

Revert "Update cordova-plugin-wkwebview-engine to 1.2.1."
This reverts commit 3f9a69d7c4.

Revert "Update cordova-plugin-whitelist to 1.3.4."
This reverts commit 979273333b.

Revert "Update cordova-plugin-meteor-webapp to 1.7.1-beta.1."
This reverts commit 565c4254f1.

Revert "Update accounts-password to version 1.5.2."
This reverts commit b827d1da2f.
2020-01-16 11:15:25 -05:00
filipenevola
234145c803 Updates skel-react dependencies 2020-01-16 00:17:36 -05:00
Ben Newman
bb96f38d9b Update meteor-babel and typescript to latest versions.
Babel releases included in this update:
- https://github.com/babel/babel/releases/tag/v7.7.6
- https://github.com/babel/babel/releases/tag/v7.7.7
- https://github.com/babel/babel/releases/tag/v7.8.0
- https://github.com/babel/babel/releases/tag/v7.8.1
- https://github.com/babel/babel/releases/tag/v7.8.2
- https://github.com/babel/babel/releases/tag/v7.8.3

Although some of these changes won't take effect until the next Meteor
release, I intend to publish the babel-compiler, ecmascript, and
typescript changes using Meteor 1.9, so that applications can update
without waiting for Meteor 1.10.
2020-01-14 13:03:59 -05:00
Ben Newman
3bc53524dd Merge pull request #10723 from klaussner/mongodb-4.2
Update MongoDB to 4.2
2020-01-13 17:39:55 -05:00
Seba Kerckhof
a205967186 Allow to exclude web architectures in development mode (#10824) 2020-01-13 16:24:50 -05:00
Ben Newman
e967e745a2 Don't wait for mongod to step down on shutdown. 2020-01-13 16:11:10 -05:00
Christian Klaussner
1a016f5c2b Update download URLs for MongoDB 4.2.1. 2020-01-13 16:02:43 -05:00
renanccastro
b3c1700fdf Use Cordova plugin info for checking plugin installation.
Avoid false missing error on git tarballs that were having their ids parsed
like https://github.com/pathable/cordova-plugin-appsettings.git#6ffc8fa844468495d09c2e46f68aad06017cd744

It's easier if the ID is just the plugin name like cordova-plugin-appsettings,
which we can get from config.xml as PluginInfo does.
2020-01-13 10:51:49 -05:00
renanccastro
3f5aa2d00d Use cordova-lib api to run Cordova. 2020-01-13 10:51:00 -05:00
filipenevola
751369d845 Update Cordova to 9.0.1.
This is not a working version, it is just a base to test in real
application and fix issues.
2020-01-13 10:50:20 -05:00
Ben Newman
33bcb04d68 Update modules test app to Meteor 1.9. 2020-01-08 22:35:53 -05:00
filipenevola
f6b4b099a5 Adds Galaxy hosting URL when creating new Meteor apps 2020-01-08 17:28:47 -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
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
cyrille
e9bd8eefb0 copy resource files to an intermediate directory 2019-12-19 10:06:53 +01:00
Christian Klaussner
92013e3486 Remove multiple restart feature (#10345) 2019-12-18 17:56:54 -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
5758aaa30d Add jquery npm package to modules test app. 2019-12-18 14:53:16 -05:00
Ben Newman
a8507b5b0b Fix self-test error: unknown package in top-level dependencies: jquery. 2019-12-18 13:49:40 -05:00