Commit Graph

17668 Commits

Author SHA1 Message Date
Ben Newman
281a73ddec Be sure to get original CSS contents from appropriate SourceMapConsumer.
https://github.com/meteor/meteor/pull/7877#issuecomment-252359894
2016-10-07 18:35:43 -04:00
Ben Newman
0996efc750 Merge pull request #7877 from klaussner/release-1.4.2
Optimize source map composition for CSS files.
2016-10-07 11:15:23 -04:00
Christian Klaussner
83b3ca7f7a Make sure only valid mappings are added to the map 2016-10-07 15:31:38 +02:00
Christian Klaussner
92bfc5f1e1 Use forEach instead of reduce 2016-10-07 15:12:52 +02:00
Ben Newman
1d149a0ed7 Keep Resolver.getOrCreate cache results distinct by caller.
The options.statOrNull function is not included in the JSON.stringify key,
but it affects the results because the implementation provided by the
ImportScanner relies on scanner._getFile to return fakeFileStat for
make-believe files created by the ImportScanner.

This becomes a problem if PackageSourceBatch#getResolver accidentally uses
a Resolver created initially for the ImportScanner, or vice-versa.

In particular, when a compiler plugin calls addJavaScript with a path
different from the original file path, the ImportScanner generates two
different modules, one of which imports the other. Only one of the files
exists on disk, though, so a special implementation of statOrNull is
necessary to keep the Resolver from having to share implementation details
with the ImportScanner.

When this system fails, users of compiler plugins see errors like this:
https://github.com/meteor/meteor/pull/7668#issuecomment-251976739
2016-10-06 12:43:37 -04:00
Ben Newman
43aa2c777b Avoid calling files.realpath in IsopackCache#getSourceRoot.
It's difficult to keep track of all the factors that could affect the
output of files.realpath, so it doesn't seem feasible to replace this call
with an optimistic function.

Fortunately, it's fine if the paths returned by IsopackCache#getSourceRoot
contain symlinks, and possibly even preferable, since

  ~/.meteor/packages/<name>/<version>

is more consistent than

  ~/.meteor/packages/<name>/.<version>.<junk>++<more junk>

though the latter happens to be a symlink to the latter.
2016-10-06 12:34:04 -04:00
Christian Klaussner
00fc89b373 Rewrite source map composition for CSS files
The previous implementation had a run time quadratic in the number of CSS files with an associated source map. This new implementation has a linear run time because it iterates only once through all mappings of each CSS file.
2016-10-06 18:25:07 +02:00
Ben Newman
232ab2d209 Bump package versions for 1.4.2-beta.9 release.
I had to scrap the 1.4.2-beta.8 release because meteor-tool@1.4.2-beta.8
got published by a partial run of the publish-release script, but then the
publish-release script thought meteor-tool changed after that, and I
didn't want to republish it as something like 1.4.2-1-beta.8.
release/METEOR@1.4.2-beta.9
2016-10-05 18:42:56 -04:00
Ben Newman
082bd48b02 Shorten implicit description of Tracker package.
This tweak is intended to fix the following publish-release error:

  => Errors while publishing:

  While publishing package tracker:
  error: Longform package description is too long. Meteor uses the section of the Markdown documentation file between the first and second headings. That section must be less than 1500 characters long.
