lint-staged 12.1.0 → 12.1.1

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/lib/loadConfig.js CHANGED
@@ -57,7 +57,13 @@ const resolveConfig = (configPath) => {
57
57
  /**
58
58
  * @param {string} [configPath]
59
59
  */
60
- export const loadConfig = (configPath) => {
60
+ export const loadConfig = async (configPath) => {
61
61
  const explorer = lilconfig('lint-staged', { searchPlaces, loaders })
62
- return configPath ? explorer.load(resolveConfig(configPath)) : explorer.search()
62
+ const result = await (configPath ? explorer.load(resolveConfig(configPath)) : explorer.search())
63
+ if (!result) return null
64
+
65
+ const { config, filepath } = result
66
+
67
+ // config is a promise when using the `dynamicImport` loader
68
+ return { config: await config, filepath }
63
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lint-staged",
3
- "version": "12.1.0",
3
+ "version": "12.1.1",
4
4
  "description": "Lint files staged by git",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/okonet/lint-staged",