@unocss/cli 0.61.3 → 0.61.5

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/cli.mjs CHANGED
@@ -2,7 +2,7 @@ import process from 'node:process';
2
2
  import { cac } from 'cac';
3
3
  import { loadConfig } from '@unocss/config';
4
4
  import { toArray } from '@unocss/core';
5
- import { b as build, v as version, h as handleError } from './shared/cli.BFjmax0P.mjs';
5
+ import { b as build, v as version, h as handleError } from './shared/cli.C2hYuVeJ.mjs';
6
6
  import 'node:fs';
7
7
  import 'pathe';
8
8
  import 'fast-glob';
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import 'consola';
6
6
  import 'colorette';
7
7
  import 'perfect-debounce';
8
8
  import '@unocss/core';
9
- export { b as build, r as resolveOptions } from './shared/cli.BFjmax0P.mjs';
9
+ export { b as build, r as resolveOptions } from './shared/cli.C2hYuVeJ.mjs';
10
10
  import '@rollup/pluginutils';
11
11
  import '@unocss/config';
12
12
  import 'magic-string';
@@ -7,7 +7,7 @@ import { cyan, green, dim } from 'colorette';
7
7
  import { debounce } from 'perfect-debounce';
8
8
  import { cssIdRE, createGenerator, BetterMap, toArray } from '@unocss/core';
9
9
  import { createFilter } from '@rollup/pluginutils';
10
- import { loadConfig } from '@unocss/config';
10
+ import { createRecoveryConfigLoader } from '@unocss/config';
11
11
  import MagicString from 'magic-string';
12
12
  import remapping from '@ampproject/remapping';
13
13
  import presetUno from '@unocss/preset-uno';
@@ -57,6 +57,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
57
57
  const tokens = /* @__PURE__ */ new Set();
58
58
  const tasks = [];
59
59
  const affectedModules = /* @__PURE__ */ new Set();
60
+ const loadConfig = createRecoveryConfigLoader();
60
61
  let ready = reloadConfig();
61
62
  async function reloadConfig() {
62
63
  const result = await loadConfig(root, configOrPath, extraConfigSources, defaults);
@@ -119,7 +120,8 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
119
120
  async function flushTasks() {
120
121
  const _tasks = [...tasks];
121
122
  await Promise.all(_tasks);
122
- tasks.splice(0, _tasks.length);
123
+ if (tasks[0] === _tasks[0])
124
+ tasks.splice(0, _tasks.length);
123
125
  }
124
126
  return {
125
127
  get ready() {
@@ -212,7 +214,7 @@ async function applyTransformers(ctx, original, id, enforce = "default") {
212
214
  }
213
215
  }
214
216
 
215
- const version = "0.61.3";
217
+ const version = "0.61.5";
216
218
 
217
219
  const defaultConfig = {
218
220
  envMode: "build",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/cli",
3
3
  "type": "module",
4
- "version": "0.61.3",
4
+ "version": "0.61.5",
5
5
  "description": "CLI for UnoCSS",
6
6
  "author": {
7
7
  "name": "Johann Schopplich",
@@ -50,9 +50,9 @@
50
50
  "magic-string": "^0.30.10",
51
51
  "pathe": "^1.1.2",
52
52
  "perfect-debounce": "^1.0.0",
53
- "@unocss/core": "0.61.3",
54
- "@unocss/config": "0.61.3",
55
- "@unocss/preset-uno": "0.61.3"
53
+ "@unocss/config": "0.61.5",
54
+ "@unocss/core": "0.61.5",
55
+ "@unocss/preset-uno": "0.61.5"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "unbuild",