Skip to content

Commit

Permalink
Merge branch 'release/1.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeyos88 committed Jan 2, 2025
2 parents 785dfd5 + d5e1e01 commit 1e22ad2
Show file tree
Hide file tree
Showing 40 changed files with 1,256 additions and 4,623 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v4.1.0
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
- name: Run Tests
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: CI Security Pipeline

on:
push:
branches: [develop]
pull_request:
branches: [develop]

jobs:
security-checks:
name: Security Checks
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
fail-fast: false

permissions:
contents: read
security-events: write

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run Tests
run: npm run test

- name: OWASP Dependency Check
id: dependency-check
continue-on-error: true
uses: dependency-check/Dependency-Check_Action@main
with:
project: "HyVueGantt"
path: "."
format: "HTML"
args: >
--failOnCVSS 7
--enableRetired
- name: Run Syft
uses: anchore/[email protected]
with:
format: spdx-json
file: package-lock.json
artifact-name: sbom-${{ github.event.repository.name }}-${{ matrix.node-version }}.spdx.json
output-file: sbom-${{ github.event.repository.name }}-${{ matrix.node-version }}.spdx.json

- name: Run Grype
uses: anchore/[email protected]
continue-on-error: true
with:
sbom: sbom-${{ github.event.repository.name }}-${{ matrix.node-version }}.spdx.json
fail-build: true
severity-cutoff: "high"
output-format: json
output-file: grype-results.json

- name: Archive Security Results
uses: actions/[email protected]
if: always()
with:
name: security-scan-results-node-${{ matrix.node-version }}
path: |
dependency-check-report.html
sbom-${{ github.event.repository.name }}-${{ matrix.node-version }}.spdx.json
${{github.workspace}}/reports
grype-results.json
retention-days: 2