2016-10-05 18:36:41 -04:00
Ben Newman
c74a95c0b8 Clean up findAssignedGlobals caching.
Two mistakes: we were maintaining two redundant caches for
findAssignedGlobals, and callings tryToParse before checking globalsCache,
when often globalsCache already had a stored result.
2016-10-05 17:54:35 -04:00
Ben Newman
2ec570251a Stop generating identity source maps for files without actual source maps.
This speeds up both getPrelinkedOutput (because we don't spend any time
generating the identity source map) and toStringWithSourceMap (because we
don't have to combine those source maps).

We still generate line number comments for files without source maps, so
it's relatively easy to find the source line for a stack trace.
2016-10-05 17:54:34 -04:00
Ben Newman
a6269c3c74 Add a note to History.md about Cordova updates. 2016-10-05 16:16:55 -04:00
Ben Newman
95286804fe Bump $BUNDLE_VERSION to 4.3.2 before rebuilding dev bundle. 2016-10-05 16:12:09 -04:00
Martijn Walraven
6b0fc9110b Update cordova-plugin-meteor-webapp dependency to 1.4.1 2016-10-05 16:11:34 -04:00
Martijn Walraven
e9aa8082dc Update cordova-plugin-meteor-webapp dependency to 1.4.0 2016-10-05 16:11:34 -04:00
Martijn Walraven
e8b1126ad4 Add temporary workaround for cordova-ios bug 2016-10-05 16:11:34 -04:00
Martijn Walraven
f574b46adc Update Crosswalk plugin to latest version 2016-10-05 16:11:33 -04:00
Martijn Walraven
458c5b40f0 Update Cordova pinned plugin versions and dependencies to latest versions 2016-10-05 16:11:33 -04:00
Martijn Walraven
6322a55985 Update cordova-ios and cordova-android to latest versions 2016-10-05 16:11:33 -04:00
Martijn Walraven
cc9882b12d Update cordova-lib in dev bundle to 6.3.1 2016-10-05 16:11:32 -04:00
Ben Newman
3fffb9bebc Revert unnecessary commits attempting to fix Travis/Circle CI tests.
After much debugging, I have tracked down and fixed the root cause of the
test failures: colorized app output was silenced because the Log.format
function could not require("cli-color").

Revert "Wait for "=> App running at:" in packages/test-in-console/run.sh."
This reverts commit 0713b9d153.

Revert "Use console.log to print test-in-console listening message."
This reverts commit a421da5a5e.
2016-10-05 15:03:43 -04:00
Ben Newman
bcc5f7ff97 Avoid dropping package.json files when "main" names a directory.
An example of an npm package that triggers this bug is the `cli-color`
package, which has a package.json file with a "main" property whose value
is "lib", and a "lib" directory that contains an index.js file.
2016-10-05 14:58:09 -04:00
Ben Newman
76903f0cfc Add a failing test to the logging package.
This test case currently fails because the `cli-color` npm package cannot
be required, which means all colorized logging messages printed by the app
will throw in the eachline callback(s) in AppProcess#start, which breaks
virtually any test that waits for an app to print a ready message.
2016-10-05 14:57:55 -04:00
Ben Newman
0713b9d153 Wait for "=> App running at:" in packages/test-in-console/run.sh.
For some unknown reason, the "test-in-console listening" message is not
being printed to STDOUT when this script runs on Travis CI any more. We
should investigate why that is, but it's important to get these tests
running (and passing) again.
2016-10-04 20:10:16 -04:00
Ben Newman
a421da5a5e Use console.log to print test-in-console listening message. 2016-10-04 18:53:36 -04:00
Ben Newman
1d64cf6f61 Attempt to fix Travis CI tests. 2016-10-04 18:34:28 -04:00
Ben Newman
339ccc9db3 Fix tests by not watching package.json files if hash is null. 2016-10-04 17:15:25 -04:00
Ben Newman
5c9d72450d Watch package.json files reported from Resolver#resolve.
This change should mitigate any regressions from my earlier commit
97ca5f1836.
2016-10-04 15:18:57 -04:00
Ben Newman
eda5f37ab2 Merge branch 'release-1.4.1.2' into release-1.4.2 2016-10-04 14:00:30 -04:00
Ben Newman
21b4c664f4 Cache Resolver objects by their constructor arguments.
This is critical because it means Resolver objects can now survive
development server restarts, which means the optimistic Resolver#resolve
method can remember results indefinitely. Thanks to this change, the
Resolver#resolve method has practically disappeared from rebuild
performance profiles.
2016-10-04 13:08:13 -04:00
Ben Newman
dd3d4363b7 Use optimistic wapper for Resolver#resolve instead of _resolveCache. 2016-10-04 12:59:16 -04:00
Ben Newman
1d74c0ce5e Bump package versions for the official 1.4.1.2 release. release/METEOR@1.4.1.2 2016-10-04 12:44:28 -04:00
Ben Newman
2937403be0 Bump package versions for 1.4.1.2-rc.0 release. release/METEOR@1.4.1.2-rc.0 2016-10-04 12:34:01 -04:00
Ben Newman
595f67fda8 Bump $BUNDLE_VERSION to 4.3.0 before rebuilding dev bundle. 2016-10-04 11:58:35 -04:00
Ben Newman
9ecf3f2b50 Upgrade Node to 4.6.0 and npm to 3.10.8. 2016-10-04 11:58:35 -04:00
Ben Newman
d0f093413c Use optimisticStatOrNull in tools/fs/watch.js. 2016-10-03 22:19:13 -04:00
Ben Newman
3ef7a08297 Eliminate the onMissing callback from the Resolver API. 2016-10-03 22:06:50 -04:00
Ben Newman
5b238bb0c7 Eliminate the onPackageJson callback from the Resolver API. 2016-10-03 22:06:38 -04:00
Ben Newman
97ca5f1836 Don't pass watchSet when instantiating Resolver objects.
We used the watchSet only when reading package.json files, and I think we
can add package.json files to the watchSet in the ImportScanner instead.
2016-10-03 21:45:36 -04:00
Ben Newman
1a3ae4e117 Remove _statCache and _pkgJsonCache members from Resolver.
This caching is redundant now that we're using optimistic functions for
accessing the file system in Resolver methods.
2016-10-03 21:01:01 -04:00
Ben Newman
23d62408b2 Use my optimism npm package to implement optimistic functions. 2016-10-03 17:32:10 -04:00
Ben Newman
27316ed78b Bump $BUNDLE_VERSION to 4.2.13 before rebuilding dev bundle. 2016-10-03 17:32:10 -04:00
Ben Newman
0d32423fe0 Upgrade Node to version 4.6.0.
https://nodejs.org/en/blog/release/v4.6.0/
2016-10-03 17:32:09 -04:00
Ben Newman
8b42bfa6f0 Add optimism@0.2.2 to the dev bundle. 2016-10-03 17:25:42 -04:00
Ben Newman
80fdc16e21 Add v8-profiler@5.6.5 to the dev bundle. 2016-09-30 10:31:58 -04:00
Ben Newman
eb4c04da86 Cache result of findAssignedGlobals in memory to speed up rebuilds. 2016-09-29 21:14:55 -04:00
Ben Newman
bd6ddc0800 Add note about killing mongod on shutdown to History.md. 2016-09-29 19:27:11 -04:00
Ben Newman
bfa3eaa57d Use async rimraf as a fallback if rimraf.sync throws ENOTEMPTY.
This change preserves the performance benefits of my previous commit
5af59c58bc, since rimraf.sync is still
attempted first.
2016-09-29 19:25:32 -04:00
Ben Newman
0808325846 Bump package versions for 1.4.2-beta.7 release. release/METEOR@1.4.2-beta.7 2016-09-29 17:48:31 -04:00
Ben Newman
42e0efef61 Update History.md with recent changes in the 1.4.2 release. 2016-09-29 17:47:15 -04:00