Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.

Commit 7581e19

Browse files
author
stefanwullems
committed
test
1 parent 556ee76 commit 7581e19

File tree

5 files changed

+2820
-56
lines changed

5 files changed

+2820
-56
lines changed

Diff for: .npmignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/src
2+
/node_modules

Diff for: .travis.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
language: node_js
2-
32
node_js:
4-
- 8
3+
- "8"
4+
5+
script: echo "Running tests against $(node -v) ..."
56

67
jobs:
78
include:
9+
- stage: test
10+
script: yarn jest
11+
- stage: build
12+
script: yarn tsc
813
# Define the release stage that runs semantic-release
914
- stage: release
1015
node_js: lts/*
1116
# Advanced: optionally overwrite your default `script` step to skip the tests
12-
# script: skip
17+
script: skip
1318
deploy:
1419
provider: script
1520
skip_cleanup: true
1621
script:
17-
- npx semantic-release
22+
- npx semantic-release

Diff for: package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
"author": "Stefan Wullems <[email protected]>",
1313
"license": "ISC",
1414
"devDependencies": {
15+
"@semantic-release/commit-analyzer": "^6.1.0",
16+
"@semantic-release/npm": "^5.1.4",
17+
"@semantic-release/release-notes-generator": "^7.1.4",
1518
"jest": "^24.7.1",
16-
"typescript": "^3.4.3",
17-
"semantic-release": "^15.13.3"
19+
"semantic-release": "^15.13.3",
20+
"typescript": "^3.4.3"
1821
},
1922
"dependencies": {
2023
"@orbit/data": "^0.15.23",
@@ -26,4 +29,4 @@
2629
"type": "git",
2730
"url": "https://github.com/exivity/orbit-query-manager.git"
2831
}
29-
}
32+
}

Diff for: src/QueryManager.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,15 @@ export class QueryManager<E extends { [key: string]: any } = any> {
176176
}
177177
})
178178

179-
const terms = this.subscriptions[queryRef].terms
180-
181-
if (this._shouldUpdate(terms, records, relatedRecords)) listener()
179+
if (this._shouldUpdate(queryRef, records, relatedRecords)) listener()
182180
}
183181

184182
_shouldUpdate = (
185-
terms: Term[],
183+
queryRef: string,
186184
records: RecordIdentity[],
187185
relatedRecords: RecordIdentity[]
188186
) => {
187+
const terms = this.subscriptions[queryRef].terms
189188
return terms.some(({ expression }) => {
190189
if (expression.op === 'findRecords') {
191190
return records.some(({ type }) => type === expression.type) ||

0 commit comments

Comments
 (0)