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

feat(Next > TypeScript): Add TypeScript with strict enabled #576

Merged
merged 45 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1dd2e0f
feat(Next > TypeScript): Add TypeScript with some errors, lint, test
danactive Feb 18, 2023
893950c
fix(Next > TypeScript): Upgrade jest to support typescript
danactive Mar 27, 2023
29a5baf
fix(Next > TypeScript): Restory mapbox filter has selected so orange …
danactive Mar 27, 2023
c005221
fix(Next > Node): Update to latest LTE version
danactive May 7, 2023
cc03121
fix(Next > Node): Reduce type error
danactive May 7, 2023
e0435f8
fix(Next > Today): Fix date format so OS can change away from YYYY-MM-DD
danactive Jul 29, 2023
6f3257f
fix(Next > npm): Decrease underused deps
danactive Jul 30, 2023
d9709c6
Merge branch 'main' into typescript
danactive Jul 30, 2023
270734f
fix(Next > Loadable): Drop loadable due to underuse
danactive Jul 30, 2023
819e0c3
fix(Next > CI): Vercel deploy UI failed so this updates the Node.js v…
danactive Jul 30, 2023
15e3595
fix(Next > CI): Tighter version control as CI build failing
danactive Jul 30, 2023
0d50f8b
fix(Next > CI): Tighter version control as CI build failing
danactive Jul 30, 2023
1037fa1
feat(Next > MUI): Add MUI Joy UI
danactive Jul 31, 2023
6422bbd
feat(Next > MUI): Drop GenericList, List, ListItem, LoadingIndicator …
danactive Jul 31, 2023
55f0eba
fix(Next > CI): Drop Font import as Jest is not configured yet. Polyf…
danactive Jul 31, 2023
8bb0b32
fix(Next > CI): Disable eslint errors with TypeScript code
danactive Jul 31, 2023
9a24de8
fix(Next > CI): Enable eslint in CI
danactive Jul 31, 2023
4f7706b
fix(Next > CI): Enable unit testing in CI
danactive Aug 1, 2023
6258fed
fix(Next > CI): Enable unit testing in CI
danactive Aug 1, 2023
4c7d850
fix(Next > TypeScript): Album transpiles with TS
danactive Aug 6, 2023
794779f
fix(Next > TypeScript): Album transpiles with TS passes lint
danactive Aug 7, 2023
e8f1aaa
fix(Next > TypeScript): Album transpiles with TS passing tests
danactive Aug 9, 2023
0f39075
fix(API > v7): Rollback to v7 to stop sharing code with Next.js
danactive Aug 20, 2023
e52a310
fix(API > MapBox): Upgrade from Mapbox GL JS v0 to v2
danactive Aug 23, 2023
ebc4f13
feat(Next > Image Gallery): Improve types
danactive Aug 25, 2023
d6ccfe6
fix(Next > Image Gallery): Update CSS based on npm module tests still…
danactive Aug 25, 2023
4885624
Next > API: Filesystem converted to TypeScript
danactive Aug 25, 2023
29ee6b8
fix(API > Deps): Update hapi-swagger due to vulnerability
danactive Aug 26, 2023
28a2639
fix(API > Video): Add default dimensions for video playback otherwise…
danactive Aug 26, 2023
507dace
API > Deps: Update hapi-swagger due to vulnerability
danactive Aug 26, 2023
173c462
Next > Tests: Update unit testing to TS
danactive Aug 26, 2023
fbf5186
feat(Next > CI): Add Playwright end-to-end test workflow
danactive Aug 26, 2023
6ff6704
API > Node: Upgrade Node.js for swagger ?? operator
danactive Aug 26, 2023
4abc34d
Next > CI: Add Playwright end-to-end test workflow
danactive Aug 26, 2023
057abfb
Next > CI: Configure Playwright to run in next folder
danactive Aug 26, 2023
86386d0
Next > CI: Drop e2e test that is 404
danactive Aug 26, 2023
c58337e
feat(Next > Dep): Major update to styled-components v5 to v6
danactive Aug 26, 2023
882d08a
feat(Next > Dep): Major update to glob v7 to v10
danactive Aug 26, 2023
8b02828
chore(Next > Dep): Major update to testing-library v5 to v6
danactive Aug 27, 2023
6a0b198
Next > ESM: Update configs to ESM
danactive Aug 27, 2023
0f94787
Next > TypeScript: Fix by following strict rules
danactive Aug 27, 2023
d394a04
Next > TypeScript: Prepare album files for TS strict
danactive Aug 27, 2023
cbeb408
Next > TypeScript: Prepare map files for TS strict
danactive Aug 29, 2023
d21713b
Next > TypeScript: Prepare api and page files for TS strict
danactive Aug 30, 2023
ee4d886
Next > TypeScript: Prepare component files for TS strict
danactive Aug 30, 2023
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
110 changes: 110 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: CI
on:
push:
branches:
- main
pull_request: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
actions: write
contents: read

