Commit Graph

141 Commits

Author SHA1 Message Date
Ben Newman
868a52829f Register package@version constraints for current release.
Package version unpinning (#7084) removed all exact package@=version
constraints derived from the current release.

As we discovered with Meteor 1.4.2.4 (#8306), this meant releases no
longer had any power to enforce package upgrades, which is why the
follow-up Meteor 1.4.2.5 release (#8311) was necessary.

This commit has the same effect as putting package@version in your
.meteor/packages file for every local/core package that your app uses.
2017-02-07 14:52:49 -05:00
Jesse Rosenberger
815e32e68b Add METEOR_PACKAGE_DIRS support and deprecate PACKAGE_DIRS
This is a refactor/finishing-move of @c9s's original PR meteor/meteor#7586.

This maintains backward compatibility with PACKAGE_DIRS using the original separator that it expected (':').  Users of the new METEOR_PACKAGE_DIRS variable should use the correct path separator for their platform (`:` on BSD/Linux and `;` on Windows).

Fixes meteor/meteor#7585
Fixes meteor/meteor#4204
2016-10-13 14:26:23 +03:00
c9s
3c5059b72a Add METEOR_PACKAGE_DIRS support
- Use path.delimiter to support windows platform
- Add console.warn message when PACAKGE_DIRS is defined
2016-10-12 18:52:58 +03:00
Ben Newman
17f79c66ce Search packages/non-core/*/packages for local packages.
Currently this finds only Blaze-related packages, but it does so without
hard-coding "blaze" in tools code.
2016-09-09 13:28:16 -04:00
Ben Newman
7600571717 Revert "Make sure .meteor/.gitignore ignores .meteor/dev_bundle."
This reverts commit 9e6ebde836.

Now that the `dev_bundle` link is called `.meteor/local/dev_bundle`, and
`.meteor/local` is already ignored, we don't need to ignore
`.meteor/dev_bundle` anymore.
2016-07-19 11:52:31 -04:00
Ben Newman
00c05facde Merge branch 'devel' into release-1.4 2016-07-18 14:52:14 -04:00
Ben Newman
576468eae8 Handle more errors in ensureDevBundleLink.
If a developer tried to `meteor update` a project whose `.meteor/release`
file corresponded to a version of `meteor-tool` that no longer exists in
`~/.meteor/packages/meteor-tool`, this code would throw an ENOENT error.
This could be fixed by running `meteor update --release <old release>`
first, but that kind of workaround shouldn't be necessary when updating
Meteor to the latest version.
2016-07-17 12:50:20 -04:00
Ben Newman
57ccaa27f9 Return an OS path for .meteor/local/dev_bundle. 2016-07-15 18:29:44 -04:00
Ben Newman
73e44a3c9c Use .meteor/local/dev_bundle instead of .meteor/dev_bundle.
I'm deliberately leaving in the code to ensure .meteor/.gitignore contains
dev_bundle for now, so that the old file won't get accidentally checked
into anyone's app repository.
2016-07-14 11:47:30 -04:00
Ben Newman
69b100d21a Save .meteor/local/resolver-result-cache.json to improve startup performance. 2016-07-14 11:27:56 -04:00
Ben Newman
78fcabbd58 Always link .meteor/dev_bundle to release specified in .meteor/release.
I was mistaken to think that files.getDevBundle() would be called after
springboarding to the appropriate release.
2016-07-14 11:27:53 -04:00
Ben Newman
c946e77d64 Use .meteor/local/dev_bundle instead of .meteor/dev_bundle.
I'm deliberately leaving in the code to ensure .meteor/.gitignore contains
dev_bundle for now, so that the old file won't get accidentally checked
into anyone's app repository.
2016-07-14 10:12:47 -04:00
Ben Newman
f620f2f047 Save .meteor/local/resolver-result-cache.json to improve startup performance. 2016-07-12 13:32:09 -04:00
Ben Newman
d732c2e649 Always link .meteor/dev_bundle to release specified in .meteor/release.
I was mistaken to think that files.getDevBundle() would be called after
springboarding to the appropriate release.
2016-07-11 18:39:52 -04:00
Ben Newman
586af3482c Merge branch 'devel' into release-1.4 2016-07-10 15:50:03 -04:00
Ben Newman
f8b1bba606 Improve .meteor/dev_bundle link reading and creation. 2016-07-10 15:39:46 -04:00
Ben Newman
77feb7b76a Decompose readLink and makeLink helper functions.
Part of #7374.
2016-07-09 16:55:14 -04:00
Ben Newman
c54686126e Merge branch 'devel' into release-1.4 2016-07-09 15:07:52 -04:00
Ben Newman
b2cae10a24 Always update .meteor/dev_bundle when reading .meteor/release. 2016-07-08 13:44:06 -04:00
Ben Newman
9e6ebde836 Make sure .meteor/.gitignore ignores .meteor/dev_bundle.
https://github.com/meteor/meteor/pull/7340#issuecomment-231253317
2016-07-08 13:44:05 -04:00
Ben Newman
7b37188279 Remove .meteor/dev_bundle if .meteor/release reads "none". 2016-07-07 16:51:04 -04:00
Ben Newman
6cd1c472d9 Create a .meteor/dev_bundle symlink when writing .meteor/release.
This will make it easier for `meteor node` and `meteor npm` to find the
right dev_bundle for the current application.
2016-07-07 15:24:24 -04:00
Wexpo Lyu
5aaf1877f9 Update the code using files. 2016-07-04 06:19:36 +08:00
Wexpo Lyu
2e73838926 Relative path resolves to project directory.
Fixing #7292
2016-07-03 12:41:18 +08:00
Tom Coleman
d2d1455f40 Updated meteor create to write package versions 2016-06-29 14:14:09 -04:00
Tom Coleman
63f1311630 First version of release constraint unpinning
For #7004. Still working on the self test but it appears to work :)
2016-06-29 14:14:08 -04:00
Ben Newman
de5411e8fd Allow importing from app node_modules when running test-packages.
Fixes #6827.
2016-05-16 18:21:08 -04:00
Wexpo Lyu
bfdca2aaf9 METEOR_LOCAL_DIR. Fixing #6532
Update History.md
2016-05-02 10:52:20 -07:00
Tom Coleman
ab5ab15768 Rename test-app -> test and test --full-app
Our old "unit" test mode didn't really enforce "unit-ness" and was perfectly capable of running integration test. So it was confusing to call the two modes unit and integration test modes.

Instead, we call them "test mode" and "full app test mode", run with `meteor test` and `meteor test --full-app`.

The rules for test files were also simplified -- simply *.test[s].* for test mode, and *.app-test[s].* for full app tests. `tests/` directories are simply ignored again.
2016-02-29 11:16:54 +11:00
Avital Oliver
a335875e19 Merge remote-tracking branch 'origin/release-1.3' into app-tests 2016-02-05 14:57:44 -08:00
David Greenspan
d6e9921bbb Try to constraint-solve the previousSolution first
To avoid solving the full constraint-solver problem when you start your
app with a previousSolution (i.e. .meteor/versions), we first try to
prove that .meteor/versions is correct as far as we can tell while only
loading the package versions mentioned there.

When it works, it saves both disk I/O and logic-solving time, starting
at a couple seconds and potentially much more.

Everything still works if .meteor/versions is missing, or partially or
totally invalid, or mentions package versions that need to be fetched in
a catalog update first, etc.
2016-02-05 12:13:33 -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
Avital Oliver
ac5a4bc809 WIP: Implement a meteor test-app command.
This command builds the app with a different directory for
`.meteor/local`, including built packages and the app database. This
allows running `meteor test-app` and `meteor test` in parallel
for a given app, with DB isolation.

Also, we've changed how test driver packages work (as used for
`meteor test-packages`, like "test-in-browser"). Instead of automatically
running tests when they load, they export a `runTests` function that
you should call when you're ready to run tests.

When running `meteor test-app` or `meteor test-packages` a new additional
last line of code is added that calls `Meteor.startup(...runTests()...)`

TODO:
* Implement `testOnly` packages. The current pattern of reading a global
  from `package.js` won't work for published packages, which are stored
  as metadata, not code.
* Let you choose a test driver package as an argument to `meteor test-app`
* Demonstrate that a Mocha test and driver package are possible to write.
* Expose Meteor.isTest, Meteor.isIntegrationTest, Meteor.isUnitTest
* Implement `meteor test-app --unit` which only loads test files
* `meteor test-app` should load ALL *.tests?.* files, including ones
  inside imports/ directories
2016-01-22 15:18:10 -08:00
Mitar
3a49ae86db Use methods when we have them. 2015-11-24 14:38:48 -08:00
Martijn Walraven
dec5d8ad91 Fix reading cordova-plugins to not remove contents after #
Attempting to remove comments lead to problems adding Cordova plugins
with a Git URL, because the removed part after # contains the SHA.
2015-09-22 22:45:38 +02:00
David Greenspan
92b3d3b1c4 Fix standard-minifiers-package upgrader
`projectConstraintsFile.addConstraints(['foo'])` is wrong because 'foo'
is supposed to be a constraint object, not a string.  However, it would
quietly add a blank line to .meteor/packages!  Now we detect this
mistake, and we also provide addPackages(['foo']).
2015-08-13 14:08:47 -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
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
Slava Kim
3ddd281d8c Move catalog files into tools/catalog/ 2015-07-30 12:12:07 -07:00
David Glasser
9dbad78d45 meteor lint in a package lints only that package
Also, fix the checks around "did we lint anything": checking
isopack.sourceProcessors.linter just checks to see if that package
itself defines any linter, not if any of the packages it uses has
linters.
2015-07-16 20:43:42 -07:00
David Glasser
2ccaf6a51e Move some files into isobuild subdirectory
The exact borderline between "Isobuild" and "the tool" is a little hazy,
but the idea is that "Isobuild" is the part that you could imagine being
embedded in a non-command-line build tool. It's not about commands or
UI, but just about building packages and apps.

A next step could be moving things that are strictly "the command-line
tool" into their own subdir, and leaving the top directory mostly just
for shared utilities like buildmessage.  (Which could even go in a utils
subdir?)
2015-07-16 15:12:36 -07:00
David Glasser
640ab28544 Improve linting of packages
- Only lint packages when we're actually going to use the output
- The linter adds the files it uses to the corresponding unibuild WatchSets
2015-07-09 16:39:57 -07:00
David Greenspan
ed822326aa Reuse previous Constraint Solver result in tool
If the same ProjectContext calls the PackagesResolver
multiple times and the ConstraintSolver.Input structure
is identical, reuse the same answer.  We still ask the
tool for the catalog data, which currently goes to sqlite
(taking ~70ms in the app tested), but we skip creating a
CS.Solver and a Logic.Solver and running them (~450ms).

Note that if a new ProjectContext is created (not sure when
that happens?), there's no caching across that.
2015-07-06 14:54:08 -07:00
Slava Kim
fa29c70d61 Make a method non-private 2015-06-26 17:35:51 -07:00
Slava Kim
fe9d69a9f7 wip linting packages 2015-06-16 19:51:52 -07:00