Skip to content

Commit 079849c

Browse files
authored
chore: upgrade dependencies, switch to ESM (#181)
1 parent 9a14f20 commit 079849c

Some content is hidden

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

58 files changed

+2753
-4853
lines changed

.eslintignore

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

.eslintrc.js

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

.github/workflows/test-and-release.yml

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,22 @@ on:
1515

1616
jobs:
1717
lint:
18-
if: contains(github.event.head_commit.message, '[skip ci]') == false
19-
2018
runs-on: ubuntu-latest
2119

2220
strategy:
2321
matrix:
24-
node-version: [20.x]
22+
node-version: [22]
2523

2624
steps:
2725
- name: Checkout code
28-
uses: actions/checkout@v2
26+
uses: actions/checkout@v5
27+
28+
- name: Enable Corepack
29+
shell: bash
30+
run: corepack enable
2931

3032
- name: Use Node.js ${{ matrix.node-version }}
31-
uses: actions/setup-node@v2
33+
uses: actions/setup-node@v5
3234
with:
3335
node-version: ${{ matrix.node-version }}
3436
cache: 'yarn'
@@ -45,20 +47,22 @@ jobs:
4547

4648
# Runs unit tests on all supported node versions and OSes
4749
unit-tests:
48-
if: contains(github.event.head_commit.message, '[skip ci]') == false
49-
5050
runs-on: ${{ matrix.os }}
5151
strategy:
5252
matrix:
53-
node-version: [18.x, 20.x]
53+
node-version: [18, 20, 22, 24]
5454
os: [ubuntu-latest, windows-latest, macos-latest]
5555

5656
steps:
5757
- name: Checkout code
58-
uses: actions/checkout@v2
58+
uses: actions/checkout@v5
59+
60+
- name: Enable Corepack
61+
shell: bash
62+
run: corepack enable
5963

6064
- name: Use Node.js ${{ matrix.node-version }}
61-
uses: actions/setup-node@v2
65+
uses: actions/setup-node@v5
6266
with:
6367
node-version: ${{ matrix.node-version }}
6468
cache: 'yarn'
@@ -78,22 +82,23 @@ jobs:
7882
needs: [lint, unit-tests]
7983

8084
# Trigger this step only when a commit on any branch is tagged with a version number
81-
if: |
82-
contains(github.event.head_commit.message, '[skip ci]') == false &&
83-
github.event_name == 'push' &&
84-
startsWith(github.ref, 'refs/tags/v')
85+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
8586

8687
runs-on: ubuntu-latest
8788
strategy:
8889
matrix:
89-
node-version: [20.x]
90+
node-version: [22]
9091

9192
steps:
9293
- name: Checkout code
93-
uses: actions/checkout@v2
94+
uses: actions/checkout@v5
95+
96+
- name: Enable Corepack
97+
shell: bash
98+
run: corepack enable
9499

95100
- name: Use Node.js ${{ matrix.node-version }}
96-
uses: actions/setup-node@v2
101+
uses: actions/setup-node@v5
97102
with:
98103
node-version: ${{ matrix.node-version }}
99104
cache: 'yarn'
@@ -104,12 +109,15 @@ jobs:
104109
run: |
105110
VERSION="${{ github.ref }}"
106111
VERSION=${VERSION##*/v}
107-
echo "::set-output name=VERSION::$VERSION"
112+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
113+
EOF=$(od -An -N6 -x /dev/urandom | tr -d ' ')
108114
BODY=$(git show -s --format=%b)
109-
BODY="${BODY//'%'/'%25'}"
110-
BODY="${BODY//$'\n'/'%0A'}"
111-
BODY="${BODY//$'\r'/'%0D'}"
112-
echo "::set-output name=BODY::$BODY"
115+
echo "BODY<<$EOF" >> $GITHUB_OUTPUT
116+
echo "$BODY" >> $GITHUB_OUTPUT
117+
echo "$EOF" >> $GITHUB_OUTPUT
118+
if [[ $VERSION == *"-"* ]] ; then
119+
echo "TAG=--tag next" >> $GITHUB_OUTPUT
120+
fi
113121
114122
- name: Install Dependencies
115123
run: yarn install --immutable
@@ -123,15 +131,16 @@ jobs:
123131
run: |
124132
yarn config set npmAuthToken "${{ secrets.NPM_TOKEN }}"
125133
yarn npm whoami
126-
yarn workspaces foreach -vti --no-private npm publish --tolerate-republish
134+
yarn workspaces foreach --all -vti --no-private npm publish --tolerate-republish $TAG
135+
127136
128137
- name: Create Github Release
129-
uses: actions/create-release@v1
138+
uses: softprops/action-gh-release@v2
130139
env:
131140
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132141
with:
133142
tag_name: ${{ github.ref }}
134-
release_name: Release v${{ steps.extract_release.outputs.VERSION }}
143+
name: Release v${{ steps.extract_release.outputs.VERSION }}
135144
draft: false
136145
# Prerelease versions create prereleases on Github
137146
prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }}

