Skip to content

Commit 11f8fa2

Browse files
committed
refactor: update codebase
1 parent f83397f commit 11f8fa2

8 files changed

Lines changed: 20211 additions & 281 deletions

File tree

.github/workflows/check-dist.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,53 @@ name: Check dist/
44
on:
55
push:
66
branches:
7-
- master
7+
- main
88
paths-ignore:
99
- '**.md'
1010
pull_request:
1111
paths-ignore:
1212
- '**.md'
13+
workflow_dispatch:
1314

1415
jobs:
1516
check-dist:
17+
name: Check dist/
1618
runs-on: ubuntu-latest
1719

20+
permissions:
21+
contents: read
22+
statuses: write
23+
1824
steps:
19-
- uses: actions/checkout@v3
25+
- name: Checkout
26+
id: checkout
27+
uses: actions/checkout@v4
2028

21-
- name: Set Node.js 16.x
22-
uses: actions/setup-node@v3.6.0
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v3
2331
with:
24-
node-version: 16.x
32+
node-version: 18
33+
cache: npm
2534

26-
- name: Install dependencies
35+
- name: Install Dependencies
36+
id: install
2737
run: npm ci
2838

29-
- name: Rebuild the dist/ directory
30-
run: |
31-
npm run build
32-
npm run package
33-
- name: Compare the expected and actual dist/ directories
39+
- name: Build dist/ Directory
40+
id: build
41+
run: npm run bundle
42+
43+
- name: Compare Expected and Actual Directories
44+
id: diff
3445
run: |
35-
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
36-
echo "Detected uncommitted changes after build. See status below:"
37-
git diff
46+
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
47+
echo "Detected uncommitted changes after build. See status below:"
48+
git diff --ignore-space-at-eol --text dist/
3849
exit 1
3950
fi
40-
id: diff
4151
42-
# If index.js was different than expected, upload the expected version as an artifact
52+
# If index.js was different than expected, upload the expected version as
53+
# a workflow artifact.
4354
- uses: actions/upload-artifact@v3
4455
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
4556
with:

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ bower_components
4040

4141
# Compiled binary addons (https://nodejs.org/api/addons.html)
4242
build/Release
43-
dist/
4443

4544
# Dependency directories
4645
jspm_packages/
@@ -97,4 +96,8 @@ Thumbs.db
9796

9897
# Ignore built ts files
9998
__tests__/runner/*
100-
lib/**/*
99+
100+
# IDE files
101+
.idea
102+
.vscode
103+
*.code-workspace

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ inputs:
1919
restart:
2020
required: false
2121
description: 'restart aplication after upload'
22+
2223
runs:
23-
using: 'node16'
24+
using: 'node20'
2425
main: 'dist/index.js'

0 commit comments

Comments
 (0)