Skip to content

Commit c85a9ea

Browse files
committedMay 29, 2019
[chore] resolve typecheck & test conflicts
2 parents 29724e0 + 3bc53c4 commit c85a9ea

14 files changed

+20
-79
lines changed
 

‎.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ node_js:
33
- "8"
44
script:
55
- npm run lint:ci
6-
- npm run flow -- check
76
- npm run test:ci
87
- npm run build
8+
- npm run typecheck
99
after_success:
1010
- npm run test:coverage

‎husky.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ module.exports = {
55
'post-checkout': `if [[ $HUSKY_GIT_PARAMS =~ 1$ ]]; then ${runYarnLock}; fi`,
66
'post-merge': runYarnLock,
77
'post-rebase': 'yarn install',
8-
'pre-commit': 'yarn flow check && yarn lint-staged'
8+
'pre-commit': 'yarn typecheck && yarn lint-staged'
99
}
1010
};

‎jest.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
testMatch: ['**/__tests__/**/*.test.js']
3+
};

‎package.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@
2929
"typings": "index.d.ts",
3030
"sideEffects": false,
3131
"scripts": {
32-
"build": "npm run clean && npm-run-all --parallel build:*",
32+
"build": "npm run clean && run-p build:*",
3333
"build:development": "NODE_ENV=development rollup -c",
3434
"build:production": "NODE_ENV=production rollup -c",
3535
"clean": "rimraf dist",
3636
"flow": "flow",
37+
"flow:ci": "flow check",
3738
"lint": "yarn lint:cmd --fix",
3839
"lint:ci": "yarn lint:cmd",
3940
"lint:cmd": "eslint . --ext '.js,.json,.snap' --cache",
@@ -42,7 +43,9 @@
4243
"prepublishOnly": "npm run build",
4344
"test": "jest",
4445
"test:ci": "jest --ci",
45-
"test:coverage": "npm run test -- --coverage && cat ./coverage/lcov.info | coveralls"
46+
"test:coverage": "npm run test -- --coverage && cat ./coverage/lcov.info | coveralls",
47+
"tsc:ci": "tsc --noEmit typescript-tests/*",
48+
"typecheck": "run-p flow:ci tsc:ci"
4649
},
4750
"author": "Paul Armstrong",
4851
"contributors": [
@@ -76,8 +79,7 @@
7679
"rollup-plugin-babel": "^4.0.1",
7780
"rollup-plugin-filesize": "^6.1.0",
7881
"rollup-plugin-terser": "^5.0.0",
79-
"typescript": "^3.4.5",
80-
"typescript-definition-tester": "^0.0.6"
82+
"typescript": "^3.4.5"
8183
},
8284
"dependencies": {}
8385
}

‎src/__tests__/typescript.test.js

-9
This file was deleted.

‎src/__tests__/typescript/array.ts ‎typescript-tests/array.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { denormalize, normalize, schema } from '../../../index';
1+
import { denormalize, normalize, schema } from '../index'
22

33
const data = [{ id: '123', name: 'Jim' }, { id: '456', name: 'Jane' }];
44
const userSchema = new schema.Entity('users');

‎src/__tests__/typescript/array_schema.ts ‎typescript-tests/array_schema.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { denormalize, normalize, schema } from '../../../index';
1+
import { denormalize, normalize, schema } from '../index'
22

33
const data = [{ id: 1, type: 'admin' }, { id: 2, type: 'user' }];
44
const userSchema = new schema.Entity('users');

‎src/__tests__/typescript/entity.ts ‎typescript-tests/entity.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { denormalize, normalize, schema } from '../../../index';
1+
import { denormalize, normalize, schema } from '../index'
22

