Skip to content

Commit

Permalink
Include the Node.js and npm version in the star.json manifest. (#8956)
Browse files Browse the repository at this point in the history
* Include the Node.js and npm version in the `star.json` manifest.

This makes it possible to know exactly which version of Node.js and npm
were used by the `meteor` command from which the bundle was built from.

* History.md for #8956.
  • Loading branch information
abernix authored and benjamn committed Aug 2, 2017
1 parent ad917dc commit 4665f2a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## v.NEXT

* The `star.json` manifest created within the root of a `meteor build` bundle
will now contain `nodeVersion` and `npmVersion` which will specify the exact
versions of Node.js and npm (respectively) which the Meteor release was
bundled with. The `.node_version.txt` file will still be written into the
root of the bundle, but it may be deprecated in a future version of Meteor.
[PR #8956](https://github.com/meteor/meteor/pull/8956)

* A new package called `mongo-dev-server` has been created and wired into
`mongo` as a dependency. As long as this package is included in a Meteor
application (which it is by default since all new Meteor apps have `mongo`
Expand Down
4 changes: 3 additions & 1 deletion tools/isobuild/bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -2628,7 +2628,9 @@ var writeSiteArchive = Profile("bundler writeSiteArchive", function (
format: "site-archive-pre1",
builtBy,
programs: [],
meteorRelease: releaseName
meteorRelease: releaseName,
nodeVersion: process.versions.node,
npmVersion: meteorNpm.npmVersion,
};
var nodePath = [];

Expand Down
4 changes: 4 additions & 0 deletions tools/isobuild/meteor-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var buildmessage = require('../utils/buildmessage.js');
var utils = require('../utils/utils.js');
var runLog = require('../runners/run-log.js');
var Profile = require('../tool-env/profile.js').Profile;
import { version as npmVersion } from 'npm';
import { execFileAsync } from "../utils/processes.js";
import {
get as getRebuildArgs
Expand All @@ -33,6 +34,9 @@ import {

var meteorNpm = exports;

// Expose the version of npm in use from the dev bundle.
meteorNpm.npmVersion = npmVersion;

// if a user exits meteor while we're trying to create a .npm
// directory, we will have temporary directories that we clean up
var tmpDirs = [];
Expand Down

0 comments on commit 4665f2a

Please sign in to comment.