Commit Graph

6760 Commits

Author SHA1 Message Date
Ben Newman
b16a61c98b Fix #9235 by bundling package.json stubs even if "main" absent. 2017-12-12 15:45:02 -05:00
Ben Newman
d4d3df1428 Inline Resolver#_resolvePkgJsonMain into sole calling method. 2017-12-12 15:45:01 -05:00
Jesse Rosenberger
ae3c05cb34 Merge pull request #9448 from skirunman/patch-3
Update to Cordova iOS v4.5.4
2017-12-12 22:06:17 +02:00
Ben Newman
b343ec8568 Fix #9305 by including default when mirroring module exports.
This functionality was added in reify@0.13.3:
10c90cd0a2

The changes to modules-test-plugin/plugin.js cause files like array.arson
to mirror array.arson.js, which exercises module.makeNsSetter(true) and
relies on default exports.
2017-12-12 13:31:28 -05:00
Ben Newman
c28440ab81 Fix warnings about missing @-scoped npm packages. 2017-12-12 13:30:59 -05:00
Jesse Rosenberger
f1ab4d7b37 Remove iPad sizes which aren't expected to be supported.
The current believe, per @skirunman (whose perspective on the matter I trust), is that these sizes won't be supported in this manner by Apple, but rather as storyboards.

