Skip to content

Commit

Permalink
bump deps (remove jsonc dep, use deno stdlib)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jun 15, 2023
1 parent 0028b6b commit ea3468e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</p>


# tea/cli 0.35.6
# tea/cli 0.35.7

`tea` puts the whole open source ecosystem at your fingertips:

Expand Down
15 changes: 3 additions & 12 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,12 @@
"coverage" : "scripts/run_coverage.sh",
"typecheck": "deno check --unstable ./src/app.ts",
// runs this source checkout for testing
"run": "deno run --unstable --allow-all src/app.ts",
"run": "deno run --unstable -A src/app.ts",
// compiles to ./tea
"compile": "deno compile --allow-read --allow-write --allow-net --allow-run --allow-env --unstable --output $INIT_CWD/tea src/app.ts",
// installs this source checkout as a tea stowed package
"install": "deno compile --unstable -Ao $TEA_PREFIX/tea.xyz/v$VERSION/bin/tea src/app.ts && scripts/repair.ts tea.xyz"
},
// ignore all files since the current style deviates from deno's default style.
"fmt": {
"files": {
"exclude": [
"./"
]
}
},
"lint": {
"include": ["src/", "scripts/"]
},
Expand All @@ -32,9 +24,8 @@
},
"imports": {
"is-what": "https://deno.land/x/is_what@v4.1.15/src/index.ts",
"jsonc": "https://deno.land/x/jsonc_parser@v0.0.1/mod.ts",
"tea": "https://raw.github.com/teaxyz/lib/v0.5.1/mod.ts",
"tea/": "https://raw.github.com/teaxyz/lib/v0.5.1/src/",
"tea": "https://raw.github.com/teaxyz/lib/v0.6.0/mod.ts",
"tea/": "https://raw.github.com/teaxyz/lib/v0.6.0/src/",
"outdent": "https://deno.land/x/outdent@v0.8.0/mod.ts",
"cliffy/": "https://deno.land/x/cliffy@v0.25.7/",
"deno/": "https://deno.land/std@0.191.0/",
Expand Down
8 changes: 5 additions & 3 deletions src/hooks/useVirtualEnv.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import usePackageYAMLFrontMatter, { refineFrontMatter, FrontMatter } from "./useYAMLFrontMatter.ts"
import { PackageRequirement, Path, SemVer, utils, TeaError, hooks, semver } from "tea"
import * as JSONC from "deno/jsonc/mod.ts"
const { flatmap, pkg, validate } = utils
import { isPlainObject } from "is-what"
import useConfig from "./useConfig.ts"
const { useMoustaches } = hooks
import { JSONC } from "jsonc"

export interface VirtualEnv {
pkgs: PackageRequirement[]
Expand Down Expand Up @@ -124,8 +124,10 @@ export default async function(cwd: Path): Promise<VirtualEnv> {
if (_if("deno.json", "deno.jsonc")) {
pkgs.push({project: "deno.land", constraint})
const json = JSONC.parse(await f!.read())
if (isPlainObject(json?.tea)) {
insert(refineFrontMatter(json?.tea, srcroot))
// deno-lint-ignore no-explicit-any
const tea = (json as any)?.tea
if (isPlainObject(tea)) {
insert(refineFrontMatter(tea, srcroot))
}
}
if (_if(".node-version")) {
Expand Down

0 comments on commit ea3468e

Please sign in to comment.