Skip to content

Commit 22498da

Browse files
authored
Merge pull request #1519 from maester365/Dependency-Management
Bump Node.js to 22.12 across the project and add better dependency management.
2 parents 0466b1b + b180fd3 commit 22498da

File tree

11 files changed

+153
-46
lines changed

11 files changed

+153
-46
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// README for image at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
33
{
44
"name": "Maester",
5-
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",
5+
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-22.12-bookworm",
66
"features": {
77
"ghcr.io/devcontainers/features/powershell:2": {
88
"modules": "Microsoft.Graph.Authentication, Pester, PSFramework, PSModuleDevelopment, PSScriptAnalyzer"

.github/dependabot.yml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,86 @@
44

55
version: 2
66
updates:
7+
78
- package-ecosystem: "devcontainers"
89
directory: "/"
910
schedule:
1011
interval: weekly
1112
open-pull-requests-limit: 10
1213
commit-message:
1314
prefix: "chore(deps): "
15+
1416
- package-ecosystem: "github-actions"
1517
directory: "/"
1618
schedule:
1719
interval: "weekly"
1820
open-pull-requests-limit: 10
1921
commit-message:
20-
prefix: "chore(deps): "
22+
prefix: "chore(deps): "
23+
24+
- package-ecosystem: "npm"
25+
directory: "/website"
26+
schedule:
27+
interval: "weekly"
28+
open-pull-requests-limit: 10
29+
commit-message:
30+
prefix: "chore(deps): "
31+
groups:
32+
docusaurus:
33+
patterns:
34+
- "@docusaurus/*"
35+
icons:
36+
patterns:
37+
- "@fortawesome/*"
38+
- "@iconify/*"
39+
minor-and-patch:
40+
update-types:
41+
- "minor"
42+
- "patch"
43+
exclude-patterns:
44+
- "@docusaurus/*"
45+
- "@fortawesome/*"
46+
- "@iconify/*"
47+
- "react"
48+
- "react-dom"
49+
50+
- package-ecosystem: "npm"
51+
directory: "/report"
52+
schedule:
53+
interval: "weekly"
54+
open-pull-requests-limit: 10
55+
commit-message:
56+
prefix: "chore(deps): "
57+
groups:
58+
ui-components:
59+
patterns:
60+
- "@radix-ui/*"
61+
- "@headlessui/*"
62+
- "@tremor/*"
63+
icons:
64+
patterns:
65+
- "@heroicons/*"
66+
- "@remixicon/*"
67+
- "lucide-react"
68+
typescript-tooling:
69+
patterns:
70+
- "typescript"
71+
- "@types/*"
72+
- "eslint"
73+
minor-and-patch:
74+
update-types:
75+
- "minor"
76+
- "patch"
77+
exclude-patterns:
78+
- "@radix-ui/*"
79+
- "@headlessui/*"
80+
- "@tremor/*"
81+
- "@heroicons/*"
82+
- "@remixicon/*"
83+
- "lucide-react"
84+
- "typescript"
85+
- "@types/*"
86+
- "eslint"
87+
- "react"
88+
- "react-dom"
89+
- "react-router-dom"

.github/workflows/build-report.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Setup Node.js
3333
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
3434
with:
35-
node-version: "20"
35+
node-version: "22.12.x"
3636
cache: "npm"
3737
cache-dependency-path: report/package-lock.json
3838

@@ -41,6 +41,11 @@ jobs:
4141
cd report
4242
npm ci
4343
44+
- name: Audit dependencies
45+
run: |
46+
cd report
47+
npm audit --audit-level=high
48+
4449
- name: Build report
4550
run: |
4651
cd report
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: dependency-review
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
paths:
7+
- "website/package.json"
8+
- "website/package-lock.json"
9+
- "report/package.json"
10+
- "report/package-lock.json"
11+
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
16+
jobs:
17+
dependency-review:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
22+
23+
- name: Dependency review
24+
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
25+
with:
26+
fail-on-severity: high

.github/workflows/publish-versioned-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: ⚙️ Setup Node.js
3737
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
3838
with:
39-
node-version: 20
39+
node-version: 22.12.x
4040
cache: 'npm'
4141
cache-dependency-path: website/package-lock.json
4242

.nvmrc

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

report/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ It uses vite-plugin-singlefile to generate a single HTML file which will be used
1818

1919
Open terminal window and navigate to /report folder and run the following command to install all dependencies:
2020

21-
```
21+
```shell
2222
npm install
2323
```
2424

2525
### Development
2626

2727
To start the development server, run the following command:
2828

29-
```
29+
```shell
3030
npm run dev
3131
```
3232

@@ -36,15 +36,17 @@ Once you are done with making updates to the report, you can build the project t
3636

3737
To build the project, run the following command:
3838

39-
```
39+
```shell
4040
npm run build
4141
```
4242

4343
- This will generate the report.html file in the /dist folder.
4444
- Copy it to the /powershell/assets folder and rename it to ReportTemplate.html (overwrite the existing file).
45+
4546
```powershell
4647
Copy-Item ./dist/index.html ../powershell/assets/ReportTemplate.html -Force
4748
```
49+
4850
- Now PowerShell will package and use the new report template.
4951

5052
### Updating the sample data in the report

report/package-lock.json

Lines changed: 31 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

report/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545
"vite-plugin-singlefile": "^2.3.0"
4646
},
4747
"engines": {
48-
"node": ">=20.0"
48+
"node": ">=22.12"
4949
}
5050
}

website/package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)