Skip to content

Commit 2a6b650

Browse files
authored
Merge branch 'main' into parammw
2 parents ea69016 + 78e652a commit 2a6b650

File tree

19 files changed

+177
-148
lines changed

19 files changed

+177
-148
lines changed

.github/workflows/coder.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@ jobs:
6161

6262
- name: Install node_modules
6363
run: yarn install
64+
working-directory: site
6465

6566
- name: "yarn lint"
6667
run: yarn lint
68+
working-directory: site
6769

6870
gen:
6971
name: "style/gen"
@@ -113,6 +115,7 @@ jobs:
113115

114116
- name: Install node_modules
115117
run: yarn install
118+
working-directory: site
116119

117120
- name: "make ${{ matrix.style }}"
118121
run: "make --output-sync -j ${{ matrix.style }}"
@@ -194,15 +197,18 @@ jobs:
194197
node-version: "14"
195198

196199
- run: yarn install
200+
working-directory: site
197201

198202
- run: yarn build
203+
working-directory: site
199204

200205
- run: yarn test:coverage
206+
working-directory: site
201207

202208
- uses: codecov/codecov-action@v2
203209
if: github.actor != 'dependabot[bot]'
204210
with:
205211
token: ${{ secrets.CODECOV_TOKEN }}
206-
files: ./coverage/lcov.info
212+
files: ./site/coverage/lcov.info
207213
flags: unittest-js
208214
fail_ci_if_error: true

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ yarn-error.log
1616

1717
# Front-end ignore
1818
.next/
19+
site/.eslintcache
1920
site/.next/
21+
site/node_modules/
22+
site/yarn-error.log
2023
coverage/
2124

2225
# Build
2326
bin/
24-
site/out/
27+
site/out/

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ fmt/prettier:
2626
@echo "--- prettier"
2727
# Avoid writing files in CI to reduce file write activity
2828
ifdef CI
29-
yarn run format:check
29+
cd site && yarn run format:check
3030
else
31-
yarn run format:write
31+
cd site && yarn run format:write
3232
endif
3333
.PHONY: fmt/prettier
3434

@@ -74,6 +74,6 @@ provisionersdk/proto: provisionersdk/proto/provisioner.proto
7474
.PHONY: provisionersdk/proto
7575

7676
site/out:
77-
yarn build
78-
yarn export
77+
cd site && yarn build
78+
cd site && yarn export
7979
.PHONY: site/out

jest.config.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

.eslintignore renamed to site/.eslintignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
# COPY PASTA OF .gitignore
33
###############################################################################
44
node_modules
5-
vendor
5+
vendor
6+
out
7+
coverage
8+
.next

.eslintrc.yaml renamed to site/.eslintrc.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ parser: "@typescript-eslint/parser"
1818
parserOptions:
1919
ecmaVersion: 2018
2020
project:
21-
- "./tsconfig.json"
22-
- "./site/tsconfig.json"
21+
- "./tsconfig.test.json"
2322
sourceType: module
2423
ecmaFeatures:
2524
jsx: true

.prettierignore renamed to site/.prettierignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ yarn-error.log
1212

1313
# Front-end ignore
1414
.next/
15-
site/.next/
16-
site/out/
17-
coverage/
15+
coverage/
16+
out/
File renamed without changes.

_jest/setupTests.ts renamed to site/_jest/setupTests.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
// Set up 'next-router-mock' to with our front-end tests:
66
// https://github.com/scottrippey/next-router-mock#quick-start
77
jest.mock("next/router", () => require("next-router-mock"))
8+
9+
// Suppress isolated modules warning
10+
export {}
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import React from "react"
22

33
export interface ErrorSummaryProps {
4-
error: Error
4+
error: Error | undefined
55
}
66

77
export const ErrorSummary: React.FC<ErrorSummaryProps> = ({ error }) => {
88
// TODO: More interesting error page
9+
10+
if (typeof error === "undefined") {
11+
return <div>{"Unknown error"}</div>
12+
}
13+
914
return <div>{error.toString()}</div>
1015
}

0 commit comments

Comments
 (0)