Ref: https://github.com/meteor/meteor/pull/9448#issuecomment-351123720
2017-12-12 19:37:25 +02:00
skirunman
8e83391b62 Update to Cordova iOS v4.5.4
Update to Cordova iOS v4.5.4 to fix iPhone X splash screen issue.
Fixes https://github.com/meteor/meteor/issues/9447
2017-12-07 13:46:07 -08:00
Ben Newman
162f458306 Merge pull request #9440 from meteor/babel-7-with-builtins
Update the babel-compiler package use to Babel 7, like the command-line tool.
2017-12-05 10:57:31 -05:00
David Brown
ed10ede29d Fix error message for invalid ROOT_URL #8026 (#9261) 2017-12-05 10:14:28 -05:00
Ben Newman
baf889695a Use Babel 7 to compile package and application code, too. 2017-12-05 09:52:54 -05:00
Jesse Rosenberger
74aa18b253 Merge pull request #9364 from meteor/abernix/decompose-self-test
Decompose self-test logic into separate files.
2017-12-04 17:03:22 +02:00
Ben Newman
855dfe8960 Merge pull request #9406 from meteor/abernix/server-shell-underscore
Avoid clobbering global _ when running `meteor shell`.
2017-12-02 17:20:39 -05:00
Hugh Willson
76736137b7 Prevent Tool crash when node_modules source watcher is removed (#9433)
When sources in the `node_modules` directory are being watched
by a build plugin, if that build plugin is removed while the
Tool is running, the Tool can crash. This is because the Tool
currently see's this situation as an improbable edge case, and
purposely errors out instead of allowing the Tool to continue.
This commit adjusts the Tool to swallow this exception
thereby allowing the rebuild process to continue normally
(and avoiding a Tool crash). Given that the liklihood of this
situation happening is quite low, and the impact of allowing
the rebuild to continue is neglibile (if source files are
no longer handled by a build plugin, app developers will
notice quickly), this seems like an acceptable way forward.

Fixes #8644.
2017-12-02 17:19:11 -05:00
Jesse Rosenberger
ba118085dc Test which ensures that the global _ isn't compromised.
As demonstrated in https://github.com/meteor/meteor/issues/9276.

This test wouldn't have caught the regression in the previous solution
since the lack of a TTY in the `self-test` test harness caused the tests
themselves to take the path through `shell-server`'s `evaluateAndExit`
logic, which didn't use the `global` scope in the same way as the
interactive shell.  That is no longer the case as of e0682c553d.
2017-11-30 19:15:25 +02:00
Jesse Rosenberger
6b27c69cd9 Remove unused meteor open-ide command from help.txt. 2017-11-29 23:16:52 +02:00
Jesse Rosenberger
bf6e401be4 Add --retries help to help.txt for meteor self-test. 2017-11-29 23:16:47 +02:00
Jesse Rosenberger
3c1ab6a3a7 Merge branch 'devel' into abernix/decompose-self-test 2017-11-29 22:28:01 +02:00
Jesse Rosenberger
1c796a69e1 Change some strings to be template literals.
There's probably a ways to go here, but these seemed like easy targets.
2017-11-29 21:51:15 +02:00
Jesse Rosenberger
936884e740 Address feedback from @benjamn regarding setRunningTest.
A great suggestion!

Refs: https://github.com/meteor/meteor/pull/9364#discussion_r150981769
2017-11-29 21:50:49 +02:00
Jesse Rosenberger
5475add47f Re-factor and re-enable BrowserStack Automate for meteor self-test.
Much of the infrastructure to run "self test" tests (those which test
core functionality of the `meteor` tool itself) in PhantomJS and
BrowserStack was already in place, though the BrowserStack portion had
been disabled some time ago, though the exact reason isn't entirely
clear.

BrowserStack could play an important roll in Meteor's future as Meteor
works to ensure that the bundle delivered to the client is appropriate
for that client's capabilities, including appropriate polyfills to
implement functionality not natively available in the browser (e.g.
ECMAScript features, SockJS, etc.).
2017-11-29 21:40:00 +02:00
Jesse Rosenberger
0ab298dd34 Change failedTests to live on the testList.
Since tests themselves already keep track of their failure, and the test
list (i.e. the `TestList` class) tracks other concepts of grouped tests,
such as "all tests", "filtered tests", etc. (like a `TestList` class
would!) I believe it makes sense for it to also maintain a collection of
"failed tests"... (in list form, of course!)

This will allow the `Run.runTest` logic to move into `run.js` file without
needing to pass back a separate `failed` variable in the event of a
failure, since that is already being tracked through the  `notifyFailed`
facility.
2017-11-29 21:33:26 +02:00
Hugh Willson
92bcfaef84 Add os.windows.x86_64 to meteor build --architecture help (#9413)
The `meteor build --architecture` help was missing
`os.windows.x86_64`. This commit adds it in and also updates
an out of date comment in the source that referred to there
only being 3 allowed architectures.
2017-11-24 11:35:42 -05:00
Jesse Rosenberger
204270694c Add support for a --retries flag to meteor self-test.
While running the tests three times might make a lot of sence in CI
environments, it certainly slows things down in development, especially
when you've failed a test on purpose, but still have to wait for it to
run three times to get the output.

This not only implements the `--retries` flag, but also activates it in
both CircleCI and AppVeyor test suites.
2017-11-23 18:39:34 +02:00
Ben Newman
c8c88300a6 Fix remaining problems with PR #9237. 2017-11-22 14:44:22 -05:00
Edgar HIPP
16b74e5c0c Fix isNpmUrl to handle http/https urls (Closes #9236) 2017-11-22 14:44:22 -05:00
Ben Newman
6a312c49cd Guard against undefined process.env.NPM_CONFIG_REGISTRY.
https://github.com/meteor/meteor/pull/9398#discussion_r152610836
2017-11-22 13:12:37 -05:00
skirunman
1d5bf0f1a4 iPhone X status bar fix (#9375) 2017-11-22 11:36:45 -05:00
James Burgess
2547957268 Fix meteor test file matching patterns (#9339)
* Adjust test filename RegExps to match Meteor guide. Fixes #9332.
* Adjusted help text for --drive-package on meteor test.
* Add integration tests for `meteor test` eager file loading.
* Fix typo in selftest.forbid comment.
* Improve test file eager load integration test coverage and clarity.
2017-11-22 11:21:49 -05:00
Hugh Willson
8da6c84eac Update the default CSS parsing/combining/minifying tools (#9263)
* Update the default CSS parsing/combining/minifying tools

The `minifier-css` package is currently using outdated
(and abandoned) npm packages (`css-parse` and `css-stringify`),
as part of its parsing/minification process. This commit
replaces those packages with the robust, modern and maintained
`postcss` package.

* Adjust CSS source file fallback value

* Self test adjustments and cleanup

* Disable sourcesContent generation by postcss

The `standard-minifier-css` package is already associating
source content with the source map, so we don't need to
do this twice.

* Add History.md entry covering backwards compatibility details

* Bump major version due to backwards compatibility breaking changes

* Bump minor versions

* Code review changes (boolean formatting, concat to spread)
2017-11-22 11:13:54 -05:00
sebakerckhof
4ce2645fbf Add scoped packages to shrinkwrap 2017-11-20 17:57:19 +01:00
sebakerckhof
1bb46bc103 Don't use resolved urls as package version when using a private NPM server 2017-11-20 17:54:45 +01:00
Jesse Rosenberger
2fee9e4d7f Change let to const for some nearby use cases. 2017-11-17 20:27:54 +02:00
Jesse Rosenberger
1ed7796956 Change nested imports to share related, top-level imports.
I believe at one point some of this nesting was important to avoid
cycles in the dependency graph, but that no longer seems to be the
case.
2017-11-17 20:26:33 +02:00
Jesse Rosenberger
5e4ee8dc36 Only import necessary functions from cordova, not *.
The rest of the module is not necessary.
2017-11-17 20:17:21 +02:00
Jesse Rosenberger
ecec5a1ad0 Ensure that Cordova is installed for meteor [add |remove] cordova:*.
In the same spirit as the changes made in
https://github.com/meteor/meteor/pull/8976.

Fixes: https://github.com/meteor/meteor/issues/9257.
2017-11-17 02:15:04 +02:00
Hugh Willson
27ed9bc2e8 Allow scoped Cordova packages to be installed
Fixes an issue preventing the installation of scoped Cordova
packages. For example,
`meteor add cordova:@somescope/some-cordova-plugin@1.0.0`
will now work properly.

Fixes https://github.com/meteor/meteor/issues/7336.
2017-11-17 01:58:54 +02:00
Jack Kavanagh
dd5ea2b950 can resolve private npm package when adding cordova plugin 2017-11-17 01:57:48 +02:00
Jesse Rosenberger
d5ff826596 Decompose self-test logic into separate files.
The single file which represented the bulk of the `meteor self-test`
functionality had got a bit heavy and it stood to benefit from some
dissemination.

I embarked on this change originally when looking into replacing
PhantomJS with Chrome Headless (and a new `ChromeClient` class) within
self-test.  Unfortunately, I didn't have time to take this the last
step of actually implementing Chrome, but this should hopefully
facilitate that change in the future by providing what I believe to be
better compartmentalization of this logic.

I apologize for the (likely) difficulty of reviewing this commit.  Due
to heavy intertwining of existing code it was hard to arrange these
changes in an easy-to-review manner.  I believe a reviewer will
find that it's mainly copy and pasting into different files and
careful adjusting of those files (new) module dependencies.
2017-11-14 15:55:11 +02:00
Jesse Rosenberger
235d00e2c7 Update references to cordova_lib.raw to account for raw deprecation.
The changes made in #9213 were seemingly innocent, but when merging
I missed the fact that the 'cordova-lib' package bump was done to a new
entry on the 'dev bundle', rather than on the
`CORDOVA_DEV_BUNDLE_VERSIONS` in tools/cordova/index.js which, as of
meteor/meteor#8976, is responsible for auto-installing Cordova when it
is used rather than including it in the pre-packaged 'dev bundle'.

That mistake was fixed with 958c44ff1b and
d6adc1b3a9, but not before it caused the
Cordova tests to falsely pass on the PR since it was functionally still
testing the previous version of Cordova, 7.0.0.

Unfortunately, one of the changes in the 7.1.0 was the deprecation of an
API we use within Meteor: the `raw` API on `cordova_lib`. Luckily, as
seen on the following commit, that change was merely a re-organizational
commit and still provides us access to that API by simply removing
the `raw.` segment and accessing the various methods directly:

90b6857f4d

Never saw that deprecation message, but we certainly saw the failure in
CI: https://circleci.com/gh/meteor/meteor/10412.

With any luck, this commit/PR will fix the problem.
2017-11-08 19:20:49 -05:00
Jesse Rosenberger
c70054dff1 Remove unintented extra space in Console message. 2017-11-09 02:10:21 +02:00
Ben Newman
eb8cf102cd Update tools/tests/old/app-with-private test app. 2017-11-08 17:52:49 -05:00
Jesse Rosenberger
1d91e05264 Remove functionality behind the build farm command.
It's still possible to publish packages for different platforms by using
the `meteor publish-for-arch` command, though it's become increasingly
difficult to offer compatible versions for every circumstance due to the
wide matrix of Node.js ABI versions. This makes it unlikely that
a package built on the build farm will be appropriate for the
application which the package is consumed by, substantially reducing the
overall value of rather expensive infrastructure.

Since Meteor 1.4, and as part of the jump from Node 0.10 to Node 4,
Meteor introduced the capability to compile binary dependencies at the
time that a package is installed.  Additionally, many Node.js packages
are already pre-compiled in a much more effective and wide-spread nature
for the entire JavaScript ecosystem using tools like `node-pre-gyp`.

cc @benjamn.
2017-11-09 00:23:25 +02:00
Jesse Rosenberger
d6adc1b3a9 Update 'cordova-lib' to the intended version, 7.1.0, not 7.1.1.
I think I just typo-ed that patch version right before I committed it.

It certainly should have been 7.1.0. :(

Ref: https://github.com/meteor/meteor/pull/9213

cc @skirunman.
2017-11-08 21:55:48 +02:00
Jesse Rosenberger
958c44ff1b Move 'cordova-lib' back to CORDOVA_DEV_BUNDLE_VERSIONS for auto install.
While 'cordova-lib' used to live in 'dev-bundle-tool-package.js' where
it was pre-bundled into the "dev bundle", that is no longer the case.

It is now automatically installed, on demand, when Cordova is used.

This follows up on meteor/meteor#9213, which added it back to the
'dev-bundle-tool-package.js' and updates it in the new location.

Ref: https://github.com/meteor/meteor/pull/9213
Ref: 073f2410a6

cc @skirunman.
2017-11-08 21:53:37 +02:00
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