From cca0be55a3f148a195d383a7dfbb3ef5b825f359 Mon Sep 17 00:00:00 2001 From: j50n Date: Thu, 8 Jun 2023 22:02:52 -0600 Subject: [PATCH] bring the README up to date; correct the MAINT document --- MAINT.md | 2 +- README.md | 55 ++++++++++++++++++--------------------------- build.sh | 1 + docs/enumerate.html | 6 ++--- docs/print.html | 6 ++--- 5 files changed, 30 insertions(+), 40 deletions(-) diff --git a/MAINT.md b/MAINT.md index 14a012d..50a89c9 100644 --- a/MAINT.md +++ b/MAINT.md @@ -8,7 +8,7 @@ Format, lint, and run tests. ## Dependency Maintenance -Integrated into the build. +Integrated into the build. ## Release diff --git a/README.md b/README.md index 9e41823..6295bc0 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,34 @@ # proc -Blue sky. Let's make something wonderful! +Maybe the easiest way to run child processes in Deno ever. -## A Warning +## The Old API -**The new API is in work and not yet ready (not even really close).** Big (good) -changes coming. Stay tuned. +The documentation for the legacy API is available at +[Legacy Documentation](./legacy/README.md). -## Documentation (Legacy API) +TO use the old API: -The documentation for the legacy API is available at -[Legacy Documentation](./legacy/README.md). It is recommended that you continue -to use the legacy API for the time being. +- https://deno.land/x/proc/mod.ts +- https://deno.land/x/proc/mod1.ts + +When the new API is ready, there will be a 1.0 release and `mod.ts` will be +switched to the new API. The old API will continue to be maintained at `mod1.ts` +for some time after the Deno 2.0 release. -Note that only the legacy API is available from -`https://deno.land/x/proc/mod.ts`. +The old API was built on `Command.run()` which is now deprecated and scheduled +to be removed in Deno 2.0. There were other reasons to start over from scratch, +but this was the primary reason everything changed. -## Documentation (New API) +## The New API The documentation is available at [https://j50n.github.io/deno-proc/](https://j50n.github.io/deno-proc/). -## A Big Change is Underway - -> **Pardon our mess!** The deprecation of `Deno.run` is both a blessing and a -> curse. `Deno.Command` is a _great_ improvement ... and it breaks pretty much -> everything. I was going to have to redo the old library as it had gone in some -> wrong directions. -> -> - The old API will remain available, unchanged, until Deno 2.0 is released. -> - When Deno 2.0 is release, the `mod.ts` for the old library will be - > relocated. Imports will have to change, but it will still work with Deno - > 1.0. -> - The old API will **not** be upgraded to work with `Deno.Command`. Once - > `Deno.run` is removed, the old API will no longer function. -> -> See [Legacy Documentation](./legacy/README.md) for the old documentation. - -I am working on a new version of this library that makes common usage patterns -in `Deno.Command` much easier. - -For now, this is a work in progress. Refer to the source code for the tests - -like [count-words.test](./tests/examples/count-words.test.md) - for examples -that are guaranteed to work with the current version. +To use the new API: + +- http://deno.land/x/proc/mod3.ts + +The new API is stabilizing and the code is working. New tests are being added +regularly. Obviously the documentation is a work in progress. Refactors are +likely before the 1.0.0 release. diff --git a/build.sh b/build.sh index 711dbd2..363f2a6 100755 --- a/build.sh +++ b/build.sh @@ -7,6 +7,7 @@ HERE="$(realpath "$(dirname "$0")")" deno install -rf --allow-read="$HERE/" --allow-write="$HERE/" --allow-net https://deno.land/x/udd/main.ts cd "$HERE/site/" && ( + rustup self update rustup update cargo install mdbook cargo install mdbook-graphviz diff --git a/docs/enumerate.html b/docs/enumerate.html index 7e3c2ab..ea9c091 100644 --- a/docs/enumerate.html +++ b/docs/enumerate.html @@ -159,9 +159,9 @@

Example 1

// [2, 4, 6]

Example 2

-

Open a file. Use enumerate to wrap the ReadableStream from the file into an Enumerable. -Uncompress, strip out empty lines, and count them. Convert the output from -wc -l into a number.

+

Open a file. Use enumerate to wrap the ReadableStream from the file into an +Enumerable. Uncompress, strip out empty lines, and count them. Convert the +output from wc -l into a number.

const file = await Deno.open(
   fromFileUrl(import.meta.resolve("./warandpeace.txt.gz")),
 );
diff --git a/docs/print.html b/docs/print.html
index 75dad34..7c2b0a5 100644
--- a/docs/print.html
+++ b/docs/print.html
@@ -375,9 +375,9 @@ 

Example 1

// [2, 4, 6]

Example 2

-

Open a file. Use enumerate to wrap the ReadableStream from the file into an Enumerable. -Uncompress, strip out empty lines, and count them. Convert the output from -wc -l into a number.

+

Open a file. Use enumerate to wrap the ReadableStream from the file into an +Enumerable. Uncompress, strip out empty lines, and count them. Convert the +output from wc -l into a number.

const file = await Deno.open(
   fromFileUrl(import.meta.resolve("./warandpeace.txt.gz")),
 );