Skip to content

Commit f988e2f

Browse files
committed
chore: update dependencies
1 parent 942a7f6 commit f988e2f

File tree

10 files changed

+712
-624
lines changed

10 files changed

+712
-624
lines changed

@mizu/event/mod.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Imports
2-
import { type Cache, type callback, type Directive, Phase } from "@mizu/internal/engine"
2+
import { type Cache, type Callback, type Directive, Phase } from "@mizu/internal/engine"
33
import { keyboard } from "./keyboard.ts"
44
export type * from "@mizu/internal/engine"
55

@@ -93,12 +93,12 @@ export const _event = {
9393
_callback(event, { attribute, expression })
9494
return
9595
}
96-
if (typeof (expression as string | callback) === "function") {
97-
;(expression as unknown as callback)(event)
96+
if (typeof (expression as string | Callback) === "function") {
97+
;(expression as unknown as Callback)(event)
9898
return
9999
}
100100
renderer.evaluate(element, `${expression || _event.default}`, { context, state: { ...state, $event: event }, args: [event] })
101-
} as callback
101+
} as Callback
102102
// Apply keyboard modifiers to callback
103103
if (modifiers.keys) {
104104
const check = keyboard(modifiers.keys)

@mizu/extras/evaluate/mod_test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@ if (runtime === "deno") {
2222
test("`evaluates()` supports `permissions` options", async () => {
2323
await expect(evaluate("Deno.osRelease()", null, { permissions: "none" })).rejects.toThrow(/run again with the --allow-sys flag/)
2424
await expect(evaluate("Deno.osRelease()", null, { permissions: { sys: ["osRelease"] } })).resolves.toBe(Deno.osRelease())
25-
})
25+
}, { permissions: { read: "inherit", sys: "inherit", import: "inherit" } })
2626

2727
test("`evaluates()` supports `permissions` options and evaluates expressions in function context", async () => {
2828
await expect(evaluate("return Deno.osRelease()", null, { context: "function", permissions: "none" })).rejects.toThrow(/run again with the --allow-sys flag/)
2929
await expect(evaluate("return Deno.osRelease()", null, { context: "function", permissions: { sys: ["osRelease"] } })).resolves.toBe(Deno.osRelease())
30-
})
30+
}, { permissions: { read: "inherit", sys: "inherit", import: "inherit" } })
3131

3232
test("`evaluates()` supports `imports` options", async () => {
3333
await expect(evaluate("foo.default", null, { imports: { foo: "data:application/javascript,export default 'bar'" } })).resolves.toBe("bar")
34-
})
34+
}, { permissions: { read: "inherit", sys: "inherit", import: "inherit" } })
3535

3636
test("`evaluates()` supports `permissions` and `imports` options", async () => {
3737
await expect(evaluate("foo.default", null, { permissions: "none", imports: { foo: "data:application/javascript,export default Deno.osRelease()" } })).rejects.toThrow(/run again with the --allow-sys flag/)
3838
await expect(evaluate("foo.default", null, { permissions: { sys: ["osRelease"] }, imports: { foo: "data:application/javascript,export default Deno.osRelease()" } })).resolves.toBe(Deno.osRelease())
39-
})
39+
}, { permissions: { read: "inherit", sys: "inherit", import: "inherit" } })
4040

4141
test("`evaluates()` supports `permissions` and custom `sandbox` module", async () => {
4242
await expect(evaluate("Deno.osRelease()", null, { permissions: "none", sandbox: import.meta.resolve("./sandbox.ts") })).rejects.toThrow(/run again with the --allow-sys flag/)
4343
await expect(evaluate("Deno.osRelease()", null, { permissions: { sys: ["osRelease"] }, sandbox: import.meta.resolve("./sandbox.ts") })).resolves.toBe(Deno.osRelease())
44-
})
44+
}, { permissions: { read: "inherit", sys: "inherit", import: "inherit" } })
4545
}

