Skip to content

Commit c6b9e45

Browse files
committed
Update to libtea 0.1.5
1 parent 27a8a3b commit c6b9e45

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

deno.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"imports": {
3434
"is-what": "https://deno.land/x/is_what@v4.1.8/src/index.ts",
3535
"jsonc": "https://deno.land/x/jsonc_parser@v0.0.1/mod.ts",
36-
"tea": "https://raw.github.com/teaxyz/lib/v0.1.3/mod.ts",
37-
"tea/": "https://raw.github.com/teaxyz/lib/v0.1.3/src/",
36+
"tea": "https://raw.github.com/teaxyz/lib/v0.1.5/mod.ts",
37+
"tea/": "https://raw.github.com/teaxyz/lib/v0.1.5/src/",
3838
"outdent": "https://deno.land/x/outdent@v0.8.0/mod.ts",
3939
"cliffy/": "https://deno.land/x/cliffy@v0.25.7/",
4040
"deno/": "https://deno.land/std@0.187.0/",

src/hooks/useConfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ export interface Config extends ConfigBase {
4040

4141
export default function(input?: Config): Config {
4242
if (!_internals.initialized()) {
43-
const rv = useConfig(input ?? ConfigDefault()) as Config
44-
return rv
43+
input ??= ConfigDefault()
4544
} else {
4645
if (input) console.warn("useConfig() already initialized, new parameters ignored")
47-
return useConfig() as Config
46+
input = undefined
4847
}
48+
return useConfig(input) as Config
4949
}
5050

5151
export function ConfigDefault(flags?: Flags, arg0 = Deno.execPath(), env = Deno.env.toObject()): Config {

tests/integration/package.yml.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import { Path } from "tea"
66

77
it(suite, "runtime.env tildes", async function() {
88
const run = async (FOO: string) => {
9-
this.sandbox.join("projects/tea.xyz/foo").mkpath().join("package.yml").write({ text: undent`
9+
this.sandbox.join("projects/tea.xyz/foo").mkdir('p').join("package.yml").write({ text: undent`
1010
provides: [bin/foo]
1111
runtime:
1212
env:
1313
FOO: "${FOO}"
1414
`, force: true})
1515

16-
this.sandbox.join("tea.xyz/foo/v1.0.0/bin").mkpath().join("foo").write({ text: undent`
16+
this.sandbox.join("tea.xyz/foo/v1.0.0/bin").mkdir('p').join("foo").write({ text: undent`
1717
#!/bin/sh
1818
echo "$FOO"
1919
`, force: true}).chmod(0o755)

0 commit comments

Comments
 (0)