Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: package security and remove package no use #20

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/pull-request-template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
Closes # <!-- addressed issue -->
Closes #

<!-- addressed issue -->

## 📑 Description

<!-- describe root cause analysis -->

## ✅ Checks

- [ ] My pull request adheres to the code style of this project
- [ ] My code requires changes to the documentation
- [ ] I have updated the documentation as required
- [ ] All the tests have passed
- [ ] My pull request adheres to the code style of this project
- [ ] My code requires changes to the documentation
- [ ] I have updated the documentation as required
- [ ] All the tests have passed
- [ ] The dependencies in `package.json` are correct and necessary (no unused or missing package

## ℹ Additional Information

<!-- adding more information -->
46 changes: 46 additions & 0 deletions .github/workflows/check-vulnerabilities.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'Package Audit'
on:
pull_request:
branches:
- main
paths:
- '**/package.json'
- '**/pnpm-lock.yaml'

jobs:
audit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install pnpm
run: npm install -g pnpm

- name: Set up PNPM_HOME and PATH
run: |
echo "PNPM_HOME=$HOME/.local/share/pnpm" >> $GITHUB_ENV
echo "PATH=$HOME/.local/share/pnpm:$PATH" >> $GITHUB_ENV
mkdir -p $HOME/.local/share/pnpm
export PNPM_HOME=$HOME/.local/share/pnpm
export PATH=$PNPM_HOME:$PATH
- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Run pnpm audit
id: audit
run: |
result=$(pnpm audit --json)
echo "Audit result: $result"
echo "$result" > audit-result.json
if echo "$result" | grep -q '"advisory"'; then
echo "Vulnerabilities found"
exit 1
else
echo "No vulnerabilities found."
fi
3 changes: 1 addition & 2 deletions .github/workflows/publish-nt-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: 'Publish NT CSS Framework'

on:
release:
branches:
- main
types: [created]

jobs:
build-and-publish:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ testem.log
# System Files
.DS_Store
Thumbs.db
pnpm-lock-error.yaml
pnpm-lock-error.yaml

# Unit test coverage
coverage
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ Before running the project, ensure the following tools are installed:
```bash
pnpm install
```

### Commit message follows the [format](https://semantic-release.gitbook.io/semantic-release#commit-message-format)
5 changes: 0 additions & 5 deletions apps/nt-stylesheet/bin/sim.spec.js

This file was deleted.

4 changes: 3 additions & 1 deletion apps/nt-stylesheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@
"@types/node": "20.4.9",
"nx": "^20.2.2",
"typescript": "^5.7.2",
"vite": "^6.0.3",
"vite": "^5.4.11",
"vite-plugin-dts": "^4.4.0",
"vite-plugin-sass-dts": "^1.3.29",
"vitest": "2.0.0"
},
"dependencies": {
"@nx/vite": "^20.3.0",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.49",
"postcss-import": "^16.1.0",
Expand Down
Loading
Loading