@mizu/http/event/mod.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Imports
2-
import { type Cache, type callback, type Directive, Phase } from "@mizu/internal/engine"
2+
import { type Cache, type Callback, type Directive, Phase } from "@mizu/internal/engine"
33
import { _event } from "@mizu/event"
44
import { _body, _header, _http, _response, _response_typings } from "@mizu/http"
55
export type * from "@mizu/internal/engine"
@@ -29,10 +29,10 @@ export const _http_event = {
2929
if (renderer.isComment(element)) {
3030
return
3131
}
32-
const cached = renderer.cache<WeakMap<HTMLElement, callback>>(`#${this.name}`)!
32+
const cached = renderer.cache<WeakMap<HTMLElement, Callback>>(`#${this.name}`)!
3333
if (!cached.has(element)) {
34-
const callback = async ($event: Event, { attribute, expression }: { attribute: Attr; expression: callback }) => {
35-
const http = await _http.execute.call(this, renderer, element, { ...arguments[2], attributes: renderer.getAttributes(element, _http.name), _return_callback: true }) as Awaited<callback>
34+
const callback = async ($event: Event, { attribute, expression }: { attribute: Attr; expression: Callback }) => {
35+
const http = await _http.execute.call(this, renderer, element, { ...arguments[2], attributes: renderer.getAttributes(element, _http.name), _return_callback: true }) as Awaited<Callback>
3636
const $response = await http($event)
3737
await _response.execute.call(this, renderer, element, { ...arguments[2], attributes: [attribute], state: { ...arguments[2].state, $event, $response }, _expression: { value: expression, args: [$event] } })
3838
}

@mizu/internal/engine/renderer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Imports
2-
import type { Arg, Arrayable, callback, NonVoid, Nullable, Optional } from "@libs/typing/types"
2+
import type { Arg, Arrayable, Callback, NonVoid, Nullable, Optional } from "@libs/typing/types"
33
import type { Cache, Directive } from "./directive.ts"
44
import { escape } from "@std/regexp"
55
import { AsyncFunction } from "@libs/typing/func"
66
import { Context } from "@libs/reactive"
77
import { Phase } from "./phase.ts"
88
import { delay } from "@std/async"
99
export { Context, Phase }
10-
export type { Arg, Arrayable, Cache, callback, Directive, NonVoid, Nullable, Optional }
10+
export type { Arg, Arrayable, Cache, Callback, Directive, NonVoid, Nullable, Optional }
1111
export type * from "./directive.ts"
1212

1313
/**
@@ -443,7 +443,7 @@ export class Renderer {
443443
}
444444

445445
/** Watched {@linkcode Context}s. */
446-
readonly #watched = new WeakMap<Context, WeakMap<HTMLElement | Comment, { properties: Set<string>; _get: Nullable<callback>; _set: Nullable<callback>; _call: Nullable<callback> }>>()
446+
readonly #watched = new WeakMap<Context, WeakMap<HTMLElement | Comment, { properties: Set<string>; _get: Nullable<Callback>; _set: Nullable<Callback>; _call: Nullable<Callback> }>>()
447447

448448
/** Start watching a {@linkcode Context} for properties read operations. */
449449
#watch(context: Context, element: HTMLElement | Comment) {

@mizu/model/mod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Imports
2-
import { type Arg, type Arrayable, type Cache, type callback, type Directive, type InferAttrTypings, type Nullable, Phase } from "@mizu/internal/engine"
2+
import { type Arg, type Arrayable, type Cache, type Callback, type Directive, type InferAttrTypings, type Nullable, Phase } from "@mizu/internal/engine"
33
import { equal } from "@std/assert"
44
import { _event } from "@mizu/event"
55
export type * from "@mizu/internal/engine"
@@ -135,7 +135,7 @@ export const _model = {
135135
},
136136
} as const satisfies Directive<{
137137
Name: RegExp
138-
Cache: WeakMap<HTMLElement, WeakMap<HTMLElement, { model: Record<"read" | "sync", Nullable<callback>>; event: Nullable<string>; init: boolean }>>
138+
Cache: WeakMap<HTMLElement, WeakMap<HTMLElement, { model: Record<"read" | "sync", Nullable<Callback>>; event: Nullable<string>; init: boolean }>>
139139
Typings: typeof typings
140140
Default: true
141141
}>

@mizu/show/mod_test.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
<p *show="false">foo</p>
1515
</render>
1616
<expect>
17-
<p style="display: none">foo</p>
17+
<p style="display: none !important">foo</p>
1818
</expect>
1919
</test>
2020

2121
<test name="[*show] is truthy when empty">
2222
<render>
2323
<style filter-remove>
2424
[\*show] {
25-
display: none;
25+
display: none !important;
2626
}
2727
</style>
2828
<p *show>foo</p>
2929
</render>
3030
<expect>
31-
<p style="display: initial">foo</p>
31+
<p style="display: initial !important">foo</p>
3232
</expect>
3333
</test>
3434

@@ -40,7 +40,7 @@
4040
<p *show="value">foo</p>
4141
</render>
4242
<expect>
43-
<p style="display: none">foo</p>
43+
<p style="display: none !important">foo</p>
4444
</expect>
4545
<script>
4646
context.value = true
@@ -54,7 +54,7 @@
5454
</script>
5555
<render></render>
5656
<expect>
57-
<p style="display: none">foo</p>
57+
<p style="display: none !important">foo</p>
5858
</expect>
5959
</test>
6060

deno.jsonc

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -154,47 +154,47 @@
154154
"nodeModulesDir": "auto",
155155
"imports": {
156156
// Dependencies
157-
"@libs/markdown": "jsr:@libs/markdown@^2.0.4",
157+
"@libs/markdown": "jsr:@libs/markdown@^2.1.0",
158158
"@libs/reactive": "jsr:@libs/reactive@^5.0.4",
159-
"@libs/typing": "jsr:@libs/typing@^3.1.3",
160-
"@libs/xml": "jsr:@libs/xml@^7.0.2",
161-
"@std/assert": "jsr:@std/assert@^1.0.14",
162-
"@std/async": "jsr:@std/async@^1.0.14",
163-
"@std/html": "jsr:@std/html@^1.0.4",
159+
"@libs/typing": "jsr:@libs/typing@^4.0.1",
160+
"@libs/xml": "jsr:@libs/xml@^7.0.3",
161+
"@std/assert": "jsr:@std/assert@^1.0.16",
162+
"@std/async": "jsr:@std/async@^1.0.15",
163+
"@std/html": "jsr:@std/html@^1.0.5",
164164
"@std/io": "jsr:@std/io@~0.225.2",
165-
"@std/path": "jsr:@std/path@^1.1.2",
165+
"@std/path": "jsr:@std/path@^1.1.3",
166166
"@std/regexp": "jsr:@std/regexp@^1.0.1",
167-
"jsdom": "npm:jsdom@^26.1.0",
167+
"jsdom": "npm:jsdom@^27.2.0",
168168
// Deno deploy dependencies
169-
"@libs/bundle/ts": "jsr:@libs/bundle@^12.6.6/ts",
170-
"@libs/typing/func": "jsr:@libs/typing@^3.1.3/func",
171-
"@std/http/unstable-route": "jsr:@std/http@^1.0.20/unstable-route",
172-
"@std/http/unstable-file-server": "jsr:@std/http@^1.0.20/unstable-file-server",
173-
"@std/html/unstable-is-valid-custom-element-name": "jsr:@std/html@^1.0.4/unstable-is-valid-custom-element-name",
169+
"@libs/bundle/ts": "jsr:@libs/bundle@^12.6.9/ts",
170+
"@libs/typing/func": "jsr:@libs/typing@^4.0.1/func",
171+
"@std/http/unstable-route": "jsr:@std/http@^1.0.22/unstable-route",
172+
"@std/http/unstable-file-server": "jsr:@std/http@^1.0.22/unstable-file-server",
173+
"@std/html/unstable-is-valid-custom-element-name": "jsr:@std/html@^1.0.5/unstable-is-valid-custom-element-name",
174174
// Development dependencies
175175
"@dprint/formatter": "jsr:@dprint/formatter@^0.4.1",
176-
"@libs/testing": "jsr:@libs/testing@^4.0.3",
176+
"@libs/testing": "jsr:@libs/testing@^5.2.1",
177177
"@std/fmt": "jsr:@std/fmt@^1.0.8",
178178
// Development server dependencies
179179
"@www/": "./www/",
180-
"@deno/doc": "jsr:@deno/doc@^0.182.0",
181-
"@libs/bundle": "jsr:@libs/bundle@^12.6.6",
182-
"@libs/logger": "jsr:@libs/logger@^3.1.5",
180+
"@deno/doc": "jsr:@deno/doc@^0.187.0",
181+
"@libs/bundle": "jsr:@libs/bundle@^12.6.9",
182+
"@libs/logger": "jsr:@libs/logger@^3.1.9",
183183
"@std/collections": "jsr:@std/collections@^1.1.3",
184-
"@std/http": "jsr:@std/http@^1.0.20",
184+
"@std/http": "jsr:@std/http@^1.0.22",
185185
"@std/jsonc": "jsr:@std/jsonc@^1.0.2",
186186
"@std/text": "jsr:@std/text@^1.0.16",
187187
// Tooling dependencies
188188
"@tools/": "./.github/tools/",
189189
"@actions/core": "npm:@actions/core@^1.11.1",
190-
"@astral/astral": "jsr:@astral/astral@~0.5.3",
191-
"@libs/git": "jsr:@libs/git@^0.1.4",
192-
"@libs/run": "jsr:@libs/run@^3.0.4",
193-
"@std/cli": "jsr:@std/cli@^1.0.21",
194-
"@std/fs": "jsr:@std/fs@^1.0.19",
195-
"@std/semver": "jsr:@std/semver@^1.0.5",
196-
"@std/tar": "jsr:@std/tar@^0.1.7",
197-
"@std/yaml": "jsr:@std/yaml@^1.0.9"
190+
"@astral/astral": "jsr:@astral/astral@^0.5.4",
191+
"@libs/git": "jsr:@libs/git@^0.1.5",
192+
"@libs/run": "jsr:@libs/run@^3.3.1",
193+
"@std/cli": "jsr:@std/cli@^1.0.24",
194+
"@std/fs": "jsr:@std/fs@^1.0.20",
195+
"@std/semver": "jsr:@std/semver@^1.0.7",
196+
"@std/tar": "jsr:@std/tar@^0.1.9",
197+
"@std/yaml": "jsr:@std/yaml@^1.0.10"
198198
},
199199
"unstable": [
200200
"worker-options"

0 commit comments

Comments
 (0)