Skip to content

Commit a66076f

Browse files
committed
build(deps): update npm dependencies, build scripts, and cicd workflows
- [x] update npm dependencies to latest compatible versions; - [x] update application build scripts according to yarn changes; - [x] add checks to the premerge validation workflow;
1 parent c5f56f3 commit a66076f

File tree

17 files changed

+36200
-26218
lines changed

17 files changed

+36200
-26218
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# For more information see:
2+
# - https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
3+
# - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputsoutput_id
4+
5+
# The action can be referenced in workflows like:
6+
# ./.github/actions/configure-yarn
7+
8+
name: configure-yarn
9+
description: Configures yarn to use the correct version.
10+
11+
runs:
12+
using: 'composite'
13+
steps:
14+
- name: Configure yarn
15+
shell: bash
16+
run: |
17+
npm i -g [email protected] corepack
18+
corepack enable
19+
corepack prepare [email protected] --activate
20+
yarn --version
21+
yarn config

.github/actions/setup-environment/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ runs:
4343
- name: Configure kernel
4444
uses: ./.github/actions/configure-kernel
4545

46-
- name: Use yarn v1 required for integrity check
47-
uses: ./.github/actions/use-yarn-v1
46+
- name: Configure yarn
47+
uses: ./.github/actions/configure-yarn
4848

4949
- name: Workspace cache
5050
id: workspace-cache
@@ -59,7 +59,7 @@ runs:
5959

6060
- name: Install project dependencies
6161
shell: bash
62-
run: yarn install:ci
62+
run: yarn install --immutable
6363

6464
- name: Install global compodoc
6565
if: inputs.compodoc == 'true'

.github/actions/use-yarn-v1/action.yml

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

.github/workflows/validate-pr.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ jobs:
103103
sudo apt install shellcheck
104104
npx nx run tools:lint-shell
105105
106+
- name: Analyze circular dependencies
107+
if: fromJSON(needs.checks.outputs.changes).src == 'true'
108+
run: |
109+
sudo npm i -g madge@latest
110+
madge --circular --extensions ts ./apps ./libs ./tools --ts-config ./tsconfig.base.json
111+
106112
- name: Set failure
107113
id: check
108114
if: failure()
@@ -197,11 +203,15 @@ jobs:
197203
- name: Setup environment
198204
uses: ./.github/actions/setup-environment
199205

200-
- name: Compiler check affected
206+
- name: Compiler check
201207
run: npx nx run-many --target tsc-check --projects ${{ matrix.projects }}
208+
env:
209+
NODE_OPTIONS: '--max-old-space-size=4096'
202210

203211
- name: Unit test
204-
run: npx nx run-many --target test --pass-with-no-tests --coverage --projects ${{ matrix.projects }}
212+
run: npx nx run-many --target test --projects ${{ matrix.projects }} --silent --no-file-parallelism --maxWorkers 1 --maxConcurrency 1 --logLevel error
213+
env:
214+
NODE_OPTIONS: '--max-old-space-size=4096'
205215

206216
- name: Set failure
207217
id: check
@@ -306,7 +316,15 @@ jobs:
306316
steps:
307317
- name: Check result
308318
run: |
309-
if [[ "$CHECKS_RESULT" != "true" || "$LINT_RESULT" != "true" || "$LINT_AFFECTED_RESULT" != "true" || "$TEST_RESULT" != "true" || "$TEST_AFFECTED_RESULT" != "true" || "$BUILD_RESULT" != "true" || "$BUILD_AFFECTED_RESULT" != "true" || "$BUILD_AFFECTED_STORYBOOK_RESULT" != "true" ]]; then exit 1; fi
319+
if [[ "$CHECKS_RESULT" != "true" || \
320+
"$LINT_RESULT" != "true" || \
321+
"$LINT_AFFECTED_RESULT" != "true" || \
322+
"$TEST_RESULT" != "true" || \
323+
"$TEST_AFFECTED_RESULT" != "true" || \
324+
"$BUILD_RESULT" != "true" || \
325+
"$BUILD_AFFECTED_RESULT" != "true" || \
326+
"$BUILD_AFFECTED_STORYBOOK_RESULT" != "true" \
327+
]]; then exit 1; fi
310328
echo "### :rocket: Premerge checks succeeded" >> $GITHUB_STEP_SUMMARY
311329
env:
312330
CHECKS_RESULT: ${{ needs.checks.outputs.success }}

