Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
277 commits
Select commit Hold shift + click to select a range
8df8ad6
Replace ADL with Zod for type definitions and serialization
PaulThompson Aug 4, 2025
5b9027a
Add error handling for manifest schema validation failures
PaulThompson Aug 4, 2025
6f87751
Add hello world example and fix README issues
PaulThompson Aug 4, 2025
c8238bc
Extract getOrCreateTaskManifest helper and start module restructuring
PaulThompson Aug 4, 2025
b75101f
Update imports for moved types module, all tests passing
PaulThompson Aug 4, 2025
b981194
Fix lint errors in core/types.ts by adding explicit type annotations
PaulThompson Aug 4, 2025
8247308
Complete module restructuring: split dnit.ts into focused modules
PaulThompson Aug 4, 2025
f3a9eea
Clean up unused imports in cli.ts
PaulThompson Aug 4, 2025
979cd25
Remove obsolete ADL tasks: genadl and updategenadlfix
PaulThompson Aug 4, 2025
748a0c9
Fix build tasks after ADL removal
PaulThompson Aug 4, 2025
516d93c
Extract TaskInterface to separate file for better organization
PaulThompson Aug 4, 2025
27e8174
Move TaskContext to taskInterface.ts for better organization
PaulThompson Aug 4, 2025
62be19d
Major refactoring: eliminate circular imports and improve code organi…
PaulThompson Aug 4, 2025
d02c6e2
Formatting
PaulThompson Aug 4, 2025
899a614
Move factory functions to their respective files
PaulThompson Aug 5, 2025
6c0d635
Complete additional code organization improvements
PaulThompson Aug 5, 2025
9ec6a8f
Fix lint issues and optimize imports
PaulThompson Aug 5, 2025
7e48ce0
Update files.md for refactored architecture
PaulThompson Aug 9, 2025
57b5675
Add comparison between current files.md and reorganise branch version
PaulThompson Aug 9, 2025
e9e1534
Fix circular dependencies and create import analyzer tool
PaulThompson Aug 9, 2025
f2b4c54
Update files.md documentation to reflect current architecture
PaulThompson Aug 9, 2025
e9ec63a
Move manifest types to interfaces directory
PaulThompson Aug 9, 2025
4aeea1d
Final organizational improvements
PaulThompson Aug 9, 2025
bce1574
Update dependencies to latest versions
PaulThompson Aug 9, 2025
6db3c50
Upgrade Zod to version 4.0.16
PaulThompson Aug 9, 2025
090a620
Standardize dnit/deps.ts to use import map approach
PaulThompson Aug 9, 2025
6a444d5
Fix final hardcoded dependency version in tests/basic.test.ts
PaulThompson Aug 9, 2025
3787b55
Add .gitignore for dnit manifest files
PaulThompson Aug 9, 2025
9dbfe18
git ignore test manifests
PaulThompson Aug 9, 2025
5624ddf
Modernize dnit/main.ts to eliminate deps.ts pattern
PaulThompson Aug 9, 2025
154fb94
Remove development helper files
PaulThompson Aug 9, 2025
6690fd7
Remove import analyser
PaulThompson Aug 9, 2025
d387004
Prepare for JSR publishing
PaulThompson Aug 9, 2025
3a45c4f
Add JSR publish exclusions
PaulThompson Aug 9, 2025
2f921ad
Remove legacy dnit.ts, use mod.ts as main export
PaulThompson Aug 9, 2025
6d4244a
Fix dnit check task to use mod.ts instead of dnit.ts
PaulThompson Aug 9, 2025
789457e
Lint & format
PaulThompson Aug 9, 2025
63af84f
Update GitHub Actions to test with Deno 2.4.3
PaulThompson Aug 9, 2025
c8011a3
Update README docs and fix import-map flag for Deno 2
PaulThompson Aug 9, 2025
4413654
Update README to document deno.json support
PaulThompson Aug 9, 2025
c55d9ad
Update README examples to use Deno 2 APIs
PaulThompson Aug 9, 2025
c3c9d5a
Use TaskName type in README documentation
PaulThompson Aug 9, 2025
28d468d
Add flavored types for nominal typing of string types
PaulThompson Aug 9, 2025
d72555f
Simplify flavored types to use single symbol and generic
PaulThompson Aug 9, 2025
581179e
Add reference link for flavored nominal typing pattern
PaulThompson Aug 9, 2025
37b9fe2
Add comment explaining symbol usage for flavored types
PaulThompson Aug 9, 2025
0eb211a
Integrate flavored types directly into Zod schemas
PaulThompson Aug 9, 2025
6328341
Add explicit types for JSR compatibility - keep flavored types separa…
PaulThompson Aug 9, 2025
78270ca
Flavored types implementation complete and JSR-ready
PaulThompson Aug 9, 2025
6e31445
Reorganize flavoring and manifest types into separate interface and i…
PaulThompson Aug 9, 2025
48a0f48
Remove Zod schema exports from public API - keep as internal implemen…
PaulThompson Aug 9, 2025
3171684
Remove unused IFileSystem and IStatResult interfaces
PaulThompson Aug 9, 2025
14dd388
Remove unused ILoggingSetup interface
PaulThompson Aug 9, 2025
565826d
Code updates and documentation changes
PaulThompson Aug 9, 2025
88d54f9
Remove asyncQueue from public interface, add schedule method
PaulThompson Aug 9, 2025
73c13ed
Make AsyncQueue schedule method generic per call, remove unnecessary …
PaulThompson Aug 9, 2025
ce586be
Add comprehensive test plan
PaulThompson Aug 9, 2025
633f79e
Add comprehensive file tracking system tests
PaulThompson Aug 9, 2025
8468d49
Update test plan - mark file tracking system tests as completed
PaulThompson Aug 9, 2025
008ef14
Add SHA1 hash validation test with known values
PaulThompson Aug 9, 2025
fb0c25b
Remove 'as any' type assertions from TrackedFile tests
PaulThompson Aug 9, 2025
115d5c3
Fix lint issues in file tracking tests
PaulThompson Aug 9, 2025
a5118ea
Add manifest system tests
PaulThompson Aug 9, 2025
8619084
Fix test import errors
PaulThompson Aug 9, 2025
a25dedf
Fix linting errors
PaulThompson Aug 9, 2025
1485d71
Mark Section 2: Manifest System Tests as completed
PaulThompson Aug 9, 2025
01ed1cc
Add comprehensive Task System tests
PaulThompson Aug 9, 2025
4623a66
Add utility tests for Section 7 of test plan
PaulThompson Aug 9, 2025
26e70bd
Mark Section 7: Utility Tests as completed
PaulThompson Aug 9, 2025
61006df
Implement targets.test.ts with comprehensive test coverage
PaulThompson Aug 9, 2025
67c4267
Add comprehensive Integration Tests for dependency resolution and up-…
PaulThompson Aug 9, 2025
0234c15
Fix type errors in git.test.ts and task.test.ts
PaulThompson Aug 9, 2025
64b0e4a
Adding tests
PaulThompson Aug 9, 2025
e4e394a
Implement comprehensive CLI tests (cli.test.ts)
PaulThompson Aug 9, 2025
59a61c9
Add comprehensive launch system tests
PaulThompson Aug 9, 2025
f85c893
Add comprehensive tab completion tests
PaulThompson Aug 10, 2025
9b9d70d
Update test plan to mark CLI tests complete
PaulThompson Aug 10, 2025
295ba06
Add comprehensive test suite review documentation
PaulThompson Aug 10, 2025
d53aeda
Add mock redundancy analysis to test review
PaulThompson Aug 10, 2025
f55cc15
remove old test plan
PaulThompson Aug 10, 2025
99e6d5e
Add mock vs execBasic analysis and refactoring recommendations
PaulThompson Aug 10, 2025
faf2ed3
Add comprehensive mock logger analysis - reveals 80+ redundant lines
PaulThompson Aug 10, 2025
0054245
Restructure test review with actionable todo list at top
PaulThompson Aug 10, 2025
26520ef
Remove redundant mock logger from TaskContext.test.ts
PaulThompson Aug 10, 2025
e3eecc4
Replace mock exec contexts with execBasic in TaskContext.test.ts
PaulThompson Aug 10, 2025
a76b6c5
Mark TaskContext.test.ts improvements as completed in test-review.md
PaulThompson Aug 10, 2025
bf4fd71
Mark TaskContext.test.ts as refactored in test file listing
PaulThompson Aug 10, 2025
4ed8799
Clean up redundant TaskContext.test.ts mentions in action items
PaulThompson Aug 10, 2025
c1d37c2
Remove specific counts from test-review.md, use qualitative terms
PaulThompson Aug 10, 2025
7a0af6c
Refactor task.test.ts: remove mock loggers, use execBasic
PaulThompson Aug 10, 2025
3bf523d
Mark task.test.ts as refactored in test-review.md
PaulThompson Aug 10, 2025
49380f9
Fix TrackedFile.test.ts: use real loggers instead of empty objects
PaulThompson Aug 10, 2025
30b2db6
Mark TrackedFile.test.ts and TrackedFilesAsync.test.ts as completed i…
PaulThompson Aug 10, 2025
a13c838
Mark manifest test files as already clean in test-review.md
PaulThompson Aug 10, 2025
f73dbff
Remove redundant mock logger from cli.test.ts
PaulThompson Aug 10, 2025
90ac269
Update test-review.md for CLI files completion
PaulThompson Aug 10, 2025
ecb4e2e
Remove redundant mock logger from tabcompletion.test.ts
PaulThompson Aug 10, 2025
89d4d95
Mark tabcompletion.test.ts as refactored in test-review.md
PaulThompson Aug 10, 2025
eae8acf
Refactor dependencies.test.ts - remove mock loggers, convert to execB…
PaulThompson Aug 10, 2025
303e863
Refactor uptodate.test.ts - remove mock loggers, convert to execBasic
PaulThompson Aug 10, 2025
8000de0
Update test-review.md - mark completed refactoring work
PaulThompson Aug 10, 2025
9844033
Refactor git.test.ts - remove mock loggers, improve context setup
PaulThompson Aug 10, 2025
2bf79fe
Complete test refactoring documentation - mark all files as processed
PaulThompson Aug 10, 2025
f52937a
Fix flaky test in basic.test.ts - replace uuid with crypto.randomUUID…
PaulThompson Aug 10, 2025
7c0411c
Mark flaky test as fixed in documentation
PaulThompson Aug 10, 2025
55f52f8
Fix race condition in clean task - await scheduled operations
PaulThompson Aug 10, 2025
c751d0b
Use proper logger for manifest warnings instead of console.warn
PaulThompson Aug 10, 2025
78b0771
Add .test/ directory to .gitignore
PaulThompson Aug 10, 2025
52f5524
Optimize test timing delays - reduce 1000ms to 10ms, use queueMicrota…
PaulThompson Aug 10, 2025
669b418
Improve cross-platform permission tests - use platform-specific paths…
PaulThompson Aug 10, 2025
3ba1507
Fix TypeScript errors - add void type parameter to Promise constructo…
PaulThompson Aug 10, 2025
95b6d5b
Remove test review documentation
PaulThompson Aug 10, 2025
201bf56
Add --config flag to source install instructions
PaulThompson Aug 10, 2025
1d843cc
Add --config flag to all install instructions
PaulThompson Aug 10, 2025
2024cf6
Update to version 2.0.0 and simplify install instructions
PaulThompson Aug 10, 2025
5ded463
Fix lint errors: remove unused imports and variables
PaulThompson Aug 10, 2025
9931aed
Format code and update dnit tasks
PaulThompson Aug 10, 2025
65c8f93
Fix manifest variable references in cli.test.ts
PaulThompson Aug 10, 2025
f29ac99
Fix Windows file system caching issue in 'task up to date' test
PaulThompson Aug 10, 2025
3f4e14b
Format Windows timing fix and add debug script
PaulThompson Aug 10, 2025
ae63a08
Add comprehensive debugging to 'task up to date' test for Windows CI
PaulThompson Aug 10, 2025
2ac574b
Fix lint error: replace 'any' type with proper TaskContext type
PaulThompson Aug 10, 2025
27984f0
Fix lint
PaulThompson Aug 10, 2025
22fb28a
Enhance Windows timestamp workaround with more aggressive cache flushing
PaulThompson Aug 10, 2025
db7e0e0
Fix Windows file system caching issue in TrackedFile.isUpToDate()
PaulThompson Aug 10, 2025
1a84f60
Remove custom uptodate function from test - use builtin Windows logic
PaulThompson Aug 10, 2025
cc6060f
Remove unused TaskContext import from basic.test.ts
PaulThompson Aug 10, 2025
9a540f5
Fix Windows up-to-date logic: use hash-only comparison
PaulThompson Aug 10, 2025
823379b
Fix Windows up-to-date checking to use hash-first then timestamp
PaulThompson Aug 10, 2025
0d9e6d9
Move maxInProgress update logic to TestHelperCtx methods
PaulThompson Aug 10, 2025
b0a0224
Merge TestHelper and TestHelperCtx into single class with static trac…
PaulThompson Aug 10, 2025
5f78d11
Remove unused started and completed properties
PaulThompson Aug 10, 2025
1507c7c
Remove unnecessary testHelpers array
PaulThompson Aug 10, 2025
2895d73
Convert TestHelper from static to instance-based tracking
PaulThompson Aug 10, 2025
d35087f
Rename TestHelper to TestConcurrency and simplify method names
PaulThompson Aug 10, 2025
be66878
Simplify basic.test.ts task up to date test
PaulThompson Aug 10, 2025
7ccb380
Use Deno.makeTempDir() instead of manual temp directory creation
PaulThompson Aug 10, 2025
eaa2c73
Remove createMockExecContext and use execBasic consistently
PaulThompson Aug 10, 2025
3aa6e20
Fix lint errors by removing unused imports
PaulThompson Aug 10, 2025
82c6b43
Fix type errors by importing log types
PaulThompson Aug 10, 2025
7f99656
Add stdout method to IExecContext and replace console.log usage
PaulThompson Aug 11, 2025
14e2dd2
Simplify test stdout capture - no need to call original
PaulThompson Aug 11, 2025
d56d025
Remove unnecessary createTestContext helper function
PaulThompson Aug 11, 2025
60e2ab8
Fix build errors: remove unused _ctx parameters and clean up test mocks
PaulThompson Aug 11, 2025
194c5e3
Simplify mock loggers in tests
PaulThompson Aug 11, 2025
dd91a6a
Fix runConsole to throw error on command failure
PaulThompson Aug 13, 2025
ead96fa
fix runConsole and move out all tests
PaulThompson Aug 13, 2025
e827ac2
Update getFileSha1Sum to use chunked processing for large files
PaulThompson Aug 13, 2025
2346ab9
Use encodeHex and streaming digest for getFileSha1Sum
PaulThompson Aug 13, 2025
3c38b2d
Simplify getFileSha1Sum to always use streaming approach
PaulThompson Aug 13, 2025
789d13f
Remove manual file.close() - stream auto-closes when consumed
PaulThompson Aug 13, 2025
7d81d18
migrating tests
PaulThompson Aug 13, 2025
0570fbf
Replace createMockExecContext with execBasic in task tests
PaulThompson Aug 13, 2025
68c5da7
Import createTempFile and cleanup from utils.ts
PaulThompson Aug 13, 2025
d0940cc
Change cleanup function to accept directory name instead of file path
PaulThompson Aug 13, 2025
110c8ab
Refactor to createTempDir with cleanup and createFileInDir pattern
PaulThompson Aug 13, 2025
50b5be6
Fix uptodate.test.ts to use new createTempDir/createFileInDir pattern
PaulThompson Aug 13, 2025
5cc49ab
Fix cleanup errors: remove duplicate cleanup calls and add error hand…
PaulThompson Aug 13, 2025
b6c135c
Test cleaning up
PaulThompson Aug 13, 2025
825b1ec
Update basic.test.ts to use createTempDir and cleanup helpers
PaulThompson Aug 13, 2025
53a6d7f
Update filesystem.test.ts to use createTempDir and cleanup helpers
PaulThompson Aug 13, 2025
2a64105
Use createFileInDir helper more consistently in filesystem tests
PaulThompson Aug 13, 2025
29f9aef
Remove problematic relative path test that created files outside test…
PaulThompson Aug 13, 2025
e5a4291
Fix TrackedFilesAsync test cleanup and assert uptodateCalled value
PaulThompson Aug 13, 2025
044f44f
Fix queueMicrotask promise to be properly awaited
PaulThompson Aug 13, 2025
39c9197
Add queueMicrotask to make TrackedFilesAsync generator actually async
PaulThompson Aug 13, 2025
b3d645b
Remove waitForTimestampChange function and calls - not needed with ha…
PaulThompson Aug 13, 2025
144e090
Add wait to timestamp-based change detection test to ensure timestamp…
PaulThompson Aug 13, 2025
6d0ae62
Add missing imports to cli.test.ts
PaulThompson Aug 13, 2025
69216c1
Complete CLI list task test implementation
PaulThompson Aug 13, 2025
27dbc48
Refactor execCli to use execBasic internally to eliminate duplication
PaulThompson Aug 14, 2025
40acf7d
Fix import path for encodeHex to use @std/encoding instead of @std/en…
PaulThompson Aug 14, 2025
993cd3c
Move type checks to tests/types.ts with comprehensive schema validation
PaulThompson Aug 14, 2025
a79d5da
Add newline at end of file
PaulThompson Aug 14, 2025
8578d0f
Add runtime test for type checks
PaulThompson Aug 14, 2025
924b0a9
Add utility types for cleaner bidirectional type checking
PaulThompson Aug 14, 2025
0843608
Add AllOf utility type for compile-time verification of multiple bool…
PaulThompson Aug 14, 2025
b5ce7a7
Use Partial record type for compile-time checks without casting
PaulThompson Aug 14, 2025
cb470aa
Use type-level AllChecks instead of const for cleaner compile-time ch…
PaulThompson Aug 14, 2025
356767e
Add AllOf check on all type checks using keyof
PaulThompson Aug 14, 2025
8bbcce5
Add compile-time verification constant for AllChecksPass
PaulThompson Aug 14, 2025
667e3f9
Use compile-time passed constant in runtime test
PaulThompson Aug 14, 2025
ca0c251
Add const allChecks with compile-time type enforcement
PaulThompson Aug 14, 2025
4eaa091
Add runtime verification of all check values in allChecks object
PaulThompson Aug 14, 2025
e8cf6ed
Rename CLI functions for clarity: execCliPartA→execContextInit, execC…
PaulThompson Aug 14, 2025
cb49f22
Add doc strings to CLI functions
PaulThompson Aug 14, 2025
336e302
Update test to use execContextInitBasicArgs with parseArgs([])
PaulThompson Aug 14, 2025
42abdf5
Use getRequestedTaskName to determine task from args in test
PaulThompson Aug 14, 2025
1173701
Add optional overrides parameter to execContextInitBasicArgs for inje…
PaulThompson Aug 14, 2025
34451f9
Add overrides parameter to execCli and execContextInit for ExecContex…
PaulThompson Aug 14, 2025
3c7e976
Simplify test to use execCli directly with overrides parameter
PaulThompson Aug 14, 2025
e87d7bd
Update test comment and add console.log for debugging
PaulThompson Aug 14, 2025
fd96a7d
Add all changes
PaulThompson Aug 14, 2025
fa16cd7
Add assertions for all builtin tasks in list output test
PaulThompson Aug 14, 2025
06b2d4d
Run CLI tests successfully with proper permissions
PaulThompson Aug 18, 2025
71b6fa7
Implement test body for non-existent task handling
PaulThompson Aug 18, 2025
90fb6f4
Fix CLI to return failure for non-existent tasks and add stderr support
PaulThompson Aug 18, 2025
0aa2351
Add test for CLI task execution error handling
PaulThompson Aug 18, 2025
0250a6c
Refactor logging to use passed loggers instead of global state
PaulThompson Aug 18, 2025
daba679
Clean up destructuring in execContextInitBasicArgs
PaulThompson Aug 18, 2025
15df7ba
Document old test files in tests_junk directory
PaulThompson Aug 18, 2025
0881c01
Add comprehensive list of all test names from tests_junk directory
PaulThompson Aug 18, 2025
514c416
Add summary and test list for current tests directory
PaulThompson Aug 18, 2025
ce1d627
...
PaulThompson Aug 18, 2025
5b9d251
Add comprehensive test organization plan with coverage gaps and prior…
PaulThompson Aug 18, 2025
d0cf2e4
drop junk tests
PaulThompson Aug 18, 2025
33f4721
Add comprehensive tests for command-line argument passing to tasks
PaulThompson Aug 18, 2025
5fb176f
Mark command-line argument passing test as completed
PaulThompson Aug 18, 2025
39dd3bd
drop checks using .denoversion
PaulThompson Aug 18, 2025
80e3ace
Add project discovery tests
PaulThompson Aug 18, 2025
540fa75
Update test organization plan - project discovery tests completed
PaulThompson Aug 18, 2025
a0f9c6a
Add custom hash and timestamp function tests
PaulThompson Aug 18, 2025
1d7d805
Revert "Add custom hash and timestamp function tests"
PaulThompson Aug 18, 2025
8a54886
Add custom hash and timestamp function tests with improved up-to-date…
PaulThompson Aug 18, 2025
56bc0d6
Fix lint errors by removing unused imports and variables
PaulThompson Aug 18, 2025
5f869f0
fmt
PaulThompson Aug 18, 2025
2230f3d
Add circular dependency tests
PaulThompson Aug 18, 2025
c6878a3
Mark circular dependency handling as tested
PaulThompson Aug 18, 2025
ece3697
Update test organization plan
PaulThompson Aug 18, 2025
cbaa575
Update manifest test status in organization plan
PaulThompson Aug 18, 2025
f656343
Implement proper circular dependency detection with iterative DFS
PaulThompson Aug 19, 2025
d70d276
Add direct unit tests for detectCircularDependencies function
PaulThompson Aug 19, 2025
df53c07
Improve test assertions with more specific assert functions
PaulThompson Aug 19, 2025
55b6f30
Update analyze_asserts.ts to accept typeof checks as valid
PaulThompson Aug 19, 2025
821da85
Fix analyze_asserts.ts to exclude .has() method calls
PaulThompson Aug 19, 2025
ca73f98
Improve test assertions using @std/assert specific functions
PaulThompson Aug 19, 2025
911b9df
clean up test fixing scripts
PaulThompson Aug 19, 2025
484663d
Replace boxed table output with plain text format
PaulThompson Aug 19, 2025
b792153
Improve test assertions by using assertFalse instead of assertEquals …
PaulThompson Aug 19, 2025
0ed46ca
Remove header row from plain text table output
PaulThompson Aug 19, 2025
d351b9b
Add --help flag with task listing and documentation
PaulThompson Aug 19, 2025
7d79cb4
Deduplicate help output and use consistent logging
PaulThompson Aug 19, 2025
667b0ff
Remove footer lines from help output
PaulThompson Aug 19, 2025
de4dd8c
Update help text with TypeScript specifics and GitHub link
PaulThompson Aug 19, 2025
65f0f77
Extract helpFooter function for GitHub link
PaulThompson Aug 19, 2025
356f714
Move common usage instruction to showHelpCommon
PaulThompson Aug 19, 2025
ca36f6d
Change help message to error format when no dnit sources found
PaulThompson Aug 19, 2025
bb53cef
Update GitHub Actions to use modern Deno dependency caching
PaulThompson Aug 19, 2025
8ffbf65
Use ITaskContext interface in Action and IsUpToDate type definitions
PaulThompson Aug 19, 2025
eb8af87
Remove redundant cli.ts backward compatibility file
PaulThompson Aug 19, 2025
9d5954a
Fix lint errors - remove unused imports
PaulThompson Aug 19, 2025
ceb6fd5
Standardize on trackFile() function, deprecate file()
PaulThompson Aug 19, 2025
79d52ba
Update Deno version requirement to be more general
PaulThompson Aug 19, 2025
183de85
Make git and process utilities part of official public API
PaulThompson Aug 19, 2025
280c487
Apply formatting changes from linter
PaulThompson Aug 19, 2025
622d893
Add explicit return types to git utilities for public API
PaulThompson Aug 19, 2025
6625513
Apply formatting changes from deno fmt
PaulThompson Aug 19, 2025
923e13c
Drop CI version 2.2, add version 2.3
PaulThompson Aug 19, 2025
26deac2
Fix Deno version to v2.3.7
PaulThompson Aug 19, 2025
29cbc33
Update Deno version to v2.4.4
PaulThompson Aug 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,43 @@ on:

