Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Oct 11, 2023
1 parent ab41033 commit 4befa96
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ jobs:
run: bun i --no-save
- name: Lint
run: npm run fix:lint
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Rust
run: rustup update
- uses: actions/cache@v3
with:
path: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/nodejs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ jobs:
run: bun i --no-save
- name: Lint
run: npm run lint
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Rust
run: rustup update
- uses: actions/cache@v3
with:
path: |
Expand Down
6 changes: 3 additions & 3 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"imports": {
"try-to-catch": "https://esm.sh/try-to-catch"
}
"imports": {
"try-to-catch": "https://esm.sh/try-to-catch"
}
}
17 changes: 9 additions & 8 deletions lib/read-std.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import {promisify} from 'node:util';
import {
promisify,
TextDecoder,
} from 'node:util';

export const readStd = async (text) => {
import process from 'node:process';

export const readStd = async () => {
if (globalThis.Deno)
return await denoReadStd();

Expand Down Expand Up @@ -33,12 +38,8 @@ export const denoReadStd = async () => {
const decoder = new TextDecoder();

for await (const chunk of Deno.stdin.readable) {
console.log(chunk);
chunks += decoder.decode(chunk);
chunks += decoder.decode(chunk);
}

console.log('yyy');

return chunks;
}

};

0 comments on commit 4befa96

Please sign in to comment.