Skip to content

Commit 0c4aff3

Browse files
authored
Add types tests (#630)
* Change index creation and wait method in tests * Add types tests * Update meilisearch js
1 parent 5dbbc0e commit 0c4aff3

File tree

5 files changed

+27
-13
lines changed

5 files changed

+27
-13
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,22 @@ jobs:
9090
uses: ibiqlik/action-yamllint@v3
9191
with:
9292
config_file: .yamllint.yml
93+
types_test:
94+
runs-on: ubuntu-latest
95+
name: types-check
96+
steps:
97+
- uses: actions/checkout@v2
98+
- name: Cache dependencies
99+
uses: actions/cache@v2
100+
with:
101+
path: |
102+
./node_modules
103+
key: ${{ hashFiles('yarn.lock') }}
104+
- name: Setup node
105+
uses: actions/setup-node@v2
106+
- name: Install dependencies
107+
run: yarn --dev
108+
- name: Build project
109+
run: yarn build
110+
- name: Run types check
111+
run: yarn types

bors.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
status = [
22
'style-check',
3+
'types-check',
34
'integration-tests (Node.js 12)',
45
'integration-tests (Node.js 14)',
56
'cypress-run'

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@meilisearch/instant-meilisearch",
3-
"version": "0.5.10",
3+
"version": "0.5.11",
44
"private": false,
55
"description": "The search client to use MeiliSearch with InstantSearch.",
66
"scripts": {
@@ -21,10 +21,11 @@
2121
"playground:angular": "yarn --cwd ./playgrounds/angular && yarn --cwd ./playgrounds/angular start",
2222
"postbuild": "yarn typingsheader",
2323
"typingsheader": "node scripts/build.js",
24-
"build": "yarn cleanup && rollup -c rollup.config.js && rollup --environment NODE_ENV:production -c rollup.config.js && tsc --emitDeclarationOnly",
24+
"build": "yarn cleanup && rollup -c rollup.config.js && rollup --environment NODE_ENV:production -c rollup.config.js",
2525
"dev": "rollup -c rollup.config.js --watch",
2626
"lint": "eslint --ext .js,.ts,.tsx,.vue .",
27-
"lint:fix": "eslint --ext .js,.ts,.tsx,.vue --fix ."
27+
"lint:fix": "eslint --ext .js,.ts,.tsx,.vue --fix .",
28+
"types": "yarn tsc"
2829
},
2930
"main": "./dist/instant-meilisearch.umd.js",
3031
"module": "./dist/instant-meilisearch.esm.js",

tsconfig.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
33
"module": "esnext",
4+
"noEmit": true,
45
"allowJs": false,
56
"removeComments": false,
67
"declaration": true,
@@ -23,13 +24,5 @@
2324
"noUnusedParameters": true,
2425
"isolatedModules": true
2526
},
26-
"include": [
27-
"src"
28-
], // files to include during compilation
29-
"exclude": [
30-
"tests",
31-
"*.js",
32-
"scripts",
33-
"**/__tests__/*.ts"
34-
],
27+
"exclude": ["playgrounds/angular"]
3528
}

tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"include": [
77
"./**/*"
88
],
9-
"exclude": []
9+
"exclude": ["playgrounds/angular"]
1010
}

0 commit comments

Comments
 (0)