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

WIP | Refactor existing parser using typescript #164

Open
wants to merge 7 commits into
base: vue3
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
data/
3 changes: 3 additions & 0 deletions compose.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ services:
- "127.0.0.1:${UI_PORT:-8000}:8000"
volumes:
- "./:/app"
- "/app/node_modules"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have my doubts about this change. Could it be that you didn't rebuild the image after changing dependencies?

container_name: frontend

pocketbase:
image: spectado/pocketbase:${POCKETBASE_VERSION_TAG:-latest}
Expand All @@ -16,3 +18,4 @@ services:
restart: "unless-stopped"
volumes:
- "./data:/pb_data"
container_name: pocketbase
129 changes: 81 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
"test:e2e:dev": "start-server-and-test 'vite dev --port 8000' http://localhost:8000 'cypress open --e2e'",
"build-only": "vite build",
"type-check": "vue-tsc --build --force",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"format": "prettier --write src/"
},
"dependencies": {
"antlr4": "^4.13.1-patch-1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you have a look at the TypeScript enabled antlr4 packages, are they any good?

"pinia": "^2.1.7",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
Expand All @@ -25,6 +27,8 @@
"@tsconfig/node20": "^20.1.4",
"@types/jsdom": "^21.1.6",
"@types/node": "^20.12.5",
"@typescript-eslint/eslint-plugin": "^7.13.0",
"@typescript-eslint/parser": "^7.13.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
Expand Down
15 changes: 15 additions & 0 deletions src/__tests__/adr.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { describe, it, expect } from 'vitest'
import { ArchitecturalDecisionRecord } from '../infrastructure/domain/model/ArchitecturalDecisionRecord'

describe('Test ADR Model', () => {
it('renders properly', () => {
const adr = new ArchitecturalDecisionRecord(
['Option One'],
'Context and problem statement',
'20-2-2020',
'Deciders'
)
expect(adr.consideredOptions[0]).toBe('Option One')
expect(adr.deciders).toBe('Deciders')
})
})
Loading