Commit Graph

183 Commits

Author SHA1 Message Date
Jan Dvorak
29adc93949 Fix #9907 2021-08-04 15:34:19 +02:00
Jan Dvorak
b6e127cfc9 Minor tools update
Replace underscore where easy and feasible & other minor modernization that I came across.
2021-06-25 00:36:03 +02:00
filipenevola
125846cefa Merge branch 'release-2.3' into feature/accurate-unused-files-tracking
# Conflicts:
#	tools/isobuild/compiler.js
2021-06-14 13:46:52 -04:00
zodern
baaf524163 Ignore changes to unused files in client watchset 2021-05-14 16:37:43 -05:00
Jan Dvorak
7ed9cc941f Merge pull request #11405 from meteor/fix/hmr-bugs
Fix HMR bugs
2021-05-11 22:50:59 +09:00
zodern
a604b7c577 Send eager updates for non-reloadable change sets 2021-05-07 16:42:13 -05:00
zodern
017bd4396e Fix hmr path when rootUrl is undefined 2021-05-07 11:40:56 -05:00
zodern
07871e9a2e Merge branch 'devel' into reify-runtime-compiler-cache 2021-04-30 17:26:39 -05:00
zodern
15f64f5bfe Fix using HMR when ROOT_URL has a path 2021-04-30 14:48:04 -05:00
zodern
6038bd5c59 Add cache for reify runtime compiler 2021-04-26 13:57:12 -05:00
Renan Castro
4ca55460b9 Fix replica set init message check 2021-04-02 10:36:22 -03:00
filipenevola
643644f7b5 Fix MongoDB startup checks 2021-04-01 17:24:47 -04:00
filipenevola
12afa3eb14 Fixes error on Mongo start in Node 14 2021-02-10 18:49:13 -04:00
zodern
8b1ba05b50 Only set hmr secret env var when HMR is enabled 2021-01-18 14:53:02 -06:00
zodern
68447d7d5a Show build errors in client 2021-01-14 21:33:25 -06:00
zodern
64165aab0e Reduce HMR logs 2021-01-14 17:25:27 -06:00
zodern
59bf534baa Ignore changes to hash of files created as alias 2021-01-14 16:29:46 -06:00
zodern
0477a59978 Fix default value for onJsOutputFiles 2020-10-12 09:07:34 -05:00
zodern
01400b50eb Improve handling wrong HMR secret or different app 2020-10-10 20:52:25 -05:00
zodern
ab3d407d22 Integrate HMR into the meteor tool 2020-10-10 20:52:18 -05:00
Filipe Névola
94cd41f760 Merge pull request #11114 from meteor/full-rebuild-build-in-place 2020-07-09 13:17:27 -04:00
zodern
97d5679889 Enable in place builds for full rebuilds on Windows 2020-07-08 10:09:06 -05:00
filipenevola
da2c653803 Adds message for when Mongo server is not starting on Windows. 2020-06-24 10:06:18 -04:00
Seba Kerckhof
9c9a8263ab Add separate SERVER_NODE_FLAGS envar (#10965)
* Add separate SERVER_NODE_FLAGS envar

Since Meteor 0.5.3, Meteor allowed to pass node command line flags
to the server node process via the `NODE_OPTIONS` environment variable.

However, since Node version 8 / Meteor 1.6 this has become a default node
envar with the same behavior:
https://nodejs.org/api/cli.html#cli_node_options_options

The side effect is that this now also affects Meteor tool.

The command line parameters could already be set separately via the `TOOL_NODE_FLAGS` envar.
This is now also possible (again) for the server.
2020-04-17 20:17:53 -04:00
Kyle Shankwiler
6803d8dfd1 Add an error message warning developers of oversized headers. (#10877)
* Add an error message warning developers of oversized headers.

An explanation of the issue being logged can be found here: https://forums.meteor.com/t/meteor-1-8-1-unexpected-error-too-many-csp-rules/48447/12.

* Ensure the large request header test works as intended
2020-04-17 11:32:21 -04:00
Ben Newman
a467255d9c Use IPC message to handle .reload command in meteor shell.
I considered using a nonzero process.exit code, but I didn't want to run
any risk of reusing a meaningful code, and the accepted range of codes
unfortunately does not include parseInt("reload", 36), or 1657112629.

Should fix #10934.
2020-02-26 12:13:48 -05:00
Seba Kerckhof
28d898dd0b Merge branch 'devel' into error-page-syntax-highlighting 2020-01-23 16:52:52 +01: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
Christian Klaussner
92013e3486 Remove multiple restart feature (#10345) 2019-12-18 17:56:54 -05:00
Christian Klaussner
c112077ac2 Convert ANSI escape codes to HTML on error page 2019-12-14 21:19:30 +01:00
Ben Newman
b3d88944ae Explicitly track potentially unused WatchSet files.
The previous implementation simply avoided calling watchSet.addFile for
potentially unused files, trusting that addFile would be called later if
the file was eventually used. However, this strategy left the contents of
watchSet.files incomplete for tasks such as IsopackCache._checkUpToDate,
which require full information about all files, even the ones that might
not be used by the bundle. The new strategy maintains metadata about
potentially unused files in a separate data structure, which will be
merged/cloned/serialized/deserialized along with other WatchSet data.
2019-09-06 16:24:41 -04:00
Michael Newman
f8ba7a96fe Convert tools/utils/mongo-exit-codes to TypeScript (#10625) 2019-07-21 12:02:29 -04:00
Michael Newman
8af53f97d6 Convert tools/utils/eachline.js to TypeScript (#10614)
Thanks to @menewman for tackling this small but important module!
2019-07-15 11:34:45 -04:00
Ben Newman
769337551e Convert tools/tool-env/profile.js to TypeScript.
Unfortunately, this conversion triggered an error due to one of the
shortcomings of the Babel implementation of TypeScript:

SyntaxError: /tools/tool-env/profile.ts: Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript
  278 | }
  279 |
> 280 | export namespace Profile {
      |                  ^
  281 |   export let enabled = !! process.env.METEOR_PROFILE;
  282 |
  283 |   export function time<TResult>(bucket: string, f: () => TResult) {
    at File.buildCodeFrameError (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/core/lib/transformation/file/file.js:261:12)
    at transpileNamespace (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/plugin-transform-typescript/lib/namespace.js:25:25)
    at PluginPass.TSModuleDeclaration (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/plugin-transform-typescript/lib/index.js:271:32)
    at newFn (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/visitors.js:193:21)
    at NodePath._call (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:88:12)
    at TraversalContext.visitQueue (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:118:16)
    at TraversalContext.visitMultiple (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:85:17)
    at TraversalContext.visit (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:144:19)
2019-07-06 09:18:35 -04:00
Ben Newman
d8436bb635 Convert tools/fs/safe-watcher.js to TypeScript.
This completes the TypeScript conversion of the tools/fs directory. 🎉
2019-07-05 18:58:18 -04:00
Ben Newman
8958cbc5e9 Convert tools/fs/watch.js to TypeScript. 2019-07-05 17:50:20 -04:00
Ben Newman
5ed64fb1db Remove explicit .js extension from tools/fs/files imports. 2019-07-04 10:32:09 -04:00
Christian Klaussner
2b21a901a5 Wait until Mongo primary node is writable (#10500)
Using the `isMaster` command instead of checking the replica set member state is more reliable because a node can be a primary without being writable.

Fixes #10381 and #9026.
2019-03-19 19:12:12 -04:00
Ben Newman
44e293b741 Merge branch 'devel' into release-1.8.1 2019-03-19 13:10:35 -04:00
Simon Schick
40e8da227e Added an environment variable to determine if Meteor will restart automatically (#10465) 2019-03-15 11:01:13 -04:00
Ben Newman
419ff7ce92 Merge pull request #10399 from zodern/windows-build-performance
Windows build performance
2019-01-31 12:02:41 -05:00
zodern
31dfb0cc06 Remove timeout for starting delayed build 2019-01-17 16:09:21 -06:00
zodern
285e1b50c3 Clean up code 2019-01-16 22:16:51 -06:00
Ben Newman
aaeb2a7c2c Pass --enableFreeMonitoring off to Mongo 4 shell, except on Linux. 2019-01-05 16:27:20 -05:00
Ben Newman
c7441e68c6 Ensure consistent LANG-related environment variables in findMongoPids.
For some reason, without all three of these environment variables set
(LANG, LC_ALL, and LANGUAGE), the STDOUT returned from the child process
in findMongoPids contained ?? in place of non-ASCII unicode characters,
which was causing the self-test of Mongo shell in a unicode application
directory to fail.

This implementation defaults all three environment variables to
process.env.LANG if it was defined, or "en_US.UTF-8" otherwise.
2019-01-05 15:05:34 -05:00
Ben Newman
61b2ac3878 Revert "Use --enableFreeMonitoring off instead of --quiet for Mongo shell."
This reverts commit 7055780697.

While this flag works as expected on MacOS, it appears not to be supported
on Linux, even using MongoDB 4.0.5 (the latest version):
https://jira.mongodb.org/browse/SERVER-38862
2019-01-05 13:17:33 -05:00
Ben Newman
7055780697 Use --enableFreeMonitoring off instead of --quiet for Mongo shell.
Previously: 7f7a987251

cc @klaussner @mitar
2019-01-05 12:45:24 -05:00
zodern
21f976d6f0 Fix delay between server starting and showing "=> Server restarted"
Creating the watcher can take up to 12+ seconds in small - medium apps, and uses sync fs calls.
The server would start right away, but the tool process wouldn't know about it until the watcher finished setting up. Also, the proxy doesn't forward requests until "=> Server restarted" is shown.
A new async option is added to Watcher which prevents it from blocking the event loop too long.
Also, the watcher and legacy bundle are only created after the server has started, or 3 seconds has passed.
2019-01-01 11:47:20 -06:00
Ben Newman
a6e52c87b9 Await lingering self.runPromise in AppProcess#_runOnce.
Should fix #10220.
2018-09-18 10:28:37 -04:00