@faststore/lighthouse 1.9.10 → 1.10.6

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.10.6 (2022-07-05)
7
+
8
+
9
+ ### Features
10
+
11
+ * Support for cross selling API ([#1396](https://github.com/vtex/faststore/issues/1396)) ([98eb7e2](https://github.com/vtex/faststore/commit/98eb7e2cc6670bcb05d00418f901e26a2e9db8f0))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.10.4](https://github.com/vtex/faststore/compare/v1.10.3...v1.10.4) (2022-07-04)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * @faststore/graphql-utils ([#1394](https://github.com/vtex/faststore/issues/1394)) ([ea4b483](https://github.com/vtex/faststore/commit/ea4b4832b25fe257d8c5c0c67bc09fb04dc693cf))
23
+
24
+
25
+
26
+
27
+
28
+ ## [1.9.14](https://github.com/vtex/faststore/compare/v1.9.13...v1.9.14) (2022-06-23)
29
+
30
+ **Note:** Version bump only for package @faststore/lighthouse
31
+
32
+
33
+
34
+
35
+
6
36
  ## [1.9.10](https://github.com/vtex/faststore/compare/v1.9.9...v1.9.10) (2022-06-18)
7
37
 
8
38
  **Note:** Version bump only for package @faststore/lighthouse
@@ -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
@@ -13,46 +13,67 @@ const lhConfig = ({ urls, server, assertions = {} }) => {
13
13
  },
14
14
  assert: {
15
15
  preset: 'lighthouse:no-pwa',
16
- assertions: Object.assign({
16
+ assertions: {
17
17
  // Final Ligthouse score Budgets
18
- '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',
19
23
  // Lighthouse Metrics Budgets
20
24
  // Minimal score for perf 90 on each metric
21
- '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 }],
22
31
  // Number of Requests Budgets
23
- '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': [
24
36
  'error',
25
37
  { maxNumericValue: 3 },
26
- ], 'resource-summary:third-party:count': [
38
+ ],
39
+ 'resource-summary:third-party:count': [
27
40
  'error',
28
41
  { maxNumericValue: 100 },
29
- ],
42
+ ],
30
43
  // Resource sizes Budgets
31
44
  // To learn where this 1024 comes from: https://github.com/GoogleChrome/lighthouse-ci/blob/fe181b61b20205dba5962c40094b1c90983f1c5e/packages/utils/src/budgets-converter.js#L49
32
45
  'resource-summary:document:size': [
33
46
  'error',
34
47
  { maxNumericValue: 40 * 1024 },
35
- ], 'resource-summary:font:size': [
48
+ ],
49
+ 'resource-summary:font:size': [
36
50
  'error',
37
51
  { maxNumericValue: 70 * 1024 },
38
- ], 'resource-summary:image:size': [
52
+ ],
53
+ 'resource-summary:image:size': [
39
54
  'error',
40
55
  { maxNumericValue: 500 * 1024 },
41
- ], 'resource-summary:script:size': [
56
+ ],
57
+ 'resource-summary:script:size': [
42
58
  'error',
43
59
  { maxNumericValue: 200 * 1024 },
44
- ], 'resource-summary:stylesheet:size': [
60
+ ],
61
+ 'resource-summary:stylesheet:size': [
45
62
  'error',
46
63
  { maxNumericValue: 100 * 1024 },
47
- ], 'resource-summary:third-party:size': [
64
+ ],
65
+ 'resource-summary:third-party:size': [
48
66
  'error',
49
67
  { maxNumericValue: 500 * 1024 },
50
- ], 'resource-summary:total:size': [
68
+ ],
69
+ 'resource-summary:total:size': [
51
70
  'error',
52
71
  { maxNumericValue: 600 * 1024 },
53
- ],
72
+ ],
54
73
  // Extra Lighthouse Assertion rules
55
- 'unused-javascript': ['error', { maxLength: 10 }] }, assertions),
74
+ 'unused-javascript': ['error', { maxLength: 10 }],
75
+ ...assertions,
76
+ },
56
77
  },
57
78
  upload: {
58
79
  target: 'temporary-public-storage',
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js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E,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.10",
3
+ "version": "1.10.6",
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.10.6",
30
28
  "typescript": "^4.2.4"
31
29
  },
32
- "gitHead": "7865d21a4a22495f3828bcc3f1d00e556c63d66f"
30
+ "gitHead": "654744a6c3b29afacbd83c4d9ebefe4270d1ae2a"
33
31
  }