Commit Graph

17 Commits

Author SHA1 Message Date
Sashko Stubailo
6aa9142e67 Fix some test bugs related to package names/dirs 2015-02-06 14:49:23 -08:00
Avital Oliver
59b1e145c6 Fix selftests that create packages with colons
We used to create package directories with the same name as the package
name, but on windows you can't have directories with colons in them.

Now Sandbox.prototype.createPackage takes an additional argument
with the directory name, as distinct from the package name.

This commit updates all the tests that called createPackage to generate
a directory name with no colons.
2015-02-05 00:12:09 -08:00
Sashko Stubailo
e1dc24a045 Add directions to publish a new version of the package 2015-01-30 15:52:32 -08:00
Sashko Stubailo
9d1c10aae2 Add test about unpacking packages as-is 2015-01-20 22:34:23 -08:00
Sashko Stubailo
74ecb02d13 Add test for disallowing colons in packages 2015-01-20 22:34:23 -08:00
ekatek
064580b553 show implied packages
In 'meteor show', display the list of packages implied by a package/version.

Implied exports are part of the package's exports, especially for an umbrealla
package like 'meteor-platform' or 'cfs:standard-packages'. However, we can't
tell you the exact exports (ex: "Mongo") without running the constraint solver
(because we don't know what version of the implied package you will end up with).

Showing implies also makes umbrella packages like 'meteor-platform' and
'cfs:standard-packages' more obvious -- the user can tell what is going on with the
package much better.
2015-01-13 13:53:21 -08:00
ekatek
0f6c31cab7 upload README.md files to the server and view the excerpt in meteor show
This commit is based on the following design document:
https://mdg.hackpad.com/Creating-and-Updating-Docs-0ZyyDcSZDxp,
and some other stuff from here: https://mdg.hackpad.com/Meteor-Long-Description-wGZ1vIOwVlF
and was code reviewed here: https://github.com/meteor/meteor/pull/3375

It does the following:

- Allow the user to specify package documentation in Package.Describe.
  We will take the README.md file by default, to make the transition easier.
  Users can specify ‘documentation: null’ to not submit a README.md

- From that documentation, extract the section between the first and second header
  to use as the long form description for the package.

- Upload the documentation to the server at publish-time. Allow metadata changes with ‘publish —update’.

- Change the default package skeleton to include the README.md file.
  Also, changes the skeleton to have fewer useless placeholders in Package.describe values.

- Fix a minor bug where Git did not show up when running ‘meteor show’ on local packages.

A note on ‘documentation: null’ and blank documentation — we don’t let maintainers upload
blank README.md files, because we want to encourage people to fill them out. (Instead,
we allow a ‘documentation: null’ as an override) This is a UX issue! It is not a technical thing.

There is more discussion and code review in: https://github.com/meteor/meteor/pull/3375
2015-01-13 13:53:21 -08:00
ekatek
5bba62e1f2 display exports for packages in ‘meteor show’
Contains:
- method to aggregate exports for a package in packageSource (exports are per-architecture).

- get this data from packageSource in PackageQuery for ‘meteor show’. Don’t store it in the
local catalog — while it is not a particularly expensive operation, it is still more expensive
than a simple lookup. We really do care about minimizing any sort of computation when we
are initializing packages, since we want the tool to be fast.

- display the data in ‘meteor show’. It makes sense to line wrap this with the ‘Exports:’ label as a
bulletPoint (just look at the test to see an example where this improves user experience). Since we
are doing that, we might as well use that bulletPoint functionality on the other labels as well.

- There is also a test. Run ‘meteor self-test show’ to test, or run ‘meteor show’ on a local package
with exports.

The Troposphere counterpoint to this is: meteor/troposphere#5
2015-01-13 13:53:21 -08:00
ekatek
12d030dd53 completely rewrite of ‘meteor show’; some changes to ‘meteor search’.
The ‘show’ command has been completely rewritten. It has different output
and now does the following:

- Interacts with local package versions. Checks in the local package catalog, and
  returns the local versions along with the server versions. When ‘meteor show’ is
  run with a specific version request (‘meteor show foo@<version>’), default to
  showing the local package version (but show a message that a server version is
  available). Running ‘meteor show foo@local’ will always show the local version
  (useful for version-less local packages).

- Simplify the interface. Instead of various ‘show-*’ flags, we only have one: show-all.
  By default, we only show the top 5 official (non-prerelease) unmigrated versions of a
  package (+ local version, if applicable). This can be overridden with ‘show-all’, and we
  let the user know that more versions are available. For releases, ‘show-all’ will show
  non-recommended releases.

- Display publication time for non-local package versions. This makes it easier to run
  ‘meteor show <name>’ and see if <name> is actively maintained. For local packages,
  we display the root directory (useful for large apps or running with the
  LOCAL_PACKAGE_DIRS variable, for example).

- For non-local package versions, show if the version is ‘installed’ (downloaded into the
  warehouse). This involved minor changes to tropohouse.js. The idea is that this should
  give a pretty good clue whether the version can be added offline.

- Show version dependencies. This should help the user understand, track down and
  debug constraint solver failures.

- Do not show version architectures except in —ejson mode.

- Allow an ‘—ejson’ flag to get the output in EJSON format. That should make scripting
  easier. (As a bonus, for release versions, the EJSON output acts as a nice template
  for the release configuration file.)

The search command now does the following:

- Interacts with local package versions. Specifically, local versions override equivalent
  server versions. Also, ‘search’ works on local packages (so, for example,
  ‘meteor search troposphere’ inside the package server app will give you the troposphere
  package).

- Allows an ‘—ejson’ flag to get the outout in EJSON format.

Minor changes to some minor testing infrastructure:

 - A new skeleton package, package-for-show. Its versions contain different
   values for various metadata, so we can test that metadata comes from
   the right version.

 - In several places, replace the pattern of copying around
   package.js files with using the replace function on a placeholder
   string. (Mostly, as applied to package versions).

This is based on these hackpads: https://mdg.hackpad.com/Showing-Package-Metadata-HdGo3Lzx3hR
and https://mdg.hackpad.com/Meteor-Search-Output-1xxEzrAK9YU.
2015-01-13 13:53:20 -08:00
ekatek
3278265b52 also testing correct behavior when there are two rcs: running update should move you to the newer rcs ifff you are already using an rc. Does not currently work. 2014-09-24 20:52:22 -07:00
ekatek
88936518d8 test reproducing this bug: when you add a package with rcs, you end up adding the rcs, even if you did not explicitly ask for them. 2014-09-24 19:23:55 -07:00
ekatek
9c99638c7f be more consistent about using utils.parseConstraint in the tool; test for either-version 2014-09-19 16:56:24 -07:00
David Glasser
273b70bea4 prerelease versions shouldn't prompt you do update
Replace catalog.getLatestVersion with catalog.getLatestMainlineVersion,
which skips prerelease versions (those with dashes in the
version). Ensure that this function is only used by high-level commands
like 'meteor list'.  Replace other uses of that function with other
equivalent functions.

Also, don't stack trace on 'meteor add' constraint failure.
2014-08-26 23:56:51 -07:00
David Glasser
08b2625082 METEOR-CORE -> METEOR 2014-08-24 18:46:37 -07:00
ekatek
52e3eafa5c tests and minor fixes for --name 2014-08-19 12:32:16 -07:00
ekatek
cf1d45fa82 indicate in meteor list when new versions are available 2014-07-15 17:19:08 -07:00
ekatek
8ed9d3459c removed some name fields, changes console.log to process.std[out,err].write in commands-packages and gave user a warning to remember to publish for arch. 2014-07-08 22:41:21 -07:00