33
type User = {
44
id_str: string;

‎src/__tests__/typescript/github.ts ‎typescript-tests/github.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { normalize, schema } from '../../../index';
1+
import { normalize, schema } from '../index'
22

33
const user = new schema.Entity('users');
44

‎src/__tests__/typescript/object.ts ‎typescript-tests/object.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { normalize, schema } from '../../../index';
1+
import { normalize, schema } from '../index'
22

33
const data = {
44
/* ...*/

‎src/__tests__/typescript/relationships.ts ‎typescript-tests/relationships.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { normalize, schema } from '../../../index';
1+
import { normalize, schema } from '../index'
22

33
const userProcessStrategy = (value: any, parent: any, key: string) => {
44
switch (key) {

‎src/__tests__/typescript/union.ts ‎typescript-tests/union.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { normalize, schema } from '../../../index';
1+
import { normalize, schema } from '../index'
22

33
const data = { owner: { id: 1, type: 'user' } };
44

‎src/__tests__/typescript/values.ts ‎typescript-tests/values.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { normalize, schema } from '../../../index';
1+
import { normalize, schema } from '../index'
22

33
const data = { firstThing: { id: 1 }, secondThing: { id: 2 } };
44

‎yarn.lock

+1-56
Original file line numberDiff line numberDiff line change
@@ -1082,10 +1082,6 @@ assert-plus@1.0.0, assert-plus@^1.0.0:
10821082
version "1.0.0"
10831083
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
10841084

1085-
assertion-error@^1.0.1:
1086-
version "1.1.0"
1087-
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"
1088-
10891085
assign-symbols@^1.0.0:
10901086
version "1.0.0"
10911087
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
@@ -1228,7 +1224,7 @@ boxen@^2.0.0:
12281224
term-size "^1.2.0"
12291225
widest-line "^2.0.0"
12301226

1231-
brace-expansion@^1.0.0, brace-expansion@^1.1.7:
1227+
brace-expansion@^1.1.7:
12321228
version "1.1.8"
12331229
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
12341230
dependencies:
@@ -1742,13 +1738,6 @@ delegates@^1.0.0:
17421738
version "1.0.0"
17431739
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
17441740

1745-
detect-indent@^0.2.0:
1746-
version "0.2.0"
1747-
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-0.2.0.tgz#042914498979ac2d9f3c73e4ff3e6877d3bc92b6"
1748-
dependencies:
1749-
get-stdin "^0.1.0"
1750-
minimist "^0.1.0"
1751-
17521741
detect-libc@^1.0.2, detect-libc@^1.0.3:
17531742
version "1.0.3"
17541743
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
@@ -1775,14 +1764,6 @@ domexception@^1.0.0:
17751764
dependencies:
17761765
webidl-conversions "^4.0.2"
17771766

1778-
dts-bundle@^0.2.0:
1779-
version "0.2.0"
1780-
resolved "https://registry.yarnpkg.com/dts-bundle/-/dts-bundle-0.2.0.tgz#e165e494b00f81a3b6eb64385cbf6d1b486b7a99"
1781-
dependencies:
1782-
detect-indent "^0.2.0"
1783-
glob "^4.0.2"
1784-
mkdirp "^0.5.0"
1785-
17861767
duplexer@^0.1.1:
17871768
version "0.1.1"
17881769
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1"
@@ -2313,10 +2294,6 @@ get-own-enumerable-property-symbols@^3.0.0:
23132294
resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203"
23142295
integrity sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg==
23152296

2316-
get-stdin@^0.1.0:
2317-
version "0.1.0"
2318-
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-0.1.0.tgz#5998af24aafc802d15c82c685657eeb8b10d4a91"
2319-
23202297
get-stdin@^6.0.0:
23212298
version "6.0.0"
23222299
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
@@ -2353,15 +2330,6 @@ github-from-package@0.0.0:
23532330
resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce"
23542331
integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=
23552332

2356-
glob@^4.0.2:
2357-
version "4.5.3"
2358-
resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f"
2359-
dependencies:
2360-
inflight "^1.0.4"
2361-
inherits "2"
2362-
minimatch "^2.0.1"
2363-
once "^1.3.0"
2364-
23652333
glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2:
23662334
version "7.1.2"
23672335
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
@@ -3554,10 +3522,6 @@ lodash.sortby@^4.7.0:
35543522
version "4.7.0"
35553523
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
35563524

3557-
lodash@^3.6.0:
3558-
version "3.10.1"
3559-
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
3560-
35613525
lodash@^4.13.1:
35623526
version "4.17.5"
35633527
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
@@ -3729,12 +3693,6 @@ mimic-response@^1.0.0:
37293693
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
37303694
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
37313695

3732-
minimatch@^2.0.1:
3733-
version "2.0.10"
3734-
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7"
3735-
dependencies:
3736-
brace-expansion "^1.0.0"
3737-
37383696
minimatch@^3.0.4:
37393697
version "3.0.4"
37403698
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
@@ -3745,10 +3703,6 @@ minimist@0.0.8, minimist@~0.0.1:
37453703
version "0.0.8"
37463704
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
37473705

3748-
minimist@^0.1.0:
3749-
version "0.1.0"
3750-
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de"
3751-
37523706
minimist@^1.1.1, minimist@^1.2.0:
37533707
version "1.2.0"
37543708
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
@@ -5341,15 +5295,6 @@ type-fest@^0.4.1:
53415295
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8"
53425296
integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw==
53435297

5344-
typescript-definition-tester@^0.0.6:
5345-
version "0.0.6"
5346-
resolved "https://registry.yarnpkg.com/typescript-definition-tester/-/typescript-definition-tester-0.0.6.tgz#097b02ac08ab9ebc2ca26b929273460130864dd9"
5347-
integrity sha512-DTUerqJ5DFtqkjggKCVVdYZGyXozqM+c+TKORm02ol3gwVcLOxeMkeBHKOBL/VnqeWWSnfoniw+AVDrl9lhVHw==
5348-
dependencies:
5349-
assertion-error "^1.0.1"
5350-
dts-bundle "^0.2.0"
5351-
lodash "^3.6.0"
5352-
53535298
typescript@^3.4.5:
53545299
version "3.4.5"
53555300
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"

0 commit comments

Comments
 (0)
Please sign in to comment.