Skip to content

Commit c8f115b

Browse files
committed
fix(build): disable flow definitions while be ready flowgen package
1 parent 389a9fd commit c8f115b

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,19 @@ const replSet = new MongoMemoryReplSet({
146146
oplogSize, // size (in MB) for the oplog; (default: 1)
147147
spawn, // spawn options when creating the child processes
148148
storageEngine, // default storage engine for instance. (Can be overridden per instance)
149-
configSettings: { // Optional settings for replSetInitiate command. See https://docs.mongodb.com/manual/reference/command/replSetInitiate/
150-
chainingAllowed: boolean, // When true it allows secondary members to replicate from other secondary members. When false, secondaries can replicate only from the primary.
151-
heartbeatTimeoutSecs: number, // Number of seconds that the replica set members wait for a successful heartbeat from each other. If a member does not respond in time, other members mark the delinquent member as inaccessible.
152-
heartbeatIntervalMillis: number, // The frequency in milliseconds of the heartbeats.
153-
electionTimeoutMillis: number, // The time limit in milliseconds for detecting when a replica set’s primary is unreachable.
154-
catchUpTimeoutMillis: number, // Time limit for a newly elected primary to sync (catch up) with the other replica set members that may have more recent writes.
155-
}
149+
configSettings: {
150+
// Optional settings for replSetInitiate command. See https://docs.mongodb.com/manual/reference/command/replSetInitiate/
151+
chainingAllowed: boolean, // When true it allows secondary members to replicate from other secondary members. When false, secondaries can replicate only from the primary.
152+
heartbeatTimeoutSecs: number, // Number of seconds that the replica set members wait for a successful heartbeat from each other. If a member does not respond in time, other members mark the delinquent member as inaccessible.
153+
heartbeatIntervalMillis: number, // The frequency in milliseconds of the heartbeats.
154+
electionTimeoutMillis: number, // The time limit in milliseconds for detecting when a replica set’s primary is unreachable.
155+
catchUpTimeoutMillis: number, // Time limit for a newly elected primary to sync (catch up) with the other replica set members that may have more recent writes.
156+
},
156157
},
157158
});
158159
```
159160
160-
The `replSet.configSettings` can be used to tune the initialization of the replica set. By default one of the nodes has
161+
The `replSet.configSettings` can be used to tune the initialization of the replica set. By default one of the nodes has
161162
to be promoted to Primary before the replica set can be successfully used but that happens only after a timeout of 10 seconds
162163
(see [electionTimeoutMillis](https://docs.mongodb.com/manual/reference/replica-configuration/#rsconf.settings.electionTimeoutMillis)).
163164
@@ -166,14 +167,14 @@ parameter as shown below:
166167
167168
```js
168169
const replSet = new MongoMemoryReplSet({
169-
replSet: {
170-
configSettings: {
171-
electionTimeoutMillis: 100,
172-
},
170+
replSet: {
171+
configSettings: {
172+
electionTimeoutMillis: 100,
173173
},
174-
})
175-
await replSet.waitUntilRunning()
176-
```
174+
},
175+
});
176+
await replSet.waitUntilRunning();
177+
```
177178
178179
### Simple test with MongoClient
179180

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"scripts": {
7474
"build": "npm-run-all build:*",
7575
"build:ts": "rimraf ./lib && tsc -p ./tsconfig.build.json",
76-
"build:flow": "find ./lib -name \"*.d.ts\" -exec bash -c './node_modules/.bin/flowgen --add-flow-header \"$1\" -o \"${1%.d.ts}\".js.flow' - '{}' \\;",
76+
"disabled-build:flow": "find ./lib -name \"*.d.ts\" -exec bash -c './node_modules/.bin/flowgen --add-flow-header \"$1\" -o \"${1%.d.ts}\".js.flow' - '{}' \\;",
7777
"watch": "cross-env MONGOMS_DOWNLOAD_DIR=./tmp jest --watch",
7878
"coverage": "cross-env MONGOMS_DOWNLOAD_DIR=./tmp jest --coverage",
7979
"lint": "eslint 'src/**/*.{js,ts}'",

0 commit comments

Comments
 (0)