meteor-node-stubs 1.2.10 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "meteor-node-stubs",
3
3
  "author": "Ben Newman <ben@meteor.com>",
4
4
  "description": "Stub implementations of Node built-in modules, a la Browserify",
5
- "version": "1.2.10",
5
+ "version": "1.2.11",
6
6
  "main": "index.js",
7
7
  "license": "MIT",
8
8
  "homepage": "https://github.com/meteor/meteor/blob/devel/npm-packages/meteor-node-stubs/README.md",
@@ -62,7 +62,7 @@
62
62
  "vm-browserify"
63
63
  ],
64
64
  "devDependencies": {
65
- "rimraf": "^2.7.1"
65
+ "rimraf": "^5.0.10"
66
66
  },
67
67
  "repository": {
68
68
  "type": "git",
@@ -2,6 +2,7 @@ var fs = require("fs");
2
2
  var path = require("path");
3
3
  var depsDir = path.join(__dirname, "..", "deps");
4
4
  var map = require("../map.json");
5
+ var rr = require("rimraf");
5
6
 
6
7
  // Each file in the `deps` directory expresses the dependencies of a stub.
7
8
  // For example, `deps/http.js` calls `require("http-browserify")` to
@@ -14,16 +15,15 @@ var map = require("../map.json");
14
15
  // bundled. Note that these modules should not be `require`d at runtime,
15
16
  // but merely scanned at bundling time.
16
17
 
17
- fs.mkdir(depsDir, function () {
18
- require("rimraf")("deps/*.js", function (error) {
19
- if (error) throw error;
20
- Object.keys(map).forEach(function (id) {
21
- fs.writeFileSync(
22
- path.join(depsDir, id + ".js"),
23
- typeof map[id] === "string"
24
- ? "require(" + JSON.stringify(map[id]) + ");\n"
25
- : ""
26
- );
27
- });
28
- });
18
+ rr.rimrafSync(depsDir);
19
+
20
+ fs.mkdirSync(depsDir);
21
+
22
+ Object.keys(map).forEach(function (id) {
23
+ fs.writeFileSync(
24
+ path.join(depsDir, id + ".js"),
25
+ typeof map[id] === "string"
26
+ ? "require(" + JSON.stringify(map[id]) + ");\n"
27
+ : ""
28
+ );
29
29
  });