Files
meteor/scripts/dev-bundle-tool-package.js
Jesse Rosenberger 74cb8ebdc2 Improve fs-extras move calls for Windows platform. (#8560)
* Improve `fs-extra.move` calls for Windows platform.

This is a follow-up to meteor/meteor#8491 which worked properly on Unix
platforms, but failed in a variety of ways on Windows due to its lack
of Fiber-awareness and desire to create symlinks as unprivileged users
(something not always possible on Windows).

The Fiber issue was observed when trying to remove "src" directories
within the `move` function (which tries a variety of OS/OS/arch-specific
techniques to accomplish its goal) after they had been copied to "dest".
On Windows, this resulted in `EDIRNOTEMPTY` errors since Windows appears
to temporarily cache the file-handle or doesn't release the file-handle
until the next tick.

The symlink issue will hopefully improve in an upcoming release of
Windows (Creator Edition) when Microsoft makes it possible to create
symlinks as an unprivileged user, however it will still require enabling
"Developer" mode in Windows settings.  This implements the same catch
which was already in place for `fs.rename` on the `fs.move` provided by
`fs-extra`.

Performance gains were the same in tests comparing before and after
these changes.

Relates to:
https://github.com/meteor/meteor/issues/8558#issuecomment-291194385

* A few code-cleanups to my original commit.
2017-04-05 12:58:32 +03:00

70 lines
2.6 KiB
JavaScript

// This file contains a package.json for the dependencies of the command-line
// tool.
// We put this in a JS file so that it can contain comments. It is processed
// into a package.json file by generate-dev-bundle.sh.
var packageJson = {
name: "meteor-dev-bundle-tool",
// Version is not important but is needed to prevent warnings.
version: "0.0.0",
dependencies: {
// Explicit dependency because we are replacing it with a bundled version
// and we want to make sure there are no dependencies on a higher version
npm: "4.4.4",
"node-gyp": "3.6.0",
"node-pre-gyp": "0.6.34",
"meteor-babel": "0.19.1",
"meteor-promise": "0.8.0",
fibers: "1.0.15",
promise: "7.1.1",
"fs-extra": "2.1.2",
// So that Babel 6 can emit require("babel-runtime/helpers/...") calls.
"babel-runtime": "6.9.2",
// For various ES2015 polyfills, such as Map and Set.
"meteor-ecmascript-runtime": "0.2.9",
// Not yet upgrading Underscore from 1.5.2 to 1.7.0 (which should be done
// in the package too) because we should consider using lodash instead
// (and there are backwards-incompatible changes either way).
underscore: "1.5.2",
"source-map-support": "https://github.com/meteor/node-source-map-support/tarball/1912478769d76e5df4c365e147f25896aee6375e",
semver: "4.1.0",
request: "2.47.0",
fstream: "https://github.com/meteor/fstream/tarball/cf4ea6c175355cec7bee38311e170d08c4078a5d",
tar: "2.2.1",
kexec: "2.0.2",
"source-map": "0.5.3",
"node-inspector": "0.12.8",
"v8-profiler": "5.6.5",
chalk: "0.5.1",
sqlite3: "3.1.3",
netroute: "1.0.2",
"http-proxy": "1.11.1",
"wordwrap": "0.0.2",
"moment": "2.8.4",
"rimraf": "2.4.3",
"glob": "7.0.6",
// XXX: When we update this, see if it fixes this Github issue:
// https://github.com/jgm/CommonMark/issues/276 . If it does, remove the
// workaround from the tool.
"commonmark": "0.15.0",
escope: "3.2.0",
// 2.4.0 (more or less, the package.json change isn't committed) plus our PR
// https://github.com/williamwicks/node-eachline/pull/4
eachline: "https://github.com/meteor/node-eachline/tarball/ff89722ff94e6b6a08652bf5f44c8fffea8a21da",
pathwatcher: "6.7.1",
optimism: "0.3.3",
'lru-cache': '4.0.1',
'cordova-lib': "6.4.0",
longjohn: '0.2.11'
}
};
if (process.platform === 'win32') {
// Remove dependencies that do not work on Windows
delete packageJson.dependencies.netroute;
delete packageJson.dependencies.kexec;
}
process.stdout.write(JSON.stringify(packageJson, null, 2) + '\n');