Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit bec9ae9

Browse files
committed
Clean up
1 parent 9ce2a98 commit bec9ae9

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

lib/@unocss/preset-uno.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
/**
2+
* The default preset (right now it's equivalent to @unocss/preset-wind).
3+
* https://github.com/unocss/unocss/tree/main/packages/preset-uno
4+
*/
15
export { default } from "https://esm.sh/@unocss/[email protected]";

server/bundle_css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { transformCSS } from "../compiler/mod.ts";
2-
import { Targets } from "../compiler/types.ts";
2+
import type { Targets } from "../compiler/types.ts";
33
import { readCode } from "../lib/fs.ts";
44
import util from "../lib/util.ts";
55
import { getAlephPkgUri, toLocalPath } from "./helpers.ts";

server/graph.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ export class DependencyGraph {
6969
this.#update(specifier);
7070
}
7171

72-
#update(specifier: string, __tracing = new Set<string>()) {
72+
#update(specifier: string, _set = new Set<string>()) {
7373
const module = this.#modules.get(specifier);
7474
if (module) {
7575
// deno-lint-ignore ban-ts-comment
7676
// @ts-ignore
7777
module.version++;
78-
__tracing.add(specifier);
78+
_set.add(specifier);
7979
this.#modules.forEach((module) => {
8080
if (module.deps?.find((dep) => dep.specifier === specifier)) {
81-
if (!__tracing.has(module.specifier)) {
82-
this.#update(module.specifier, __tracing);
81+
if (!_set.has(module.specifier)) {
82+
this.#update(module.specifier, _set);
8383
}
8484
}
8585
});
@@ -90,12 +90,12 @@ export class DependencyGraph {
9090
this.#lookup(specifier, callback);
9191
}
9292

93-
#lookup(specifier: string, callback: (specifier: string) => void | false, __tracing = new Set<string>()) {
94-
__tracing.add(specifier);
93+
#lookup(specifier: string, callback: (specifier: string) => void | false, _set = new Set<string>()) {
94+
_set.add(specifier);
9595
for (const module of this.#modules.values()) {
9696
if (module.deps?.find((dep) => dep.specifier === specifier)) {
97-
if (!__tracing.has(module.specifier) && callback(module.specifier) !== false) {
98-
this.#lookup(module.specifier, callback, __tracing);
97+
if (!_set.has(module.specifier) && callback(module.specifier) !== false) {
98+
this.#lookup(module.specifier, callback, _set);
9999
}
100100
}
101101
}
@@ -105,14 +105,14 @@ export class DependencyGraph {
105105
this.#walk(specifier, callback);
106106
}
107107

108-
#walk(specifier: string, callback: (mod: Module) => void, __tracing = new Set<string>()) {
108+
#walk(specifier: string, callback: (mod: Module) => void, _set = new Set<string>()) {
109109
if (this.#modules.has(specifier)) {
110110
const mod = this.#modules.get(specifier)!;
111111
callback(mod);
112-
__tracing.add(specifier);
112+
_set.add(specifier);
113113
mod.deps?.forEach((dep) => {
114-
if (!__tracing.has(dep.specifier)) {
115-
this.#walk(dep.specifier, callback, __tracing);
114+
if (!_set.has(dep.specifier)) {
115+
this.#walk(dep.specifier, callback, _set);
116116
}
117117
});
118118
}

0 commit comments

Comments
 (0)