microlink.io 0.5.1 → 0.5.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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.js +2 -3
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "microlink.io",
3
3
  "description": "The Microlink API organized into products, each returning a direct result",
4
4
  "homepage": "https://github.com/microlinkhq/microlink",
5
- "version": "0.5.1",
5
+ "version": "0.5.2",
6
6
  "types": "./src/index.d.ts",
7
7
  "main": "./src/index.js",
8
8
  "exports": {
@@ -45,7 +45,7 @@
45
45
  ],
46
46
  "dependencies": {
47
47
  "@microlink/function": "0.3.2",
48
- "@microlink/google": "1.2.0",
48
+ "@microlink/google": "1.2.1",
49
49
  "@microlink/mql": "0.18.1",
50
50
  "mri": "~1.2.0",
51
51
  "terminal-link": "~5.0.0"
@@ -78,5 +78,5 @@
78
78
  },
79
79
  "directory": "test"
80
80
  },
81
- "gitHead": "231f3506d8b3345d55a0473a50f9dc1d90d45aed"
81
+ "gitHead": "755abe6066dfc709e3c7bff2ddf08377902fd42e"
82
82
  }
package/src/index.js CHANGED
@@ -41,7 +41,8 @@ const LIGHTHOUSE_KEYS = ['onlyCategories', 'onlyAudits', 'skipAudits', 'output']
41
41
  const isEmpty = obj => Object.keys(obj).length === 0
42
42
 
43
43
  const create = (ctx = {}) => {
44
- const last = {}
44
+ const googleClient = createGoogleClient()
45
+ const last = googleClient.last ?? {}
45
46
  const request = (...args) => {
46
47
  const [requestUrl, requestOptions] = mql.getApiUrl(...args)
47
48
  last.requestUrl = requestUrl
@@ -105,8 +106,6 @@ const create = (ctx = {}) => {
105
106
  )
106
107
  }
107
108
 
108
- const googleClient = createGoogleClient()
109
-
110
109
  const run = (url, code, options) => {
111
110
  const { top, got } = route(options)
112
111
  return fn(code, top, got)(url)