@node-cli/bundlesize 2.1.0 → 2.1.2

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 CHANGED
@@ -10,9 +10,16 @@
10
10
  > npm install --dev @node-cli/bundlesize
11
11
  ```
12
12
 
13
- ## Examples
13
+ ## Configuration
14
14
 
15
- Assuming there is a `bundlesize.config.js` file in the root of the project with the following content:
15
+ A configuration file must be provided via the `-c` parameter, it must export an array of objects with the following properties:
16
+
17
+ - `path`: the path to the file to check
18
+ - `limit`: the limit to check against
19
+
20
+ ### Examples
21
+
22
+ #### Single file
16
23
 
17
24
  ```js
18
25
  export default [
@@ -23,6 +30,54 @@ export default [
23
30
  ];
24
31
  ```
25
32
 
33
+ #### Multiple files
34
+
35
+ ```js
36
+ export default [
37
+ {
38
+ path: "dist/some-bundle.js",
39
+ limit: "10 kB",
40
+ },
41
+ {
42
+ path: "dist/some-other-bundle.js",
43
+ limit: "100 kB",
44
+ },
45
+ ];
46
+ ```
47
+
48
+ #### With glob patterns
49
+
50
+ ```js
51
+ export default [
52
+ {
53
+ path: "dist/**/some-bundle.js",
54
+ limit: "10 kB",
55
+ },
56
+ {
57
+ path: "dist/**/some-other-bundle-*.js",
58
+ limit: "100 kB",
59
+ },
60
+ {
61
+ path: "dist/**/extra-+([a-zA-Z0-9]).js",
62
+ limit: "100 kB",
63
+ },
64
+ ];
65
+ ```
66
+
67
+ #### With a hash
68
+
69
+ The special keyword `<hash>` can be used to match a hash in the filename. It cannot be used in conjunction with the single star (\*) glob pattern, and it cannot be used if multiple files match the pattern.
70
+
71
+ **NOTE**: Using `<hash>` is equivalent to using `+([a-zA-Z0-9])` in the glob pattern. However, the result will be indexed with the `hash` key instead of the `match` key, so that subsequent scripts can use the hash value.
72
+
73
+ | Status | Pattern | Comment |
74
+ | ------ | ------------------------------- | ------------------------------------ |
75
+ | OK | `dist/**/some-bundle-<hash>.js` | If only one file matches the pattern |
76
+ | Not OK | `dist/**/some-bundle-<hash>.js` | If multiple files match the pattern |
77
+ | Not OK | `dist/**/some-bundle-<hash>.*` | Cannot use `<hash>` with `*` |
78
+
79
+ ## Usage
80
+
26
81
  ### Print the results at the command line
27
82
 
28
83
  ```json
@@ -30,11 +30,29 @@ try {
30
30
  const configuration = await import(configurationFile).then((m)=>m.default);
31
31
  for (const artifact of configuration){
32
32
  const rootPath = artifact.path.startsWith("/") ? "" : path.dirname(configurationFile);
33
- const file = path.join(rootPath, artifact.path);
34
- const files = glob.sync(file);
33
+ const artifactPath = path.dirname(artifact.path);
34
+ const globReplace = "+([a-zA-Z0-9])";
35
+ const hasHash = artifact.path.includes("<hash>");
36
+ /**
37
+ * if the artifact.path has the string <hash> in it,
38
+ * then we need to check for other characters:
39
+ * - Double stars ** are allowed.
40
+ * - Single stars * are not allowed.
41
+ */ if (hasHash && /(?<!\*)\*(?!\*)/.test(artifact.path)) {
42
+ log.error(`Invalid path: ${artifact.path}.`);
43
+ log.error("Single stars (*) are not allowed when using the special keyword <hash>");
44
+ process.exit(1);
45
+ }
46
+ const fileGlob = path.join(rootPath, artifact.path.replace("<hash>", globReplace));
47
+ const files = glob.sync(fileGlob);
35
48
  if (files.length === 0) {
36
- log.error(`File not found: ${file}`);
37
- process.exit(flags.silent === false ? 1 : 0);
49
+ log.error(`File not found: ${fileGlob}`);
50
+ process.exit(1);
51
+ }
52
+ if (files.length > 1 && hasHash) {
53
+ log.error(`Multiple files found for: ${artifact.path}.`);
54
+ log.error("Please use a more specific path when using the special keyword <hash>.");
55
+ process.exit(1);
38
56
  }
39
57
  for (const file of files){
40
58
  const fileSize = statSync(file).size;
@@ -43,10 +61,7 @@ try {
43
61
  if (passed === false) {
44
62
  failed = true;
45
63
  }
46
- let index = file.replace(rootPath, "");
47
- if (!artifact.path.startsWith("/") && index.startsWith("/")) {
48
- index = index.slice(1);
49
- }
64
+ let index = hasHash ? artifact.path : path.join(artifactPath, path.basename(file));
50
65
  currentResults[index] = {
51
66
  fileSize,
52
67
  fileSizeGzip,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/bundlesize.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Logger } from \"@node-cli/logger\";\nimport bytes from \"bytes\";\nimport { config } from \"./parse.js\";\nimport fs from \"fs-extra\";\nimport { glob } from \"glob\";\nimport { gzipSizeFromFileSync } from \"gzip-size\";\nimport path from \"node:path\";\nimport { statSync } from \"node:fs\";\n\nconst STDOUT = \"stdout\";\nconst CWD = process.cwd();\n\nconst flags = config.flags;\nconst configurationFile = path.join(CWD, flags.configuration);\nconst outputFile =\n\tflags.output === \"\" || flags.output === undefined\n\t\t? STDOUT\n\t\t: path.join(CWD, flags.output);\nconst prefix = flags.prefix || Date.now().toString();\nconst currentResults = {};\nconst log = new Logger({\n\tboring: flags.boring,\n});\n\nlet failed = false;\n\nif (flags.configuration === \"\") {\n\tlog.error(\"Please provide a configuration file\");\n\tprocess.exit(0);\n}\n\nif (fs.existsSync(configurationFile) === false) {\n\tlog.error(\"Invalid or missing configuration file!\");\n\tprocess.exit(0);\n}\n\ntry {\n\tconst configuration = await import(configurationFile).then((m) => m.default);\n\n\tfor (const artifact of configuration) {\n\t\tconst rootPath = artifact.path.startsWith(\"/\")\n\t\t\t? \"\"\n\t\t\t: path.dirname(configurationFile);\n\t\tconst file = path.join(rootPath, artifact.path);\n\t\tconst files = glob.sync(file);\n\n\t\tif (files.length === 0) {\n\t\t\tlog.error(`File not found: ${file}`);\n\t\t\tprocess.exit(flags.silent === false ? 1 : 0);\n\t\t}\n\n\t\tfor (const file of files) {\n\t\t\tconst fileSize = statSync(file).size;\n\t\t\tconst fileSizeGzip = gzipSizeFromFileSync(file);\n\t\t\tconst passed = fileSizeGzip < bytes(artifact.limit);\n\n\t\t\tif (passed === false) {\n\t\t\t\tfailed = true;\n\t\t\t}\n\t\t\tlet index = file.replace(rootPath, \"\");\n\t\t\tif (!artifact.path.startsWith(\"/\") && index.startsWith(\"/\")) {\n\t\t\t\tindex = index.slice(1);\n\t\t\t}\n\n\t\t\tcurrentResults[index] = {\n\t\t\t\tfileSize,\n\t\t\t\tfileSizeGzip,\n\t\t\t\tlimit: artifact.limit,\n\t\t\t\tpassed,\n\t\t\t};\n\t\t}\n\t}\n\n\tlet existingResults = {};\n\tif (outputFile !== STDOUT) {\n\t\ttry {\n\t\t\texistingResults = fs.readJsonSync(outputFile);\n\t\t} catch {\n\t\t\t// nothing to declare officer\n\t\t}\n\t}\n\texistingResults[prefix] = currentResults;\n\tif (outputFile !== STDOUT) {\n\t\tfs.outputJsonSync(outputFile, existingResults, { spaces: 2 });\n\t}\n\n\tif (outputFile === STDOUT) {\n\t\tlog.info(`Configuration: ${flags.configuration}`);\n\t\tlog.info(`Output: ${outputFile}`);\n\t\tlog.info(`Output prefix: ${prefix}`);\n\t\tlog.log(`\\n${JSON.stringify(currentResults, undefined, 2)}`);\n\t}\n} catch (error) {\n\tlog.error(error);\n\tprocess.exit(0);\n}\n\nif (failed && flags.silent === false) {\n\tprocess.exit(1);\n}\n"],"names":["Logger","bytes","config","fs","glob","gzipSizeFromFileSync","path","statSync","STDOUT","CWD","process","cwd","flags","configurationFile","join","configuration","outputFile","output","undefined","prefix","Date","now","toString","currentResults","log","boring","failed","error","exit","existsSync","then","m","default","artifact","rootPath","startsWith","dirname","file","files","sync","length","silent","fileSize","size","fileSizeGzip","passed","limit","index","replace","slice","existingResults","readJsonSync","outputJsonSync","spaces","info","JSON","stringify"],"mappings":";AAEA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,WAAW,QAAQ;AAC1B,SAASC,MAAM,QAAQ,aAAa;AACpC,OAAOC,QAAQ,WAAW;AAC1B,SAASC,IAAI,QAAQ,OAAO;AAC5B,SAASC,oBAAoB,QAAQ,YAAY;AACjD,OAAOC,UAAU,YAAY;AAC7B,SAASC,QAAQ,QAAQ,UAAU;AAEnC,MAAMC,SAAS;AACf,MAAMC,MAAMC,QAAQC,GAAG;AAEvB,MAAMC,QAAQV,OAAOU,KA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,SAASa,KAAK;YAElD,IAAID,WAAW,OAAO;gBACrBnB,SAAS;YACV;YACA,IAAIqB,QAAQV,KAAKW,OAAO,CAACd,UAAU;YACnC,IAAI,CAACD,SAAS3B,IAAI,CAAC6B,UAAU,CAAC,QAAQY,MAAMZ,UAAU,CAAC,MAAM;gBAC5DY,QAAQA,MAAME,KAAK,CAAC;YACrB;YAEA1B,cAAc,CAACwB,MAAM,GAAG;gBACvBL;gBACAE;gBACAE,OAAOb,SAASa,KAAK;gBACrBD;YACD;QACD;IACD;IAEA,IAAIK,kBAAkB,CAAC;IACvB,IAAIlC,eAAeR,QAAQ;QAC1B,IAAI;YACH0C,kBAAkB/C,GAAGgD,YAAY,CAACnC;QACnC,EAAE,OAAM;QACP,6BAA6B;QAC9B;IACD;IACAkC,eAAe,CAAC/B,OAAO,GAAGI;IAC1B,IAAIP,eAAeR,QAAQ;QAC1BL,GAAGiD,cAAc,CAACpC,YAAYkC,iBAAiB;YAAEG,QAAQ;QAAE;IAC5D;IAEA,IAAIrC,eAAeR,QAAQ;QAC1BgB,IAAI8B,IAAI,CAAC,CAAC,eAAe,EAAE1C,MAAMG,aAAa,CAAC,CAAC;QAChDS,IAAI8B,IAAI,CAAC,CAAC,QAAQ,EAAEtC,WAAW,CAAC;QAChCQ,IAAI8B,IAAI,CAAC,CAAC,eAAe,EAAEnC,OAAO,CAAC;QACnCK,IAAIA,GAAG,CAAC,CAAC,EAAE,EAAE+B,KAAKC,SAAS,CAACjC,gBAAgBL,WAAW,GAAG,CAAC;IAC5D;AACD,EAAE,OAAOS,OAAO;IACfH,IAAIG,KAAK,CAACA;IACVjB,QAAQkB,IAAI,CAAC;AACd;AAEA,IAAIF,UAAUd,MAAM6B,MAAM,KAAK,OAAO;IACrC/B,QAAQkB,IAAI,CAAC;AACd"}
1
+ {"version":3,"sources":["../src/bundlesize.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Logger } from \"@node-cli/logger\";\nimport bytes from \"bytes\";\nimport { config } from \"./parse.js\";\nimport fs from \"fs-extra\";\nimport { glob } from \"glob\";\nimport { gzipSizeFromFileSync } from \"gzip-size\";\nimport path from \"node:path\";\nimport { statSync } from \"node:fs\";\n\nconst STDOUT = \"stdout\";\nconst CWD = process.cwd();\n\nconst flags = config.flags;\nconst configurationFile = path.join(CWD, flags.configuration);\nconst outputFile =\n\tflags.output === \"\" || flags.output === undefined\n\t\t? STDOUT\n\t\t: path.join(CWD, flags.output);\nconst prefix = flags.prefix || Date.now().toString();\nconst currentResults = {};\nconst log = new Logger({\n\tboring: flags.boring,\n});\n\nlet failed = false;\n\nif (flags.configuration === \"\") {\n\tlog.error(\"Please provide a configuration file\");\n\tprocess.exit(0);\n}\n\nif (fs.existsSync(configurationFile) === false) {\n\tlog.error(\"Invalid or missing configuration file!\");\n\tprocess.exit(0);\n}\n\ntry {\n\tconst configuration = await import(configurationFile).then((m) => m.default);\n\n\tfor (const artifact of configuration) {\n\t\tconst rootPath = artifact.path.startsWith(\"/\")\n\t\t\t? \"\"\n\t\t\t: path.dirname(configurationFile);\n\t\tconst artifactPath = path.dirname(artifact.path);\n\t\tconst globReplace = \"+([a-zA-Z0-9])\";\n\t\tconst hasHash = artifact.path.includes(\"<hash>\");\n\n\t\t/**\n\t\t * if the artifact.path has the string <hash> in it,\n\t\t * then we need to check for other characters:\n\t\t * - Double stars ** are allowed.\n\t\t * - Single stars * are not allowed.\n\t\t */\n\t\tif (hasHash && /(?<!\\*)\\*(?!\\*)/.test(artifact.path)) {\n\t\t\tlog.error(`Invalid path: ${artifact.path}.`);\n\t\t\tlog.error(\n\t\t\t\t\"Single stars (*) are not allowed when using the special keyword <hash>\",\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tconst fileGlob = path.join(\n\t\t\trootPath,\n\t\t\tartifact.path.replace(\"<hash>\", globReplace),\n\t\t);\n\t\tconst files = glob.sync(fileGlob);\n\n\t\tif (files.length === 0) {\n\t\t\tlog.error(`File not found: ${fileGlob}`);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tif (files.length > 1 && hasHash) {\n\t\t\tlog.error(`Multiple files found for: ${artifact.path}.`);\n\t\t\tlog.error(\n\t\t\t\t\"Please use a more specific path when using the special keyword <hash>.\",\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tfor (const file of files) {\n\t\t\tconst fileSize = statSync(file).size;\n\t\t\tconst fileSizeGzip = gzipSizeFromFileSync(file);\n\t\t\tconst passed = fileSizeGzip < bytes(artifact.limit);\n\n\t\t\tif (passed === false) {\n\t\t\t\tfailed = true;\n\t\t\t}\n\t\t\tlet index = hasHash\n\t\t\t\t? artifact.path\n\t\t\t\t: path.join(artifactPath, path.basename(file));\n\n\t\t\tcurrentResults[index] = {\n\t\t\t\tfileSize,\n\t\t\t\tfileSizeGzip,\n\t\t\t\tlimit: artifact.limit,\n\t\t\t\tpassed,\n\t\t\t};\n\t\t}\n\t}\n\n\tlet existingResults = {};\n\tif (outputFile !== STDOUT) {\n\t\ttry {\n\t\t\texistingResults = fs.readJsonSync(outputFile);\n\t\t} catch {\n\t\t\t// nothing to declare officer\n\t\t}\n\t}\n\texistingResults[prefix] = currentResults;\n\tif (outputFile !== STDOUT) {\n\t\tfs.outputJsonSync(outputFile, existingResults, { spaces: 2 });\n\t}\n\n\tif (outputFile === STDOUT) {\n\t\tlog.info(`Configuration: ${flags.configuration}`);\n\t\tlog.info(`Output: ${outputFile}`);\n\t\tlog.info(`Output prefix: ${prefix}`);\n\t\tlog.log(`\\n${JSON.stringify(currentResults, undefined, 2)}`);\n\t}\n} catch (error) {\n\tlog.error(error);\n\tprocess.exit(0);\n}\n\nif (failed && flags.silent === false) {\n\tprocess.exit(1);\n}\n"],"names":["Logger","bytes","config","fs","glob","gzipSizeFromFileSync","path","statSync","STDOUT","CWD","process","cwd","flags","configurationFile","join","configuration","outputFile","output","undefined","prefix","Date","now","toString","currentResults","log","boring","failed","error","exit","existsSync","then","m","default","artifact","rootPath","startsWith","dirname","artifactPath","globReplace","hasHash","includes","test","fileGlob","replace","files","sync","length","file","fileSize","size","fileSizeGzip","passed","limit","index","basename","existingResults","readJsonSync","outputJsonSync","spaces","info","JSON","stringify","silent"],"mappings":";AAEA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,WAAW,QAAQ;AAC1B,SAASC,MAAM,QAAQ,aAAa;AACpC,OAAOC,QAAQ,WAAW;AAC1B,SAASC,IAAI,QAAQ,OAAO;AAC5B,SAASC,oBAAoB,QAAQ,YAAY;AACjD,OAAOC,UAAU,YAAY;AAC7B,SAASC,QAAQ,QAAQ,UAAU;AAEnC,MAAMC,SAAS;AACf,MAAMC,MAAMC,QAAQC,GAAG;AAEvB,MAAMC,QAAQV,OAAOU,KAAK;AAC1B,MAAMC,oBAAoBP,KAAKQ,IAAI,CAACL,KAAKG,MAAMG,aAAa;AAC5D,MAAMC,aACLJ,MAAMK,MAAM,KAAK,MAAML,MAAMK,MAAM,KAAKC,YACrCV,SACAF,KAAKQ,IAAI,CAACL,KAAKG,MAAMK,MAAM;AAC/B,MAAME,SAASP,MAAMO,MAAM,IAAIC,KAAKC,GAAG,GAAGC,QAAQ;AAClD,MAAMC,iBAAiB,CAAC;AACxB,MAAMC,MAAM,IAAIxB,OAAO;IACtByB,QAAQb,MAAMa,MAAM;AACrB;AAEA,IAAIC,SAAS;AAEb,IAAId,MAAMG,aAAa,KAAK,IAAI;IAC/BS,IAAIG,KAAK,CAAC;IACVjB,QAAQkB,IAAI,CAAC;AACd;AAEA,IAAIzB,GAAG0B,UAAU,CAAChB,uBAAuB,OAAO;IAC/CW,IAAIG,KAAK,CAAC;IACVjB,QAAQkB,IAAI,CAAC;AACd;AAEA,IAAI;IACH,MAAMb,gBAAgB,MAAM,MAAM,CAACF,mBAAmBiB,IAAI,CAAC,CAACC,IAAMA,EAAEC,OAAO;IAE3E,KAAK,MAAMC,YAAYlB,cAAe;QACrC,MAAMmB,WAAWD,SAAS3B,IAAI,CAAC6B,UAAU,CAAC,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;QACD;IACD;IAEA,IAAII,kBAAkB,CAAC;IACvB,IAAIvC,eAAeR,QAAQ;QAC1B,IAAI;YACH+C,kBAAkBpD,GAAGqD,YAAY,CAACxC;QACnC,EAAE,OAAM;QACP,6BAA6B;QAC9B;IACD;IACAuC,eAAe,CAACpC,OAAO,GAAGI;IAC1B,IAAIP,eAAeR,QAAQ;QAC1BL,GAAGsD,cAAc,CAACzC,YAAYuC,iBAAiB;YAAEG,QAAQ;QAAE;IAC5D;IAEA,IAAI1C,eAAeR,QAAQ;QAC1BgB,IAAImC,IAAI,CAAC,CAAC,eAAe,EAAE/C,MAAMG,aAAa,CAAC,CAAC;QAChDS,IAAImC,IAAI,CAAC,CAAC,QAAQ,EAAE3C,WAAW,CAAC;QAChCQ,IAAImC,IAAI,CAAC,CAAC,eAAe,EAAExC,OAAO,CAAC;QACnCK,IAAIA,GAAG,CAAC,CAAC,EAAE,EAAEoC,KAAKC,SAAS,CAACtC,gBAAgBL,WAAW,GAAG,CAAC;IAC5D;AACD,EAAE,OAAOS,OAAO;IACfH,IAAIG,KAAK,CAACA;IACVjB,QAAQkB,IAAI,CAAC;AACd;AAEA,IAAIF,UAAUd,MAAMkD,MAAM,KAAK,OAAO;IACrCpD,QAAQkB,IAAI,CAAC;AACd"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-cli/bundlesize",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "description": "Simple CLI tool that checks file(s) size and report if limits have been reached",
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "2ced1c1d13328fab153e028d9c2eca062a832e41"
36
+ "gitHead": "feee529dafbd7b992827d3e749300cda51c8c8b1"
37
37
  }