Skip to content
Draft

V2 #48

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
25 changes: 25 additions & 0 deletions .cursor/rules/project.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
description:
globs:
alwaysApply: true
---
This is an open source project called parserblade - simple JSON-like parse() and stringify() API for different file types.
Take into consideration that, now, the project will have a v2 version with:

- [x] TypeScript support
- [x] Run as npx CLI
- [] format validation
- [] clipboard support on the CLI
- [] inline conversion for shell pipelines llike `cat data.yaml | npx parserblade parse --to json | jq '.'`
- [] Multi file batch processing
- [] Watch mode for CLI
- [] File merge CLI
- [] New files support: toml, init, JSON Lines (JSONL/NDJSON), .env, .properties, markdown front formatter, excel, sql, avro
- [] format diff via CLI
- [] built-in checksum/hash utility built-in md5, sha256, etc on CLI
- [] schema-aware validation (JSON Schema, OpenAPI, zod, joi, custom)
- [] schema generation from data
- [] data generation
- [] compressing support

You'll work as a software engineer focusing on implementing / creating the needed features following the best practices, writing unit tests, always focusing on great dx, with updated docs (in english and brazillian portuguese).
22 changes: 10 additions & 12 deletions .esdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
},
"option": {
"manual": {
"index": "./README.md",
"asset": "",
"globalIndex": true,
"files": [
"./esdocs/manual/json.md",
"./esdocs/manual/csv.md",
"./esdocs/manual/xml.md",
"./esdocs/manual/yaml.md"
]
"index": "./README.md",
"asset": "",
"globalIndex": true,
"files": [
"./esdocs/manual/json.md",
"./esdocs/manual/csv.md",
"./esdocs/manual/xml.md",
"./esdocs/manual/yaml.md"
]
}
}
},
Expand All @@ -30,9 +30,7 @@
"name": "esdoc-inject-style-plugin",
"option": {
"enable": true,
"styles": [
"./esdocs/css/parser.css"
]
"styles": ["./esdocs/css/parser.css"]
}
}
]
Expand Down
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

21 changes: 0 additions & 21 deletions .eslintrc.json

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/coverage-badge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Coverage Badge
on:
push:
branches: [main, v2]

jobs:
coverage-badge:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests with coverage
run: npm run test:coverage
- name: Coverage Badge
uses: tj-actions/coverage-badge-js@v2
with:
coverage-summary-path: coverage/coverage-summary.json
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
id: verify-changed-files
with:
files: coverage-badge.svg
- name: Commit files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add coverage-badge.svg
git commit -m "Updated coverage badge."
- name: Push changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
10 changes: 5 additions & 5 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: npm install
- name: Run linter
run: npm run lint
- uses: actions/checkout@v2
- name: Install modules
run: npm install
- name: Run linter
run: npm run lint
51 changes: 45 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,50 @@
name: CI
on: push
on:
push:
branches: [main, v2]
pull_request:
branches: [main, v2]

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v2
- name: Install modules
run: npm install
- name: Run tests
run: npm run test
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests with coverage
run: npm run test:coverage
- name: Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/cobertura-coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '60 80'
if: github.event_name == 'pull_request'
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@ node_modules
coverage
nohup.out
parserblade.tar.gz

# TypeScript build outputs
dist
*.tsbuildinfo

# IDE files
.vscode
.idea

# OS files
.DS_Store
Thumbs.db
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
Loading
Loading