Skip to content

Commit

Permalink
Remove outdated ldjson-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
onigoetz authored and clshortfuse committed Oct 4, 2023
1 parent 0a1ae0c commit a296474
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 51 deletions.
9 changes: 7 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import fs from 'node:fs';
import path from 'node:path';
import { PassThrough } from 'node:stream';
import { EOL } from 'node:os';

import browserslist from 'browserslist';
import ldjson from 'ldjson-stream';
import yargs from 'yargs';

import DoIUse from '../lib/DoIUse.js';
Expand Down Expand Up @@ -125,7 +125,12 @@ if (argv.help || (argv._.length === 0 && process.stdin.isTTY)) {
/** @type {import("stream").Writable} */
let outStream;
if (argv.json) {
outStream = ldjson.serialize();
outStream = new PassThrough({
objectMode: true,
transform(object, encoding, next) {
next(null, JSON.stringify(object) + EOL);
},
});
} else {
outStream = new PassThrough({
objectMode: true,
Expand Down
50 changes: 2 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"caniuse-lite": "^1.0.30001487",
"css-tokenize": "^1.0.1",
"duplexify": "^4.1.2",
"ldjson-stream": "^1.2.1",
"multimatch": "^5.0.0",
"postcss": "^8.4.21",
"source-map": "^0.7.4",
Expand Down

0 comments on commit a296474

Please sign in to comment.