Commit Graph

22234 Commits

Author SHA1 Message Date
Ben Newman
dea305ca4a Set a higher LRU cache size for makeCheapPathFunction entries.
In PR #10720, we introduced the makeCheapPathFunction in an effort to
reduce the caching overhead for very frequently called (and already pretty
quick) operations like files.stat.

However, the default maximum LRU cache size of Math.pow(2, 16) can cause
quite a bit of cache eviction churn for large applications, which @veered
has identified as a potential source of build performance problems.

By setting the maximum cache size to Math.pow(2, 20) instead, I am no
longer seeing any files.stat calls in the profiling output for rebuilding
a large internal app, saving several seconds of rebuild time. The obvious
downside is that this cache might accumulate more memory over time, which
is why I didn't just set the max to Infinity, though that might be a
viable option if the total set of paths ever stat'd is small enough to fit
into the available memory.

In the future, I hope to find ways of managing LRU cache size that respond
to actual memory pressure (relative to available memory), rather than
pruning the cache after an arbitrary numeric threshold is reached.
2019-11-05 11:19:43 -05:00
David Glasser
3e9e11d76c tools/deploy: provide more context for version-status errors (#10670)
Also only print the error once on failure.
2019-11-05 10:01:53 -05:00
filipenevola
ebeb7f6879 - adds break change on 1.8.2 history about variables named exports 2019-11-04 07:41:27 -03:00
filipenevola
1761ea02c5 - adds break change on 1.8.2 history about variables named exports 2019-11-04 07:36:55 -03:00
Ben Newman
19f00eef81 Bump package versions for 1.8.2-rc.4 release. release/METEOR@1.8.2-rc.4 2019-10-24 19:36:39 -04:00
Ben Newman
9b4e742516 Bump $BUNDLE_VERSION to 8.16.2.0 before rebuilding dev bundle. 2019-10-24 19:36:34 -04:00
Ben Newman
1cf59867b2 Remove no-longer-necessary noYieldsAllowed wrapper from loadIsopackage. 2019-10-24 19:36:32 -04:00
Ben Newman
7fb7fcdd6d Work around incorrect fs.statSync type inference. 2019-10-24 19:36:32 -04:00
Ben Newman
f42d6db609 Update Node.js to version 8.16.2.
https://nodejs.org/en/blog/release/v8.16.2/
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.16.2
2019-10-24 18:57:13 -04:00
Ben Newman
354c65e7aa Bump webapp package patch version to 1.7.5 after PR #10711. 2019-10-24 18:55:44 -04:00
Ben Newman
56c21a9796 Attempt to make optimisticStatOrNull less expensive. (#10720) 2019-10-24 18:55:12 -04:00
Ben Newman
4a159066d6 Merge pull request #10730 from filipenevola/cannot-find-module-dynamic-imports
Fixes `cannot find module` error when using dynamic imports in massive projects
2019-10-24 18:45:13 -04:00
Florian Kaiser
11ef927252 Remove qs-middleware from webapp package to avoid license issues (#10711)
Closes #10707.
2019-10-24 18:33:34 -04:00
Ben Newman
11e60dc22e Finish converting changes from PR #10730 to TypeScript. 2019-10-24 18:17:41 -04:00
filipenevola
bbd256ffd1 Fix "Cannot find module" error when using dynamic and nested imports.
Fixes #10643.
2019-10-24 18:09:29 -04:00
Ben Newman
8c187586ae Update typescript plugin patch version to match npm version. 2019-09-23 12:50:46 -04:00
Ben Newman
8dd87a6636 Bump package versions for 1.8.2-rc.3 release. release/METEOR@1.8.2-rc.3 2019-09-23 12:26:57 -04:00
Ben Newman
ef289cf044 Bump $BUNDLE_VERSION to 8.16.1.3 before rebuilding dev bundle. 2019-09-23 12:20:00 -04:00
Ben Newman
f5c85a0243 Update typescript and optimism packages to latest versions. 2019-09-23 12:18:26 -04:00
Ben Newman
a102e5fe37 Use optimisticStatOrNull in readAndStatDirectory.
This drastically (by more than half) cuts down the number of calls to
files.stat that occur during PackageSource#_findSources scanning.
2019-09-23 12:02:32 -04:00
Ben Newman
62faa518a0 Bump package versions for 1.8.2-rc.2 release. release/METEOR@1.8.2-rc.2 2019-09-23 10:06:43 -04:00
Ben Newman
48d27202e7 Skip watching output files without absPath or sourcePath properties.
https://github.com/meteor/meteor/pull/10522#issuecomment-533393100
2019-09-22 11:50:52 -04:00
Ben Newman
c0f3222ea5 Bump package versions for 1.8.2-rc.1 release. release/METEOR@1.8.2-rc.1 2019-09-19 19:09:38 -04:00
Ben Newman
9cba123401 Restore CLI progress messages by revisiting progress.ts conversion.
I noticed recently that progress messages were no longer displayed (though
the ASCII spinner was still animating). I bisected the problem to the
progress.ts conversion in #10650, and I attempted to reproduce the
conversion, step by step. The problem ended up being the renaming of
._title to .title, which was a mistake because external code accesses
progress._title. Once I updated those invasive access points, progress
messages began displaying once again.
2019-09-19 19:01:33 -04:00
Ben Newman
df3fac2e1f Sanitize risky whitespace characters to recover from failed JSON.parse.
Partial alternative to using json5, which we tried in commit
5124cb495c, which was recently reverted due
to performance concerns: 0e19c365a8.

Should solve the specific problem reported in #10688.
2019-09-19 16:14:56 -04:00
Ben Newman
0e19c365a8 Revert "Use json5 for optimisticReadJsonOrNull."
This reverts commit 5124cb495c.

Perhaps unsurprisingly, JSON5 is much slower than JSON, so much so that
"other optimisticReadJsonOrNull" has become the single most expensive leaf
when building one of our internal applications. We will have to find
another solution.
2019-09-19 15:15:47 -04:00
Ben Newman
37f363177e Update coffeescript to use version 2.4.1. 2019-09-19 14:51:41 -04:00
Ben Newman
d0781233e8 Install typescript in devDependencies of skel-typescript.
This is important so that tools like VSCode will pick up the correct
version of the TypeScript SDK, rather than whatever default version was
installed with VSCode.
2019-09-19 13:22:22 -04:00
Ben Newman
e94739f7e8 Bump package versions for 1.8.2-rc.0 release. 🎉 release/METEOR@1.8.2-rc.0 2019-09-19 11:54:49 -04:00
Ben Newman
810c8ea89b Update core-js to version 3.2.1. 2019-09-19 11:01:17 -04:00
Ben Newman
6c3ce7baa6 Update terser minifier to version 4.3.1. 2019-09-19 10:51:51 -04:00
Ben Newman
de01ab1a09 Pass tsconfig.json path to meteor-babel via features.typescript.
This information is not used by meteor-babel, yet, but it will become
important as Meteor's TypeScript support begins to honor tsconfig.json.
2019-09-19 10:51:51 -04:00
Ben Newman
c61c75b0e8 Include checksum of meteor script in .babel-cache CircleCI cache key. 2019-09-19 10:51:51 -04:00
Ben Newman
403d5cabd7 Merge pull request #10695 from meteor/meteor-create-typescript-skeleton
Allow creating Meteor apps with --typescript skeleton.
2019-09-19 10:34:34 -04:00
Ben Newman
63bb2cbac6 Invalidate AppVeyor .babel-cache cache when BUNDLE_VERSION changes. 2019-09-19 10:12:48 -04:00
Ben Newman
ee62fd419e Mention TypeScript support and skeleton app in History.md. 2019-09-19 09:41:23 -04:00
Ben Newman
2468d17fec Allow creating Meteor apps with --typescript skeleton.
Just as developers can run

  meteor create --react my-react-app
  meteor create --minimal my-minimal-app
  meteor create --bare my-bare-app
  meteor create --full my-full-app

they can now run

  meteor create --typescript my-typescript-app

to produce a new TypeScript application, based on the --react application,
configured using a recommended tsconfig.json file.

This app represents the current best/simplest-known way to set up a
Meteor-compatible TypeScript application, but it is still very much a work
in progress. Please feel free to submit pull requests to improve it, or
create issues to discuss how it should work.

For example, the community-maintained @types/meteor package covers all the
core packages used by this starter application, but it has not been
updated in a while, so there will no doubt be meteor/* packages with
missing types. In future versions, Meteor should ideally generate the
appropriate .d.ts files from TypeScript package source code, so that no
separate @types/meteor/* declarations need to be maintained.
2019-09-19 09:27:23 -04:00
Ben Newman
f9c498adb8 Improve the shouldWatch function in tools/fs/optimistic.ts. (#10693)
This function determines whether the optimistic caching system should
subscribe to file change notifications for a given path.

Note that Meteor has other ways of watching for file changes (e.g. the
WatchSet abstraction), as well as other mechanisms for invalidating cached
results, so time and resources can often be saved by returning false here,
if we know that the path will be watched in other ways.

Improvements:

- Add METEOR_PROFILE instrumentation to the shouldWatch implementation.

- Stop exporting shouldWatch, since it is no longer used anywhere else in
  the codebase.

- Return false early to avoid watching files inside the .meteor directory,
  a significant shortcut.

- Allow watching files in application node_modules directories that are
  not located directly in the root application directory (closes #10664).
2019-09-18 16:19:02 -04:00
Ben Newman
7bc5b5b061 Use dep API from optimism instead of wrap in a few places.
Background: https://github.com/benjamn/optimism/pull/50
2019-09-18 12:08:30 -04:00
Ben Newman
f22bfec527 Bump $BUNDLE_VERSION to 8.16.1.2 before rebuilding dev bundle. 2019-09-18 11:42:02 -04:00
Ben Newman
ec403b3fe5 Update optimism npm package to latest version (0.11.2). 2019-09-18 11:42:02 -04:00
Ben Newman
c4ad648c5e Update meteor-babel to version 7.6.1. 2019-09-17 21:11:56 -04:00
Ben Newman
5124cb495c Use json5 for optimisticReadJsonOrNull.
Because json5 is more tolerant of non-standards-compliant input, it has no
trouble with \t tab characters outside of string literals, so this change
should fix issue #10688.

Note that json5 is already installed in dev_bundle/lib/node_modules/json5,
because it is a dependency of @babel/core, so we don't need to rebuild the
dev bundle immediately, though it would be a good idea to do so before the
next beta/RC release.
2019-09-07 21:04:29 -04:00
Ben Newman
6b1e1f7a4f Bump $BUNDLE_VERSION to 8.16.1.1 before rebuilding dev bundle. 2019-09-06 19:12:35 -04:00
Ben Newman
9fb6b9cd89 Bump package versions for 1.8.2-beta.18 release. release/METEOR@1.8.2-beta.18 2019-09-06 18:53:04 -04:00
Ben Newman
7bf1b3cbc5 Update 'meteor create --react' react[-dom] versions to 16.9.0. 2019-09-06 18:45:04 -04:00
Ben Newman
c8e322e197 Update typescript version to 3.6.2.
Most of these changes came for free with the update of meteor-babel to
version 7.6.0, but a few remaining spots needed to be updated.
2019-09-06 18:43:40 -04:00
Ben Newman
cf5db3626e Update meteor-babel to version 7.6.0. 2019-09-06 18:40:50 -04:00
Ben Newman
e4101e1f0a Go back to using LRU cache for findImportedModuleIdentifiers.
Should fix #10674.
May help with #10608.

cc @houshuang @klaussner
2019-09-06 18:29:14 -04:00
Ben Newman
5a765e9b47 Update npm dependencies of minifier-css package. 2019-09-06 18:29:14 -04:00