Skip to content

Commit

Permalink
chore: extract the analyser from the stream (#185)
Browse files Browse the repository at this point in the history
* extract the analyzer from the stream

* increase timeout to reduce flakyness
  • Loading branch information
lerouxb authored Apr 11, 2023
1 parent a061a8a commit 9bdd5e1
Show file tree
Hide file tree
Showing 21 changed files with 469 additions and 420 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
".esm-wrapper.mjs"
],
"scripts": {
"test": "nyc mocha --colors -r ts-node/register test/*.ts",
"test": "nyc mocha --timeout 5000 --colors -r ts-node/register test/*.ts",
"test-example-parse-from-file": "ts-node examples/parse-from-file.ts",
"test-example-parse-schema": "ts-node examples/parse-schema.ts",
"build": "npm run compile-ts && gen-esm-wrapper . ./.esm-wrapper.mjs",
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { pipeline as callbackPipeline, Readable, PassThrough } from 'stream';
import { promisify } from 'util';

import stream from './stream';
import type { SchemaParseOptions, Schema, SchemaField } from './stream';
import { SchemaAnalyzer } from './schema-analyzer';
import type { SchemaParseOptions, Schema, SchemaField } from './schema-analyzer';
import * as schemaStats from './stats';

type MongoDBCursor = AggregationCursor | FindCursor;
Expand Down Expand Up @@ -53,5 +54,6 @@ export type { Schema, SchemaField };

export {
stream,
SchemaAnalyzer,
schemaStats
};
Loading

0 comments on commit 9bdd5e1

Please sign in to comment.