memlab 1.1.12-alpha → 1.1.13-alpha

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.
Files changed (2) hide show
  1. package/bin/preinstall +23 -0
  2. package/package.json +3 -2
package/bin/preinstall ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ *
9
+ * @emails oncall+ws_labs
10
+ * @format
11
+ */
12
+
13
+ const path = require("path");
14
+ const fs = require("fs");
15
+ if (process.platform !== "win32") {
16
+ const memlabFile = path.join(__dirname, "../bin/memlab");
17
+ const content = fs.readFileSync(memlabFile, "UTF-8");
18
+ fs.writeFileSync(
19
+ memlabFile,
20
+ content.replace("#!/usr/bin/env node", "#!/usr/bin/env -S node"),
21
+ "UTF-8"
22
+ );
23
+ }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "memlab",
3
- "version": "1.1.12-alpha",
3
+ "version": "1.1.13-alpha",
4
4
  "license": "MIT",
5
5
  "description": "memlab is a framework that analyzes memory and finds memory leaks in JavaScript applications.",
6
6
  "main": "dist/index.js",
7
7
  "files": [
8
- "dist"
8
+ "dist",
9
+ "bin"
9
10
  ],
10
11
  "bin": {
11
12
  "memlab": "bin/memlab"