Skip to content

Commit 033a54f

Browse files
authored
Merge pull request #54 from ksxnodeapps/update-template
Update template
2 parents 67ad726 + 04f9d80 commit 033a54f

File tree

187 files changed

+5454
-7387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+5454
-7387
lines changed

.dependabot/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 1
2+
update_configs:
3+
- package_manager: github_actions
4+
directory: /
5+
update_schedule: weekly
6+
default_labels:
7+
- dependabot
8+
- github-actions

.dprintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://dprint.dev/schemas/v0.json",
3+
"projectType": "openSource",
4+
"extends": "https://github.com/sane-fmt/sane-fmt/raw/0.4.1/exports/sane-fmt.dprintrc.json",
5+
"includes": [
6+
"**/*.js",
7+
"**/*.ts",
8+
"**/*.jsx",
9+
"**/*.tsx"
10+
],
11+
"excludes": [
12+
".git",
13+
"node_modules",
14+
"/coverage",
15+
"/docs",
16+
"/dist"
17+
],
18+
"plugins": [
19+
"https://plugins.dprint.dev/typescript-0.29.0.wasm"
20+
]
21+
}

.eslintrc.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/workflows/nodejs.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,59 @@ on:
1313
- '!*.draft'
1414
- '!draft.*'
1515
pull_request: {}
16+
workflow_dispatch: {}
1617
jobs:
1718
test:
1819
runs-on: ubuntu-latest
1920
strategy:
2021
fail-fast: false
2122
matrix:
23+
pnpm:
24+
- 5.0.2
2225
vars:
23-
- node: 12.x
26+
- id: 0
27+
node: 12.x
2428
cmd: pnpm run test:ci
25-
- node: 13.x
29+
- id: 1
30+
node: 14.x
2631
cmd: pnpm run test:ci
27-
- node: 13.x
32+
- id: 2
33+
node: 14.x
2834
cmd: pnpx tsc --noEmit
29-
- node: 13.x
35+
- id: 3
36+
node: 14.x
3037
cmd: pnpm run glob testWithoutCoverage '**/package.json'
31-
- node: 13.x
38+
- id: 4
39+
node: 14.x
3240
cmd: pnpm run glob testWithoutCoverage '**/*.ts' '**/*.js'
33-
- node: 13.x
41+
- id: 5
42+
node: 14.x
3443
pnpm: --frozen-lockfile
44+
- id: 6
45+
node: 14.x
46+
cmd: pnpm run sane-fmt -- --log-format=github-actions --details=diff
3547
steps:
3648
- uses: actions/checkout@v1
3749
- name: Use Node.js ${{ matrix.vars.node }}
3850
uses: actions/setup-node@v1
3951
with:
4052
node-version: ${{ matrix.vars.node }}
53+
- name: Cache PNPM store
54+
uses: actions/[email protected]
55+
with:
56+
path: ~/.pnpm-store/v3
57+
key: pnpm5-${{ matrix.vars.id }}-${{ hashFiles('**/pnpm-lock.yaml') }}
58+
restore-keys: |
59+
pnpm5-${{ matrix.vars.id }}-${{ hashFiles('**/pnpm-lock.yaml') }}
60+
pnpm5-${{ matrix.vars.id }}-
61+
pnpm5-
4162
- name: Install pnpm
42-
run: curl -L https://unpkg.com/@pnpm/self-installer | node
43-
- name: Install dependencies
44-
run: pnpm recursive install ${{ matrix.vars.pnpm }}
63+
uses: pnpm/[email protected]
64+
with:
65+
version: ${{ matrix.pnpm }}
66+
run_install: |
67+
recursive: true
68+
args: [ ${{ matrix.vars.pnpm }} ]
4569
- name: Test
4670
env:
4771
SHOW_SPAWN_CMD: 'true'

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ hoist = false
22
shamefully-hoist = false
33
link-workspace-packages = true
44
shared-workspace-lockfile = false
5+
recursive-install = true

.tern-project.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ language: node_js
99

1010
node_js:
1111
- '12.11.0'
12-
- '13'
12+
- '14'
1313

1414
cache:
1515
directories:
16-
- $HOME/.pnpm-store
16+
- $HOME/.pnpm-store/v3
1717
- $HOME/.node-gyp
1818
- $HOME/.node_libraries
1919

2020
before_cache:
2121
- pnpm store prune
2222

2323
before_install:
24-
- curl -L https://unpkg.com/@pnpm/self-installer | node
24+
- bash ci/install-pnpm.sh
2525
- pnpm --version
2626
- bash ci/before-install.sh
2727

@@ -38,3 +38,4 @@ after_script:
3838

3939
env:
4040
- SHOW_SPAWN_CMD=true
41+
PNPM_VERSION=5.0.2

ci/after-script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ echo 'Reporting coverage information...'
44
stcode=0
55

66
echo ' → To Coveralls <https://coveralls.io/>'
7-
cat ./coverage/lcov.info | coveralls
7+
coveralls < ./coverage/lcov.info
88
((stcode|=$?))
99

1010
echo ' → To Codecov <https://codecov.io/>'
1111
codecov
1212
((stcode|=$?))
1313

14-
exit $stcode
14+
exit "$stcode"

ci/install-pnpm.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#! /usr/bin/env bash
2+
3+
if [ -z "$PNPM_VERSION" ]; then
4+
# shellcheck disable=SC2016
5+
echo '[ERROR] $PNPM_VERSION is undefined' > /dev/stderr
6+
exit 1
7+
fi
8+
9+
ref=301414cec74a2b6b63c95b42f2ad1790ccb980ed
10+
exec curl -fsSL https://raw.githubusercontent.com/pnpm/self-installer/$ref/install.js | node

package.json

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@
1111
"url": "https://github.com/ksxnodeapps/make-mjs/issues"
1212
},
1313
"devDependencies": {
14-
"standard": "^14.3.1",
15-
"tslint": "^5.20.1",
16-
"tslint-config-standard": "^9.0.0",
17-
"typescript": "^3.7.4",
18-
"toolcheck": "^0.1.3",
19-
"tslib": "^1.10.0",
20-
"@types/jest": "^24.0.25",
21-
"@types/node": "^13.1.6",
14+
"tslint": "^6.1.3",
15+
"typescript": "^4.0.2",
16+
"toolcheck": "^0.1.4",
17+
"tslib": "^2.0.1",
18+
"@types/jest": "^26.0.10",
19+
"@types/node": "^14.6.0",
2220
"@tools/scripts": "file:./tools/scripts"
2321
},
2422
"scripts": {
@@ -31,8 +29,8 @@
3129
"execute": "execute",
3230
"glob": "execute glob",
3331
"workspace": "execute workspace",
34-
"standardjs": "execute runStandardJS",
35-
"standardjs:fix": "execute runStandardJS --fix",
32+
"sane-fmt": "execute runSaneFmt",
33+
"sane-fmt:fix": "execute runSaneFmtFix",
3634
"tslint": "execute runTSLint",
3735
"tslint:fix": "execute runTSLint --fix",
3836
"test": "execute test",
@@ -47,12 +45,6 @@
4745
"project-publish:dry": "execute publish --dry",
4846
"publish-tag-push": "execute publishTagPush"
4947
},
50-
"standard": {
51-
"env": {
52-
"jest": true,
53-
"node": true
54-
}
55-
},
5648
"engines": {
5749
"node": ">= 12.11.0",
5850
"pnpm": ">= 3.8.0"

0 commit comments

Comments
 (0)