Skip to content

Commit e622b34

Browse files
author
TurtlePaw
committed
Add Github workflows & switch to yarn
1 parent 9424247 commit e622b34

File tree

4 files changed

+60
-9
lines changed

4 files changed

+60
-9
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
name: Build Source
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout repository
9+
uses: actions/checkout@v2
10+
11+
- name: Install node.js v16
12+
uses: actions/setup-node@v2
13+
with:
14+
node-version: 16
15+
cache: 'yarn'
16+
cache-dependency-path: yarn.lock
17+
18+
- name: Install dependencies
19+
run: yarn --immutable
20+
21+
- name: Tests
22+
run: yarn build

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Tests
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
name: Run Tests
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout repository
9+
uses: actions/checkout@v2
10+
11+
- name: Install node.js v16
12+
uses: actions/setup-node@v2
13+
with:
14+
node-version: 16
15+
cache: 'yarn'
16+
cache-dependency-path: yarn.lock
17+
18+
- name: Install dependencies
19+
run: yarn --immutable
20+
21+
- name: Tests
22+
run: yarn dev

package.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "open-trivia-db",
3-
"version": "1.0.2",
3+
"version": "1.2.0",
44
"description": "A wrapper for the Open Trivia Database API. Built with TypeScript, works with VanillaJS.",
55
"keywords": [
66
"opentriviadatabase",
@@ -18,11 +18,12 @@
1818
"types": "dist/index.d.ts",
1919
"scripts": {
2020
"build": "tsc",
21-
"prettier": "npm run build && prettier -w src/",
22-
"prepublish": "npm run prep",
23-
"exec": "npm run build && node .",
24-
"test": "npm run build && npx jest",
25-
"prep": "npm run build && npm run test && npm run prettier"
21+
"prettier": "yarn run build && prettier -w src/",
22+
"prepublish": "yarn run prep",
23+
"exec": "yarn run build && node .",
24+
"test": "yarn run build && npx jest",
25+
"prep": "yarn run build && yarn run test && yarn run prettier",
26+
"dev": "yarn build && yarn test"
2627
},
2728
"files": [
2829
"typings",
@@ -33,7 +34,7 @@
3334
"url": "git+https://github.com/Elitezen/open-trivia-db-wrapper.git"
3435
},
3536
"author": "Elitezen",
36-
"license": "ISC",
37+
"license": "MIT",
3738
"bugs": {
3839
"url": "https://github.com/Elitezen/open-trivia-db-wrapper/issues"
3940
},
@@ -43,9 +44,10 @@
4344
"jest": "^28.1.0",
4445
"nodemon": "^2.0.16",
4546
"prettier": "^2.6.2",
46-
"ts-jest": "^28.0.2"
47+
"ts-jest": "^28.0.2",
48+
"typescript": "^4.8.4"
4749
},
4850
"engines": {
4951
"node": ">=14.0.0"
5052
}
51-
}
53+
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,6 +2262,11 @@ type-fest@^0.21.3:
22622262
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
22632263
integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==
22642264

2265+
typescript@^4.8.4:
2266+
version "4.8.4"
2267+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
2268+
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==
2269+
22652270
undefsafe@^2.0.5:
22662271
version "2.0.5"
22672272
resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c"

0 commit comments

Comments
 (0)