Skip to content

Commit 024fcdf

Browse files
author
Zhen Li
committed
Removing v1
1 parent 8d79796 commit 024fcdf

File tree

156 files changed

+785
-944
lines changed

Some content is hidden

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

156 files changed

+785
-944
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();

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)