Skip to content

Commit

Permalink
Update deps to typescript 5.4 (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlansley authored Mar 28, 2024
1 parent 526342f commit 0fa8310
Show file tree
Hide file tree
Showing 15 changed files with 1,116 additions and 763 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-published-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
name: Check Published
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ jobs:
matrix:
node-version: [20.x, 21.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Audit Signatures
run: npm audit signatures
- name: Compile
run: npm run ci:compile
- name: Check Code Style
Expand All @@ -39,18 +37,16 @@ jobs:
matrix:
node-version: [20.x, 21.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Audit Signatures
run: npm audit signatures
- name: Compile
run: npm run ci:compile
- name: Check Code Style
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
language: ['javascript']
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
runs-on: ubuntu-latest
name: Coverage
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,32 @@ on:

jobs:
publishBeta:
runs-on: ubuntu-latest
name: Publish Beta
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Node.js
uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Check Label
uses: checkdigit/github-actions/check-label@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
- name: Check Imports
uses: checkdigit/github-actions/check-imports@main
- name: Install latest npm
run: npm install -g npm@latest
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: Audit Signatures
run: npm audit signatures
- name: Run Test
run: npm run test
run: npm run ci:test
- name: Prepare Beta
id: prepare-beta
uses: checkdigit/github-actions/prepare-beta@main
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ jobs:
id-token: write
name: Publish to NPM
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
- name: Install latest npm
run: npm install -g npm@latest
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: Audit Signatures
run: npm audit signatures
- name: Run Test
run: npm run test
- name: Publish
run: npm publish --provenance
env:
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pipeline(
```

The main advantage of the typings is that at compile-time, the outputs of each source or transformation must match the
input of the subsequent transformation or sink. **This makes working with complex pipelines much less error-prone.**
input of the later transformation or sink. **This makes working with complex pipelines much less error-prone.**

In addition, the standard Node typings (`@types/node`) for `stream.pipeline` are woefully incorrect (as of 14.14.32)
to the point of being unusable.
Expand Down Expand Up @@ -120,9 +120,6 @@ Sources return an object of type `Asyncerator<T>` that can be passed to `pipelin
these built-in functions, the other objects that are considered a "source" are `string`, arrays or basically anything
that implements the `Readable`, `Iterable` and `AsyncIterable` interfaces.

Note: due to an apparent bug in the Node 14 `stream.pipeline` implementation, a `Buffer` cannot be used as a source,
even though it is iterable. Instead, use the result of the `.values()` method as a source.

Some built-in source functions take an argument of type `Asyncable<T>`. Asyncables are anything that can be
turned into an Asyncerator: normal iterators and iterables, AsyncIterators, AsyncIterables, AsyncGenerators,
AsyncIterableIterators, and of course Asyncerators themselves.
Expand Down
Loading

0 comments on commit 0fa8310

Please sign in to comment.