Skip to content

Commit e1b28f3

Browse files
authored
Merge pull request #439 from zhenlineo/2.0-remove-v1
Removing v1 folder
2 parents feb3c67 + 5ffcad7 commit e1b28f3

File tree

159 files changed

+843
-954
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+843
-954
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Please note that `@next` only points to pre-releases that are not suitable for p
2727
To get the latest stable release omit `@next` part altogether or use `@latest` instead.
2828

2929
```javascript
30-
var neo4j = require('neo4j-driver').v1;
30+
var neo4j = require('neo4j-driver');
3131
```
3232
Driver instance should be closed when Node.js application exits:
3333

@@ -58,12 +58,14 @@ It can be included in an HTML page using one of the following tags:
5858

5959
```
6060

61-
This will make a global `neo4j` object available, where you can access the `v1` API at `neo4j.v1`:
61+
This will make a global `neo4j` object available, where you can access the driver API at `neo4j`*:
6262

6363
```javascript
64-
var driver = neo4j.v1.driver("bolt://localhost", neo4j.v1.auth.basic("neo4j", "neo4j"));
64+
var driver = neo4j.driver("bolt://localhost", neo4j.auth.basic("neo4j", "neo4j"));
6565
```
6666

67+
\* Since 2.0, driver API is moved from `neo4j.v1` to `neo4j`.
68+
6769
It is not required to explicitly close the driver on a web page. Web browser should gracefully close all open
6870
WebSockets when the page is unloaded. However, driver instance should be explicitly closed when it's lifetime
6971
is not the same as the lifetime of the web page:
@@ -278,7 +280,7 @@ Number written directly e.g. `session.run("CREATE (n:Node {age: {age}})", {age:
278280
To write the `age` as an integer the `neo4j.int` method should be used:
279281

280282
```javascript
281-
var neo4j = require('neo4j-driver').v1;
283+
var neo4j = require('neo4j-driver');
282284

283285
session.run("CREATE (n {age: {myIntParam}})", {myIntParam: neo4j.int(22)});
284286
```

examples/neo4j.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ <h1>Cypher Runner for New Remoting</h1>
131131
</div>
132132

133133
<script>
134-
var authToken = neo4j.v1.auth.basic("neo4j", "neo4j");
134+
var authToken = neo4j.auth.basic("neo4j", "neo4j");
135135
console.log(authToken);
136-
var driver = neo4j.v1.driver("bolt://localhost", authToken, {
136+
var driver = neo4j.driver("bolt://localhost", authToken, {
137137
encrypted:false
138138
});
139139
var session = driver.session();

gulpfile.babel.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,25 +181,37 @@ gulp.task('run-browser-test', function(cb){
181181
gulp.task('run-browser-test-chrome', function(cb){
182182
new karmaServer({
183183
configFile: __dirname + '/test/browser/karma-chrome.conf.js',
184-
}, cb).start();
184+
singleRun: true,
185+
}, function (exitCode) {
186+
exitCode ? process.exit(exitCode) : cb();
187+
}).start();
185188
});
186189

187190
gulp.task('run-browser-test-firefox', function(cb){
188191
new karmaServer({
189192
configFile: __dirname + '/test/browser/karma-firefox.conf.js',
190-
}, cb).start();
193+
singleRun: true,
194+
}, function (exitCode) {
195+
exitCode ? process.exit(exitCode) : cb();
196+
}).start();
191197
});
192198

193199
gulp.task('run-browser-test-edge', function(cb){
194200
new karmaServer({
195201
configFile: __dirname + '/test/browser/karma-edge.conf.js',
196-
}, cb).start();
202+
singleRun: true,
203+
}, function (exitCode) {
204+
exitCode ? process.exit(exitCode) : cb();
205+
}).start();
197206
});
198207

199208
gulp.task('run-browser-test-ie', function (cb) {
200209
new karmaServer({
201210
configFile: __dirname + '/test/browser/karma-ie.conf.js',
202-
}, cb).start();
211+
singleRun: true,
212+
}, function (exitCode) {
213+
exitCode ? process.exit(exitCode) : cb();
214+
}).start();
203215
});
204216

205217
gulp.task('watch', function () {

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"main": "lib/index.js",
2323
"browser": {
24-
"./lib/v1/internal/node/index.js": "./lib/v1/internal/browser/index.js"
24+
"./lib/internal/node/index.js": "./lib/internal/browser/index.js"
2525
},
2626
"unpkg": "lib/browser/neo4j-web.js",
2727
"jsdelivr": "lib/browser/neo4j-web.js",
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)