Skip to content

Commit 45afe36

Browse files
authored
Merge pull request #345 from nulib/deploy/staging
Push to production
2 parents d41bac5 + 27cc9a3 commit 45afe36

File tree

102 files changed

+24987
-1472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+24987
-1472
lines changed

.github/workflows/run-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515

1616
steps:
1717
- name: Cancel Previous Runs
18-
uses: styfle/cancel-workflow-action@0.9.1
18+
uses: styfle/cancel-workflow-action@0.12.1
1919

2020
- name: Get files
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- name: Setup NodeJS
24-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2525
with:
2626
node-version: "lts/*"
2727

2828
- name: Install dependencies
29-
run: npm ci
29+
run: npm ci --force
3030

3131
- name: Run tests
3232
run: npm run test:ci

.husky/pre-commit

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

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"tabWidth": 2
3+
}

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,22 @@ The API endpoint is an environment variable which is accessed in a local dev env
103103

104104
## Code Quality
105105

106-
The app uses ESLint with a plugin for TypeScript support.
106+
### Prettier
107+
108+
There are no pre-commit hooks, however deploy CI will run a Prettier check on all files to ensure code quality. It's recommended to:
109+
110+
- Install the [Prettier VSCode extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
111+
- Enable the "Format on Save" setting in VSCode
112+
- Manually validate and/or fix, by running Prettier locally using the following commands:
113+
114+
```bash
115+
npm run prettier:check # Check for formatting issues
116+
npm run prettier:fix # Fix formatting issues
117+
```
118+
119+
### ESLint
120+
121+
The app uses ESLint with a plugin for TypeScript support. Note currently with NextJS `v14`, this command won't run due to a dependency issue with ESLint `v9` support. Hopefully resolved by NextJS soon.
107122

108123
```bash
109124
npm run lint

components/About/CollectionGrid.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import PhotoFeature, {
22
PhotoFeatureProps,
33
} from "@/components/Shared/PhotoFeature/PhotoFeature";
4+
45
import { CollectionGridStyled } from "components/About/CollectionGridStyled";
56

67
interface Props {

components/Clover/ViewerWrapper.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe("WorkViewerWrapper", () => {
3434
isWorkRestricted={true}
3535
manifestId="http://testing.com"
3636
/>
37-
</UserContext.Provider>
37+
</UserContext.Provider>,
3838
);
3939

4040
expect(await screen.findByText(readingRoomMessage)).toBeInTheDocument();
@@ -50,7 +50,7 @@ describe("WorkViewerWrapper", () => {
5050
isWorkRestricted={false}
5151
manifestId="http://testing.com"
5252
/>
53-
</UserContext.Provider>
53+
</UserContext.Provider>,
5454
);
5555

5656
let el;

components/Clover/ViewerWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const CloverViewer = dynamic(
1818
() => import("@samvera/clover-iiif/viewer"),
1919
{
2020
ssr: false,
21-
}
21+
},
2222
);
2323

2424
interface WrapperProps {

components/Collection/Tabs/Explore.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const topMetadata = [
1717
describe("CollectionTabsExplore", () => {
1818
it("renders the description", async () => {
1919
render(
20-
<CollectionTabsExplore collectionId="abc123" topMetadata={topMetadata} />
20+
<CollectionTabsExplore collectionId="abc123" topMetadata={topMetadata} />,
2121
);
2222
expect(screen.getByTestId("explore-wrapper"));
2323
});

components/Collection/Tabs/Explore.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const CollectionTabsExplore: React.FC<CollectionTabsExploreProps> = ({
2828
subject.value.map((subjectValue) => {
2929
const str = `${url}/search?query=collection.id:"${collectionId}" AND ${subject.field}:"${subjectValue}"&collectionLabel=${subjectValue}&collectionSummary=${""}&as=iiif`;
3030
return str;
31-
})
31+
}),
3232
);
3333
}, [collectionId, topMetadata]);
3434

components/Facets/Facet/GenericFacet.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe("Facet GenericFacet UI component", () => {
8383
id: "genre",
8484
label: "Genre",
8585
}}
86-
/>
86+
/>,
8787
);
8888
}
8989
it("renders facet title", async () => {

0 commit comments

Comments
 (0)