jobs:
lint:
name: ESLint
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version-file: "next/.nvmrc"

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: next

- name: Lint
run: npm run lint:ci
working-directory: next

typecheck:
name: TypeScript
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version-file: "next/.nvmrc"

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: next

- name: 🔎 Type check
run: npm run typecheck --if-present
working-directory: next

unittest:
name: Jest
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version-file: "next/.nvmrc"

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: next

- name: Unit Test runner
run: npm run test:ci
working-directory: next
e2etest:
name: Playwright
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version-file: "next/.nvmrc"

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
working-directory: next

- name: Install Playwright Browsers
run: npx playwright install --with-deps
working-directory: next

- name: Run Playwright tests
run: npx playwright test
working-directory: next

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
1 change: 0 additions & 1 deletion .github/workflows/visualize_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- master
jobs:
get_data:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Your personal **history** storyboarded with photo and video albums. Associate ph
## Installation

### Development
1. Node.js v16 LTS [Download](https://nodejs.org/)
1. Node.js v18 LTS [Download](https://nodejs.org/)
1. Folder **app** both the backend and frontend using Next.js
1. Install project dependencies `npm ci`
1. Start web server `npm run dev`
Expand Down
2 changes: 1 addition & 1 deletion api/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.18.1
14.21.3
14 changes: 7 additions & 7 deletions api/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,31 @@ To use the administration tools
* Install project dependencies `npm install [module]`

## Photo/video album XML schemas
### Current schema (2.2)
### Current schema (2.0)

Example

<album>
<meta>
<gallery>demo</gallery> <!-- gallery directory name excluding 'gallery-'; new in schema 2.0 -->
<album_name>sample</album_name>
<album_version>2.2</album_version>
<id>sample</id> <!--Filename is album_sample.xml; new in schema 2.0-->
<version>1.8</version> <!--Reference schema version; new in schema 2.0-->
</meta>
<item id="1"><!-- photo -->
<item><!-- photo -->
<id>1</id> <!-- id attribute must be unique for this album; used by JavaScript & for character association -->
<filename>2001-03-21-01.jpg</filename> <!-- must start with YYYY year; photos and thumbs must be places in this folder too -->
<geo> <!-- geocode -->
<lat>49.25</lat> <!-- latitude -->
<lon>-123.1</lon> <!-- longitude -->
<accuracy>14</accuracy> <!-- zoom level to item this indicates not precise -->
</geo>
<photo_city>Vancouver, BC</photo_city> <!-- Political location name often City, Province/State -->
<photo_loc>Granville Island</photo_loc> <!-- General location name often neighourhood or building -->
<photo_desc>An oversized avocado</photo_desc> <!-- The photo description only viewable in the lightbox view -->
<thumb_caption>Lunch</thumb_caption> <!-- Less than three words to descibe the thumbnail in gallery view -->
<search>Photographer name, subject names</search> <!-- keywords for searching, such as persons in the photo -->
</item>
<item id="2"><!-- video -->
<item><!-- video -->
<type>video</type>
<id>1</id> <!-- id attribute must be unique for this album; used by JavaScript & for character association -->
<filename>2012-fireplace.mp4</filename> <!-- History supports both HTML5 video formats for best browser support; must start with YYYY year; photos and thumbs must be places in this folder too -->
<filename>2012-fireplace.webm</filename>
<photo_city>Vancouver, BC</photo_city>
Expand Down
Loading
Loading