Skip to content

Commit ec9d356

Browse files
andriikamaldinov1lachesseNepipenkoIgor
authored
feat(ref: no-ref): release
* fix(no-ref): libraries * fix(no-ref): workflow * fix(no-ref): workflow * feat(ref: #112): bun+nodejs, lint-staged (#113) feat(ref: #112): bun+nodejs, lint-staged (#113) * fix(no-ref): pre-commit fix (remove bun lint) * fix(ref:#114): new deps * feat(ref: #118): enhancement * feat(ref: #118): update changelog * feat(ref: #118): remove comments * feat(ref: #118): add gap * feat(ref: #118): add gap * feat(ref: #132): update github actions --------- Co-authored-by: andrey.levchaev <[email protected]> Co-authored-by: Andrey <[email protected]> Co-authored-by: NepipenkoIgor <[email protected]>
1 parent 3336626 commit ec9d356

Some content is hidden

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

47 files changed

+542
-27701
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22

33
Please check if your PR fulfills the following requirements:
44

5-
- [ ] The commit message follows our guidelines: https://github.com/JsDaddy/ngx-loader-indicator/blob/develop/CONTRIBUTING.md#commit
6-
- [ ] Tests for the changes have been added (for bug fixes / features)
7-
- [ ] Docs have been added / updated (for bug fixes / features)
5+
- [ ] The commit message follows our guidelines: https://github.com/JsDaddy/ngx-loader-indicator/blob/develop/CONTRIBUTING.md#commit
6+
- [ ] Tests for the changes have been added (for bug fixes / features)
7+
- [ ] Docs have been added / updated (for bug fixes / features)
88

99
## PR Type
1010

1111
What kind of change does this PR introduce?
1212

1313
<!-- Please check the one that applies to this PR using "x". -->
1414

15-
- [ ] Bugfix
16-
- [ ] Feature
17-
- [ ] Code style update (formatting, local variables)
18-
- [ ] Refactoring (no functional changes, no api changes)
19-
- [ ] Build related changes
20-
- [ ] CI related changes
21-
- [ ] Documentation content changes
22-
- [ ] Other... Please describe:
15+
- [ ] Bugfix
16+
- [ ] Feature
17+
- [ ] Code style update (formatting, local variables)
18+
- [ ] Refactoring (no functional changes, no api changes)
19+
- [ ] Build related changes
20+
- [ ] CI related changes
21+
- [ ] Documentation content changes
22+
- [ ] Other... Please describe:
2323

2424
## What is the current behavior?
2525

@@ -31,8 +31,8 @@ Issue Number: N/A
3131

3232
## Does this PR introduce a breaking change?
3333

34-
- [ ] Yes
35-
- [ ] No
34+
- [ ] Yes
35+
- [ ] No
3636

3737
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
3838

.github/hooks/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
set -e
44

55
commit_msg=$(cat .git/COMMIT_EDITMSG)
6-
echo "$commit_msg" | npx commitlint
6+
echo "$commit_msg" | bun commitlint

.github/hooks/pre-commit

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
set -e
44

5-
npm run lint
5+
bun lint-staged
66

7-
npm run snyk:test
7+
# bun run snyk:test
88

9-
output=$(npm run type-coverage)
9+
output=$(bun run type-coverage)
1010
if echo "$output" | grep -q "lower than "; then
1111
echo "$output"
1212
exit 1 # Terminate the hook script with a non-zero exit code
1313
else
1414
echo "Type coverage is good! 🎉"
1515
fi
1616

17-
npm run test
17+
bun run test
1818

19-
npm run build
19+
bun run build
2020

21-
npm run build:lib
21+
bun run build:lib
2222

.github/workflows/gh-pages.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,20 @@ jobs:
1212
contents: write
1313
steps:
1414
- uses: actions/checkout@v4
15+
with:
16+
submodules: true
1517

1618
- uses: actions/setup-node@v4
1719
with:
1820
node-version: 20
1921

22+
- uses: oven-sh/setup-bun@v2
23+
with:
24+
bun-version: latest
25+
2026
- name: Install deps
2127
run: |
22-
npm ci --force
23-
git submodule update --init --recursive --remote
28+
bun i
2429
2530
- name: Semantic Release
2631
id: semantic-release
@@ -37,14 +42,13 @@ jobs:
3742
echo "RELEASE_VERSION: $RELEASE_VERSION"
3843
echo '********'
3944
bash .github/workflows/scripts/replace_template.sh $RELEASE_VERSION
40-
npm run build
45+
bun run build
4146
4247
- name: Deploy demo
43-
uses: peaceiris/actions-gh-pages@v3
48+
uses: peaceiris/actions-gh-pages@v4
4449
with:
4550
github_token: ${{ secrets.GITHUB_TOKEN }}
4651
publish_dir: ./dist/angular-loader/browser
47-
4852
outputs:
4953
version: ${{ steps.semantic-release.outputs.new-release-version }}
5054

@@ -55,7 +59,7 @@ jobs:
5559
steps:
5660
- name: Post to a Slack channel
5761
id: slack
58-
uses: slackapi/slack-github-action@v1.26.0
62+
uses: slackapi/slack-github-action@v1.27.0
5963
with:
6064
channel-id: 'deployments'
6165
payload: |

.github/workflows/publish.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish npm
1+
name: Publish bun
22

33
on:
44
push:
@@ -10,17 +10,21 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13+
with:
14+
submodules: true
15+
- uses: oven-sh/setup-bun@v2
16+
with:
17+
bun-version: latest
1318
- uses: actions/setup-node@v4
1419
with:
1520
node-version: 20
16-
registry-url: https://registry.npmjs.org/
21+
registry-url: 'https://registry.npmjs.org'
1722
- name: Build library
1823
run: |
19-
npm ci --force
20-
git submodule update --init --recursive --remote
21-
npm run build:lib
24+
bun i
25+
bun run build:lib
2226
- name: Publish library
23-
run: npm run publish:lib
27+
run: bun run publish:lib
2428
env:
2529
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
2630

@@ -63,7 +67,7 @@ jobs:
6367
"type": "section",
6468
"text": {
6569
"type": "mrkdwn",
66-
"text": "Website URL: ${{ secrets.WEBSITE_URL || 'TBA' }}"
70+
"text": "Website URL: ${{ secrets.NPM_PACKAGE_URL || 'TBA' }}"
6771
}
6872
}
6973
]
Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
name: build and quality
22