jobs:
lint:
runs-on: ${{ matrix.os }} # runs a test on Ubuntu, Windows and macOS
runs-on: ${{ matrix.os }}

strategy:
matrix:
deno: ["v1.42.x"]
deno: ["v2.4.4"]
os: [ubuntu-latest]

steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno }} # tests across multiple Deno versions
deno-version: ${{ matrix.deno }}
cache: true

- name: Run Deno lint
run: deno lint

test:
runs-on: ${{ matrix.os }} # runs a test on Ubuntu, Windows and macOS
runs-on: ${{ matrix.os }}

strategy:
matrix:
deno: ["v1.42.0", "v1.38.0"]
deno: ["v2.4.4", "v2.3.7"]
os: [macOS-latest, windows-latest, ubuntu-latest]

steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno }} # tests across multiple Deno versions

- name: Cache Dependencies
run: deno cache deps.ts
deno-version: ${{ matrix.deno }}
cache: true

- name: Run Tests
run: deno test -A
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Dnit manifest files (build state)
.manifest.json
*/.manifest.json

# Test directories
.test/
51 changes: 0 additions & 51 deletions ADLMap.ts

This file was deleted.

73 changes: 38 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,36 @@ across many files or shared between projects.
### Pre-Requisites

- [Deno](https://deno.land/#installation)
- Requires deno v1.16.4 or greater
- Requires Deno 2.x (tested on recent versions in CI)

### Install

It is recommended to use `deno install` to install the tool, which provides a
convenient entrypoint script and aliases the permission flags.

```
deno install --global --allow-read --allow-write --allow-run -f --name dnit https://deno.land/x/dnit@dnit-v1.14.4/main.ts
```

Install from source checkout:

```
deno install --global --allow-read --allow-write --allow-run -f --name dnit ./main.ts
deno install --global --allow-read --allow-write --allow-run -f --name dnit --config deno.json ./main.ts
```

(Install instructions from JSR will be added pending final release)

- Read, Write and Run permissions are required in order to operate on files and
execute tasks.

## Example

See the [example/](./example/) directory for a complete working hello world
example.

## Sample Usage

```ts
import {
file,
main,
task,
} from "https://deno.land/x/dnit@dnit-v1.14.4/dnit.ts";
import { main, task, trackFile } from "jsr:@dnit/dnit@2.0.0";

/// A file to be tracked as a target and dependency:
export const msg = file({
export const msg = trackFile({
path: "./msg.txt",
});

Expand All @@ -48,12 +47,12 @@ export const helloWorld = task({
name: "helloWorld",
description: "foo",
action: async () => { /// Actions are typescript async ()=> Promise<void> functions.
await Deno.run({
cmd: ["./writeMsg.sh"],
}).status();
const command = new Deno.Command("./writeMsg.sh");
const { code } = await command.output();
if (code !== 0) throw new Error(`Command failed with code ${code}`);
},
deps: [
file({
trackFile({
path: "./writeMsg.sh",
}),
],
Expand Down Expand Up @@ -112,7 +111,7 @@ In verbose mode the tool logs to stderr (fd #2)
## Tasks and Files in Detail

Files are tracked by the exported
`export function file(fileParams: FileParams) : TrackedFile`
`export function trackFile(fileParams: FileParams) : TrackedFile`

```ts
/** User params for a tracked file */
Expand All @@ -122,7 +121,10 @@ export type FileParams = {

/// Optional function for how to hash the file. Defaults to the sha1 hash of the file contents.
/// A file is out of date if the file timestamp and the hash are different than that in the task manifest
gethash?: GetFileHash;
getHash?: GetFileHash;

/// Optional function for how to get the file timestamp. Defaults to the actual file timestamp
getTimestamp?: GetFileTimestamp;
};
```

Expand All @@ -134,38 +136,35 @@ Tasks are created by the exported `function task(taskParams: TaskParams): Task`
/** User definition of a task */
export type TaskParams = {
/// Name: (string) - The key used to initiate a task
name: A.TaskName;
name: TaskName;

/// Description (string) - Freeform text description shown on help
description?: string;

/// Action executed on execution of the task (async or sync)
action: Action;

/// Optional list of explicit task dependencies
task_deps?: Task[];

/// Optional list of explicit file dependencies
file_deps?: TrackedFile[];

/// Optional list of task or file dependencies
deps?: (Task | TrackedFile)[];
deps?: Dep[];

/// Targets (files which will be produced by execution of this task)
targets?: TrackedFile[];

/// Custom up-to-date definition - Can be used to make a task *less* up to date. Eg; use uptodate: runAlways to run always on request regardless of dependencies being up to date.
uptodate?: IsUpToDate;
};

/// The kinds of supported dependencies.
export type Dep = Task | TrackedFile | TrackedFilesAsync;
```

Tasks are passed to the exported
`export async function exec(cliArgs: string[], tasks: Task[]) : Promise<void>`
This exposes the tasks for execution by the CLI and executes them according to
the `cliArgs` passed in.
`export function main(cliArgs: string[], tasks: Task[]) : Promise<void>` This
exposes the tasks for execution by the CLI and executes them according to the
`cliArgs` passed in.

```ts
exec(Deno.args, tasks);
main(Deno.args, tasks);
```

## Larger Scale use of tasks
Expand All @@ -180,8 +179,10 @@ definitions across projects.
place to have a (deno) typescript tree for the task scripting, which
encourages tasks to be separated into modules and generally organised as a
typescript project tree.
- User scripts can have an `import_map.json` file in order to import tasks and
utils more flexibly.
- User scripts can use a `deno.json` file in the `dnit` directory for
configuration (import maps, TypeScript options, etc). For legacy
compatibility, standalone `import_map.json` or `.import_map.json` files are
also supported.
- The main `dnit` tool can be executed on its own (see section on
[Installation](#Installation) above)

Expand All @@ -195,8 +196,10 @@ The `dnit` tool searches for a user script to execute, in order to support the
- It starts from the current working directory and runs `findUserSource`
- `findUserSource` looks for subdirectory `dnit` and looks for sources `main.ts`
or `dnit.ts`
- It optionally looks for `import_map.json` or `.import_map.json` to use as
the import map.
- Deno will automatically discover and use any `deno.json` file in the `dnit`
directory or parent directories
- For legacy compatibility, it also looks for `import_map.json` or
`.import_map.json` to use as the import map
- If found then it changes working directory and executes the user script.
- If not found then it recurses into `findUserSource` in the parent directory.

Expand All @@ -206,7 +209,7 @@ Eg: with a file layout:
repo
dnit
main.ts
import_map.json
deno.json
src
project.ts
package.json
Expand Down
11 changes: 0 additions & 11 deletions adl-gen/.manifest

This file was deleted.

Loading
Loading