memlab 1.1.18 → 1.1.21
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/README.md +5 -6
- package/bin/memlab +16 -1
- package/dist/index.d.ts +2 -9
- package/dist/index.js +31 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
memlab is an E2E testing and analysis framework for finding JavaScript memory
|
|
4
4
|
leaks and optimization opportunities.
|
|
5
5
|
|
|
6
|
+
Online Resources:
|
|
7
|
+
* [Official Website and Demo](https://facebookincubator.github.io/memlab)
|
|
8
|
+
* [Documentation](https://facebookincubator.github.io/memlab/docs/intro)
|
|
9
|
+
|
|
6
10
|
Features:
|
|
7
11
|
* **Browser memory leak detection** - Write test scenario with puppeteer API,
|
|
8
12
|
memlab auto diffs JS heap snapshots, filters out memory leaks, and
|
|
@@ -10,17 +14,12 @@ Features:
|
|
|
10
14
|
* **Object-oriented heap traversing API** - Supports self-defined memory leak
|
|
11
15
|
detector and programmatically analyzing JS heap snapshots taken from
|
|
12
16
|
Chromium-based browsers, Node.js, Electron.js, and Hermes
|
|
13
|
-
* **Memory CLI
|
|
17
|
+
* **Memory CLI toolbox** - Built-in toolbox and APIs for finding memory
|
|
14
18
|
optimization opportunities (not necessarily memory leaks)
|
|
15
19
|
* **Memory assertions in Node.js** - Enables unit test or running node.js
|
|
16
20
|
program to take a heap snapshot of its own state, do self memory checking,
|
|
17
21
|
or write advanced memory assertions
|
|
18
22
|
|
|
19
|
-
Online Resources:
|
|
20
|
-
|
|
21
|
-
* [Official Website and Demo](https://facebookincubator.github.io/memlab)
|
|
22
|
-
* [Documentation](https://facebookincubator.github.io/memlab/docs/intro)
|
|
23
|
-
|
|
24
23
|
## CLI Usage
|
|
25
24
|
|
|
26
25
|
Install the CLI
|
package/bin/memlab
CHANGED
|
@@ -10,5 +10,20 @@
|
|
|
10
10
|
* @format
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
var path = require('path');
|
|
14
|
+
var e2e = require('@memlab/e2e');
|
|
15
|
+
var heapAnalysis = require('@memlab/heap-analysis');
|
|
16
|
+
var api = require('@memlab/api');
|
|
17
|
+
var core = require('@memlab/core');
|
|
13
18
|
var cli = require("@memlab/cli");
|
|
14
|
-
|
|
19
|
+
// require all sub-packages to register package information
|
|
20
|
+
Promise.all([
|
|
21
|
+
core.PackageInfoLoader.registerPackage(path.join(__dirname, '..')),
|
|
22
|
+
core.registerPackage(),
|
|
23
|
+
cli.registerPackage(),
|
|
24
|
+
api.registerPackage(),
|
|
25
|
+
heapAnalysis.registerPackage(),
|
|
26
|
+
e2e.registerPackage(),
|
|
27
|
+
]).then(() => {
|
|
28
|
+
cli.run();
|
|
29
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
1
|
+
/** @internal */
|
|
2
|
+
export declare function registerPackage(): Promise<void>;
|
|
10
3
|
export * from '@memlab/api';
|
|
11
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
|
-
* @format
|
|
10
|
-
*/
|
|
11
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
3
|
if (k2 === undefined) k2 = k;
|
|
13
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -22,5 +13,36 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
22
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
24
15
|
};
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.registerPackage = void 0;
|
|
30
|
+
/**
|
|
31
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the MIT license found in the
|
|
34
|
+
* LICENSE file in the root directory of this source tree.
|
|
35
|
+
*
|
|
36
|
+
* @emails oncall+ws_labs
|
|
37
|
+
* @format
|
|
38
|
+
*/
|
|
39
|
+
const path_1 = __importDefault(require("path"));
|
|
40
|
+
const core_1 = require("@memlab/core");
|
|
41
|
+
/** @internal */
|
|
42
|
+
function registerPackage() {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return core_1.PackageInfoLoader.registerPackage(path_1.default.join(__dirname, '..'));
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
exports.registerPackage = registerPackage;
|
|
26
48
|
__exportStar(require("@memlab/api"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memlab",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.21",
|
|
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",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@memlab/cli": "^1.0.0",
|
|
29
29
|
"@memlab/api": "^1.0.0",
|
|
30
|
-
"@memlab/core": "^1.
|
|
30
|
+
"@memlab/core": "^1.1.5",
|
|
31
31
|
"@memlab/e2e": "^1.0.0",
|
|
32
32
|
"@memlab/heap-analysis": "^1.0.0",
|
|
33
33
|
"ansi": "^0.3.1",
|