mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
Changes for tea/cli 0.19 (#101)
* Changes for tea/cli 0.19 * wip * wip * wip * wip * wip
This commit is contained in:
parent
f51268d2b3
commit
fe6eadedc8
7 changed files with 28 additions and 40 deletions
10
.github/workflows/ci-scripts.yml
vendored
10
.github/workflows/ci-scripts.yml
vendored
|
@ -2,7 +2,9 @@ name: ci-scripts
|
|||
|
||||
on:
|
||||
pull_request:
|
||||
paths: [scripts/**.ts]
|
||||
paths:
|
||||
- scripts/**.ts
|
||||
- import-map.json
|
||||
|
||||
jobs:
|
||||
typecheck:
|
||||
|
@ -11,9 +13,5 @@ jobs:
|
|||
TEA_SECRET: ${{ secrets.TEA_SECRET }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: teaxyz/setup@v0
|
||||
with:
|
||||
target: typecheck
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
- run: tea deno check --unstable --import-map=import-map.json scripts/*.ts
|
||||
|
|
16
README.md
16
README.md
|
@ -17,11 +17,11 @@ versioned.
|
|||
|
||||
See the contributing guide in [pantry.zero].
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Meta
|
||||
|
||||
## Dependencies
|
||||
|
||||
| Project | Version |
|
||||
|
@ -29,19 +29,5 @@ See the contributing guide in [pantry.zero].
|
|||
| deno.land | ^1.27 |
|
||||
| tea.xyz | ^0 |
|
||||
|
||||
## Build All
|
||||
|
||||
```sh
|
||||
scripts/ls.ts | scripts/sort.ts | scripts/build.ts
|
||||
```
|
||||
|
||||
## Typecheck
|
||||
|
||||
```sh
|
||||
for x in $(find scripts -name '*.ts'); do
|
||||
deno check --unstable --import-map=$SRCROOT/import-map.json $x
|
||||
done
|
||||
```
|
||||
|
||||
[pantry.zero]: https://github.com/teaxyz/pantry.zero#contributing
|
||||
[pantry.extra]: https://github.com/teaxyz/pantry.extra
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"imports": {
|
||||
"prefab": "https://raw.githubusercontent.com/teaxyz/cli/v0.18.1/src/prefab/index.ts",
|
||||
"semver": "https://raw.githubusercontent.com/teaxyz/cli/v0.18.1/src/utils/semver.ts",
|
||||
"hooks": "https://raw.githubusercontent.com/teaxyz/cli/v0.18.1/src/hooks/index.ts",
|
||||
"utils": "https://raw.githubusercontent.com/teaxyz/cli/v0.18.1/src/utils/index.ts",
|
||||
"path": "https://raw.githubusercontent.com/teaxyz/cli/v0.18.1/src/vendor/Path.ts",
|
||||
"prefab/": "https://raw.githubusercontent.com/teaxyz/cli/v0.18.1/src/prefab/",
|
||||
"types": "https://raw.githubusercontent.com/teaxyz/cli/v0.18.1/src/types.ts",
|
||||
"hooks/": "https://raw.githubusercontent.com/teaxyz/cli/v0.18.1/src/hooks/",
|
||||
"utils/": "https://raw.githubusercontent.com/teaxyz/cli/v0.18.1/src/utils/",
|
||||
"prefab": "https://raw.githubusercontent.com/teaxyz/cli/v0.19.1/src/prefab/index.ts",
|
||||
"semver": "https://raw.githubusercontent.com/teaxyz/cli/v0.19.1/src/utils/semver.ts",
|
||||
"hooks": "https://raw.githubusercontent.com/teaxyz/cli/v0.19.1/src/hooks/index.ts",
|
||||
"utils": "https://raw.githubusercontent.com/teaxyz/cli/v0.19.1/src/utils/index.ts",
|
||||
"path": "https://raw.githubusercontent.com/teaxyz/cli/v0.19.1/src/vendor/Path.ts",
|
||||
"prefab/": "https://raw.githubusercontent.com/teaxyz/cli/v0.19.1/src/prefab/",
|
||||
"types": "https://raw.githubusercontent.com/teaxyz/cli/v0.19.1/src/types.ts",
|
||||
"hooks/": "https://raw.githubusercontent.com/teaxyz/cli/v0.19.1/src/hooks/",
|
||||
"utils/": "https://raw.githubusercontent.com/teaxyz/cli/v0.19.1/src/utils/",
|
||||
"deno/": "https://deno.land/std@0.156.0/",
|
||||
"is_what": "https://deno.land/x/is_what@v4.1.7/src/index.ts",
|
||||
"cliffy/": "https://deno.land/x/cliffy@v0.25.2/",
|
||||
|
|
|
@ -11,6 +11,10 @@ provides:
|
|||
- bin/bash
|
||||
- bin/bashbug
|
||||
|
||||
interprets:
|
||||
extensions: bash
|
||||
args: [bash, -e]
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
tea.xyz/gx/make: '*'
|
||||
|
|
|
@ -59,10 +59,10 @@ if (import.meta.main) {
|
|||
if (Deno.env.get("GITHUB_ACTIONS")) {
|
||||
const projects = rv.map(x => x.project).join(":")
|
||||
console.log(`::set-output name=projects::${projects}`)
|
||||
} else if (flags.json) {
|
||||
const obj = rv.map(({ path, project }) => ({ path: path.string, project }))
|
||||
const out = JSON.stringify(obj, null, 2)
|
||||
console.log(out)
|
||||
// } else if (flags.json) {
|
||||
// const obj = rv.map(({ path, project }) => ({ path: path.string, project }))
|
||||
// const out = JSON.stringify(obj, null, 2)
|
||||
// console.log(out)
|
||||
} else {
|
||||
console.log(rv.map(x => x.project).join("\n"))
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ import { hydrate } from "prefab"
|
|||
import * as ARGV from "./utils/args.ts"
|
||||
import { set_output } from "./utils/gha.ts";
|
||||
|
||||
const flags = useFlags()
|
||||
// const flags = useFlags()
|
||||
const pantry = usePantry()
|
||||
|
||||
const dry = await ARGV.toArray(ARGV.pkgs())
|
||||
|
@ -33,9 +33,9 @@ if (Deno.env.get("GITHUB_ACTIONS")) {
|
|||
await set_output('pkgs', wet.dry.map(pkg.str))
|
||||
} else {
|
||||
const gas = wet.dry.map(pkg.str)
|
||||
if (flags.json) {
|
||||
console.log(gas)
|
||||
} else {
|
||||
// if (flags.json) {
|
||||
// console.log(gas)
|
||||
// } else {
|
||||
console.log(gas.join("\n"))
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ function assert_pkg(pkg: Package | PackageRequirement) {
|
|||
} else {
|
||||
return {
|
||||
project: pkg.project,
|
||||
version: new SemVer(pkg.constraint),
|
||||
version: new SemVer(pkg.constraint, {tolerant: true}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue