@faststore/lighthouse 1.8.51 → 1.9.8

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/CHANGELOG.md CHANGED
@@ -3,6 +3,36 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 1.9.8 (2022-06-17)
7
+
8
+
9
+ ### Features
10
+
11
+ * lint ([#1368](https://github.com/vtex/faststore/issues/1368)) ([66ce99f](https://github.com/vtex/faststore/commit/66ce99f310ec593245e3937daea5ed813e1630e6))
12
+
13
+
14
+
15
+
16
+
17
+ ## 1.9.4 (2022-06-10)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * codesandbox ci ([#1357](https://github.com/vtex/faststore/issues/1357)) ([db07e1f](https://github.com/vtex/faststore/commit/db07e1fb02f28b0f082c361cb2c28250a687b760))
23
+
24
+
25
+
26
+
27
+
28
+ ## 1.9.1 (2022-06-09)
29
+
30
+ **Note:** Version bump only for package @faststore/lighthouse
31
+
32
+
33
+
34
+
35
+
6
36
  ## 1.8.51 (2022-06-03)
7
37
 
8
38
 
package/dist/index.js CHANGED
@@ -1,8 +1,63 @@
1
-
2
- 'use strict'
3
-
4
- if (process.env.NODE_ENV === 'production') {
5
- module.exports = require('./lighthouse.cjs.production.min.js')
6
- } else {
7
- module.exports = require('./lighthouse.cjs.development.js')
8
- }
1
+ /**
2
+ * Some values, we took from the default lighthouse config
3
+ * throttling mobileSlow4G: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/constants.js#L22
4
+ */
5
+ const lhConfig = ({ urls, server, assertions = {} }) => {
6
+ const url = urls.map((path) => `${server}${path}`);
7
+ return {
8
+ ci: {
9
+ collect: {
10
+ url,
11
+ },
12
+ assert: {
13
+ preset: 'lighthouse:no-pwa',
14
+ assertions: Object.assign({
15
+ // Final Ligthouse score Budgets
16
+ 'categories:accessibility': ['error', { minScore: 1 }], 'categories:best-practices': ['error', { minScore: 1 }], 'categories:performance': ['error', { minScore: 0.95 }], 'categories:seo': ['error', { minScore: 1 }], 'categories:pwa': 'off',
17
+ // Lighthouse Metrics Budgets
18
+ // Minimal score for perf 90 on each metric
19
+ 'first-contentful-paint': ['error', { maxNumericValue: 1800 }], 'speed-index': ['error', { maxNumericValue: 3387 }], 'largest-contentful-paint': ['error', { maxNumericValue: 2500 }], interactive: ['error', { maxNumericValue: 3785 }], 'total-blocking-time': ['error', { maxNumericValue: 350 }], 'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }],
20
+ // Number of Requests Budgets
21
+ 'resource-summary:font:count': ['error', { maxNumericValue: 3 }], 'resource-summary:image:count': ['error', { maxNumericValue: 20 }], 'resource-summary:script:count': ['error', { maxNumericValue: 15 }], 'resource-summary:stylesheet:count': [
22
+ 'error',
23
+ { maxNumericValue: 3 },
24
+ ], 'resource-summary:third-party:count': [
25
+ 'error',
26
+ { maxNumericValue: 100 },
27
+ ],
28
+ // Resource sizes Budgets
29
+ // To learn where this 1024 comes from: https://github.com/GoogleChrome/lighthouse-ci/blob/fe181b61b20205dba5962c40094b1c90983f1c5e/packages/utils/src/budgets-converter.js#L49
30
+ 'resource-summary:document:size': [
31
+ 'error',
32
+ { maxNumericValue: 40 * 1024 },
33
+ ], 'resource-summary:font:size': [
34
+ 'error',
35
+ { maxNumericValue: 70 * 1024 },
36
+ ], 'resource-summary:image:size': [
37
+ 'error',
38
+ { maxNumericValue: 500 * 1024 },
39
+ ], 'resource-summary:script:size': [
40
+ 'error',
41
+ { maxNumericValue: 200 * 1024 },
42
+ ], 'resource-summary:stylesheet:size': [
43
+ 'error',
44
+ { maxNumericValue: 100 * 1024 },
45
+ ], 'resource-summary:third-party:size': [
46
+ 'error',
47
+ { maxNumericValue: 500 * 1024 },
48
+ ], 'resource-summary:total:size': [
49
+ 'error',
50
+ { maxNumericValue: 600 * 1024 },
51
+ ],
52
+ // Extra Lighthouse Assertion rules
53
+ 'unused-javascript': ['error', { maxLength: 10 }] }, assertions),
54
+ },
55
+ upload: {
56
+ target: 'temporary-public-storage',
57
+ urlReplacementPatterns: 's/.*app//',
58
+ },
59
+ },
60
+ };
61
+ };
62
+ export default lhConfig;
63
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA;;;GAGG;AAEH,MAAM,QAAQ,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,GAAG,EAAE,EAAU,EAAE,EAAE;IAC7D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,IAAI,EAAE,CAAC,CAAA;IAElD,OAAO;QACL,EAAE,EAAE;YACF,OAAO,EAAE;gBACP,GAAG;aACJ;YACD,MAAM,EAAE;gBACN,MAAM,EAAE,mBAAmB;gBAC3B,UAAU;oBACR,gCAAgC;oBAChC,0BAA0B,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EACtD,2BAA2B,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EACvD,wBAAwB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EACvD,gBAAgB,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EAC5C,gBAAgB,EAAE,KAAK;oBAEvB,6BAA6B;oBAC7B,2CAA2C;oBAC3C,wBAAwB,EAAE,CAAC,OAAO,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,EAC9D,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,EACnD,0BAA0B,EAAE,CAAC,OAAO,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,EAChE,WAAW,EAAE,CAAC,OA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I,EAAE;qBAChC;oBAED,mCAAmC;oBACnC,mBAAmB,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,IAE9C,UAAU,CACd;aACF;YACD,MAAM,EAAE;gBACN,MAAM,EAAE,0BAA0B;gBAClC,sBAAsB,EAAE,WAAW;aACpC;SACF;KACF,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/lighthouse",
3
- "version": "1.8.51",
3
+ "version": "1.9.8",
4
4
  "author": "Emerson Laurentino",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -19,8 +19,9 @@
19
19
  "src"
20
20
  ],
21
21
  "scripts": {
22
- "develop": "tsdx watch",
23
- "build": "tsdx build",
22
+ "develop": "tsc --watch",
23
+ "build": "tsc",
24
+ "lint": "eslint src/**/*.ts",
24
25
  "test": "tsdx test --passWithNoTests"
25
26
  },
26
27
  "devDependencies": {
@@ -28,5 +29,5 @@
28
29
  "tsdx": "^0.14.1",
29
30
  "typescript": "^4.2.4"
30
31
  },
31
- "gitHead": "be1a2b1a38ec185ca8bd90af6e5fb02119f2fcb9"
32
+ "gitHead": "f8e0cb3d43978426228addcc28055e537eaf7752"
32
33
  }
package/dist/index.d.ts DELETED
@@ -1,25 +0,0 @@
1
- interface Params {
2
- server?: string;
3
- urls: string[];
4
- assertions?: any;
5
- }
6
- /**
7
- * Some values, we took from the default lighthouse config
8
- * throttling mobileSlow4G: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/constants.js#L22
9
- */
10
- declare const lhConfig: ({ urls, server, assertions }: Params) => {
11
- ci: {
12
- collect: {
13
- url: string[];
14
- };
15
- assert: {
16
- preset: string;
17
- assertions: any;
18
- };
19
- upload: {
20
- target: string;
21
- urlReplacementPatterns: string;
22
- };
23
- };
24
- };
25
- export default lhConfig;
@@ -1,131 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- function _extends() {
6
- _extends = Object.assign || function (target) {
7
- for (var i = 1; i < arguments.length; i++) {
8
- var source = arguments[i];
9
-
10
- for (var key in source) {
11
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12
- target[key] = source[key];
13
- }
14
- }
15
- }
16
-
17
- return target;
18
- };
19
-
20
- return _extends.apply(this, arguments);
21
- }
22
-
23
- /**
24
- * Some values, we took from the default lighthouse config
25
- * throttling mobileSlow4G: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/constants.js#L22
26
- */
27
- var lhConfig = function lhConfig(_ref) {
28
- var urls = _ref.urls,
29
- server = _ref.server,
30
- _ref$assertions = _ref.assertions,
31
- assertions = _ref$assertions === void 0 ? {} : _ref$assertions;
32
- var url = urls.map(function (path) {
33
- return "" + server + path;
34
- });
35
- return {
36
- ci: {
37
- collect: {
38
- url: url
39
- },
40
- assert: {
41
- preset: 'lighthouse:no-pwa',
42
- assertions: _extends({
43
- // Final Ligthouse score Budgets
44
- 'categories:accessibility': ['error', {
45
- minScore: 1
46
- }],
47
- 'categories:best-practices': ['error', {
48
- minScore: 1
49
- }],
50
- 'categories:performance': ['error', {
51
- minScore: 0.95
52
- }],
53
- 'categories:seo': ['error', {
54
- minScore: 1
55
- }],
56
- 'categories:pwa': 'off',
57
- // Lighthouse Metrics Budgets
58
- // Minimal score for perf 90 on each metric
59
- 'first-contentful-paint': ['error', {
60
- maxNumericValue: 1800
61
- }],
62
- 'speed-index': ['error', {
63
- maxNumericValue: 3387
64
- }],
65
- 'largest-contentful-paint': ['error', {
66
- maxNumericValue: 2500
67
- }],
68
- interactive: ['error', {
69
- maxNumericValue: 3785
70
- }],
71
- 'total-blocking-time': ['error', {
72
- maxNumericValue: 350
73
- }],
74
- 'cumulative-layout-shift': ['error', {
75
- maxNumericValue: 0.1
76
- }],
77
- // Number of Requests Budgets
78
- 'resource-summary:font:count': ['error', {
79
- maxNumericValue: 3
80
- }],
81
- 'resource-summary:image:count': ['error', {
82
- maxNumericValue: 20
83
- }],
84
- 'resource-summary:script:count': ['error', {
85
- maxNumericValue: 15
86
- }],
87
- 'resource-summary:stylesheet:count': ['error', {
88
- maxNumericValue: 3
89
- }],
90
- 'resource-summary:third-party:count': ['error', {
91
- maxNumericValue: 100
92
- }],
93
- // Resource sizes Budgets
94
- // To learn where this 1024 comes from: https://github.com/GoogleChrome/lighthouse-ci/blob/fe181b61b20205dba5962c40094b1c90983f1c5e/packages/utils/src/budgets-converter.js#L49
95
- 'resource-summary:document:size': ['error', {
96
- maxNumericValue: 40 * 1024
97
- }],
98
- 'resource-summary:font:size': ['error', {
99
- maxNumericValue: 70 * 1024
100
- }],
101
- 'resource-summary:image:size': ['error', {
102
- maxNumericValue: 500 * 1024
103
- }],
104
- 'resource-summary:script:size': ['error', {
105
- maxNumericValue: 200 * 1024
106
- }],
107
- 'resource-summary:stylesheet:size': ['error', {
108
- maxNumericValue: 100 * 1024
109
- }],
110
- 'resource-summary:third-party:size': ['error', {
111
- maxNumericValue: 500 * 1024
112
- }],
113
- 'resource-summary:total:size': ['error', {
114
- maxNumericValue: 600 * 1024
115
- }],
116
- // Extra Lighthouse Assertion rules
117
- 'unused-javascript': ['error', {
118
- maxLength: 10
119
- }]
120
- }, assertions)
121
- },
122
- upload: {
123
- target: 'temporary-public-storage',
124
- urlReplacementPatterns: 's/.*app//'
125
- }
126
- }
127
- };
128
- };
129
-
130
- exports.default = lhConfig;
131
- //# sourceMappingURL=lighthouse.cjs.development.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lighthouse.cjs.development.js","sources":["../src/index.ts"],"sourcesContent":["interface Params {\n server?: string\n urls: string[]\n assertions?: any\n}\n\n/**\n * Some values, we took from the default lighthouse config\n * throttling mobileSlow4G: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/constants.js#L22\n */\n\nconst lhConfig = ({ urls, server, assertions = {} }: Params) => {\n const url = urls.map((path) => `${server}${path}`)\n\n return {\n ci: {\n collect: {\n url,\n },\n assert: {\n preset: 'lighthouse:no-pwa',\n assertions: {\n // Final Ligthouse score Budgets\n 'categories:accessibility': ['error', { minScore: 1 }],\n 'categories:best-practices': ['error', { minScore: 1 }],\n 'categories:performance': ['error', { minScore: 0.95 }],\n 'categories:seo': ['error', { minScore: 1 }],\n 'categories:pwa': 'off',\n\n // Lighthouse Metrics Budgets\n // Minimal score for perf 90 on each metric\n 'first-contentful-paint': ['error', { maxNumericValue: 1800 }],\n 'speed-index': ['error', { maxNumericValue: 3387 }],\n 'largest-contentful-paint': ['error', { maxNumericValue: 2500 }],\n interactive: ['error', { maxNumericValue: 3785 }],\n 'total-blocking-time': ['error', { maxNumericValue: 350 }],\n 'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }],\n\n // Number of Requests Budgets\n 'resource-summary:font:count': ['error', { maxNumericValue: 3 }],\n 'resource-summary:image:count': ['error', { maxNumericValue: 20 }],\n 'resource-summary:script:count': ['error', { maxNumericValue: 15 }],\n 'resource-summary:stylesheet:count': [\n 'error',\n { maxNumericValue: 3 },\n ],\n 'resource-summary:third-party:count': [\n 'error',\n { maxNumericValue: 100 },\n ],\n\n // Resource sizes Budgets\n // To learn where this 1024 comes from: https://github.com/GoogleChrome/lighthouse-ci/blob/fe181b61b20205dba5962c40094b1c90983f1c5e/packages/utils/src/budgets-converter.js#L49\n 'resource-summary:document:size': [\n 'error',\n { maxNumericValue: 40 * 1024 },\n ],\n 'resource-summary:font:size': [\n 'error',\n { maxNumericValue: 70 * 1024 },\n ],\n 'resource-summary:image:size': [\n 'error',\n { maxNumericValue: 500 * 1024 },\n ],\n 'resource-summary:script:size': [\n 'error',\n { maxNumericValue: 200 * 1024 },\n ],\n 'resource-summary:stylesheet:size': [\n 'error',\n { maxNumericValue: 100 * 1024 },\n ],\n 'resource-summary:third-party:size': [\n 'error',\n { maxNumericValue: 500 * 1024 },\n ],\n 'resource-summary:total:size': [\n 'error',\n { maxNumericValue: 600 * 1024 },\n ],\n\n // Extra Lighthouse Assertion rules\n 'unused-javascript': ['error', { maxLength: 10 }],\n\n ...assertions,\n },\n },\n upload: {\n target: 'temporary-public-storage',\n urlReplacementPatterns: 's/.*app//',\n },\n },\n }\n}\n\nexport default lhConfig\n"],"names":["lhConfig","urls","server","assertions","url","map","path","ci","collect","assert","preset","minScore","maxNumericValue","interactive","maxLength","upload","target","urlReplacementPatterns"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA;;;;AAKA,IAAMA,QAAQ,GAAG,SAAXA,QAAW;MAAGC,YAAAA;MAAMC,cAAAA;6BAAQC;MAAAA,0CAAa;AAC7C,MAAMC,GAAG,GAAGH,IAAI,CAACI,GAAL,CAAS,UAACC,IAAD;AAAA,gBAAaJ,MAAb,GAAsBI,IAAtB;AAAA,GAAT,CAAZ;AAEA,SAAO;AACLC,IAAAA,EAAE,EAAE;AACFC,MAAAA,OAAO,EAAE;AACPJ,QAAAA,GAAG,EAAHA;AADO,OADP;AAIFK,MAAAA,MAAM,EAAE;AACNC,QAAAA,MAAM,EAAE,mBADF;AAENP,QAAAA,UAAU;AACR;AACA,sCAA4B,CAAC,OAAD,EAAU;AAAEQ,YAAAA,QAAQ,EAAE;AAAZ,WAAV,CAFpB;AAGR,uCAA6B,CAAC,OAAD,EAAU;AAAEA,YAAAA,QAAQ,EAAE;AAAZ,WAAV,CAHrB;AAIR,oCAA0B,CAAC,OAAD,EAAU;AAAEA,YAAAA,QAAQ,EAAE;AAAZ,WAAV,CAJlB;AAKR,4BAAkB,CAAC,OAAD,EAAU;AAAEA,YAAAA,QAAQ,EAAE;AAAZ,WAAV,CALV;AAMR,4BAAkB,KANV;AAQR;AACA;AACA,oCAA0B,CAAC,OAAD,EAAU;AAAEC,YAAAA,eAAe,EAAE;AAAnB,WAAV,CAVlB;AAWR,yBAAe,CAAC,OAAD,EAAU;AAAEA,YAAAA,eAAe,EAAE;AAAnB,WAAV,CAXP;AAYR,sCAA4B,CAAC,OAAD,EAAU;AAAEA,YAA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AAAzB,WAFmC,CApD7B;AAwDR,yCAA+B,CAC7B,OAD6B,EAE7B;AAAEA,YAAAA,eAAe,EAAE,MAAM;AAAzB,WAF6B,CAxDvB;AA6DR;AACA,+BAAqB,CAAC,OAAD,EAAU;AAAEE,YAAAA,SAAS,EAAE;AAAb,WAAV;AA9Db,WAgELX,UAhEK;AAFJ,OAJN;AAyEFY,MAAAA,MAAM,EAAE;AACNC,QAAAA,MAAM,EAAE,0BADF;AAENC,QAAAA,sBAAsB,EAAE;AAFlB;AAzEN;AADC,GAAP;AAgFD,CAnFD;;;;"}
@@ -1,2 +0,0 @@
1
- "use strict";function r(){return(r=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(r[u]=a[u])}return r}).apply(this,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(e){var a=e.server,u=e.assertions,o=void 0===u?{}:u;return{ci:{collect:{url:e.urls.map((function(r){return""+a+r}))},assert:{preset:"lighthouse:no-pwa",assertions:r({"categories:accessibility":["error",{minScore:1}],"categories:best-practices":["error",{minScore:1}],"categories:performance":["error",{minScore:.95}],"categories:seo":["error",{minScore:1}],"categories:pwa":"off","first-contentful-paint":["error",{maxNumericValue:1800}],"speed-index":["error",{maxNumericValue:3387}],"largest-contentful-paint":["error",{maxNumericValue:2500}],interactive:["error",{maxNumericValue:3785}],"total-blocking-time":["error",{maxNumericValue:350}],"cumulative-layout-shift":["error",{maxNumericValue:.1}],"resource-summary:font:count":["error",{maxNumericValue:3}],"resource-summary:image:count":["error",{maxNumericValue:20}],"resource-summary:script:count":["error",{maxNumericValue:15}],"resource-summary:stylesheet:count":["error",{maxNumericValue:3}],"resource-summary:third-party:count":["error",{maxNumericValue:100}],"resource-summary:document:size":["error",{maxNumericValue:40960}],"resource-summary:font:size":["error",{maxNumericValue:71680}],"resource-summary:image:size":["error",{maxNumericValue:512e3}],"resource-summary:script:size":["error",{maxNumericValue:204800}],"resource-summary:stylesheet:size":["error",{maxNumericValue:102400}],"resource-summary:third-party:size":["error",{maxNumericValue:512e3}],"resource-summary:total:size":["error",{maxNumericValue:614400}],"unused-javascript":["error",{maxLength:10}]},o)},upload:{target:"temporary-public-storage",urlReplacementPatterns:"s/.*app//"}}}};
2
- //# sourceMappingURL=lighthouse.cjs.production.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lighthouse.cjs.production.min.js","sources":["../src/index.ts"],"sourcesContent":["interface Params {\n server?: string\n urls: string[]\n assertions?: any\n}\n\n/**\n * Some values, we took from the default lighthouse config\n * throttling mobileSlow4G: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/constants.js#L22\n */\n\nconst lhConfig = ({ urls, server, assertions = {} }: Params) => {\n const url = urls.map((path) => `${server}${path}`)\n\n return {\n ci: {\n collect: {\n url,\n },\n assert: {\n preset: 'lighthouse:no-pwa',\n assertions: {\n // Final Ligthouse score Budgets\n 'categories:accessibility': ['error', { minScore: 1 }],\n 'categories:best-practices': ['error', { minScore: 1 }],\n 'categories:performance': ['error', { minScore: 0.95 }],\n 'categories:seo': ['error', { minScore: 1 }],\n 'categories:pwa': 'off',\n\n // Lighthouse Metrics Budgets\n // Minimal score for perf 90 on each metric\n 'first-contentful-paint': ['error', { maxNumericValue: 1800 }],\n 'speed-index': ['error', { maxNumericValue: 3387 }],\n 'largest-contentful-paint': ['error', { maxNumericValue: 2500 }],\n interactive: ['error', { maxNumericValue: 3785 }],\n 'total-blocking-time': ['error', { maxNumericValue: 350 }],\n 'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }],\n\n // Number of Requests Budgets\n 'resource-summary:font:count': ['error', { maxNumericValue: 3 }],\n 'resource-summary:image:count': ['error', { maxNumericValue: 20 }],\n 'resource-summary:script:count': ['error', { maxNumericValue: 15 }],\n 'resource-summary:stylesheet:count': [\n 'error',\n { maxNumericValue: 3 },\n ],\n 'resource-summary:third-party:count': [\n 'error',\n { maxNumericValue: 100 },\n ],\n\n // Resource sizes Budgets\n // To learn where this 1024 comes from: https://github.com/GoogleChrome/lighthouse-ci/blob/fe181b61b20205dba5962c40094b1c90983f1c5e/packages/utils/src/budgets-converter.js#L49\n 'resource-summary:document:size': [\n 'error',\n { maxNumericValue: 40 * 1024 },\n ],\n 'resource-summary:font:size': [\n 'error',\n { maxNumericValue: 70 * 1024 },\n ],\n 'resource-summary:image:size': [\n 'error',\n { maxNumericValue: 500 * 1024 },\n ],\n 'resource-summary:script:size': [\n 'error',\n { maxNumericValue: 200 * 1024 },\n ],\n 'resource-summary:stylesheet:size': [\n 'error',\n { maxNumericValue: 100 * 1024 },\n ],\n 'resource-summary:third-party:size': [\n 'error',\n { maxNumericValue: 500 * 1024 },\n ],\n 'resource-summary:total:size': [\n 'error',\n { maxNumericValue: 600 * 1024 },\n ],\n\n // Extra Lighthouse Assertion rules\n 'unused-javascript': ['error', { maxLength: 10 }],\n\n ...assertions,\n },\n },\n upload: {\n target: 'temporary-public-storage',\n urlReplacementPatterns: 's/.*app//',\n },\n },\n }\n}\n\nexport default lhConfig\n"],"names":["server","assertions","ci","collect","url","urls","map","path","assert","preset","minScore","maxNumericValue","interactive","maxLength","upload","target","urlReplacementPatterns"],"mappings":"mSAWiB,gBAASA,IAAAA,WAAQC,WAAAA,aAAa,WAGtC,CACLC,GAAI,CACFC,QAAS,CACPC,MANYC,KACDC,KAAI,SAACC,YAAYP,EAASO,MAOvCC,OAAQ,CACNC,OAAQ,oBACRR,yCAE8B,CAAC,QAAS,CAAES,SAAU,gCACrB,CAAC,QAAS,CAAEA,SAAU,6BACzB,CAAC,QAAS,CAAEA,SAAU,uBAC9B,CAAC,QAAS,CAAEA,SAAU,qBACtB,+BAIQ,CAAC,QAAS,CAAEC,gBAAiB,qBACxC,CAAC,QAAS,CAAEA,gBAAiB,kCAChB,CAAC,QAAS,CAAEA,gBAAiB,OACzDC,YAAa,CAAC,QAAS,CAAED,gBAAiB,6BACnB,CAAC,QAAS,CAAEA,gBAAiB,gCACzB,CAAC,QAAS,CAAEA,gBAAiB,mCAGzB,CAAC,QAAS,CAAEA,gBAAiB,mCAC5B,CAAC,QAAS,CAAEA,gBAAiB,qCAC5B,CAAC,QAAS,CAAEA,gBAAiB,yCACzB,CACnC,QACA,CAAEA,gBAAiB,yCAEiB,CACpC,QACA,CAAEA,gBAAiB,uCAKa,CAChC,QACA,CAAEA,gBAAiB,qCAES,CAC5B,QACA,CAAEA,gBAAiB,sCAEU,CAC7B,QACA,CAAEA,gBAAiB,uCAEW,CAC9B,QACA,CAAEA,gBAAiB,4CAEe,CAClC,QACA,CAAEA,gBAAiB,6CAEgB,CACnC,QACA,CAAEA,gBAAiB,sCAEU,CAC7B,QACA,CAAEA,gBAAiB,6BAIA,CAAC,QAAS,CAAEE,UAAW,MAEzCZ,IAGPa,OAAQ,CACNC,OAAQ,2BACRC,uBAAwB"}
@@ -1,127 +0,0 @@
1
- function _extends() {
2
- _extends = Object.assign || function (target) {
3
- for (var i = 1; i < arguments.length; i++) {
4
- var source = arguments[i];
5
-
6
- for (var key in source) {
7
- if (Object.prototype.hasOwnProperty.call(source, key)) {
8
- target[key] = source[key];
9
- }
10
- }
11
- }
12
-
13
- return target;
14
- };
15
-
16
- return _extends.apply(this, arguments);
17
- }
18
-
19
- /**
20
- * Some values, we took from the default lighthouse config
21
- * throttling mobileSlow4G: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/constants.js#L22
22
- */
23
- var lhConfig = function lhConfig(_ref) {
24
- var urls = _ref.urls,
25
- server = _ref.server,
26
- _ref$assertions = _ref.assertions,
27
- assertions = _ref$assertions === void 0 ? {} : _ref$assertions;
28
- var url = urls.map(function (path) {
29
- return "" + server + path;
30
- });
31
- return {
32
- ci: {
33
- collect: {
34
- url: url
35
- },
36
- assert: {
37
- preset: 'lighthouse:no-pwa',
38
- assertions: _extends({
39
- // Final Ligthouse score Budgets
40
- 'categories:accessibility': ['error', {
41
- minScore: 1
42
- }],
43
- 'categories:best-practices': ['error', {
44
- minScore: 1
45
- }],
46
- 'categories:performance': ['error', {
47
- minScore: 0.95
48
- }],
49
- 'categories:seo': ['error', {
50
- minScore: 1
51
- }],
52
- 'categories:pwa': 'off',
53
- // Lighthouse Metrics Budgets
54
- // Minimal score for perf 90 on each metric
55
- 'first-contentful-paint': ['error', {
56
- maxNumericValue: 1800
57
- }],
58
- 'speed-index': ['error', {
59
- maxNumericValue: 3387
60
- }],
61
- 'largest-contentful-paint': ['error', {
62
- maxNumericValue: 2500
63
- }],
64
- interactive: ['error', {
65
- maxNumericValue: 3785
66
- }],
67
- 'total-blocking-time': ['error', {
68
- maxNumericValue: 350
69
- }],
70
- 'cumulative-layout-shift': ['error', {
71
- maxNumericValue: 0.1
72
- }],
73
- // Number of Requests Budgets
74
- 'resource-summary:font:count': ['error', {
75
- maxNumericValue: 3
76
- }],
77
- 'resource-summary:image:count': ['error', {
78
- maxNumericValue: 20
79
- }],
80
- 'resource-summary:script:count': ['error', {
81
- maxNumericValue: 15
82
- }],
83
- 'resource-summary:stylesheet:count': ['error', {
84
- maxNumericValue: 3
85
- }],
86
- 'resource-summary:third-party:count': ['error', {
87
- maxNumericValue: 100
88
- }],
89
- // Resource sizes Budgets
90
- // To learn where this 1024 comes from: https://github.com/GoogleChrome/lighthouse-ci/blob/fe181b61b20205dba5962c40094b1c90983f1c5e/packages/utils/src/budgets-converter.js#L49
91
- 'resource-summary:document:size': ['error', {
92
- maxNumericValue: 40 * 1024
93
- }],
94
- 'resource-summary:font:size': ['error', {
95
- maxNumericValue: 70 * 1024
96
- }],
97
- 'resource-summary:image:size': ['error', {
98
- maxNumericValue: 500 * 1024
99
- }],
100
- 'resource-summary:script:size': ['error', {
101
- maxNumericValue: 200 * 1024
102
- }],
103
- 'resource-summary:stylesheet:size': ['error', {
104
- maxNumericValue: 100 * 1024
105
- }],
106
- 'resource-summary:third-party:size': ['error', {
107
- maxNumericValue: 500 * 1024
108
- }],
109
- 'resource-summary:total:size': ['error', {
110
- maxNumericValue: 600 * 1024
111
- }],
112
- // Extra Lighthouse Assertion rules
113
- 'unused-javascript': ['error', {
114
- maxLength: 10
115
- }]
116
- }, assertions)
117
- },
118
- upload: {
119
- target: 'temporary-public-storage',
120
- urlReplacementPatterns: 's/.*app//'
121
- }
122
- }
123
- };
124
- };
125
-
126
- export default lhConfig;
127
- //# sourceMappingURL=lighthouse.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lighthouse.esm.js","sources":["../src/index.ts"],"sourcesContent":["interface Params {\n server?: string\n urls: string[]\n assertions?: any\n}\n\n/**\n * Some values, we took from the default lighthouse config\n * throttling mobileSlow4G: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/constants.js#L22\n */\n\nconst lhConfig = ({ urls, server, assertions = {} }: Params) => {\n const url = urls.map((path) => `${server}${path}`)\n\n return {\n ci: {\n collect: {\n url,\n },\n assert: {\n preset: 'lighthouse:no-pwa',\n assertions: {\n // Final Ligthouse score Budgets\n 'categories:accessibility': ['error', { minScore: 1 }],\n 'categories:best-practices': ['error', { minScore: 1 }],\n 'categories:performance': ['error', { minScore: 0.95 }],\n 'categories:seo': ['error', { minScore: 1 }],\n 'categories:pwa': 'off',\n\n // Lighthouse Metrics Budgets\n // Minimal score for perf 90 on each metric\n 'first-contentful-paint': ['error', { maxNumericValue: 1800 }],\n 'speed-index': ['error', { maxNumericValue: 3387 }],\n 'largest-contentful-paint': ['error', { maxNumericValue: 2500 }],\n interactive: ['error', { maxNumericValue: 3785 }],\n 'total-blocking-time': ['error', { maxNumericValue: 350 }],\n 'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }],\n\n // Number of Requests Budgets\n 'resource-summary:font:count': ['error', { maxNumericValue: 3 }],\n 'resource-summary:image:count': ['error', { maxNumericValue: 20 }],\n 'resource-summary:script:count': ['error', { maxNumericValue: 15 }],\n 'resource-summary:stylesheet:count': [\n 'error',\n { maxNumericValue: 3 },\n ],\n 'resource-summary:third-party:count': [\n 'error',\n { maxNumericValue: 100 },\n ],\n\n // Resource sizes Budgets\n // To learn where this 1024 comes from: https://github.com/GoogleChrome/lighthouse-ci/blob/fe181b61b20205dba5962c40094b1c90983f1c5e/packages/utils/src/budgets-converter.js#L49\n 'resource-summary:document:size': [\n 'error',\n { maxNumericValue: 40 * 1024 },\n ],\n 'resource-summary:font:size': [\n 'error',\n { maxNumericValue: 70 * 1024 },\n ],\n 'resource-summary:image:size': [\n 'error',\n { maxNumericValue: 500 * 1024 },\n ],\n 'resource-summary:script:size': [\n 'error',\n { maxNumericValue: 200 * 1024 },\n ],\n 'resource-summary:stylesheet:size': [\n 'error',\n { maxNumericValue: 100 * 1024 },\n ],\n 'resource-summary:third-party:size': [\n 'error',\n { maxNumericValue: 500 * 1024 },\n ],\n 'resource-summary:total:size': [\n 'error',\n { maxNumericValue: 600 * 1024 },\n ],\n\n // Extra Lighthouse Assertion rules\n 'unused-javascript': ['error', { maxLength: 10 }],\n\n ...assertions,\n },\n },\n upload: {\n target: 'temporary-public-storage',\n urlReplacementPatterns: 's/.*app//',\n },\n },\n }\n}\n\nexport default lhConfig\n"],"names":["lhConfig","urls","server","assertions","url","map","path","ci","collect","assert","preset","minScore","maxNumericValue","interactive","maxLength","upload","target","urlReplacementPatterns"],"mappings":";;;;;;;;;;;;;;;;;;AAMA;;;;AAKA,IAAMA,QAAQ,GAAG,SAAXA,QAAW;MAAGC,YAAAA;MAAMC,cAAAA;6BAAQC;MAAAA,0CAAa;AAC7C,MAAMC,GAAG,GAAGH,IAAI,CAACI,GAAL,CAAS,UAACC,IAAD;AAAA,gBAAaJ,MAAb,GAAsBI,IAAtB;AAAA,GAAT,CAAZ;AAEA,SAAO;AACLC,IAAAA,EAAE,EAAE;AACFC,MAAAA,OAAO,EAAE;AACPJ,QAAAA,GAAG,EAAHA;AADO,OADP;AAIFK,MAAAA,MAAM,EAAE;AACNC,QAAAA,MAAM,EAAE,mBADF;AAENP,QAAAA,UAAU;AACR;AACA,sCAA4B,CAAC,OAAD,EAAU;AAAEQ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