Skip to content

Commit

Permalink
Merge patch commit
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 5, 2023
2 parents 0265594 + dec631f commit 615a532
Show file tree
Hide file tree
Showing 33 changed files with 1,979 additions and 1,529 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# https://stackoverflow.com/a/69634516
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf ssh://git@github.com/
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npm test -- --reporters=default --reporters=jest-junit

- name: 'Install dependencies'
run: npm ci

- name: 'Run tests'
run: npm test -- --reporters=default --reporters=jest-junit

- name: Test Report
uses: dorny/test-reporter@v1
with:
name: Jest Tests # Name of the check run which will be created
path: reports/jest-*.xml # Path to test results
reporter: jest-junit # Format of test results

- name: 'Check types'
# TODO: Change this to check:types when all type errors are fixed
run: npm run check:types:noerror

- name: 'Build web app artifacts'
run: |
npm run build
npm run doc
- uses: actions/upload-artifact@v3
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/run-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ jobs:

- run: |
PUBLIC_URL='/farmhand' npm run build
npm run doc
# https://github.com/marketplace/actions/deploy-to-github-pages
- name: Deploy to jeremyckahn.github.io/farmhand
Expand Down
16 changes: 0 additions & 16 deletions .jsdoc

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
- Includes native app downloads for Linux, MacOS and Windows.
- All versioned releases available at [unpkg](https://unpkg.com/browse/@jeremyckahn/farmhand/build/)
- [Wiki](https://github.com/jeremyckahn/farmhand/wiki)
- [Data model documentation](https://jeremyckahn.github.io/farmhand/docs/index.html)
- [API deployment logs](https://farmhand.vercel.app/_logs)

Community links:
Expand Down
26 changes: 26 additions & 0 deletions doc/adr/0005-type-system.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 5. Type system

Date: 2023-07-23

## Status

Accepted

## Context

Farmhand is implemented with JavaScript. Given the size of the codebase, the dynamic nature of JavaScript creates some ambiguity and confusion during development. A type system helps to mitigate these challenges. The ideal type system solution would be a migration to TypeScript, but that is a significant undertaking that would take an outsize amount of effort to complete and get value from. A more approachable solution is to incorporate [Typed JavaScript](https://depth-first.com/articles/2021/11/03/typed-javascript/). Typed JavaScript can be adopted incrementally and does not introduce new syntaxes or tooling needs.

## Decision

Farmhand will transition to using Typed JavaScript. This transition will take a long time and may never be fully completed, but effort should be made to update preexisting code as it modified. Type violations will not be used to break builds until all type violations have been fixed.

## Consequences

- Code will be more clearly and completely documented
- Data type errors will be more obvious
- Improved support for automated refactoring for editors that support such features
- More verbose code
- Many features of TypeScript are unavailable in Typed JavaScript, such as proper enums and interface extension
- Errors will be shown during development in editors that support Typed JavaScript until the code has been updated to be type safe
- The transition may never be complete
- At will be much easier to transition to TypeScript if the transition to Typed JavaScript is ever completed
28 changes: 0 additions & 28 deletions jsdoc-ts.js

This file was deleted.

Loading

1 comment on commit 615a532

@vercel
Copy link

@vercel vercel bot commented on 615a532 Aug 5, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.