@faststore/lighthouse 1.9.9 → 1.10.4

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,33 @@
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.10.4](https://github.com/vtex/faststore/compare/v1.10.3...v1.10.4) (2022-07-04)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * @faststore/graphql-utils ([#1394](https://github.com/vtex/faststore/issues/1394)) ([ea4b483](https://github.com/vtex/faststore/commit/ea4b4832b25fe257d8c5c0c67bc09fb04dc693cf))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.9.14](https://github.com/vtex/faststore/compare/v1.9.13...v1.9.14) (2022-06-23)
18
+
19
+ **Note:** Version bump only for package @faststore/lighthouse
20
+
21
+
22
+
23
+
24
+
25
+ ## [1.9.10](https://github.com/vtex/faststore/compare/v1.9.9...v1.9.10) (2022-06-18)
26
+
27
+ **Note:** Version bump only for package @faststore/lighthouse
28
+
29
+
30
+
31
+
32
+
6
33
  ## 1.9.9 (2022-06-17)
7
34
 
8
35
 
@@ -0,0 +1,25 @@
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;
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
1
3
  /**
2
4
  * Some values, we took from the default lighthouse config
3
5
  * throttling mobileSlow4G: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/constants.js#L22
@@ -11,46 +13,67 @@ const lhConfig = ({ urls, server, assertions = {} }) => {
11
13
  },
12
14
  assert: {
13
15
  preset: 'lighthouse:no-pwa',
14
- assertions: Object.assign({
16
+ assertions: {
15
17
  // 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',
18
+ 'categories:accessibility': ['error', { minScore: 1 }],
19
+ 'categories:best-practices': ['error', { minScore: 1 }],
20
+ 'categories:performance': ['error', { minScore: 0.95 }],
21
+ 'categories:seo': ['error', { minScore: 1 }],
22
+ 'categories:pwa': 'off',
17
23
  // Lighthouse Metrics Budgets
18
24
  // 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 }],
25
+ 'first-contentful-paint': ['error', { maxNumericValue: 1800 }],
26
+ 'speed-index': ['error', { maxNumericValue: 3387 }],
27
+ 'largest-contentful-paint': ['error', { maxNumericValue: 2500 }],
28
+ interactive: ['error', { maxNumericValue: 3785 }],
29
+ 'total-blocking-time': ['error', { maxNumericValue: 350 }],
30
+ 'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }],
20
31
  // 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': [
32
+ 'resource-summary:font:count': ['error', { maxNumericValue: 3 }],
33
+ 'resource-summary:image:count': ['error', { maxNumericValue: 20 }],
34
+ 'resource-summary:script:count': ['error', { maxNumericValue: 15 }],
35
+ 'resource-summary:stylesheet:count': [
22
36
  'error',
23
37
  { maxNumericValue: 3 },
24
- ], 'resource-summary:third-party:count': [
38
+ ],
39
+ 'resource-summary:third-party:count': [
25
40
  'error',
26
41
  { maxNumericValue: 100 },
27
- ],
42
+ ],
28
43
  // Resource sizes Budgets
29
44
  // To learn where this 1024 comes from: https://github.com/GoogleChrome/lighthouse-ci/blob/fe181b61b20205dba5962c40094b1c90983f1c5e/packages/utils/src/budgets-converter.js#L49
30
45
  'resource-summary:document:size': [
31
46
  'error',
32
47
  { maxNumericValue: 40 * 1024 },
33
- ], 'resource-summary:font:size': [
48
+ ],
49
+ 'resource-summary:font:size': [
34
50
  'error',
35
51
  { maxNumericValue: 70 * 1024 },
36
- ], 'resource-summary:image:size': [
52
+ ],
53
+ 'resource-summary:image:size': [
37
54
  'error',
38
55
  { maxNumericValue: 500 * 1024 },
39
- ], 'resource-summary:script:size': [
56
+ ],
57
+ 'resource-summary:script:size': [
40
58
  'error',
41
59
  { maxNumericValue: 200 * 1024 },
42
- ], 'resource-summary:stylesheet:size': [
60
+ ],
61
+ 'resource-summary:stylesheet:size': [
43
62
  'error',
44
63
  { maxNumericValue: 100 * 1024 },
45
- ], 'resource-summary:third-party:size': [
64
+ ],
65
+ 'resource-summary:third-party:size': [
46
66
  'error',
47
67
  { maxNumericValue: 500 * 1024 },
48
- ], 'resource-summary:total:size': [
68
+ ],
69
+ 'resource-summary:total:size': [
49
70
  'error',
50
71
  { maxNumericValue: 600 * 1024 },
51
- ],
72
+ ],
52
73
  // Extra Lighthouse Assertion rules
53
- 'unused-javascript': ['error', { maxLength: 10 }] }, assertions),
74
+ 'unused-javascript': ['error', { maxLength: 10 }],
75
+ ...assertions,
76
+ },
54
77
  },
55
78
  upload: {
56
79
  target: 'temporary-public-storage',
@@ -59,5 +82,5 @@ const lhConfig = ({ urls, server, assertions = {} }) => {
59
82
  },
60
83
  };
61
84
  };
62
- export default lhConfig;
85
+ exports.default = lhConfig;
63
86
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +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,OAAO,EAAE,EAAE,eAAe,EAA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AE;qBAChC;oBACD,6BAA6B,EAAE;wBAC7B,OAAO;wBACP,EAAE,eAAe,EAAE,GAAG,GAAG,IAAI,EAAE;qBAChC;oBAED,mCAAmC;oBACnC,mBAAmB,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;oBAEjD,GAAG,UAAU;iBACd;aACF;YACD,MAAM,EAAE;gBACN,MAAM,EAAE,0BAA0B;gBAClC,sBAAsB,EAAE,WAAW;aACpC;SACF;KACF,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,QAAQ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/lighthouse",
3
- "version": "1.9.9",
3
+ "version": "1.10.4",
4
4
  "author": "Emerson Laurentino",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,13 +21,11 @@
21
21
  "scripts": {
22
22
  "develop": "tsc --watch",
23
23
  "build": "tsc",
24
- "lint": "eslint src/**/*.ts",
25
- "test": "tsdx test --passWithNoTests"
24
+ "lint": "eslint src/**/*.ts"
26
25
  },
27
26
  "devDependencies": {
28
- "@vtex/tsconfig": "^0.5.6",
29
- "tsdx": "^0.14.1",
27
+ "shared": "^1.9.14",
30
28
  "typescript": "^4.2.4"
31
29
  },
32
- "gitHead": "1f1d2c97e399fb44987cdbd7980157242f193abf"
30
+ "gitHead": "d36bb24a69f08701be27ac2f98b07905cfe2d9dc"
33
31
  }