|
28 | 28 | "examples/hono/**/*.ts"
|
29 | 29 | ]
|
30 | 30 | },
|
| 31 | + |
| 32 | + // WARNING! |
| 33 | + // AFAIK, these task dependencies are declared properly. (And in fact, a bit conservatively to keep things simple) |
| 34 | + // However, when run in parallel, I get errors that very much make it seem like dependency tasks haven't finished |
| 35 | + // before running the next task. |
| 36 | + // BUT, with the current state of the output of `deno task` when running parallel tasks, it's difficult to verify/debug this. |
| 37 | + // TODO: Once better logging is implemented, come back and try to debug this again: |
| 38 | + // See: https://github.com/denoland/deno/issues/27647 |
| 39 | + // |
| 40 | + // Until then, run tasks with `DENO_JOBS=1 deno task ...` |
31 | 41 | "tasks": {
|
32 |
| - // Run the full test suite: |
33 |
| - "test": "deno task check && deno task examples:test && deno task test:jsx && deno task lints", |
| 42 | + "test": { |
| 43 | + "description": "Run the full test suite. Use DENO_JOBS=1", |
| 44 | + "command": "echo Task test 'done'", |
| 45 | + "dependencies": [ |
| 46 | + "check", |
| 47 | + "examples:test", |
| 48 | + "test:jsx", |
| 49 | + "test:crashes" |
| 50 | + ] |
| 51 | + }, |
34 | 52 |
|
35 | 53 | // Since this directory has its own deno.jsonc, we need to test it explicitly:
|
36 |
| - "test:jsx": "cd tests/jsx_config && deno test -A", |
| 54 | + "test:jsx": { |
| 55 | + "command": "cd tests/jsx_config && deno test -A", |
| 56 | + "dependencies": ["build"], |
| 57 | + }, |
| 58 | + "test:crashes": { |
| 59 | + "command": "cd tests/crashes && deno test -A --quiet", |
| 60 | + "dependencies": ["build"] |
| 61 | + }, |
37 | 62 |
|
38 |
| - "check": "deno task check:main && deno task check:without-embedder && deno task examples:build && deno task examples:check && deno task check:publish", |
39 |
| - "check:main": "./tools/with-exports.ts deno check --doc", |
40 |
| - "check:publish": "deno publish --dry-run --allow-dirty", |
41 |
| - "check:without-embedder": "cd examples/without-embedder; deno task check", |
| 63 | + // Runs code generation tasks. Depend on this to make sure file modifications have settled. |
| 64 | + "build": { |
| 65 | + "command": "echo Task build 'done'", |
| 66 | + "dependencies": ["oak:build", "hono:build"] |
| 67 | + }, |
42 | 68 |
|
43 |
| - "examples:check": "deno task oak:check && deno task hono:check", |
44 |
| - "examples:build": "deno task oak:build && deno task hono:build", |
45 |
| - "examples:test": "deno task oak:test && deno task hono:test", |
| 69 | + "check": { |
| 70 | + "command": "echo Task check 'done'", |
| 71 | + "dependencies": [ |
| 72 | + "check:main", |
| 73 | + "examples:check", |
| 74 | + "check:publish", |
| 75 | + "lints", |
| 76 | + ], |
| 77 | + }, |
| 78 | + "check:main": { |
| 79 | + "command": "./tools/with-exports.ts deno check --doc", |
| 80 | + "dependencies": ["build"], |
| 81 | + }, |
| 82 | + "check:publish": { |
| 83 | + "command": "deno publish --dry-run --allow-dirty", |
| 84 | + "dependencies": [ |
| 85 | + "build", |
| 86 | + ], |
| 87 | + }, |
| 88 | + "check:without-embedder": { |
| 89 | + "command": "cd examples/without-embedder; deno task check", |
| 90 | + "dependencies": ["build"], |
| 91 | + }, |
46 | 92 |
|
47 |
| - "oak:check": "cd examples/with-embedder; deno task check", |
48 |
| - "oak:test": "cd examples/with-embedder && deno test -A --trace-leaks", |
| 93 | + "examples:check": { |
| 94 | + "command": "echo Task examples:check 'done'", |
| 95 | + "dependencies": [ |
| 96 | + "oak:check", |
| 97 | + "hono:check", |
| 98 | + "check:without-embedder" |
| 99 | + ] |
| 100 | + }, |
| 101 | + "examples:build": { |
| 102 | + "command": "echo Task examples:build 'done'", |
| 103 | + "dependencies": ["build"], |
| 104 | + }, |
| 105 | + "examples:test": { |
| 106 | + "command": "echo Task examples:test 'done'", |
| 107 | + "dependencies": ["oak:test", "hono:test"], |
| 108 | + }, |
49 | 109 | "oak:build": "cd examples/with-embedder && deno task build-embeds",
|
50 |
| - "oak:start": "cd examples/with-embedder && deno task start", |
| 110 | + "oak:check": { |
| 111 | + "command": "cd examples/with-embedder; deno task check", |
| 112 | + "dependencies": ["build"] |
| 113 | + }, |
| 114 | + "oak:test": { |
| 115 | + "command": "cd examples/with-embedder && deno test -A --trace-leaks", |
| 116 | + "dependencies": ["build"] |
| 117 | + }, |
| 118 | + "oak:start": { |
| 119 | + "command": "cd examples/with-embedder && deno task start", |
| 120 | + "dependencies": ["build"] |
| 121 | + }, |
51 | 122 |
|
52 |
| - "hono:check": "cd examples/hono; deno task check", |
53 |
| - "hono:test": "cd examples/hono && deno test -A", |
54 | 123 | "hono:build": "cd examples/hono && deno task build-embeds",
|
55 |
| - "hono:start": "cd examples/hono && deno task start", |
| 124 | + "hono:check": { |
| 125 | + "command": "cd examples/hono; deno task check", |
| 126 | + "dependencies": ["build"] |
| 127 | + }, |
| 128 | + "hono:test": { |
| 129 | + "command": "cd examples/hono && deno test -A", |
| 130 | + "dependencies": ["build"] |
| 131 | + }, |
| 132 | + "hono:start": { |
| 133 | + "command": "cd examples/hono && deno task start", |
| 134 | + "dependencies": ["build"] |
| 135 | + }, |
56 | 136 |
|
57 |
| - "lints": "deno lint && deno task lints:docs", |
58 |
| - "lints:docs": "./tools/with-exports.ts deno doc --lint" |
| 137 | + "lints": { |
| 138 | + "command": "deno lint", |
| 139 | + "dependencies": ["build", "lints:docs"], |
| 140 | + }, |
| 141 | + "lints:docs": { |
| 142 | + "command": "./tools/with-exports.ts deno doc --lint", |
| 143 | + "dependencies": ["build"], |
| 144 | + } |
59 | 145 | },
|
60 | 146 | "lint": {
|
61 | 147 | "rules": {
|
|
0 commit comments