Skip to content

Commit d1ecbcf

Browse files
committed
fix: Update dependencies and actions
1 parent 78019e9 commit d1ecbcf

File tree

13 files changed

+2883
-1945
lines changed

13 files changed

+2883
-1945
lines changed

Diff for: .github/actions/install-build-test/action.yaml

-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
name: install_build_test
22
description: Install Build and Test
3-
inputs:
4-
node-version:
5-
required: true
6-
description: The version of Node to use.
73
runs:
84
using: 'composite'
95
steps:
10-
- name: Setup
11-
# Directory name only
12-
uses: ./.github/actions/setup
13-
with:
14-
node-version: ${{ inputs.node-version }}
156
- shell: bash
167
run: |
178
pnpm i

Diff for: .github/actions/setup/action.yaml

+3-8
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,14 @@ inputs:
44
node-version:
55
required: false
66
description: The version of Node to use.
7-
default: '18.x'
7+
default: '20.x'
88
runs:
99
using: 'composite'
1010
steps:
11-
- name: Setup pnpm
12-
uses: pnpm/[email protected]
13-
14-
- name: Use Node.js ${{ inputs.node-version }}
15-
uses: actions/setup-node@v3
11+
- name: Setup
12+
uses: streetsidesoftware/actions/public/setup-node-pnpm@v1
1613
with:
17-
registry-url: 'https://registry.npmjs.org'
1814
node-version: ${{ inputs.node-version }}
19-
cache: 'pnpm'
2015

2116
- name: Install
2217
run: pnpm i

Diff for: .github/workflows/codeql.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
strategy:
3434
fail-fast: false
3535
matrix:
36-
language: ['javascript']
36+
language: ['javascript', 'typescript']
3737
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3838
# Use only 'java' to analyze code written in Java, Kotlin or both
3939
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both

Diff for: .github/workflows/lint.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18+
1819
- name: Setup
1920
uses: ./.github/actions/setup
20-
with:
21-
node-version: ${{ matrix.node-version }}
21+
2222
- name: Lint
2323
run: pnpm lint
24+
2425
- name: Spell Check
2526
run: pnpm lint:spell

Diff for: .github/workflows/release-please.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ jobs:
1717
release_created: ${{ steps.release.outputs.release_created }}
1818
steps:
1919
- uses: actions/checkout@v3
20-
- uses: google-github-actions/release-please-action@v3
20+
21+
- uses: google-github-actions/release-please-action@v4
2122
id: release
2223
with:
23-
command: manifest
24+
config-file: release-please-config.json
25+
manifest-file: .release-please-manifest.json
2426

2527
# cspell:ignore noreply
2628

Diff for: .github/workflows/test.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,21 @@ jobs:
1717
strategy:
1818
matrix:
1919
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
20-
node-version: [14.x, 16.x, 18.x, 19.x]
20+
node-version: [18.x, 20.x, 21.x]
2121
os:
2222
- ubuntu-latest
2323

2424
steps:
2525
- uses: actions/checkout@v3
26+
2627
- name: Setup
27-
uses: ./.github/actions/install-build-test
28+
uses: streetsidesoftware/actions/public/setup-node-pnpm@v1
2829
with:
2930
node-version: ${{ matrix.node-version }}
3031

32+
- name: Install - Build - Test
33+
uses: ./.github/actions/install-build-test
34+
3135
test-os:
3236
runs-on: ${{ matrix.os }}
3337

@@ -41,11 +45,15 @@ jobs:
4145

4246
steps:
4347
- uses: actions/checkout@v3
48+
4449
- name: Setup
45-
uses: ./.github/actions/install-build-test
50+
uses: streetsidesoftware/actions/public/setup-node-pnpm@v1
4651
with:
4752
node-version: ${{ matrix.node-version }}
4853

54+
- name: Install - Build - Test
55+
uses: ./.github/actions/install-build-test
56+
4957
coverage:
5058
permissions:
5159
checks: write # for coverallsapp/github-action to create new checks

Diff for: eslint.config.js

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import nodePlugin from 'eslint-plugin-n';
5+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
6+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
7+
import tsEslint from 'typescript-eslint';
8+
9+
// mimic CommonJS variables -- not needed if using CommonJS
10+
// import { FlatCompat } from "@eslint/eslintrc";
11+
// const __dirname = fileURLToPath(new URL('.', import.meta.url));
12+
// const compat = new FlatCompat({baseDirectory: __dirname, recommendedConfig: eslint.configs.recommended});
13+
14+
export default tsEslint.config(
15+
eslint.configs.recommended,
16+
nodePlugin.configs['flat/recommended'],
17+
eslintPluginPrettierRecommended,
18+
...tsEslint.configs.recommended,
19+
{
20+
ignores: ['dist', 'node_modules', 'coverage'],
21+
},
22+
{
23+
plugins: {
24+
'simple-import-sort': simpleImportSort,
25+
},
26+
rules: {
27+
'simple-import-sort/imports': 'error',
28+
'simple-import-sort/exports': 'error',
29+
},
30+
},
31+
{
32+
files: ['**/*.{ts,cts,mts,tsx}'],
33+
rules: {
34+
// Note: you must disable the base rule as it can report incorrect errors
35+
'no-unused-vars': 'off',
36+
'@typescript-eslint/no-unused-vars': [
37+
'error',
38+
{
39+
args: 'all',
40+
argsIgnorePattern: '^_',
41+
caughtErrors: 'all',
42+
caughtErrorsIgnorePattern: '^_',
43+
destructuredArrayIgnorePattern: '^_',
44+
varsIgnorePattern: '^_',
45+
ignoreRestSiblings: true,
46+
},
47+
],
48+
},
49+
},
50+
);

