@atlaspack/utils 3.4.0 → 3.4.3-dev-ce9f111cb.0

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/src/config.ts CHANGED
@@ -6,7 +6,7 @@ import path from 'path';
6
6
  import clone from 'clone';
7
7
  import json5 from 'json5';
8
8
  import {parse as toml} from '@iarna/toml';
9
- import LRU from 'lru-cache';
9
+ import {LRUCache as LRU} from 'lru-cache';
10
10
 
11
11
  export type ConfigOutput = {
12
12
  config: ConfigResult;
@@ -18,7 +18,6 @@ export type ConfigOptions = {
18
18
  parser?: (arg1: string) => any;
19
19
  };
20
20
 
21
- // @ts-expect-error TS2351
22
21
  const configCache = new LRU<FilePath, ConfigOutput>({max: 500});
23
22
  const resolveCache = new Map();
24
23
 
@@ -95,7 +94,7 @@ export async function loadConfig(
95
94
  }
96
95
 
97
96
  loadConfig.clear = () => {
98
- configCache.reset();
97
+ configCache.clear();
99
98
  resolveCache.clear();
100
99
  };
101
100
 
@@ -48,7 +48,7 @@ export default async function openInBrowser(url: string, browser: string) {
48
48
  try {
49
49
  const options =
50
50
  typeof browser === 'string' && browser.length > 0
51
- ? {app: [getAppName(browser)]}
51
+ ? {app: {name: getAppName(browser)}}
52
52
  : undefined;
53
53
 
54
54
  await open(url, options);