Commit Graph

7379 Commits

Author SHA1 Message Date
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
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
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
claudiosdc
924b5e8c3c Improve Node.js built-in modules detection to fix #10892 (#10896) 2020-02-07 17:45:20 -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
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
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
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
Seba Kerckhof
8b43e385e0 Add upgrader to add jquery dependency for blaze-users. (#10801) 2019-12-18 13:45:38 -05:00
Ben Newman
24e02b7411 Avoid bundling jquery twice (#10498)
Although the Meteor jquery package is no long a core package (and thus is
not tied to the Meteor release), it seems like a good idea to nudge folks
towards installing jquery from npm, instead of relying on the very old
version (1.12.1) residing in meteor/packages/non-core/jquery/jquery.js.

Closes #10289.
2019-12-18 13:45:36 -05:00
Ben Newman
aee0092f64 Merge branch 'release-1.8.3' into release-1.9 2019-12-18 13:19:31 -05:00
Ben Newman
ebdaa230d5 Update meteor-babel to version 7.7.5. 2019-12-18 12:39:57 -05:00
Christian Klaussner
c112077ac2 Convert ANSI escape codes to HTML on error page 2019-12-14 21:19:30 +01:00
filipenevola
1a5d6fb5b6 - MDG => Meteor Software
- updates CONTRIBUTING.md
2019-12-13 08:05:14 -04:00
Filipe Névola
a1caff04b7 Merge pull request #10789 from sebakerckhof/patch-2
Fix comment in resolver
2019-11-28 13:51:03 -04:00
Ben Newman
c90246d55b Merge branch 'devel' into release-1.9 2019-11-26 15:46:38 -05:00
seke
a87e9116e6 Fix old-style tests 2019-11-26 15:31:13 -05:00
Ben Newman
34ada3f791 Declare type of Promise.await in tools/index.d.ts. 2019-11-26 14:36:26 -05:00
seke
830b8a40cb Update source-map to 0.7.3
source-map 0.7.0+ has a much faster Rust WASM implementation.
Because this needs to be loaded, the constructor is now asynchronous.
The consumer should also be destroyed after it's no longer needed.
2019-11-26 14:15:33 -05:00
Ben Newman
cf8dbf1c37 Add static-html compiler plugin to custom-minifier test app. 2019-11-26 12:58:49 -05:00
Ben Newman
f6fcd620a7 Add a package.json to custom-minifiers test app.
Self-tests involving this test app were failing because of an undefined
jQuery reference on the client.
2019-11-26 12:49:23 -05:00
Seba Kerckhof
a72c92c852 Fix comment in resolver
Between 1.3 and 1.3.1 the modules.js file got moved from modules to modules-runtime
2019-11-21 20:53:37 +01:00
Ben Newman
407b2d17cb Remove eslint and pre-commit hook to fix npm security warnings. 2019-11-14 17:34:29 -05:00
Ben Newman
0af5c64bd1 Update modules test app to Meteor 1.8.2. 2019-11-14 17:21:02 -05:00
Ben Newman
14cb5fc026 Merge branch 'devel' into release-1.9 2019-11-14 16:30:42 -05:00
Ben Newman
c24077e65f Allow relative --test-app-path arguments when running test-packages.
https://github.com/meteor/meteor/pull/10772#issuecomment-553517459

The assertion in tools/fs/optimistic.ts was failing if I passed a relative
path for --test-app-path, and passing the path as a second argument when
calling assert made it easier to tell what was going on, so I decided to
keep that change.
2019-11-13 12:43:42 -05:00
Ben Newman
edbaeae98b Merge branch 'release-1.8.2' into release-1.9 2019-11-12 19:47:30 -05:00