Commit Graph

15868 Commits

Author SHA1 Message Date
Ben Newman
b7c48ee8ed Bump 1.3 beta release numbers. release/METEOR@1.3-modules-beta.7 2016-02-04 23:48:45 -05:00
Ben Newman
7e68dacc3c Stop passing unnecessary options to Babel.parse in js-analyze.js. 2016-02-04 23:48:44 -05:00
Ben Newman
6bfb19b700 Fix Babel.compile call in isopack.js. 2016-02-04 23:46:21 -05:00
Ben Newman
8e5cb81138 Bump $BUNDLE_VERSION to 0.5.23. 2016-02-04 23:17:03 -05:00
Ben Newman
7fb2ffb945 Stop using reserved word 'package' in logic_tests.js. 2016-02-04 23:13:02 -05: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
Ben Newman
ea5ac99593 Upgrade babel-compiler npm dependency meteor-babel to v0.7.1. 2016-02-04 21:37:34 -05:00
David Greenspan
9303c0baab Fix typo in README 2016-02-04 17:11:39 -08:00
David Greenspan
fabb20d2cd Rebuild in place for better performance
writeSiteArchive already supported rebuilding in place (rather than
creating a new build directory and moving it into place; see comments
at top of builder.js), but it was not used and didn't work:

* run-app.js only passed previousBuilders to the bundler in the case
  of a client-only refresh, in which case it also passed
  hasCachedBundle, bypassing writeSiteArchive altogether.

* writeSiteArchive's use of previousBuilders seemingly didn't work,
  because the site archive itself was never written in place, so
  trying to write the targets "in place" into a brand-new build
  directory didn't make sense (and threw an error).

With this change, previousBuilders are kept across all rebuilds
(not just client-only refreshes), which enables efficient, in-place
building (except on Windows, where in-place building has never been
supported), and writeSiteArchive is fixed to write the site archive
in place as well.
2016-02-04 17:11:39 -08:00
David Greenspan
be44a75ca3 Minor stylistic changes 2016-02-04 17:11:39 -08:00
Ben Newman
8497c0a5d2 Wrap async function calls with Promise.asyncApply when available. 2016-02-04 17:17:21 -05:00
Ben Newman
ce890c98d1 Share a cache of ASTs between js-analyze.js functions. 2016-02-04 12:08:20 -05:00
Ben Newman
084f682e28 Make findImportedModuleIdentifiers print more useful errors.
Fixes #6009.
2016-02-04 11:46:21 -05:00
Ben Newman
e150f6c919 Bump 1.3 beta release numbers.
The beta released with this commit (modules-beta.6) included everything on
the release-1.3 branch up to bdf64da339
("Avoid circular package.json resolution chains.").

Unfortunately, additional commits were pushed to the branch before this
commit was pushed, so the release tag release/METEOR@1.3-modules-beta.6
does not correspond to any commit in the branch history.

Rather than attempting to rewrite the branch history, I decided to amend
this commit with this explanation before pushing it.

To see exactly what was released with the sixth beta:

  git fetch --tags
  git log release/METEOR@1.3-modules-beta.6
2016-02-04 09:58:05 -05:00
David Greenspan
29c3d5fde8 Bump dev_bundle version 2016-02-03 20:34:59 -08:00
David Greenspan
a05b81af8d Merge remote-tracking branch 'origin/devel' into release-1.3
Conflicts:
	History.md
	packages/babel-compiler/.npm/package/npm-shrinkwrap.json
	packages/ecmascript/package.js
	tools/isobuild/compiler.js
2016-02-03 13:31:29 -08: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
Ben Newman
bdf64da339 Avoid circular package.json resolution chains.
Fixes #6114.
2016-02-03 13:21:58 -05:00
Ben Newman
b0da03b009 Regression test to verify #6144 fixed.
Closes #6144.
2016-02-03 10:30:49 -05:00
Sashko Stubailo
df73a636c6 Add testing directions suggested by @queso 2016-02-03 00:36:03 -08:00
Sashko Stubailo
2ac1c9104e Switch to h1 2016-02-03 00:31:41 -08:00
Sashko Stubailo
217470f06c Move contributing guidelines out of the wiki
So that people can file PRs, and it's in the standard place for GitHub
2016-02-03 00:30:41 -08:00
ozsayag
a91a1cc787 Refactor static-html to not use jquery
Simply use setAttribute instead.

