Skip to content

Commit

Permalink
ci: handle node_js v6
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Oct 29, 2019
1 parent ce07285 commit b5e06ee
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 64 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ npm-debug.log
.DS_Store
.esm-cache

# Bundle
target

# Typescript
*.tsbuildinfo
.tsbuildinfo
Expand Down
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
language: node_js
node_js:
- "6"
- "8"
- "10"
- "12"
- "13"
sudo: false

cache:
directories:
- node_modules

install:
- yarn install --ignore-engines

script:
- 'if [ "${TRAVIS_NODE_VERSION}" = "6" ] ; then yarn build:tsc ; else yarn build:microbundle ; fi ;'
- yarn test
59 changes: 0 additions & 59 deletions example/jsonrpc.js

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"license": "MIT",
"version": "2.1.0",
"source": "src/main/ts/index.ts",
"source": "jsonrpc.ts",
"main": "jsonrpc.js",
"module": "jsonrpc.mjs",
"unpkg": "jsonrpc.umd.js",
Expand Down Expand Up @@ -42,10 +42,10 @@
},
"scripts": {
"build:tsc": "tsc -p tsconfig.build.json",
"build:microbundle": "microbundle jsonrpc.ts --name jsonrpc --strict",
"build:microbundle": "microbundle build jsonrpc.ts --name jsonrpc --strict",
"build": "yarn build:microbundle",
"lint": "tslint -p tsconfig.json -t stylish jsonrpc.ts",
"test": "npm run lint && tman"
"test": "yarn lint && tman"
},
"files": [
"README.md",
Expand Down
7 changes: 5 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ const assert = require('assert')
const tman = require('tman')

test(require('../jsonrpc.js'))
test(require('../jsonrpc.umd'))
test(require('esm')(module)('../jsonrpc.mjs'))

if (!process.version.match(/^v(6\.\d+)/)) {
test(require('../jsonrpc.umd'))
test(require('esm')(module)('../jsonrpc.mjs'))
}

require('ts-node/register')
test(require('../jsonrpc.ts').default)
Expand Down

0 comments on commit b5e06ee

Please sign in to comment.