Skip to content

Commit 2c1a02b

Browse files
committed
Add docs and fix scripts
1 parent 84cd3b5 commit 2c1a02b

File tree

8 files changed

+53
-40
lines changed

8 files changed

+53
-40
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,7 @@ var driver = neo4j.driver(
480480
## Building
481481

482482
```
483-
./buildDependencies.sh
484-
npm install
483+
npm ci
485484
npm run build
486485
```
487486

buildDependencies.sh

-8
This file was deleted.

package.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
"scripts": {
88
"clean": "lerna clean -y && lerna run clean",
99
"build": "lerna bootstrap --ci",
10-
"test::unit": "lerna run test::unit",
11-
"test::integration": "lerna run test::integration",
12-
"test::stress": "lerna run test::stress"
10+
"test::unit": "lerna run test::unit --stream",
11+
"test::integration": "lerna run test::integration --stream",
12+
"test::stress": "lerna run test::stress --stream",
13+
"test": "lerna run test --stream",
14+
"start-neo4j": "lerna run start-neo4j --scope neo4j-driver",
15+
"stop-neo4j": "lerna run stop-neo4j --scope neo4j-driver",
16+
"lerna": "lerna"
1317
}
1418
}

packages/bolt-connection/README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,28 @@ This is an internal package shared by the [neo4j-driver](https://www.npmjs.com/p
66

77
## Building
88

9-
It's required to first build the `neo4j-driver-core` under the `../core` (see instruction on its folder). Then,
9+
The build of this package is handled by the root package of this repository.
10+
11+
First it is needed to install the mono-repo dependencies by running `npm ci` in the root of the repository. Then:
12+
13+
* Build all could be performed with
14+
1015

1116
```
12-
npm install
1317
npm run build
18+
```
19+
* Build only the Core could be performed with
20+
Builind only Core:
21+
```
22+
npm run build -- --scope=neo4j-driver-bolt-connection
23+
1424
```
1525

1626
This produces a Node.js module version under `lib/`.
1727

1828
## Testing
1929

20-
The tests can be executed by running `npm test`. For development, you can have the build tool rerun the tests each time you change the source code:
30+
The tests could be executed by running `npm test` in this package folder. For development, you can have the build tool rerun the tests each time you change the source code:
2131

2232
```
2333
npm run test::watch

packages/core/README.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,28 @@ This is a internal package shared by the [neo4j-driver](https://www.npmjs.com/pa
66

77
## Building
88

9+
The build of this package is handled by the root package of this repository.
10+
11+
First it is needed to install the mono-repo dependencies by running `npm ci` in the root of the repository. Then:
12+
13+
* Build all could be performed with
14+
15+
916
```
10-
npm install
1117
npm run build
18+
```
19+
* Build only the Core could be performed with
20+
Builind only Core:
21+
```
22+
npm run build -- --scope=neo4j-driver-core
23+
1224
```
1325

1426
This produces a Node.js module version under `lib/`.
1527

1628
## Testing
1729

18-
The tests could be executed by running `npm test`. For development, you can have the build tool rerun the tests each time you change the source code:
30+
The tests could be executed by running `npm test` in this package folder. For development, you can have the build tool rerun the tests each time you change the source code:
1931

2032
```
2133
npm run test::watch

packages/neo4j-driver-lite/README.md

+14-7
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,20 @@ var driver = neo4j.driver(
355355

356356
## Building
357357

358+
The build of this package is handled by the root package of this repository.
359+
360+
First it is needed to install the mono-repo dependencies by running `npm ci` in the root of the repository. Then:
361+
362+
* Build all could be performed with
363+
358364
```
359-
./buildDependencies.sh
360-
npm install
361365
npm run build
362-
npn rub build:browser
366+
```
367+
* Build only the Core could be performed with
368+
Builind only Core:
369+
```
370+
npm run build -- --scope=neo4j-driver-lite
371+
363372
```
364373

365374
This produces browser-compatible standalone files under `lib/browser` and a Node.js module version under `lib/`.
@@ -399,14 +408,12 @@ python3 main.py
399408

400409
More details about how to use Teskit could be found on [its repository](https://github.com/neo4j-drivers/testkit/tree/4.3)
401410

402-
Simple `npm test` can also be used if you want to run only the unit tests.
411+
Runing `npm test` in this package directory can also be used if you want to run only the unit tests.
403412

404413
For development, you can have the build tool rerun the tests each time you change the source code:
405414

406415
```
407416
npm run test:watch
408417
```
409418

410-
The guides about how to test the driver internal dependencies should be found on it own Readme files.
411-
412-
See `../core` and `../bolt-connection`
419+
The command `npm run test::unit` could be used in the root package for running the unit tests for all the packages in this project.

runTests.ps1

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
npm install -g gulp typescript jest
22

3-
npm --prefix core ci
4-
npm --prefix core run build
5-
npm --prefix bolt-connection ci
6-
npm --prefix bolt-connection run build
7-
83
npm ci
9-
10-
npm --prefix core test
11-
npm --prefix bolt-connection test
4+
npm run build -- --no-private
125

136
$ErrorFound = $False
147

@@ -26,7 +19,7 @@ try
2619
exit 1
2720
}
2821

29-
npm test
22+
npm test -- --no-private
3023
if($LastExitCode -ne 0) #failed to execute npm test without error
3124
{
3225
$ErrorFound = $True

runTests.sh

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@ trap finish EXIT
77

88
npm install -g gulp typescript jest
99

10-
./buildDependencies.sh
11-
1210
npm ci
11+
npm run build -- --no-private
1312

1413
if [[ ! -z "$1" ]]; then
1514
export NEOCTRL_ARGS="$1"
1615
fi
1716

18-
npm --prefix ./core/ test
19-
npm --prefix ./bolt-connection/ test
20-
21-
npm run start-neo4j && npm test
17+
npm run start-neo4j && npm test -- --no-private

0 commit comments

Comments
 (0)