Skip to content

Commit a4f429e

Browse files
Merge pull request #79 from shiftcode/#7-support-new-sc-lib-versions
use latest @shiftcode dependencies + node 24
2 parents eda9cb8 + b3a2312 commit a4f429e

75 files changed

Lines changed: 9926 additions & 20203 deletions

File tree

Some content is hidden

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

.commitlintrc.yml

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

.github/workflows/main.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,45 +21,39 @@ jobs:
2121
outputs:
2222
shouldExecute: ${{ steps.stepCheckExecution.outputs.shouldExecute }}
2323
steps:
24-
- name: Dump GitHub context
25-
run: |
26-
echo "::group::github context"
27-
echo "$GITHUB_CONTEXT"
28-
echo "::endgroup::"
29-
env:
30-
GITHUB_CONTEXT: ${{ toJson(github) }}
3124
- id: stepCheckExecution
3225
name: Check for execution
33-
uses: shiftcode/github-action-skip@v4.0.0
26+
uses: shiftcode/github-action-skip@9d4a90c80567f59dfaacf18fe703a324583c742e #v5.0.0
3427
with:
3528
skipOnCommitMsg: '[skip_build]'
3629
githubToken: ${{ secrets.GITHUB_TOKEN }}
3730
build:
3831
runs-on: ubuntu-latest
3932
needs: checkExecution
33+
permissions:
34+
contents: read
35+
packages: write
4036
# only execute if not skipped by commit message
4137
if: needs.checkExecution.outputs.shouldExecute == 'true'
4238
steps:
4339
# checkout branch
4440
- name: Checkout
45-
uses: actions/checkout@v4
41+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd #v5.0.1
4642
with:
4743
# 0 indicates all history, because publish requires tag information
4844
fetch-depth: 0
49-
# we need priviledged access to publish to protected branch
50-
token: ${{ secrets.GH_TOKEN_PUBLIC_REPO }}
45+
# do not persist credentials to avoid issues with protected branches (e.g. when pushing version-bump commit after merging PR)
46+
persist-credentials: false
5147
# setup node and dependency cache
5248
- name: Setup Node and NPM Cache
53-
uses: actions/setup-node@v4
49+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
5450
with:
5551
node-version-file: .nvmrc
5652
cache: 'npm'
5753
# NPM Authenticate
5854
- name: Auth for github registry
5955
run: |
60-
npm config set //npm.pkg.github.com/:_authToken=$REGISTRY_TOKEN
61-
env:
62-
REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
6357
# install dependencies
6458
- name: Install
6559
run: HUSKY=0 npm ci --include=optional
@@ -82,7 +76,10 @@ jobs:
8276
run: |
8377
git config user.email "actions@github.com"
8478
git config user.name "Github Actions"
79+
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/shiftcode/sc-ng-commons-public.git
8580
npx publish-lib
8681
env:
8782
GITHUB_CONTEXT: ${{ toJson(github) }}
88-
GH_TOKEN: ${{ secrets.GH_TOKEN_PUBLIC_REPO }} # necessary for publish-libs script
83+
# necessary to commit on protected branch after merging
84+
# and to run actions after version-bump commit (otherwise we can't create rules for merging as no workflows run after GITHUB_TOKEN commits)
85+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx lerna exec --concurrency 1 --stream lint-staged && npx lint-staged
1+
npx lint-staged

.lintstagedrc.yml

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

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/jod
1+
lts/krypton

.prettierrc.yml

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

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# sc-ng-commons-public
22

3+
> 🎯\
4+
> Target runtime: [Node >=24](https://node.green/#ES2023) and [modern Browsers](https://caniuse.com/?search=es2023) + Firefox ESR\
5+
> Target lib: es2022 + ES2023.Array
6+
37
Public Angular libraries used in various shiftcode projects.
48

59
> [![@shiftcode/ngx-core](https://img.shields.io/github/package-json/v/shiftcode/sc-ng-commons-public?filename=%2Flibs%2Fcore%2Fpackage.json&label=%40shiftcode%2Fngx-core)](libs/core)\
@@ -21,7 +25,7 @@ Shows the mapping between the angular version and our lib versions.
2125

2226
| Angular Version | Lib Version |
2327
| --------------- | ----------------------------- |
24-
| `^21` | `^13` |
28+
| `^21` | `^13 \|\| ^14 \|\| ^15` |
2529
| `^20` | `^11 \|\| ^12` |
2630
| `^19` | `^7 \|\| ^8 \|\| ^9 \|\| ^10` |
2731
| `^18` | `^6` |

angular.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@
1818
"configurations": {
1919
"production": {
2020
"tsConfig": "libs/core/tsconfig.lib.prod.json"
21-
}
21+
},
22+
"development": {}
2223
},
2324
"defaultConfiguration": "production"
2425
},
2526
"test": {
26-
"builder": "@angular-devkit/build-angular:jest",
27+
"builder": "@angular/build:unit-test",
2728
"options": {
2829
"tsConfig": "tsconfig.spec.json",
29-
"polyfills": ["zone.js", "zone.js/testing"]
30+
"runner": "vitest"
3031
}
3132
}
3233
}
@@ -46,15 +47,16 @@
4647
"configurations": {
4748
"production": {
4849
"tsConfig": "libs/components/tsconfig.lib.prod.json"
49-
}
50+
},
51+
"development": {}
5052
},
5153
"defaultConfiguration": "production"
5254
},
5355
"test": {
54-
"builder": "@angular-devkit/build-angular:jest",
56+
"builder": "@angular/build:unit-test",
5557
"options": {
5658
"tsConfig": "tsconfig.spec.json",
57-
"polyfills": ["zone.js", "zone.js/testing"]
59+
"runner": "vitest"
5860
}
5961
}
6062
}

apps/styleguide/.lintstagedrc.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)