Skip to content

Commit

Permalink
bring the README up to date; correct the MAINT document
Browse files Browse the repository at this point in the history
  • Loading branch information
j50n committed Jun 9, 2023
1 parent 0cf5eec commit cca0be5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 40 deletions.
2 changes: 1 addition & 1 deletion MAINT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Format, lint, and run tests.

## Dependency Maintenance

Integrated into the build.
Integrated into the build.

## Release

Expand Down
55 changes: 22 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/enumerate.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ <h3 id="example-1"><a class="header" href="#example-1">Example 1</a></h3>
// [2, 4, 6]
</code></pre>
<h3 id="example-2"><a class="header" href="#example-2">Example 2</a></h3>
<p>Open a file. Use <code>enumerate</code> to wrap the <code>ReadableStream</code> from the file into an <code>Enumerable</code>.
Uncompress, strip out empty lines, and count them. Convert the output from
<code>wc -l</code> into a number.</p>
<p>Open a file. Use <code>enumerate</code> to wrap the <code>ReadableStream</code> from the file into an
<code>Enumerable</code>. Uncompress, strip out empty lines, and count them. Convert the
output from <code>wc -l</code> into a number.</p>
<pre><code class="language-typescript">const file = await Deno.open(
fromFileUrl(import.meta.resolve(&quot;./warandpeace.txt.gz&quot;)),
);
Expand Down
6 changes: 3 additions & 3 deletions docs/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ <h3 id="example-1"><a class="header" href="#example-1">Example 1</a></h3>
// [2, 4, 6]
</code></pre>
<h3 id="example-2"><a class="header" href="#example-2">Example 2</a></h3>
<p>Open a file. Use <code>enumerate</code> to wrap the <code>ReadableStream</code> from the file into an <code>Enumerable</code>.
Uncompress, strip out empty lines, and count them. Convert the output from
<code>wc -l</code> into a number.</p>
<p>Open a file. Use <code>enumerate</code> to wrap the <code>ReadableStream</code> from the file into an
<code>Enumerable</code>. Uncompress, strip out empty lines, and count them. Convert the
output from <code>wc -l</code> into a number.</p>
<pre><code class="language-typescript">const file = await Deno.open(
fromFileUrl(import.meta.resolve(&quot;./warandpeace.txt.gz&quot;)),
);
Expand Down

0 comments on commit cca0be5

Please sign in to comment.