@unocss/core 0.28.0 → 0.28.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/dist/index.cjs CHANGED
@@ -356,7 +356,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
356
356
  };
357
357
  }
358
358
 
359
- const version = "0.28.0";
359
+ const version = "0.28.1";
360
360
 
361
361
  class UnoGenerator {
362
362
  constructor(userConfig = {}, defaults = {}) {
@@ -409,9 +409,8 @@ class UnoGenerator {
409
409
  if (this.blocked.has(raw))
410
410
  return;
411
411
  const cacheKey = `${raw}${alias ? ` ${alias}` : ""}`;
412
- const cached = this._cache.get(cacheKey);
413
- if (cached)
414
- return cached;
412
+ if (this._cache.has(cacheKey))
413
+ return this._cache.get(cacheKey);
415
414
  let current = raw;
416
415
  for (const p of this.config.preprocess)
417
416
  current = p(raw);
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ declare class UnoGenerator {
13
13
  setConfig(userConfig?: UserConfig, defaults?: UserConfigDefaults): void;
14
14
  applyExtractors(code: string, id?: string, set?: Set<string>): Promise<Set<string>>;
15
15
  makeContext(raw: string, applied: VariantMatchedResult): RuleContext<{}>;
16
- parseToken(raw: string, alias?: string): Promise<StringifiedUtil[] | undefined>;
16
+ parseToken(raw: string, alias?: string): Promise<StringifiedUtil[] | null | undefined>;
17
17
  generate(input: string | Set<string>, { id, scope, preflights, safelist, minify, }?: GenerateOptions): Promise<GenerateResult>;
18
18
  matchVariants(raw: string, current?: string): VariantMatchedResult;
19
19
  applyVariants(parsed: ParsedUtil, variantHandlers?: VariantHandler[], raw?: string): UtilObject;
package/dist/index.mjs CHANGED
@@ -352,7 +352,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
352
352
  };
353
353
  }
354
354
 
355
- const version = "0.28.0";
355
+ const version = "0.28.1";
356
356
 
357
357
  class UnoGenerator {
358
358
  constructor(userConfig = {}, defaults = {}) {
@@ -405,9 +405,8 @@ class UnoGenerator {
405
405
  if (this.blocked.has(raw))
406
406
  return;
407
407
  const cacheKey = `${raw}${alias ? ` ${alias}` : ""}`;
408
- const cached = this._cache.get(cacheKey);
409
- if (cached)
410
- return cached;
408
+ if (this._cache.has(cacheKey))
409
+ return this._cache.get(cacheKey);
411
410
  let current = raw;
412
411
  for (const p of this.config.preprocess)
413
412
  current = p(raw);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/core",
3
- "version": "0.28.0",
3
+ "version": "0.28.1",
4
4
  "description": "The instant on-demand Atomic CSS engine.",
5
5
  "keywords": [
6
6
  "unocss",