Skip to content

Commit c7f370d

Browse files
Fix some broken imports (#828)
* Fix imports * Fix imports: ALL was changed to FETCH_ALL This fixes: SyntaxError: The requested module './request-message.js' does not provide an export named 'ALL' * Fix import to avoid using internal file name (Address review comment)
1 parent 7386e26 commit c7f370d

File tree

8 files changed

+16
-15
lines changed

8 files changed

+16
-15
lines changed

packages/bolt-connection/src/bolt/bolt-protocol-v1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
assertTxConfigIsEmpty,
2222
assertImpersonatedUserIsEmpty
2323
} from './bolt-protocol-util'
24-
import { Chunker } from '../chunking'
24+
import { Chunker } from '../channel'
2525
import { v1 } from '../packstream'
2626
import RequestMessage from './request-message'
2727
import {

packages/bolt-connection/src/bolt/bolt-protocol-v4x0.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* limitations under the License.
1818
*/
1919
import BoltProtocolV3 from './bolt-protocol-v3'
20-
import RequestMessage, { ALL } from './request-message'
20+
import RequestMessage from './request-message'
2121
import { assertImpersonatedUserIsEmpty } from './bolt-protocol-util'
2222
import {
2323
ResultStreamObserver,
@@ -28,7 +28,7 @@ import { internal } from 'neo4j-driver-core'
2828

2929
const {
3030
bookmark: { Bookmark },
31-
constants: { BOLT_PROTOCOL_V4_0 },
31+
constants: { BOLT_PROTOCOL_V4_0, FETCH_ALL },
3232
txConfig: { TxConfig }
3333
} = internal
3434

@@ -90,7 +90,7 @@ export default class BoltProtocol extends BoltProtocolV3 {
9090
afterComplete,
9191
flush = true,
9292
reactive = false,
93-
fetchSize = ALL
93+
fetchSize = FETCH_ALL
9494
} = {}
9595
) {
9696
const observer = new ResultStreamObserver({

packages/bolt-connection/src/bolt/bolt-protocol-v4x1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* limitations under the License.
1818
*/
1919
import BoltProtocolV4 from './bolt-protocol-v4x0'
20-
import RequestMessage, { ALL } from './request-message'
20+
import RequestMessage from './request-message'
2121
import { LoginObserver } from './stream-observers'
2222
import { internal } from 'neo4j-driver-core'
2323

packages/bolt-connection/src/bolt/bolt-protocol-v4x4.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
import BoltProtocolV43 from './bolt-protocol-v4x3'
2020

2121
import { internal } from 'neo4j-driver-core'
22-
import RequestMessage, { ALL } from './request-message'
22+
import RequestMessage from './request-message'
2323
import { RouteObserver, ResultStreamObserver } from './stream-observers'
2424

2525
const {
26-
constants: { BOLT_PROTOCOL_V4_4 },
26+
constants: { BOLT_PROTOCOL_V4_4, FETCH_ALL },
2727
bookmark: { Bookmark },
2828
} = internal
2929

@@ -84,7 +84,7 @@ export default class BoltProtocol extends BoltProtocolV43 {
8484
afterComplete,
8585
flush = true,
8686
reactive = false,
87-
fetchSize = ALL
87+
fetchSize = FETCH_ALL
8888
} = {}
8989
) {
9090
const observer = new ResultStreamObserver({

packages/bolt-connection/src/bolt/stream-observers.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
import { newError, error, Integer, Record, json } from 'neo4j-driver-core'
20-
import { ALL } from './request-message'
19+
import { newError, error, Integer, Record, json, internal } from 'neo4j-driver-core'
2120
import RawRoutingTable from './routing-table-raw'
2221

22+
const {
23+
constants: { FETCH_ALL },
24+
} = internal
2325
const { PROTOCOL_ERROR } = error
2426
class StreamObserver {
2527
onNext (rawRecord) {}
@@ -59,7 +61,7 @@ class ResultStreamObserver extends StreamObserver {
5961
reactive = false,
6062
moreFunction,
6163
discardFunction,
62-
fetchSize = ALL,
64+
fetchSize = FETCH_ALL,
6365
beforeError,
6466
afterError,
6567
beforeKeys,
@@ -367,7 +369,7 @@ class ResultStreamObserver extends StreamObserver {
367369

368370
_setupAuoPull (fetchSize) {
369371
this._autoPull = true
370-
if (fetchSize === ALL) {
372+
if (fetchSize === FETCH_ALL) {
371373
this._lowRecordWatermark = Number.MAX_VALUE // we shall always lower than this number to enable auto pull
372374
this._highRecordWatermark = Number.MAX_VALUE // we shall never reach this number to disable auto pull
373375
} else {

packages/bolt-connection/src/connection/connection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* limitations under the License.
1818
*/
1919

20-
import { ResultStreamObserver, BoltProtocol } from '..bolt'
20+
import { ResultStreamObserver, BoltProtocol } from '../bolt'
2121

2222
export default class Connection {
2323
/**

packages/bolt-connection/src/rediscovery/rediscovery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
import RoutingTable from './routing-table'
2020
import { RawRoutingTable } from '../bolt'
21-
import { newError, error, Session, ServerAddress } from 'neo4j-driver-core'
21+
import { newError, error, Session } from 'neo4j-driver-core'
2222

2323
const { SERVICE_UNAVAILABLE } = error
2424
const PROCEDURE_NOT_FOUND_CODE = 'Neo.ClientError.Procedure.ProcedureNotFound'

packages/core/src/internal/observers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* limitations under the License.
1818
*/
1919

20-
import { observer } from '.'
2120
import Record from '../record'
2221
import ResultSummary from '../result-summary'
2322

0 commit comments

Comments
 (0)