Skip to content

Commit 406bdc1

Browse files
Merge pull request #9 from usu/feature/typescript
Convert to typescript
2 parents 9feaec0 + 54e59fb commit 406bdc1

39 files changed

+5490
-2246
lines changed

.babelrc

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"presets": [
3-
"@babel/preset-env"
3+
"@babel/preset-env",
4+
"@babel/preset-typescript"
45
],
56
"plugins": [
67
"@babel/plugin-transform-regenerator",
78
"@babel/plugin-transform-runtime"
89
],
910
"sourceType": "module"
10-
}
11+
}

.eslintrc

+25-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,33 @@
55
"jest": true
66
},
77
"extends": [
8+
"eslint:recommended",
89
"plugin:vue/recommended",
910
"@vue/standard"
1011
],
12+
"overrides": [
13+
{
14+
"files": [
15+
"**/*.ts",
16+
"**/*.tsx"
17+
],
18+
"extends": [
19+
"eslint:recommended",
20+
"plugin:@typescript-eslint/eslint-recommended",
21+
"plugin:@typescript-eslint/recommended",
22+
"plugin:vue/recommended",
23+
"@vue/standard"
24+
],
25+
"parser": "@typescript-eslint/parser",
26+
"plugins": [
27+
"@typescript-eslint"
28+
],
29+
"rules": {
30+
"no-redeclare": "off",
31+
"@typescript-eslint/no-redeclare": ["error"]
32+
}
33+
}
34+
],
1135
"rules": {
1236
"vue/component-tags-order": [
1337
"error",
@@ -56,4 +80,4 @@
5680
"parserOptions": {
5781
"parser": "babel-eslint"
5882
}
59-
}
83+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
unit-tests:
10+
name: "Unit tests"
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node: [ '12', '13', '14' ]
15+
steps:
16+
17+
- uses: actions/checkout@v2
18+
19+
- uses: actions/cache@v2
20+
with:
21+
path: ~/.npm
22+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.os }}-node-
25+
26+
- name: Setup node
27+
uses: actions/setup-node@v2
28+
with:
29+
node-version: ${{ matrix.node }}
30+
31+
- run: npm ci
32+
33+
- run: npm run coverage
34+
35+
- run: cat ./coverage/lcov.info | npx coveralls .
36+
env:
37+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
COVERALLS_SERVICE_NAME: github
39+
COVERALLS_SERVICE_NUMBER: ${{ github.run_id }}
40+
CI_PULL_REQUEST: ${{ github.event.number }}
41+
42+
lint:
43+
name: "Linter"
44+
runs-on: ubuntu-latest
45+
steps:
46+
47+
- uses: actions/checkout@v2
48+
49+
- uses: actions/cache@v2
50+
with:
51+
path: ~/.npm
52+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
53+
restore-keys: |
54+
${{ runner.os }}-node-
55+
56+
- name: Setup node
57+
uses: actions/setup-node@v2
58+
with:
59+
node-version: 14
60+
61+
- run: npm ci
62+
63+
- run: npm run lint

.travis.yml

-9
This file was deleted.

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
### Unreleased
22

3+
### 1.2.2
4+
- Fix embedded standalone collections that wouldn't work before
5+
36
### 1.2.1
47
- Avoid sending a reload request as long as an equal reload request is still ongoing
58
- Added source maps to the exported bundle

jest.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'jsdom',
4+
transform: {
5+
'^.+\\.ts?$': 'ts-jest',
6+
'^.+\\.js?$': 'babel-jest'
7+
}
8+
}

0 commit comments

Comments
 (0)