@bundle-stats/cli-utils 4.5.2 → 4.5.3-alpha.3
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 +10 -10
- package/lib/fs.js +19 -0
- package/lib/fs.js.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib-esm/fs.js +12 -0
- package/lib-esm/fs.js.map +1 -0
- package/lib-esm/index.js +1 -0
- package/lib-esm/index.js.map +1 -1
- package/package.json +12 -8
- package/types/fs.d.ts +1 -0
- package/types/index.d.ts +1 -0
package/README.md
CHANGED
|
@@ -6,19 +6,19 @@ CLI utilities for [bundle-stats](https://github.com/relative-ci/bundle-stats)
|
|
|
6
6
|
|
|
7
7
|
## Related projects
|
|
8
8
|
|
|
9
|
-
### :cyclone: [relative-ci.com](https://relative-ci.com?utm_medium=bundle-stats)
|
|
9
|
+
### :cyclone: [relative-ci.com](https://relative-ci.com?utm_medium=bundle-stats-cli-utils)
|
|
10
10
|
|
|
11
|
-
####
|
|
11
|
+
#### Optimize your web app's performance with automated bundle stats analysis and monitoring.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
- :crystal_ball: In-depth bundle stats analysis for every build
|
|
14
|
+
- :chart_with_upwards_trend: Monitor bundle stats changes and identify opportunities for optimizations
|
|
15
|
+
- :bell: [Rule based automated review flow](https://relative-ci.com/documentation/setup/configure/integrations/github-commit-status-review?utm_medium=bundle-stats-cli-utils), or get notified via [GitHub Pull Request comments](https://relative-ci.com/documentation/setup/configure/integrations/github-pull-request-comment?utm_medium=bundle-stats-cli-utils), [GitHub check reports](https://relative-ci.com/documentation/setup/configure/integrations/github-check-report?utm_medium=bundle-stats-cli-utils) and [Slack messages](https://relative-ci.com/documentation/setup/configure/integrations/slack-notification?utm_medium=bundle-stats-cli-utils)
|
|
16
|
+
- :wrench: Support for **webpack** and beta support for **Vite**/**Rollup**
|
|
17
|
+
- :hammer: Support for all major CI services(CircleCI, GitHub Actions, Gitlab CI, Jenkins, Travis CI)
|
|
18
|
+
- :nut_and_bolt: Support for **npm**, **yarn** and **pnpm**; support for monorepos
|
|
19
|
+
- :two_hearts: **Always free** for **Open Source**
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
- :chart_with_upwards_trend: Monitor webpack bundle stats changes and identify tendencies over extended periods
|
|
17
|
-
- :bell: Get notified via GitHub Checks, GitHub Pull Request comments, and Slack notifications
|
|
18
|
-
- :hammer: Support for all major CI services (CircleCI, GitHub Actions, Gitlab CI, Jenkins, Travis CI)
|
|
19
|
-
- :two_hearts: Always free for Open Source
|
|
20
|
-
|
|
21
|
-
[Try for free](https://relative-ci.com?utm_medium=bundle-stats)
|
|
21
|
+
[:rocket: Get started](https://relative-ci.com?utm_medium=bundle-stats-cli-utils)
|
|
22
22
|
|
|
23
23
|
### :first_quarter_moon: [relative-ci/compare](https://compare.relative-ci.com)
|
|
24
24
|
|
package/lib/fs.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.readJSONStream = void 0;
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const stream_json_1 = require("stream-json");
|
|
9
|
+
const stream_chain_1 = require("stream-chain");
|
|
10
|
+
const Assembler_1 = __importDefault(require("stream-json/Assembler"));
|
|
11
|
+
const readJSONStream = (filepath) => {
|
|
12
|
+
const pipeline = (0, stream_chain_1.chain)([(0, fs_1.createReadStream)(filepath), (0, stream_json_1.parser)()]);
|
|
13
|
+
const asm = Assembler_1.default.connectTo(pipeline);
|
|
14
|
+
return new Promise((fulfill) => {
|
|
15
|
+
asm.on('done', (data) => fulfill(data.current));
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports.readJSONStream = readJSONStream;
|
|
19
|
+
//# sourceMappingURL=fs.js.map
|
package/lib/fs.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":";;;;;;AAAA,2BAAsC;AACtC,6CAAqC;AACrC,+CAAqC;AACrC,sEAAwC;AAEjC,MAAM,cAAc,GAAG,CAAc,QAAgB,EAAc,EAAE;IAC1E,MAAM,QAAQ,GAAG,IAAA,oBAAK,EAAC,CAAC,IAAA,qBAAgB,EAAC,QAAQ,CAAC,EAAE,IAAA,oBAAM,GAAE,CAAC,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,mBAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAEpC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAPW,QAAA,cAAc,kBAOzB"}
|
package/lib/index.js
CHANGED
|
@@ -28,6 +28,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.TEXT = void 0;
|
|
30
30
|
const T = __importStar(require("./text"));
|
|
31
|
+
__exportStar(require("./fs"), exports);
|
|
31
32
|
__exportStar(require("./baseline"), exports);
|
|
32
33
|
__exportStar(require("./create-artifacts"), exports);
|
|
33
34
|
__exportStar(require("./constants"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA4B;AAE5B,6CAA2B;AAC3B,qDAAmC;AACnC,8CAA4B;AAC5B,4CAA0B;AAEb,QAAA,IAAI,GAAG,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA4B;AAE5B,uCAAqB;AACrB,6CAA2B;AAC3B,qDAAmC;AACnC,8CAA4B;AAC5B,4CAA0B;AAEb,QAAA,IAAI,GAAG,CAAC,CAAC"}
|
package/lib-esm/fs.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createReadStream } from 'fs';
|
|
2
|
+
import { parser } from 'stream-json';
|
|
3
|
+
import { chain } from 'stream-chain';
|
|
4
|
+
import Asm from 'stream-json/Assembler';
|
|
5
|
+
export const readJSONStream = (filepath) => {
|
|
6
|
+
const pipeline = chain([createReadStream(filepath), parser()]);
|
|
7
|
+
const asm = Asm.connectTo(pipeline);
|
|
8
|
+
return new Promise((fulfill) => {
|
|
9
|
+
asm.on('done', (data) => fulfill(data.current));
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=fs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAExC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAc,QAAgB,EAAc,EAAE;IAC1E,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAEpC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/lib-esm/index.js
CHANGED
package/lib-esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAE1B,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,cAAc,MAAM,CAAC;AACrB,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAE1B,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bundle-stats/cli-utils",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3-alpha.3",
|
|
4
4
|
"description": "BundleStats CLI utilities",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -34,18 +34,22 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/relative-ci/bundle-stats/blob/master/packages/cli-utils#readme",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@bundle-stats/html-templates": "^4.5.
|
|
38
|
-
"@bundle-stats/plugin-webpack-filter": "^4.5.
|
|
39
|
-
"@bundle-stats/plugin-webpack-validate": "^4.5.
|
|
40
|
-
"@bundle-stats/utils": "^4.5.
|
|
37
|
+
"@bundle-stats/html-templates": "^4.5.3-alpha.3",
|
|
38
|
+
"@bundle-stats/plugin-webpack-filter": "^4.5.3-alpha.3",
|
|
39
|
+
"@bundle-stats/plugin-webpack-validate": "^4.5.3-alpha.3",
|
|
40
|
+
"@bundle-stats/utils": "^4.5.3-alpha.3",
|
|
41
41
|
"core-js": "^3.21.0",
|
|
42
42
|
"find-cache-dir": "^3.1.0",
|
|
43
|
-
"fs-extra": "^11.0.0"
|
|
43
|
+
"fs-extra": "^11.0.0",
|
|
44
|
+
"stream-chain": "^2.2.5",
|
|
45
|
+
"stream-json": "^1.8.0"
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
46
48
|
"@types/find-cache-dir": "^3.2.1",
|
|
47
|
-
"
|
|
49
|
+
"@types/stream-chain": "^2.0.1",
|
|
50
|
+
"@types/stream-json": "^1.7.3",
|
|
51
|
+
"jest": "29.6.2",
|
|
48
52
|
"typescript": "5.1.6"
|
|
49
53
|
},
|
|
50
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "e6c4133b85498ae82fcf2ec0b36e5475a2607c91"
|
|
51
55
|
}
|
package/types/fs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const readJSONStream: <T = unknown>(filepath: string) => Promise<T>;
|