Diff for: package.json

+32-29
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"version": "1.0.1",
44
"description": "Example command line tool.",
55
"type": "module",
6-
"packageManager": "[email protected]",
6+
"private": true,
7+
"packageManager": "[email protected]",
8+
"engines": {
9+
"node": ">=18"
10+
},
711
"bin": {
812
"list-files": "./bin.mjs"
913
},
@@ -15,12 +19,12 @@
1519
"build:readme:inject": "inject-markdown README.md",
1620
"watch": "tsc -p . --watch",
1721
"coverage": "vitest run --coverage",
18-
"lint": "pnpm eslint && pnpm prettier",
22+
"lint": "pnpm eslint:check && pnpm prettier:check",
1923
"lint:fix": "pnpm eslint:fix && pnpm prettier:fix",
2024
"lint:spell": "cspell \"**\"",
21-
"prettier": "prettier -c .",
25+
"prettier:check": "prettier -c .",
2226
"prettier:fix": "prettier -w .",
23-
"eslint": "eslint .",
27+
"eslint:check": "eslint .",
2428
"eslint:fix": "eslint . --fix",
2529
"app": "node ./bin.mjs",
2630
"test": "vitest run",
@@ -41,38 +45,37 @@
4145
"homepage": "https://github.com/streetsidesoftware/template-typescript-cli-app#readme",
4246
"license": "MIT",
4347
"devDependencies": {
44-
"@tsconfig/node16": "^1.0.3",
45-
"@types/node": "^18.11.18",
46-
"@typescript-eslint/eslint-plugin": "^5.47.1",
47-
"@typescript-eslint/parser": "^5.47.1",
48-
"@vitest/coverage-c8": "^0.26.2",
49-
"cspell": "^6.18.1",
50-
"eslint": "^8.30.0",
51-
"eslint-config-prettier": "^8.5.0",
52-
"eslint-import-resolver-typescript": "^3.5.2",
53-
"eslint-plugin-import": "^2.26.0",
54-
"eslint-plugin-node": "^11.1.0",
55-
"eslint-plugin-prettier": "^4.2.1",
56-
"eslint-plugin-promise": "^6.1.1",
57-
"inject-markdown": "^1.3.0",
58-
"prettier": "^2.8.1",
59-
"typescript": "^4.9.4",
60-
"vite": "^4.0.3",
61-
"vitest": "^0.26.2"
48+
"@eslint/eslintrc": "^3.0.2",
49+
"@eslint/js": "^9.0.0",
50+
"@tsconfig/node20": "^20.1.4",
51+
"@types/node": "^20.12.7",
52+
"@vitest/coverage-v8": "^1.5.0",
53+
"cspell": "^8.7.0",
54+
"eslint": "^9.0.0",
55+
"eslint-config-prettier": "^9.1.0",
56+
"eslint-import-resolver-typescript": "^3.6.1",
57+
"eslint-plugin-import": "^2.29.1",
58+
"eslint-plugin-n": "^17.2.1",
59+
"eslint-plugin-prettier": "^5.1.3",
60+
"eslint-plugin-simple-import-sort": "^12.1.0",
61+
"globals": "^15.0.0",
62+
"inject-markdown": "^3.0.0",
63+
"prettier": "^3.2.5",
64+
"typescript": "^5.4.5",
65+
"typescript-eslint": "^7.7.0",
66+
"vite": "^5.2.9",
67+
"vitest": "^1.5.0"
6268
},
6369
"dependencies": {
64-
"chalk": "^5.2.0",
65-
"commander": "^9.4.1",
66-
"globby": "^13.1.3"
70+
"chalk": "^5.3.0",
71+
"commander": "^12.0.0",
72+
"globby": "^14.0.1"
6773
},
6874
"files": [
6975
"bin.mjs",
7076
"dist/**/*.mjs",
7177
"dist/**/*.js",
7278
"!**/*.test.*",
7379
"!**/*.map"
74-
],
75-
"engines": {
76-
"node": ">=14"
77-
}
80+
]
7881
}

0 commit comments

Comments
 (0)