Skip to content

Commit 5781454

Browse files
authored
Merge pull request #205 from OpenLiberty/staging
Merge staging to prod - Update react nextjs (#199)
2 parents b5ecc04 + 424e4ee commit 5781454

File tree

93 files changed

+3168
-37021
lines changed

Some content is hidden

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

93 files changed

+3168
-37021
lines changed

Diff for: .github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
VALIDATE_CSS: false
3030
VALIDATE_TYPESCRIPT_STANDARD: false
3131
VALIDATE_JAVASCRIPT_STANDARD: false
32+
VALIDATE_HTML: false
3233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3334
LINTER_RULES_PATH: ./tools/pr-checker/linters/
3435
DEFAULT_BRANCH: prod

Diff for: README.adoc

+88-67
Large diffs are not rendered by default.

Diff for: finish/pom.xml

+11-11
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1313
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
14-
<maven.compiler.source>11</maven.compiler.source>
15-
<maven.compiler.target>11</maven.compiler.target>
14+
<maven.compiler.source>11</maven.compiler.source>
15+
<maven.compiler.target>11</maven.compiler.target>
1616
<!-- Liberty configuration -->
1717
<liberty.var.http.port>9080</liberty.var.http.port>
1818
<liberty.var.https.port>9443</liberty.var.https.port>
@@ -23,13 +23,13 @@
2323
<dependency>
2424
<groupId>jakarta.platform</groupId>
2525
<artifactId>jakarta.jakartaee-api</artifactId>
26-
<version>10.0.0</version>
26+
<version>10.0.0</version>
2727
<scope>provided</scope>
2828
</dependency>
2929
<dependency>
3030
<groupId>org.eclipse.microprofile</groupId>
3131
<artifactId>microprofile</artifactId>
32-
<version>6.1</version>
32+
<version>6.1</version>
3333
<type>pom</type>
3434
<scope>provided</scope>
3535
</dependency>
@@ -38,7 +38,7 @@
3838
<dependency>
3939
<groupId>org.junit.jupiter</groupId>
4040
<artifactId>junit-jupiter</artifactId>
41-
<version>5.10.3</version>
41+
<version>5.10.3</version>
4242
<scope>test</scope>
4343
</dependency>
4444
</dependencies>
@@ -75,8 +75,8 @@
7575
<goal>install-node-and-npm</goal>
7676
</goals>
7777
<configuration>
78-
<nodeVersion>v21.6.2</nodeVersion>
79-
<npmVersion>10.2.4</npmVersion>
78+
<nodeVersion>v20.14.0</nodeVersion>
79+
<npmVersion>10.7.0</npmVersion>
8080
</configuration>
8181
</execution>
8282
<!-- tag::node-resource-install[] -->
@@ -123,9 +123,9 @@
123123
<plugin>
124124
<groupId>org.apache.maven.plugins</groupId>
125125
<artifactId>maven-resources-plugin</artifactId>
126-
<version>3.3.1</version>
126+
<version>3.3.1</version>
127127
<executions>
128-
<execution>
128+
<execution>
129129
<id>Copy frontend build to target</id>
130130
<phase>process-resources</phase>
131131
<goals>
@@ -141,7 +141,7 @@
141141
<resource>
142142
<directory>
143143
<!-- tag::directory[] -->
144-
${basedir}/src/main/frontend/build
144+
${basedir}/src/main/frontend/out
145145
<!-- end::directory[] -->
146146
</directory>
147147
<filtering>true</filtering>
@@ -154,4 +154,4 @@
154154
<!-- end::copy-plugin[] -->
155155
</plugins>
156156
</build>
157-
</project>
157+
</project>

Diff for: finish/src/main/frontend/.gitignore

+17-5
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,36 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
/node
54
/node_modules
65
/.pnp
76
.pnp.js
7+
.yarn/install-state.gz
88

99
# testing
1010
/coverage
1111

12+
# next.js
13+
/.next/
14+
/out/
15+
1216
# production
1317
/build
1418

1519
# misc
1620
.DS_Store
17-
.env.local
18-
.env.development.local
19-
.env.test.local
20-
.env.production.local
21+
*.pem
2122

23+
# debug
2224
npm-debug.log*
2325
yarn-debug.log*
2426
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

Diff for: finish/src/main/frontend/README.md

+23-54
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,37 @@
1-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
1+
# Next.js Project
2+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
23

3-
## Available Scripts
4+
## Getting Started
45

5-
In the project directory, you can run:
6+
First, run the development server:
67

7-
### `npm start`
8+
```bash
9+
npm run dev
10+
# or
11+
yarn dev
12+
# or
13+
pnpm dev
14+
# or
15+
bun dev
16+
```
817

9-
Runs the app in the development mode.<br />
10-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
18+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
1119

12-
The page will reload if you make edits.<br />
13-
You will also see any lint errors in the console.
20+
You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
1421

15-
### `npm test`
16-
17-
Launches the test runner in the interactive watch mode.<br />
18-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19-
20-
### `npm run build`
21-
22-
Builds the app for production to the `build` folder.<br />
23-
It correctly bundles React in production mode and optimizes the build for the best performance.
24-
25-
The build is minified and the filenames include the hashes.<br />
26-
Your app is ready to be deployed!
27-
28-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29-
30-
### `npm run eject`
31-
32-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
33-
34-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
35-
36-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
37-
38-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
22+
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
3923

4024
## Learn More
4125

42-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
43-
44-
To learn React, check out the [React documentation](https://reactjs.org/).
45-
46-
### Code Splitting
47-
48-
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
49-
50-
### Analyzing the Bundle Size
51-
52-
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
53-
54-
### Making a Progressive Web App
55-
56-
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
57-
58-
### Advanced Configuration
26+
To learn more about Next.js, take a look at the following resources:
5927

60-
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
28+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
29+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
6130

62-
### Deployment
31+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
6332

64-
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
33+
## Deploy on Vercel
6534

66-
### `npm run build` fails to minify
35+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
6736

68-
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
37+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

Diff for: finish/src/main/frontend/__tests__/App.test.jsx

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { describe, it, expect, test } from 'vitest'
2+
import { render, screen } from '@testing-library/react'
3+
import '@testing-library/jest-dom/vitest';
4+
import Home from '../src/app/page'
5+
import React from 'react';
6+
7+
8+
/**
9+
* @vitest-environment jsdom
10+
*/
11+
describe('Testing home page rendering', async () => {
12+
it('Should render the page correctly', async () => {
13+
// Setup
14+
render(<Home />)
15+
expect(screen.getByText(/Artist Web Service/i)).toBeInTheDocument();
16+
});
17+
});
18+

Diff for: finish/src/main/frontend/jsconfig.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
"paths": {
4+
"@/*": ["./src/*"]
5+
}
6+
}
7+
}

Diff for: finish/src/main/frontend/next.config.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @type {import('next').NextConfig}
3+
*/
4+
5+
const nextConfig = {
6+
output: 'export',
7+
}
8+
9+
module.exports = nextConfig

0 commit comments

Comments
 (0)