Commit Graph

39 Commits

Author SHA1 Message Date
Ben Newman
6aec3603c8 Separate install-runtime.js from install-babel.js. 2016-05-19 17:04:08 -04:00
Ben Newman
d94e7d812d Upgrade dev bundle meteor-promise to 0.7.1. 2016-05-16 18:21:11 -04:00
Ben Newman
cf98e285ac Fix imports of tools/tool-env/isopackets.js.
Fixes #6778.
2016-04-11 12:33:16 -04:00
Ben Newman
911b4aa4cb Simplify CSS-to-CommonJS conversion by not handling @import rules.
We can revisit this conversion if it turns out anyone really wants to use
@import rules in CSS files instead of using something like LESS.

Part of #6037.
2016-04-08 19:02:33 -04:00
Ben Newman
5a78420b10 Upgrade meteor-babel versions to 0.9.2. 2016-04-07 13:51:24 -04:00
Ben Newman
b4fe0d5c85 Allow importing .css files from node_modules directories.
Fixes #6037.
2016-04-07 13:05:49 -04:00
Ben Newman
8248d86fb2 Consolidate exit code logic for meteor npm and meteor node.
Follow-up to #6675.
2016-04-01 12:08:55 -04:00
Maxime Quandalle
a7bc440ca7 Emphasize the tree structure in the profile output
The formating is freely inspired by the Unix `tree` command.
2016-02-06 14:32:05 +01:00
David Greenspan
601cfbcebd Don't re-parse versions during sorting; profiling
- We don't want to do a bunch of parsing *per comparison* when sorting
  a list of package version strings.  package-version-parser's `compare`
  (and server's `compare`, which it uses) both accept either a string
  or a parsed record.  By parsing explicitly with memoization, we avoid
  a super-linear blow-up in the amount of parsing.  This'll save someone
  half a second, at least.
- Adjust profiling hooks and messages
- Expose `Profile` to isopackets
2016-02-05 10:04:31 -08:00
David Greenspan
0a22393c90 Profiler: Encode entry keys a little faster
Don't want too much overhead in there.
2016-02-05 02:30:28 -08:00
David Greenspan
2b1b95dd1b Profiler: show counts for hot leaves
we put a count in "other $foo" entries now so that you can
see them under hot leaves, but we still don't show the count
in the hierarchical report.
2016-02-05 00:52:31 -08:00
Ben Newman
4c890ac20d Use Babel 6 to implement ECMAScript 2015+ in tool code.
Note that `export default` no longer modifies `module.exports`, but simply
defines `exports.default`, so these two import styles will work:

  import DefaultExport from "./export-default-module.js"; // preferred
  var DefaultExport = require("./export-default-module.js").default;

but this style will no longer work:

  var DefaultExport = require("./export-default-module.js");
2016-02-04 21:37:34 -05:00
David Greenspan
2fca3a9599 Profile more of tool and improvements to Profile
Previously, we would generate reports on
"Selecting Package Versions" and "Rebuild App".

- Instead of just profiling constraint solving, profile the entire
  process of preparing the project via ProjectContext, by giving
  each public function that "advances the stage" a Profile.run
  (typically prepareProjectForBuild).
- Improve profiler output to better distinguish multiple runs
- Distinguish "Build App" and "Rebuild App"
- Instrument lots of calls that weren't instrumented before
2016-02-03 11:54:05 -08:00
David Greenspan
b9f7613373 Don't show "other" in profile when no signif. kids
Background: we omit entries from the report whose time is below
a threshold (by default 1ms).

This change prevents a display like the following, where the
presence of child entries creates a "group" but the group
appears to be empty except for "other":
```
foo...........30 ms
   other foo  29 ms
```
2016-02-01 08:45:36 -08:00
David Greenspan
213deebf26 Improvements to profiler report
Call counts, and visual improvements
2016-02-01 08:45:36 -08:00
David Greenspan
e21b5498f2 Support sub-millisecond thresholds in Profile
METEOR_PROFILE=1 sets the threshold for displaying profiler entries
to 1ms.  Previously, however, passing "0.1" or "0" would enable
profiling but use the default threshold of 100ms.  With this change,
any recognizable number passed as METEOR_PROFILE will be used as
a threshold, including "0.1" and "0".
2016-02-01 08:45:35 -08:00
David Greenspan
8edffac142 Speed improvements to Profile
profile.js uses some "dumb" data structures and algorithms that are
N^2 or even N^3.  If you experiment with adding more data to the
profile (e.g. names of files written), you'll find that the time it
takes to generate the profiler report blows up.  This commit
makes the profiler usable again in that case.

* Don't create a new array in isChild(.), and compare elements
  starting at the end (because early elements are more likely
  to be similar)
* Swap order of entryName(.) (cheap) and isLeaf(.) (expensive)
  in leafTotal(.)
2016-02-01 08:45:35 -08:00
David Greenspan
ea3f8e3f15 Clarify a comment about source maps 2016-02-01 08:32:25 -08:00
David Greenspan
0dab7bdad3 Fix tool source maps (clobbered by coffee-script)
Switching from "require" to "import" in the coffeescript plugin
broke our hack that keeps coffeescript from clobbering our version
of Error.prepareStackTrace, because imports are automatically
hoisted to the top of the file, and thus so are any side effects of
requiring a module.

The new fix has the tool save a copy of the correct
Error.prepareStackTrace so that any plugin that wants to unclobber
Error.prepareStackTrace can do so.

Other, fancier fixes are possible; there's a package called
stack-chain that installs a getter/setter on
Error.prepareStackTrace:
e51a7b2e0f/stack-chain.js (L136)
2016-02-01 08:32:12 -08:00
Ben Newman
ed17924940 Add braces to every if/for(-in)/while statement in tools directory. 2015-11-13 12:25:19 -05:00
Evan You
0f98ea22fc fix git hook install check 2015-10-09 20:58:45 -04:00
Ben Newman
c00b12b8fa Use meteor-ecmascript-runtime in dev bundle instead of core-js. 2015-10-03 14:39:24 -04:00
Sashko Stubailo
a23cc02492 Merge branch 'master' into devel
Conflicts:
	History.md
	packages/babel-compiler/.npm/package/npm-shrinkwrap.json
	packages/babel-compiler/package.js
	packages/ecmascript/package.js
	packages/sha/package.js
	tools/upgraders.js
2015-09-21 20:12:55 -04:00
Mitar
5a36f344e8 Do not fail if meteor tool is not run from a git clone. 2015-09-15 13:59:49 -07:00
Evan You
452c839d94 apply ci script updates 2015-09-09 15:29:46 -04:00
Martijn Walraven
af70287656 Remove cordova package and put cordova-lib and ios-sim back into the dev bundle 2015-08-26 19:26:51 +02:00
Martijn Walraven
74b5f7bcea Move cordova-lib and ios-sim from dev bundle to package 2015-08-26 19:26:47 +02:00
Ben Newman
6979fab28a Configure meteor-babel with a source map root path.
This ensures paths embedded in source maps for meteor/tools/ files don't
include directories outside the meteor directory, which makes navigating
the directory tree in node-inspector considerably easier.
2015-08-13 20:01:01 -04:00
David Glasser
153f18b462 no more minifiers isopacket! 2015-08-11 20:51:15 -07:00
Slava Kim
4a098a674d Explain how Babel compilation is hooked into tool 2015-08-07 11:41:25 -07:00
Slava Kim
afee6b07c7 move catalog/ into packaging/ 2015-08-06 16:39:01 -07:00
Slava Kim
39d8aef3d9 move files into console/ tool-testing/ 2015-08-06 16:39:00 -07:00
Slava Kim
f49de5b9ac Move files connecting to Meteor-provided services
to a separate folder
2015-08-06 16:00:39 -07:00
Slava Kim
76b001d0da Kill some dead code 2015-08-05 15:03:53 -07:00
Slava Kim
6b1bb038d8 Move files into tools/fs 2015-08-03 22:09:28 -07:00
Slava Kim
8a8db83d29 Move files into tools/utils 2015-08-03 20:32:38 -07:00
Slava Kim
36b542f822 move files into tools/packaging 2015-08-03 16:03:15 -07:00
Slava Kim
5472331fc5 Move isopackets.js to tool-env
Because it is only used in tool to load packages, so it is sort of a
setup environment file.
2015-08-01 14:13:53 -07:00
Slava Kim
49a7088c30 Create a folder "tool-env"
Contains uninteresting setup and cleanup files
2015-07-31 18:38:25 -07:00