Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Commit 1059032

Browse files
committed
feat: support node 12
1 parent 4ed22d5 commit 1059032

File tree

3 files changed

+213
-58
lines changed

3 files changed

+213
-58
lines changed

.travis.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,28 @@ branches:
44
language: node_js
55
node_js:
66
- "10"
7+
- "12"
78
before_install:
89
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
910
- export PATH="$(yarn global bin):$PATH"
1011
cache: yarn
1112
install:
12-
- yarn
13+
- yarn --frozen-lockfile
1314
before_script:
1415
- export FAKE_HOSTNAME=travis-box
1516
script: yarn test-coverage
16-
after_success: yarn semantic-release
17+
18+
stages:
19+
- name: test
20+
- name: release
21+
if: branch = master AND type = push
22+
jobs:
23+
include:
24+
- stage: release
25+
node_js: lts/*
26+
script: skip
27+
deploy:
28+
provider: script
29+
skip_cleanup: true
30+
script:
31+
- yarn semantic-release

package.json

Lines changed: 62 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"search"
1515
],
1616
"engines": {
17-
"node": "^10.0.0",
17+
"node": "^10.0.0 || ^ 12.0.0",
1818
"yarn": "^1.0.0"
1919
},
2020
"main": "build/src/index.js",
@@ -26,48 +26,78 @@
2626
"NOTICE",
2727
"README.md"
2828
],
29-
"nyc": {
30-
"extension": [
31-
".ts",
32-
".tsx"
33-
],
34-
"exclude": [
35-
"coverage/**",
36-
"prettier.config.js",
37-
"**/*.d.ts",
38-
"test/**/*.*",
39-
"build/**/**/*.js"
40-
],
41-
"all": true
42-
},
4329
"author": "Holvonix LLC",
4430
"license": "SEE LICENSE IN LICENSE",
4531
"private": false,
4632
"scripts": {
47-
"t": "yarn fix && yarn test --grep='#slow' --invert && yarn coverage",
48-
"cleantests": "rm -rf *.lcov .nyc_output coverage",
49-
"clean": "gts clean && yarn cleantests",
50-
"start": "node index.js",
51-
"debug": "node --inspect index.js",
52-
"cleanstart": "yarn clean; yarn start",
53-
"test": "nyc --reporter=json --reporter=lcov --reporter=text ts-mocha -p ./tsconfig.json 'test/**/*.ts'",
54-
"test-coverage": "yarn clean && yarn test && yarn report-coverage",
55-
"coverage": "nyc report --reporter=lcov --reporter=json",
56-
"report-coverage": "yarn coverage && codecov -F unit -f coverage/*.json",
33+
"t": "yarn test --inspect --grep='#e2e|#int' --invert",
34+
"watch:build": "yarn run --silent build:core --watch",
35+
"watch:test": "yarn run --silent test-impl --watch --grep='#e2e|#int' --invert -R min",
36+
"watch:test-cov": "chokidar --throttle 750 --debounce 500 --silent --initial \"build/**/*.js\" -c \"yarn run --silent watch:test-impl\"",
37+
"watch:test-impl": "yarn run --silent test-impl-lcov --grep='#e2e|#int' --invert -R min",
38+
"w": "yarn run clean && yarn run build && concurrently --raw -n tsc,mocha \"yarn run --silent watch:build\" \"yarn run --silent watch:test\"",
39+
"wc": "yarn run clean && yarn run build && concurrently --raw -n tsc,mocha \"yarn run --silent watch:build\" \"yarn run --silent watch:test-cov\"",
40+
"postinstall": "yarn test:postinstall",
41+
"build:core": "tsc -p .",
42+
"build": "yarn build:core",
43+
"clean.builds": "gts clean",
44+
"clean": "yarn clean.builds && yarn clean.tests",
45+
"clean.tests": "rm -rf *.lcov .nyc_output *.log coverage",
46+
"test:postinstall": "yarn clean && yarn build && yarn test-impl --grep='#e2e' --invert",
47+
"test": "yarn clean && yarn build && yarn test-impl",
48+
"test-impl": "nyc --reporter=text --reporter=lcov mocha",
49+
"test-impl-lcov": "nyc --reporter=lcov mocha",
50+
"test-coverage": "yarn test && yarn report-coverage",
51+
"report-coverage": "nyc report --reporter=json && codecov -F unit -f coverage/*.json",
5752
"lint": "yarn fix && yarn run check",
5853
"check": "gts check",
59-
"compile": "tsc -p .",
60-
"watch": "tsc -w -p .",
6154
"fix": "gts fix",
62-
"prepare": "yarn clean && yarn run check && yarn run compile",
63-
"pretest": "yarn run compile",
64-
"posttest": "yarn run check",
6555
"preversion": "yarn test",
56+
"docs": "yarn clean && yarn build && rm -rf docs && mkdir -p docs && ( mocha --grep='#private' --invert -R markdown >docs/index.md )",
57+
"test-unit": "yarn test --grep='#e2e|#int' --invert",
58+
"test-e2e": "yarn test --grep='#e2e'",
59+
"test-int": "yarn test --grep='#int'",
60+
"up": "yarn upgrade-interactive --latest",
61+
"yarn": "rm -rf yarn.lock node_modules/ && yarn",
6662
"semantic-release": "semantic-release"
6763
},
64+
"sideEffects": false,
65+
"husky": {
66+
"hooks": {
67+
"pre-commit": "yarn clean && yarn run check && yarn test:postinstall"
68+
}
69+
},
6870
"release": {
6971
"extends": "@holvonix-open/release-config-js"
7072
},
73+
"nyc": {
74+
"skip-full": true,
75+
"cache": false,
76+
"extension": [
77+
".ts",
78+
".tsx"
79+
],
80+
"require": [
81+
"source-map-support/register",
82+
"ts-node/register"
83+
],
84+
"include": [
85+
"src/**/*.ts",
86+
"src/**/*.tsx",
87+
"build/src/**/*.js",
88+
"build/src/**/*.jsx"
89+
],
90+
"exclude": [],
91+
"all": true
92+
},
93+
"mocha": {
94+
"require": [
95+
"source-map-support/register",
96+
"ts-node/register"
97+
],
98+
"forbid-pending": true,
99+
"spec": "./build/test/**/test-*.js"
100+
},
71101
"dependencies": {
72102
"terraformer-wkt-parser": "^1.2.0"
73103
},
@@ -77,7 +107,9 @@
77107
"@types/mocha": "^5.2.5",
78108
"@types/nock": "^10.0.3",
79109
"@types/node": "^12.6.1",
110+
"chokidar-cli": "^2.0.0",
80111
"codecov": "^3.4.0",
112+
"concurrently": "^4.1.1",
81113
"gts": "^1.0.0",
82114
"mocha": "^6.1.4",
83115
"nock": "^10.0.6",

0 commit comments

Comments
 (0)