.prettierrc.js renamed to .prettierrc.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
semi: true,
33
trailingComma: "all",
44
singleQuote: false,

.vscode/settings.json

Lines changed: 103 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,107 @@
77
"source.organizeImports": "explicit"
88
}
99
},
10-
"jest.jestCommandLine": "yarn test",
11-
"jest.autoRun": {
12-
"watch": false,
13-
"onStartup": [
14-
"all-tests"
15-
],
16-
"onSave": "test-src-file",
10+
"chat.tools.terminal.autoApprove": {
11+
"yarn build": true,
12+
"yarn lint": true,
13+
"yarn test:ts": true,
14+
"yarn test:ci": true,
15+
"cd": true,
16+
"echo": true,
17+
"ls": true,
18+
"pwd": true,
19+
"cat": true,
20+
"head": true,
21+
"tail": true,
22+
"findstr": true,
23+
"wc": true,
24+
"tr": true,
25+
"cut": true,
26+
"cmp": true,
27+
"which": true,
28+
"basename": true,
29+
"dirname": true,
30+
"realpath": true,
31+
"readlink": true,
32+
"stat": true,
33+
"file": true,
34+
"du": true,
35+
"df": true,
36+
"sleep": true,
37+
"git status": true,
38+
"git log": true,
39+
"git show": true,
40+
"git diff": true,
41+
"Get-ChildItem": true,
42+
"Get-Content": true,
43+
"Get-Date": true,
44+
"Get-Random": true,
45+
"Get-Location": true,
46+
"Write-Host": true,
47+
"Write-Output": true,
48+
"Split-Path": true,
49+
"Join-Path": true,
50+
"Start-Sleep": true,
51+
"Where-Object": true,
52+
"/^Select-[a-z0-9]/i": true,
53+
"/^Measure-[a-z0-9]/i": true,
54+
"/^Compare-[a-z0-9]/i": true,
55+
"/^Format-[a-z0-9]/i": true,
56+
"/^Sort-[a-z0-9]/i": true,
57+
"column": true,
58+
"/^column\\b.*-c\\s+[0-9]{4,}/": false,
59+
"date": true,
60+
"/^date\\b.*(-s|--set)\\b/": false,
61+
"find": true,
62+
"/^find\\b.*-(delete|exec|execdir|fprint|fprintf|fls|ok|okdir)\\b/": false,
63+
"grep": true,
64+
"/^grep\\b.*-(f|P)\\b/": false,
65+
"sort": true,
66+
"/^sort\\b.*-(o|S)\\b/": false,
67+
"tree": true,
68+
"/^tree\\b.*-o\\b/": false,
69+
"/\\(.+\\)/": {
70+
"approve": false,
71+
"matchCommandLine": true
72+
},
73+
"/\\{.+\\}/": {
74+
"approve": false,
75+
"matchCommandLine": true
76+
},
77+
"/`.+`/": {
78+
"approve": false,
79+
"matchCommandLine": true
80+
},
81+
"rm": false,
82+
"rmdir": false,
83+
"del": false,
84+
"Remove-Item": false,
85+
"ri": false,
86+
"rd": false,
87+
"erase": false,
88+
"dd": false,
89+
"kill": false,
90+
"ps": false,
91+
"top": false,
92+
"Stop-Process": false,
93+
"spps": false,
94+
"taskkill": false,
95+
"taskkill.exe": false,
96+
"curl": false,
97+
"wget": false,
98+
"Invoke-RestMethod": false,
99+
"Invoke-WebRequest": false,
100+
"irm": false,
101+
"iwr": false,
102+
"chmod": false,
103+
"chown": false,
104+
"Set-ItemProperty": false,
105+
"sp": false,
106+
"Set-Acl": false,
107+
"jq": false,
108+
"xargs": false,
109+
"eval": false,
110+
"Invoke-Expression": false,
111+
"iex": false
17112
}
18-
}
113+
}

babel.config.js

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module.exports = {
1+
export default {
22
extends: ["@commitlint/config-conventional"],
33
};

0 commit comments

Comments
 (0)