Skip to content

Commit 8734daa

Browse files
ci: add comprehensive GitHub Actions CI/CD pipeline
- Main CI workflow with multi-OS, multi-GHC matrix testing - Release workflow with automated builds and Hackage publishing - Security workflow with vulnerability scanning and static analysis - Code quality workflow with formatting, linting, and complexity checks - Nightly workflow with fuzzing, performance, and compatibility testing - Dependabot configuration for automated dependency updates - PR and issue templates for bug reports, features, and performance issues Features: - Test coverage analysis with 85% threshold enforcement - Documentation generation and GitHub Pages deployment - Performance benchmarking with regression detection - Memory leak detection and profiling - Multi-platform compatibility testing (Ubuntu, macOS, Windows) - CLAUDE.md compliance checking - Automatic code formatting and refactoring - Security scanning and license compliance - Real-world JavaScript file testing - Comprehensive reporting and artifact collection
1 parent 6ed73ed commit 8734daa

File tree

10 files changed

+2182
-0
lines changed

10 files changed

+2182
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve the JavaScript parser
4+
title: '[BUG] '
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## JavaScript Code
14+
15+
Please provide the JavaScript code that triggers the bug:
16+
17+
```javascript
18+
// Paste your JavaScript code here
19+
```
20+
21+
## Expected Behavior
22+
23+
A clear and concise description of what you expected to happen.
24+
25+
## Actual Behavior
26+
27+
A clear and concise description of what actually happened.
28+
29+
## Parser Output/Error
30+
31+
```
32+
Paste the parser output or error message here
33+
```
34+
35+
## Environment
36+
37+
- **language-javascript version:** [e.g., 0.8.0.0]
38+
- **GHC version:** [e.g., 9.8.2]
39+
- **Operating System:** [e.g., Ubuntu 22.04, macOS 13, Windows 11]
40+
- **Cabal version:** [e.g., 3.10.2.1]
41+
42+
## Reproduction Steps
43+
44+
Steps to reproduce the behavior:
45+
46+
1. Create a file with the JavaScript code above
47+
2. Run the parser with: `cabal exec language-javascript < file.js`
48+
3. Observe the error/unexpected behavior
49+
50+
## Additional Context
51+
52+
- Does this work with other JavaScript parsers? (e.g., Babel, Acorn, etc.)
53+
- Is this valid JavaScript according to the ECMAScript specification?
54+
- Any additional context or screenshots
55+
56+
## Minimal Example
57+
58+
If possible, provide the smallest JavaScript code that reproduces the issue:
59+
60+
```javascript
61+
// Minimal reproduction case
62+
```
63+
64+
## Parser Mode
65+
66+
- [ ] Parsing entire programs
67+
- [ ] Parsing expressions only
68+
- [ ] Parsing statements only
69+
- [ ] Using pretty printer output
70+
- [ ] Using JSON serialization
71+
- [ ] Using XML serialization
72+
73+
## JavaScript Language Version
74+
75+
Which JavaScript/ECMAScript version should this code work with?
76+
77+
- [ ] ES3
78+
- [ ] ES5
79+
- [ ] ES6/ES2015
80+
- [ ] ES2016
81+
- [ ] ES2017
82+
- [ ] ES2018
83+
- [ ] ES2019
84+
- [ ] ES2020
85+
- [ ] ES2021
86+
- [ ] ES2022+
87+
88+
## Related Issues
89+
90+
<!-- Link any related issues here -->
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or JavaScript language support
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
11+
A clear and concise description of the feature you'd like to see implemented.
12+
13+
## JavaScript Language Feature
14+
15+
If this is about supporting a new JavaScript/ECMAScript feature:
16+
17+
**Feature Name:** [e.g., Optional Chaining, Nullish Coalescing, etc.]
18+
**ECMAScript Version:** [e.g., ES2020, ES2021, etc.]
19+
**Specification Link:** [Link to TC39 proposal or MDN documentation]
20+
21+
## Example JavaScript Code
22+
23+
Provide example JavaScript code that should be supported:
24+
25+
```javascript
26+
// Example code that should parse correctly
27+
```
28+
29+
## Current Behavior
30+
31+
What currently happens when you try to parse this code?
32+
33+
```
34+
Current parser output/error
35+
```
36+
37+
## Use Case
38+
39+
Describe your use case and why this feature would be valuable:
40+
41+
- Who would benefit from this feature?
42+
- What problems does it solve?
43+
- How critical is this for your workflow?
44+
45+
## Implementation Considerations
46+
47+
If you have thoughts on implementation:
48+
49+
- [ ] Lexer changes needed
50+
- [ ] Grammar changes needed
51+
- [ ] AST changes needed
52+
- [ ] Pretty printer changes needed
53+
- [ ] Backward compatibility concerns
54+
55+
## Alternative Solutions
56+
57+
Are there any workarounds or alternative approaches you've considered?
58+
59+
## Additional Context
60+
61+
<!-- Add any other context, screenshots, or examples about the feature request here -->
62+
63+
## References
64+
65+
- [ ] Link to ECMAScript specification
66+
- [ ] Link to MDN documentation
67+
- [ ] Link to TC39 proposal
68+
- [ ] Examples from other parsers (Babel, Acorn, etc.)
69+
- [ ] Real-world usage examples
70+
71+
## Priority
72+
73+
How important is this feature to you?
74+
75+
- [ ] Critical - blocks my work
76+
- [ ] High - significantly improves my workflow
77+
- [ ] Medium - nice to have
78+
- [ ] Low - minor improvement
79+
80+
## Compatibility
81+
82+
Should this feature:
83+
84+
- [ ] Be enabled by default
85+
- [ ] Require a flag/option to enable
86+
- [ ] Be backward compatible
87+
- [ ] May introduce breaking changes (justified below)
88+
89+
<!-- If breaking changes are acceptable, explain why -->
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
name: Performance Issue
3+
about: Report performance problems or memory issues
4+
title: '[PERFORMANCE] '
5+
labels: 'performance'
6+
assignees: ''
7+
---
8+
9+
## Performance Issue Description
10+
11+
A clear description of the performance problem you're experiencing.
12+
13+
## JavaScript Code
14+
15+
Please provide the JavaScript code that demonstrates the performance issue:
16+
17+
```javascript
18+
// Paste your JavaScript code here
19+
// Include file size if it's a large file
20+
```
21+
22+
## Performance Metrics
23+
24+
**File size:** [e.g., 2.5MB]
25+
**Parse time:** [e.g., 45 seconds]
26+
**Memory usage:** [e.g., 1.2GB peak memory]
27+
28+
## Expected Performance
29+
30+
What performance would you expect for this input?
31+
32+
## Environment
33+
34+
- **language-javascript version:** [e.g., 0.8.0.0]
35+
- **GHC version:** [e.g., 9.8.2]
36+
- **Operating System:** [e.g., Ubuntu 22.04]
37+
- **Available RAM:** [e.g., 16GB]
38+
- **CPU:** [e.g., Intel i7-12700K]
39+
40+
## Reproduction Steps
41+
42+
1. Create a file with the JavaScript code
43+
2. Time the parsing: `time cabal exec language-javascript < largefile.js`
44+
3. Monitor memory usage with: `top` or `htop`
45+
46+
## Profiling Information
47+
48+
If you've done any profiling, please share the results:
49+
50+
```
51+
Profiling output here
52+
```
53+
54+
## Comparison with Other Tools
55+
56+
How does performance compare with other JavaScript parsers?
57+
58+
| Parser | Parse Time | Memory Usage |
59+
|--------|------------|--------------|
60+
| language-javascript | ? | ? |
61+
| Babel | ? | ? |
62+
| Acorn | ? | ? |
63+
64+
## Type of Performance Issue
65+
66+
- [ ] Slow parsing speed
67+
- [ ] High memory usage
68+
- [ ] Memory leaks
69+
- [ ] Exponential time complexity
70+
- [ ] Stack overflow
71+
- [ ] Other: ___________
72+
73+
## JavaScript Characteristics
74+
75+
What characteristics does your JavaScript code have?
76+
77+
- [ ] Deeply nested structures
78+
- [ ] Very long identifier names
79+
- [ ] Many string literals
80+
- [ ] Complex regular expressions
81+
- [ ] Large number of functions
82+
- [ ] Heavy use of ES6+ features
83+
- [ ] Minified code
84+
- [ ] Generated/transpiled code
85+
86+
## Impact
87+
88+
- [ ] Blocks usage entirely
89+
- [ ] Significantly slows down workflow
90+
- [ ] Minor inconvenience
91+
- [ ] Academic interest
92+
93+
## Suggested Solutions
94+
95+
Do you have any ideas for improving performance?
96+
97+
## Additional Context
98+
99+
Any additional information about the performance issue.

.github/dependabot.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# GitHub Dependabot configuration for language-javascript
2+
# Automatically creates PRs for dependency updates
3+
4+
version: 2
5+
updates:
6+
# Monitor Haskell dependencies
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
day: "monday"
12+
time: "04:00"
13+
timezone: "UTC"
14+
open-pull-requests-limit: 10
15+
reviewers:
16+
- "quintenkasteel"
17+
assignees:
18+
- "quintenkasteel"
19+
commit-message:
20+
prefix: "ci"
21+
prefix-development: "ci"
22+
include: "scope"
23+
labels:
24+
- "dependencies"
25+
- "github-actions"
26+
27+
# Monitor for security updates more frequently
28+
- package-ecosystem: "github-actions"
29+
directory: "/"
30+
schedule:
31+
interval: "daily"
32+
open-pull-requests-limit: 5
33+
allow:
34+
- dependency-type: "direct"
35+
update-type: "security"
36+
commit-message:
37+
prefix: "security"
38+
prefix-development: "security"
39+
include: "scope"
40+
labels:
41+
- "security"
42+
- "dependencies"

0 commit comments

Comments
 (0)