33
on:
4-
push:
5-
branches:
6-
- develop
7-
pull_request:
8-
branches:
9-
- develop
4+
push:
5+
branches:
6+
- develop
7+
pull_request:
8+
branches:
9+
- develop
1010

1111
env:
1212
snyk_token: ${{ secrets.SNYK_TOKEN }}
13+
REF: ${{ github.head_ref || github.ref_name }}
1314

1415
jobs:
15-
quality-check:
16-
runs-on: ubuntu-latest
17-
permissions:
18-
contents: write
19-
steps:
20-
- uses: actions/checkout@v4
21-
- uses: actions/setup-node@v4
22-
with:
23-
node-version: 20
24-
- name: Check quality
25-
run: |
26-
npm ci --force
27-
git submodule update --init --recursive --remote
28-
bash .github/workflows/scripts/quality.sh
16+
quality-check:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
submodules: true
24+
ref: ${{ env.REF }}
25+
- uses: oven-sh/setup-bun@v2
26+
with:
27+
bun-version: latest
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: 20
31+
- name: Check quality
32+
run: |
33+
bun i
34+
bash .github/workflows/scripts/quality.sh

.github/workflows/scripts/quality.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
set -e
44

5-
npm run lint
5+
bun run lint
66

7-
npm run snyk:auth -- $snyk_token
8-
npm run snyk:test
7+
# bun run snyk:auth -- $snyk_token
8+
# bun run snyk:test
99

10-
output=$(npm run type-coverage)
10+
output=$(bun run type-coverage)
1111
if echo "$output" | grep -q "lower than "; then
1212
echo "$output"
1313
exit 1 # Terminate the hook script with a non-zero exit code
1414
else
1515
echo "Type coverage is good! 🎉"
1616
fi
1717

18-
npm run test
18+
bun run test
1919

20-
npm run build
20+
bun run build
2121

22-
npm run build:lib
22+
bun run build:lib

.lintstagedrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"*.{ts,js,json}": [
3+
"eslint --report-unused-disable-directives --max-warnings 0 --fix",
4+
"prettier . --write"
5+
],
6+
"*.scss": "stylelint --fix"
7+
}

.releaserc.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
branches:
2-
- develop
2+
- develop
33

44
plugins:
5-
- '@semantic-release/commit-analyzer'
6-
- '@semantic-release/github'
7-
- 'semantic-release-export-data'
5+
- '@semantic-release/commit-analyzer'
6+
- '@semantic-release/github'
7+
- 'semantic-release-export-data'

.stylelintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/tmp
44
/out-tsc
55
/bazel-out
6+
/src/styles.scss
67

78
# Node
89
/node_modules

0 commit comments

Comments
 (0)