.storybook/main.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ module.exports = {
2828
const tsPaths = new TsconfigPathsPlugin({
2929
configFile: './tsconfig.base.json',
3030
});
31-
config.resolve.plugins ? config.resolve.plugins.push(tsPaths) : (config.resolve.plugins = [tsPaths]);
31+
32+
if (config.resolve.plugins) {
33+
config.resolve.plugins.push(tsPaths);
34+
} else {
35+
config.resolve.plugins = [tsPaths];
36+
}
3237

3338
// add your own webpack tweaks below if needed
3439

@@ -54,5 +59,5 @@ module.exports = {
5459
// add your own webpack tweaks above if needed
5560

5661
return config;
57-
}
62+
},
5863
};

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"eslint.validate": ["json"],
2+
"eslint.validate": ["json", "javascript", "typescript"],
33
"[html]": {
44
"editor.defaultFormatter": "esbenp.prettier-vscode"
55
},

.yarn/install-state.gz

3.8 MB
Binary file not shown.

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

apps/api/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@
44
"description": "Dependencies for docker containers running api application. Do not install dependencies in this directory. This file is only for containers.",
55
"dependencies": {
66
"@apollo/server": "5.0.0",
7-
"@grpc/grpc-js": "1.14.0",
7+
"@grpc/grpc-js": "1.14.1",
88
"@grpc/proto-loader": "0.8.0",
9-
"@nestjs/apollo": "13.1.0",
9+
"@nestjs/apollo": "13.2.1",
1010
"@nestjs/axios": "4.0.1",
1111
"@nestjs/cache-manager": "3.0.1",
12-
"@nestjs/common": "11.1.6",
12+
"@nestjs/common": "11.1.8",
1313
"@nestjs/config": "4.0.2",
14-
"@nestjs/core": "11.1.6",
15-
"@nestjs/graphql": "13.1.0",
16-
"@nestjs/jwt": "11.0.0",
17-
"@nestjs/microservices": "11.1.6",
14+
"@nestjs/core": "11.1.8",
15+
"@nestjs/graphql": "13.2.0",
16+
"@nestjs/jwt": "11.0.1",
17+
"@nestjs/microservices": "11.1.8",
1818
"@nestjs/passport": "11.0.5",
19-
"@nestjs/platform-express": "11.1.6",
20-
"@nestjs/platform-ws": "11.1.6",
21-
"@nestjs/serve-static": "5.0.3",
22-
"@nestjs/swagger": "11.2.0",
19+
"@nestjs/platform-express": "11.1.8",
20+
"@nestjs/platform-ws": "11.1.8",
21+
"@nestjs/serve-static": "5.0.4",
22+
"@nestjs/swagger": "11.2.1",
2323
"@nestjs/throttler": "6.4.0",
24-
"@nestjs/websockets": "11.1.6",
25-
"axios": "1.12.2",
26-
"cache-manager": "7.2.2",
24+
"@nestjs/websockets": "11.1.8",
25+
"axios": "1.13.2",
26+
"cache-manager": "7.2.4",
2727
"class-transformer": "0.5.1",
2828
"class-validator": "0.14.2",
2929
"compression": "1.8.1",
30-
"dotenv": "17.2.2",
30+
"dotenv": "17.2.3",
3131
"express": "5.1.0",
3232
"firebase-admin": "12.5.0",
33-
"firebase-functions": "6.4.0",
33+
"firebase-functions": "6.6.0",
3434
"google-protobuf": "4.0.0",
35-
"graphql": "16.11.0",
35+
"graphql": "16.12.0",
3636
"graphql-subscriptions": "3.0.0",
3737
"graphql-tag": "2.12.6",
38-
"graphql-tools": "9.0.20",
38+
"graphql-tools": "9.0.22",
3939
"graphql-upload": "17.0.0",
4040
"grpc-web": "2.0.2",
4141
"protobufjs": "7.5.4",

apps/client/project.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,26 @@
8989
"tsConfig": "apps/client/tsconfig.app.json"
9090
}
9191
},
92+
"build-with-hooks": {
93+
"executor": "nx:run-commands",
94+
"options": {
95+
"commands": [
96+
{
97+
"command": "npx nx run client:configure-env",
98+
"forwardAllArgs": false
99+
},
100+
{
101+
"command": "npx nx build client",
102+
"forwardAllArgs": true
103+
},
104+
{
105+
"command": "npx nx run client:configure-env --reset",
106+
"forwardAllArgs": false
107+
}
108+
],
109+
"parallel": false
110+
}
111+
},
92112
"configure-env": {
93113
"executor": "./tools/executors/client-env:configure",
94114
"options": {

0 commit comments

Comments
 (0)