#- name: Notify on Failure
# if: failure()
# uses: actions/github-script@v7
# with:
# script: |
# const nodeVersion = '${{ matrix.node }}';
# github.rest.issues.create({
# owner: context.repo.owner,
# repo: context.repo.repo,
# title: `Security Scan Failed - Node ${nodeVersion}`,
# body: `Security scan failed for Node.js ${nodeVersion} in workflow run: ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
# labels: ['security', 'ci-failure']
# })
38 changes: 27 additions & 11 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,40 @@
"@semantic-release/release-notes-generator",
{
"preset": "angular",
"releaseRules": [
{"type": "major", "release": "major"},
{"type": "minor", "release": "minor"},
{"type": "patch", "release": "patch"},
{"type": "feat", "release": false},
{"type": "fix", "release": false},
{"type": "docs", "release": false},
{"type": "style", "release": false},
{"type": "refactor", "release": false},
{"type": "test", "release": false},
{"type": "ci", "release": false}
],
"writerOpts": {
"mainTemplate": "## [v{{version}}](https://github.com/Xeyos88/HyVueGantt/tree/v{{version}}) ({{date}})\n\n[Full Changelog](https://github.com/Xeyos88/HyVueGantt/compare/{{previousTag}}...v{{version}})\n\n{{> header}}\n\n{{#each commitGroups}}\n{{#if title}}\n### {{title}}\n\n{{/if}}\n{{#each commits}}\n{{> commit root=@root}}\n{{/each}}\n{{/each}}\n\n{{> footer}}",
"groupBy": "type",
"commitGroupsSort": ["feat", "fix", "perf", "docs"],
"commitsSort": "header",
"mainTemplate": "## [v{{version}}](https://github.com/Xeyos88/HyVueGantt/tree/v{{version}}) ({{date}})\n\n[Full Changelog](https://github.com/Xeyos88/HyVueGantt/compare/{{previousTag}}...v{{version}})\n\n{{> header}}\n\n{{#each commitGroups}}\n{{#if title}}\n**{{title}}:**\n\n{{/if}}\n{{#each commits}}\n{{> commit root=@root}}\n{{/each}}\n{{/each}}\n\n{{> footer}}",
"headerPartial": "",
"commitPartial": "- {{#if scope}}**{{scope}}:** {{/if}}{{subject}}\n",
"footerPartial": "",
"footerPartial": "{{#if noteGroups}}### Note\n\n{{#each noteGroups}}\n#### {{title}}\n{{#each notes}}\n* {{text}}\n{{/each}}\n{{/each}}{{/if}}",
"partials": {}
},
"presetConfig": {
"types": [
{ "type": "feat", "section": "✨ New Feature" },
{ "type": "fix", "section": "🐛 Fix" },
{ "type": "perf", "section": "⚡️ Performance" },
{ "type": "docs", "section": "📚 Documentation" },
{ "type": "style", "section": "💄 Style" },
{ "type": "refactor", "section": "♻️ Refactoring" },
{ "type": "test", "section": "✅ Test" },
{ "type": "build", "section": "👷 Build" },
{ "type": "ci", "section": "🔧 CI" }
{ "type": "feat", "section": "✨ New Features", "hidden": false },
{ "type": "fix", "section": "🐛 Fix", "hidden": false },
{ "type": "break", "section": "⚠ BREAKING CHANGES", "hidden": false },
{ "type": "perf", "section": "⚡️ Performance", "hidden": false },
{ "type": "docs", "section": "📚 Documentation", "hidden": false },
{ "type": "style", "section": "💄 Style", "hidden": true },
{ "type": "refactor", "section": "♻️ Refactoring", "hidden": true },
{ "type": "test", "section": "✅ Test", "hidden": true },
{ "type": "build", "section": "👷 Build", "hidden": true },
{ "type": "ci", "section": "🔧 CI", "hidden": true }
]
}
}
Expand Down
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ All notable changes to this project will be documented in this file.
[Full Changelog](https://github.com/Xeyos88/HyVueGantt/compare/v1.3.0...v1.4.0)


### Features
**New Features:**

- 'release/1.4.0 - Refactoring release process and added test'
- release/1.4.0 - Refactoring release process and added test

# Changelog

## [v1.3.0](https://github.com/Xeyos88/HyVueGantt/tree/v1.3.0) (2024-12-29)

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,11 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
## Acknowledgments

This project is based on [vue-ganttastic](https://github.com/zunnzunn/vue-ganttastic) and has been completely rewritten with update TypeScript and enhanced features. Special thanks to the original authors and all contributors.

## Screenshots

<img src="https://github.com/Xeyos88/HyVueGantt/blob/main/docs/.vitepress/public/Gantt1.PNG?raw=true" alt="screenshot HyVueGantt" witdh="300" height="200">

<img src="https://github.com/Xeyos88/HyVueGantt/blob/main/docs/.vitepress/public/Gantt2.PNG?raw=true" alt="screenshot HyVueGantt" witdh="300" height="200">

<img src="https://github.com/Xeyos88/HyVueGantt/blob/main/docs/.vitepress/public/Gantt3.PNG?raw=true" alt="screenshot HyVueGantt" witdh="300" height="200">
Binary file added docs/.vitepress/public/Gantt1.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vitepress/public/Gantt2.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vitepress/public/Gantt3.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
142 changes: 142 additions & 0 deletions docs/.vitepress/theme/components/HolidayGanttDemo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<script setup lang="ts">
import { ref, onMounted, computed } from 'vue'
import { GGanttChart, GGanttRow } from 'hy-vue-gantt'
const isLibraryReady = ref(false)
const chartConfig = {
chartStart: '2024-12-15',
chartEnd: '2025-01-15',
precision: 'hour',
barStart: 'start',
barEnd: 'end',
colorScheme: 'vue',
grid: true
}
const enableWeekends = ref(true)
const enableHolidays = ref('US')
const enableBusinessHours = ref(true)
const highlightedDaysInWeek = computed(() =>
enableWeekends.value ? [0, 6] : []
)
const highlightedHours = computed(() =>
enableBusinessHours.value ? [9, 10, 11, 12, 13, 14, 15, 16, 17] : []
)
const rows = ref([
{
label: 'Year End Activities',
bars: [
{
ganttBarConfig: {
id: 'task1',
label: 'Planning',
style: { background: '#42b883' }
},
start: '2024-12-16 00:00',
end: '2024-12-20 23:59'
},
{
ganttBarConfig: {
id: 'task2',
label: 'Implementation',
style: { background: '#35495e' }
},
start: '2024-12-27',
end: '2025-01-03'
},
{
ganttBarConfig: {
id: 'task3',
label: 'Review',
style: { background: '#ff7e67' }
},
start: '2025-01-06',
end: '2025-01-10'
}
]
}
])
onMounted(() => {
isLibraryReady.value = true
})
</script>

<template>
<ClientOnly>
<div class="demo-container" v-if="isLibraryReady">
<div class="controls">
<label class="control-item">
<input type="checkbox" v-model="enableWeekends">
Highlight Weekends
</label>

<label class="control-item">
<select v-model="enableHolidays">
<option value="">No Holidays</option>
<option value="US">US Holidays</option>
<option value="GB">UK Holidays</option>
<option value="IT">Italian Holidays</option>
</select>
</label>

<label class="control-item">
<input type="checkbox" v-model="enableBusinessHours">
Highlight Business Hours
</label>
</div>

<g-gantt-chart
v-bind="chartConfig"
:highlighted-days-in-week="highlightedDaysInWeek"
:highlighted-hours="highlightedHours"
:holiday-highlight="enableHolidays"
>
<g-gantt-row
v-for="row in rows"
:key="row.label"
:label="row.label"
:bars="row.bars"
:highlight-on-hover="true"
/>
</g-gantt-chart>
</div>
</ClientOnly>
</template>

<style scoped>
.demo-container {
border: 1px solid #eaeaea;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
}
.controls {
margin-bottom: 20px;
display: flex;
gap: 20px;
align-items: center;
}
.control-item {
display: flex;
align-items: center;
gap: 8px;
}
.control-item select {
padding: 4px 8px;
border-radius: 4px;
border: 1px solid #eaeaea;
}
.control-item input[type="checkbox"] {
width: 16px;
height: 16px;
}
</style>
16 changes: 13 additions & 3 deletions docs/.vitepress/theme/components/OtherGanttDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@ const rows = ref([
},
start: '2024-12-13 09:00',
end: '2024-12-13 12:00',
},
{
ganttBarConfig: {
id: 'deploy2',
label: 'Production Deploy',
style: { background: '#FF8A65' },
},
start: '2025-01-01 14:00',
end: '2025-01-01 17:00',
}
]
},
Expand All @@ -221,8 +230,8 @@ const rows = ref([
label: 'Production Deploy',
style: { background: '#FF8A65' },
},
start: '2024-12-13 14:00',
end: '2024-12-13 17:00',
start: '2025-01-01 14:00',
end: '2025-01-01 17:00',
}
]
}
Expand Down Expand Up @@ -253,7 +262,7 @@ onMounted(() => {
<div class="demo-container" v-if="isLibraryReady">
<g-gantt-chart
chart-start="2024-12-10 08:00"
chart-end="2024-12-13 18:00"
chart-end="2025-01-01 18:00"
precision="hour"
bar-start="start"
bar-end="end"
Expand All @@ -265,6 +274,7 @@ onMounted(() => {
label-column-title="Rows"
:dayOptionLabel="['day','name','doy']"
:milestones="milestones"

>
<g-gantt-row
v-for="row in rows"
Expand Down
Loading

0 comments on commit 1e22ad2

Please sign in to comment.