Fixes #5320
PR #6105
2016-02-03 00:24:07 -08:00
lassombra
85f2958b0b Make #each use _id in object or as getter in object's prototype
Fixes #6124 #6125
2016-02-03 00:20:18 -08:00
Sashko Stubailo
055f28f017 Merge pull request #6139 from pra85/patch-1
Fix typo in docs
2016-02-03 00:18:49 -08:00
Evan Marsland
06d64bfcd4 PATCH HTTP convenience method 2016-02-03 00:17:53 -08:00
Zoltan Olah
88458e794e Merge pull request #6090 from zimme/devonbarretwastoolazy
Remove duplicate exports.hasScheme
2016-02-02 15:02:20 -08:00
Prayag Verma
7596e64e16 Fix typo in docs
Found a spelling mistake -
`responsiblity` > `responsibility`
2016-02-02 20:14:22 +05:30
Ben Newman
3b7b30dd28 Upgrade babel-compiler npm dependency meteor-babel to v0.6.6.
This fixes Babel.parse, improves Babel.compile cache performance, and
stops forcing strict mode in module files, which fixes problems with
global variable assignments.
2016-02-01 21:39:22 -05:00
David Greenspan
f0b76186b5 Don't stat in Builder#write
The only reason for the files.stat in atomicallyRewriteFile (called
by Builder#write), which was taking up time comparable to write
and rename (not as much as one of those but same order of
magnitude, in the hundreds of ms total)... was for the case where we
are trying to rename a file in a way that overwrites an existing
directory.  We can avoid the stat by catching this unusual case when
rename throws an error.
2016-02-01 17:49:36 -08:00
David Greenspan
e01ce18a76 Update version of 'source-map' used by plugins 2016-02-01 17:49:36 -08:00
David Greenspan
4ef2a98513 Update dev_bundle version of 'source-map' package
Processing source maps takes a while, but this version bump claims
to have some significant speed increases
2016-02-01 17:49:36 -08:00
David Greenspan
21fe9ca9b4 Merge branch 'profiling-improvements' into release-1.3 2016-02-01 08:46:02 -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
0fdbe6e176 Profile legacy extension handlers 2016-02-01 08:45:36 -08:00
David Greenspan
d3749485be Profile a few more things 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
3c2521cc30 More detailed profiling in ImportScanner 2016-02-01 08:45:35 -08:00
David Greenspan
5719d6b611 Profile CSS minification in more detail
Uses the fact that the `Profile` symbol is now exposed to plugins.
2016-02-01 08:45:35 -08:00
David Greenspan
132c515d04 Expose "Profile" to compiler plugins
Note that for code that may or may not run in the context of a
compiler plugin, you should always test `typeof Profile` before
assuming it exists in the global environment.
2016-02-01 08:45:35 -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
ef73a4c9e6 Cache the output of findImportedModuleIdentifiers 2016-02-01 08:44:03 -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
Simon Fridlund
a3c701e9de Remove duplicate exports.hasScheme
Fixes #6089
2016-01-26 12:51:02 +01:00
Ben Newman
877cb9e61a Add a test of client/compatibility directories. 2016-01-25 15:34:16 -05:00
Ben Newman
3f3aac4fd1 Implement babel-runtime/helpers/slicedToArray, with tests.
Fixes #6076.
2016-01-25 15:17:54 -05:00
Ben Newman
2c1083feb3 Add basic test of async functions and await expressions. 2016-01-25 14:21:05 -05:00
Ben Newman
6939940ca9 Update History.md with new modules-related features. 2016-01-25 13:46:03 -05:00