Commit Graph

6716 Commits

Author SHA1 Message Date
Ben Newman
35e70fd23d Stop adding line number comments to linked JavaScript files. (#9323)
Several years ago, before all major browsers supported source maps, we
felt it was important to provide line number information in generated
files using end-of-line comments like "// 123\n".

Adding all these comments was always slower than leaving the code
unmodified, and recently they have begun interacting badly with certain
newer ECMAScript syntax, such as multi-line template strings (#9160).

Since source maps are well supported in most browsers that developers are
likely to be using for development, and the line number comments are now
causing substantive problems beyond the performance cost, I think it's
time we stopped using them once and for all.

Fixes #9160.
2017-11-08 12:04:59 -05:00
skirunman
073f2410a6 Cordova 7.1.0, Android 6.3.0 and iOS 4.5.3 updates (#9213)
* Update to Cordova 7.1.0 and Cordova Android 6.3.0

* Update deprecated Cordova plugins

* Update History.md for both Cordova updates and previous iOS icons and launch screens

* Update the PR #

* Remove change to History.md

This change is now in https://github.com/meteor/meteor/pull/9227

* Update to iOS 4.5.2

Update to new Cordova iOS 4.5.2 release. https://cordova.apache.org/announcements/2017/10/16/ios-release.html

* Update History.md for Cordova iOS 4.5.2.

* Update to Cordova iOS 4.5.3

Update to Cordova iOS 4.5.3, see https://cordova.apache.org/announcements/2017/10/31/ios-release.html

* Tweak history for update to Cordova iOS 4.5.3

* Update iOS launch screens 

Updating iOS launch screens to match what is supported in Cordova iOS 4.5.3 and remove latest iPad Pro sizes that are not supported in Xcode 9 and therefore not in Cordova iOS. See c3d24a9f02/bin/templates/scripts/cordova/lib/prepare.js
2017-11-08 18:14:12 +02:00
Ben Newman
54b649d5f5 Encapsulate deserialization logic in Unibuild#fromJSON method. 2017-11-06 17:14:05 -05:00
Ben Newman
081d59fa1a Avoid passing two unnecessary parameters to Unibuild#toJSON. 2017-11-06 17:12:10 -05:00
Ben Newman
60fe3a096d Encapsulate serialization logic in Unibuild#toJSON method. 2017-11-06 17:12:10 -05:00
Ben Newman
206f6b7ce4 Convert Unibuild to class and extract into own module. 2017-11-06 17:12:10 -05:00
Ben Newman
f70f3f275c Bump LINKER_CACHE_SALT after recent linker changes. 2017-11-06 16:55:31 -05:00
Ben Newman
78a7cc0633 Use PackageRegistry for build plugins, too. 2017-11-06 16:55:31 -05:00
Ben Newman
57533d2205 Use Package._define helper to initialize Package.* exports.
This saves a little bit of boilerplate code in every package.
2017-11-06 16:55:31 -05:00
Ben Newman
5ee44ca81c Initialize global.Package once, instead of in every package. 2017-11-06 16:55:31 -05:00
Ben Newman
a33ac61ea8 Remove underscore import from boot.js. 2017-11-06 16:55:31 -05:00
Ben Newman
1cbcfb59bc Update dynamic-import test app to use React 16. 2017-11-06 15:46:33 -05:00
Ben Newman
9526ce8976 Test that object-valued package.json "browser" fields are respected.
Regression test for #6890.
2017-11-06 15:46:09 -05:00
Ben Newman
d6b8648eec Add a package-lock.json file to the dynamic-import test app. 2017-11-06 15:10:38 -05:00
Ben Newman
6ada1565aa Update dynamic-import test app to Meteor 1.6. 2017-11-06 15:10:38 -05:00
Ben Newman
234fb35174 Update modules test app to Meteor 1.6. 2017-11-06 15:09:55 -05:00
Ben Newman
8d3ae25eb8 Cache Resolver methods for finding package.json data. 2017-11-06 14:09:54 -05:00
Ben Newman
71cffb2a1f Output package.json "browser" aliases in tools/isobuild/linker.js. 2017-11-06 14:09:54 -05:00
Ben Newman
edc97bad27 Register aliases from package.json "browser" field in ImportScanner. 2017-11-06 14:09:54 -05:00
Ben Newman
d4872366d0 Refactor Resolver handling of package.json files.
Any package.json file that includes an object-valued "browser" field will
now be included in the .packageJsonMap.
2017-11-06 14:09:54 -05:00
Ben Newman
26ab2e5b4e Rename installPath property to absModuleId, and make absolute.
The `installPath` property was always essentially an absolute module
identifier that was simply missing the leading '/' character, so this
commit acknowledges that role by renaming the property to `absModuleId`
and adding the leading slash.
2017-11-06 14:09:54 -05:00
Ben Newman
92f5350e1e Merge instead of replacing implicit files in ImportScanner. 2017-11-06 11:21:27 -05:00
Geoffrey Booth
318d93ec0f See if the noop test driver can work here too 2017-10-31 14:00:56 -07:00
Geoffrey Booth
3cfea0c71d Use empty test driver for test that doesn't need Mocha 2017-10-31 14:00:56 -07:00
Geoffrey Booth
fbf1e9ee43 Try different Mocha test driver 2017-10-31 14:00:56 -07:00
Ben Newman
0fddc26a2e Adjust npm update notifier opt-out environment variable.
https://github.com/zkat/npx/issues/98#issuecomment-316936135
https://www.npmjs.com/package/update-notifier#user-settings
2017-10-23 19:37:44 -04:00
Ben Newman
1389db4631 Increase garbage collection throttling delay.
May help with this problem, which seems to stem from too much GC:
https://github.com/meteor/meteor/pull/8728#issuecomment-337636773

If this isn't enough, we could include this commit in 1.6.1:
5d212926e7
2017-10-19 11:31:23 -04:00
Ben Newman
9c1745f161 Update meteor-node-stubs to 0.3.2 everywhere else. 2017-10-18 21:52:16 -04:00
Ben Newman
301c1fe616 Update modules test app to use meteor-node-stubs@0.3.2. 2017-10-18 21:52:14 -04:00
Ben Newman
b499ad8c45 Another small improvement to temp directory removal logic. 2017-10-17 10:21:01 -04:00
Ben Newman
3739677140 Use files.rm_recursive_async to implement files.freeTempDir. 2017-10-16 17:59:52 -04:00
Ben Newman
9bedf027d4 Move VALID_ARCHITECTURES to its natural home, utils/archinfo.js.
Apparently importing cli/commands.js in isobuild/bundler.js led to calling
ensureIsopacketsLoadable more than once, which broke some tests.
2017-10-16 15:47:55 -04:00
Ben Newman
352b319646 Allow Builder#copyDirectory to re-create symlinks again.
Commit 86ec7eb5db broke tests because we
rely on symlinks even when the symlink option is false.
2017-10-16 14:59:01 -04:00
Ben Newman
eded323039 Avoid calling files.stat(source) in symlinkWithOverwrite.
This was dangerous because source is often a path relative to the old
target file, whereas files.stat was interpreting source as a path relative
to process.cwd().

Fixes #9203.
2017-10-16 14:07:11 -04:00
Ben Newman
86ec7eb5db Avoid creating symlinks in Builder#copyDirectory when forbidden. 2017-10-16 14:07:07 -04:00
Ben Newman
e6e5d427b4 Allow files.rm_recursive to yield whenever possible.
A while back, for performance reasons, we disabled yielding for all
files.* operations unless METEOR_DISABLE_FS_FIBERS was set to false.

This was safe for almost all files.* operations, because most of them have
a synchronous fs.*Sync version available.

For a more complicated operation like files.rm_recursive, however, there
is no synchronous or asynchronous counterpart in the fs.* namespace, so
the safety of disabling fibers is not guaranteed.

Lately, files.rm_recursive has become a major source of uncaught ENOTEMPTY
errors on Windows, because rimraf.sync fails with that error, and we don't
give files.rm_recursive_async a chance to delete the directory in a more
persistent, forgiving manner.

The only reason we haven't been falling back to files.rm_recursive_async
is that YIELD_ALLOWED is false by default, so canYield() returns false.

This commit distinguishes between canYield() and mayYield(), and uses
canYield() in files.rm_recursive to determine whether it is technically
safe to yield, regardless of YIELD_ALLOWED.

Anyone who ever asked "Can I go to the bathroom?" in elementary school,
only to be mercilessly rebuked with "I don't know, CAN YOU?" should
understand the difference between these two functions.
2017-10-16 13:58:49 -04:00
Ben Newman
af016aa306 Disable automatic switching to 64-bit meteor-tool on Windows.
This means running `meteor update` on Windows with an existing (pre-1.6)
installation of Meteor will install a 32-bit version of Meteor 1.6, even
if the underlying machine architecture could handle a 64-bit version.

To get a native 64-bit version of Meteor, Windows developers should
reinstall Meteor 1.6 from scratch using the new and improved Windows
installer (👋 @abernix), rather than running `meteor update`.

If we really want to make `meteor update` just work , we can
revisit this change in Meteor 1.6.1.
2017-10-16 13:58:49 -04:00
Ben Newman
11ea9aef58 Stop wasting time making extracted tarball trees read-only.
Whatever benefits this may have had, a general purpose function like
files.extractTarGz is definitely not the place for such an aggressive
safety measure, and the performance penalty is significant, especially on
Windows.
2017-10-16 13:58:49 -04:00
Ben Newman
132a835086 Fix typo in archinfo.canSwitchTo64Bit.
5a9e837937 (r144887020)
2017-10-16 12:46:49 -04:00
Ben Newman
b99f2be040 Reuse VALID_ARCHITECTURES for great DRY-ness. 2017-10-16 10:00:45 -04:00
Ben Newman
bbd3b9ffca Tolerate springboarding to the same meteor-tool build directory.
Though this seems wasteful, it can happen if a SpringboardToLatestRelease
exception is thrown, and it definitely should spawn a new process rather
than returning normally from the springboard function.
2017-10-15 20:10:21 -04:00
Ben Newman
5a9e837937 Upgrade to 64-bit when possible on Windows.
Since we can't change the springboarding logic of existing Meteor
releases, this decision has to be made by the springboarded-to Meteor 1.6
release, and may result in a second springboarding.
2017-10-15 19:36:37 -04:00
Ben Newman
e9db660d03 Allow 64-bit Windows builds of meteor-tool to download 32-bit builds.
Once Windows developers update to a 64-bit version of Meteor 1.6, they may
still wish to run apps using older versions of Meteor where only 32-bit
builds of meteor-tool are available. This commit makes that possible.
2017-10-15 19:32:18 -04:00
Jesse Rosenberger
00bc5e6201 Address PR feedback from @benjamn on #9218. 2017-10-14 13:37:20 -04:00
Jesse Rosenberger
0dac129770 Introduce os.windows.x86_64 architecture for 64-bit Windows.
This commit reverts much of the work @hwillson had put in place for
meteor/meteor#9173, which made it possible for 32-bit and 64-bit
Mongo versions to exist in harmony within the same dev-bundle.  That
hard work was not in vein though as it offered invaluable research.
Ultimately, this showed that a more aggressive approach would be ideal,
even if the proposed option would have worked great in the short-term.

In the wake of the news that Mongo would no longer be supporting 32-bit
versions, these changes are important so 32-bit users of Meteor can
continue to have a functioning Mongo binary in development, while still
allowing Meteor to ship newer Mongo (e.g. 3.4+) binaries for 64-bit
users.  This is particularly relevant for Windows users, who have
previously only had 32-bit Meteor builds and represented a majority of
"32-bit" development, despite the fact most of their hosts supported
64-bit.  During another time in Meteor's life, this made sense.

This commit takes improved functionality to the next level (and makes
the aforementioned changes obsolete) by introducing support for building
and shipping Meteor for Windows in a 64-bit flavor (in addition to
32-bit), which will hopefully solve a number of performance matters on
Windows by using binaries which are pre-compiled for 64-bit, rather than
forcing the Windows kernel to deal with 32-bit binaries.  While Windows
has shown it's quite capable of dealing with such a situation, it seems
more and more clear (given improvements in underlying dependencies) that
performance gains could be had by freeing Windows of its 32-bit work.

This commit also further perpetuates the "archinfo" plot-line with more
story (about Windows) and various spelling corrections.
2017-10-14 13:36:29 -04:00
Hugh Willson
9a1f91843e Add Tool support for both 32 bit (3.2) and 64 bit (3.4) Mongo
These changes introduce dual Mongo support into the Meteor
Tool. 32-bit Mongo (3.2.15) will be used by Meteor when the
Tool is run on a 32-bit OS (32-bit Linux and Windows). 64-bit
Mongo (3.4.9) will be used when the Tool is run on a 64-bit
OS (64-bit Linux, Windows and macOS).

Fixes https://github.com/meteor/meteor-feature-requests/issues/129.
2017-10-14 13:36:29 -04:00
Ben Newman
f011bf2acc Don't add //#sourceURL comment to dynamic modules.
Dynamic modules get a dynamic //#sourceURL when they are evaluated:
948d9628f8/packages/dynamic-import/client.js (L103)
2017-10-12 17:42:21 -04:00
Ben Newman
948d9628f8 Add //#sourceURL comments to assist with source mapping on Windows.
Fixes #9166 (👋 @brucejo75).
2017-10-12 17:28:17 -04:00
Ben Newman
abd91ac7c5 Use files.rm_recursive_async to implement meteor reset.
This should hopefully prevent ENOTEMPTY errors on Windows.
2017-10-12 16:46:10 -04:00
Ben Newman
5154835c73 Allow asynchronous meteor command implementations. 2017-10-12 16:45:04 -04:00