Skip to content

Commit eccd9c0

Browse files
authored
Upgrade generator-jhipster to v9.0.0-beta.3 (#341)
* Upgrade generator-jhipster to v9.0.0-beta.2 * cleanup * bump yeoman-environment * adjusts * Fix Java package directory variable in customizeArchTest * adjusts * drop SharedModule * update to beta.3 * adjusts * Import DatePipe in entity-audit.component.ts.ejs * Add JsonPipe import to entity-audit component * Refactor dependency injection in EntityAuditModalComponent Refactor EntityAuditModalComponent to use Angular's inject function for dependency injection. * Update javers-core version to 7.10.0 * Refactor EntityAuditService to use inject for HttpClient * Conditionally render ngx-unified-diff component
1 parent d359664 commit eccd9c0

43 files changed

Lines changed: 2738 additions & 5132 deletions

Some content is hidden

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

.blueprint/cli/commands.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013-2025 the original author or authors from the JHipster project.
2+
* Copyright 2013-2026 the original author or authors from the JHipster project.
33
*
44
* This file is part of the JHipster project, see https://www.jhipster.tech/
55
* for more information.

.blueprint/generate-sample/command.mjs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013-2025 the original author or authors from the JHipster project.
2+
* Copyright 2013-2026 the original author or authors from the JHipster project.
33
*
44
* This file is part of the JHipster project, see https://www.jhipster.tech/
55
* for more information.
@@ -16,8 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
import { GENERATOR_APP } from 'generator-jhipster/generators';
20-
import { getGithubSamplesGroup, getGithubSamplesGroups } from 'generator-jhipster/testing';
19+
import { getGithubSamplesGroup, getGithubSamplesGroups } from 'generator-jhipster/ci';
2120

2221
const DEFAULT_SAMPLES_GROUP = 'samples';
2322

@@ -45,7 +44,7 @@ const command = {
4544
},
4645
prompt: gen => ({
4746
when: !gen.all && !gen.sampleName,
48-
type: 'list',
47+
type: 'select',
4948
message: 'which sample group do you want to lookup?',
5049
choices: async () => getGithubSamplesGroups(gen.templatePath(gen.samplesFolder ?? '')),
5150
default: DEFAULT_SAMPLES_GROUP,
@@ -58,7 +57,7 @@ const command = {
5857
sampleName: {
5958
prompt: gen => ({
6059
when: !gen.all,
61-
type: 'list',
60+
type: 'select',
6261
message: 'which sample do you want to generate?',
6362
choices: async answers => {
6463
const samples = await getGithubSamplesGroup(gen.templatePath(), answers.samplesGroup ?? gen.samplesGroup);
@@ -75,8 +74,7 @@ const command = {
7574
scope: 'generator',
7675
},
7776
},
78-
options: {},
79-
import: [GENERATOR_APP],
77+
import: ['app'],
8078
};
8179

8280
export default command;

.blueprint/generate-sample/generator.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { readdir } from 'node:fs/promises';
21
import { readFileSync } from 'node:fs';
2+
import { readdir } from 'node:fs/promises';
33
import { extname, join } from 'node:path';
4+
5+
import { getGithubSamplesGroup } from 'generator-jhipster/ci';
46
import BaseGenerator from 'generator-jhipster/generators/base';
5-
import { getGithubSamplesGroup } from 'generator-jhipster/testing';
67

78
export default class extends BaseGenerator {
89
/** @type {string | undefined} */

.blueprint/github-build-matrix/__snapshots__/generator.spec.mjs.snap

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
55
"include": [
66
{
77
"default-environment": "prod",
8-
"java-version": "17",
8+
"java-version": "21",
99
"job-name": "custom, maven, postgresql-mvc-jwt",
1010
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
11-
"node-version": "22.15.0",
12-
"npm-version": "11.3.0",
11+
"node-version": "24.13.0",
12+
"npm-version": "11.8.0",
1313
"os": "ubuntu-latest",
1414
"sample": "maven-custom",
1515
"sample-file": "postgresql-mvc-jwt",
@@ -22,11 +22,11 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
2222
},
2323
{
2424
"default-environment": "prod",
25-
"java-version": "17",
25+
"java-version": "21",
2626
"job-name": "javers, maven, postgresql-mvc-jwt",
2727
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
28-
"node-version": "22.15.0",
29-
"npm-version": "11.3.0",
28+
"node-version": "24.13.0",
29+
"npm-version": "11.8.0",
3030
"os": "ubuntu-latest",
3131
"sample": "maven-javers",
3232
"sample-file": "postgresql-mvc-jwt",
@@ -39,11 +39,11 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
3939
},
4040
{
4141
"default-environment": "prod",
42-
"java-version": "17",
42+
"java-version": "21",
4343
"job-name": "custom, gradle, postgresql-mvc-jwt",
4444
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
45-
"node-version": "22.15.0",
46-
"npm-version": "11.3.0",
45+
"node-version": "24.13.0",
46+
"npm-version": "11.8.0",
4747
"os": "ubuntu-latest",
4848
"sample": "gradle-custom",
4949
"sample-file": "postgresql-mvc-jwt",
@@ -56,11 +56,11 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
5656
},
5757
{
5858
"default-environment": "prod",
59-
"java-version": "17",
59+
"java-version": "21",
6060
"job-name": "javers, gradle, postgresql-mvc-jwt",
6161
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
62-
"node-version": "22.15.0",
63-
"npm-version": "11.3.0",
62+
"node-version": "24.13.0",
63+
"npm-version": "11.8.0",
6464
"os": "ubuntu-latest",
6565
"sample": "gradle-javers",
6666
"sample-file": "postgresql-mvc-jwt",
@@ -80,11 +80,11 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
8080
"include": [
8181
{
8282
"default-environment": "prod",
83-
"java-version": "17",
83+
"java-version": "21",
8484
"job-name": "custom, maven, postgresql-mvc-jwt",
8585
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
86-
"node-version": "22.15.0",
87-
"npm-version": "11.3.0",
86+
"node-version": "24.13.0",
87+
"npm-version": "11.8.0",
8888
"os": "ubuntu-latest",
8989
"sample": "maven-custom",
9090
"sample-file": "postgresql-mvc-jwt",
@@ -97,11 +97,11 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
9797
},
9898
{
9999
"default-environment": "prod",
100-
"java-version": "17",
100+
"java-version": "21",
101101
"job-name": "javers, maven, postgresql-mvc-jwt",
102102
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
103-
"node-version": "22.15.0",
104-
"npm-version": "11.3.0",
103+
"node-version": "24.13.0",
104+
"npm-version": "11.8.0",
105105
"os": "ubuntu-latest",
106106
"sample": "maven-javers",
107107
"sample-file": "postgresql-mvc-jwt",
@@ -114,11 +114,11 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
114114
},
115115
{
116116
"default-environment": "prod",
117-
"java-version": "17",
117+
"java-version": "21",
118118
"job-name": "custom, gradle, postgresql-mvc-jwt",
119119
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
120-
"node-version": "22.15.0",
121-
"npm-version": "11.3.0",
120+
"node-version": "24.13.0",
121+
"npm-version": "11.8.0",
122122
"os": "ubuntu-latest",
123123
"sample": "gradle-custom",
124124
"sample-file": "postgresql-mvc-jwt",
@@ -131,11 +131,11 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
131131
},
132132
{
133133
"default-environment": "prod",
134-
"java-version": "17",
134+
"java-version": "21",
135135
"job-name": "javers, gradle, postgresql-mvc-jwt",
136136
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
137-
"node-version": "22.15.0",
138-
"npm-version": "11.3.0",
137+
"node-version": "24.13.0",
138+
"npm-version": "11.8.0",
139139
"os": "ubuntu-latest",
140140
"sample": "gradle-javers",
141141
"sample-file": "postgresql-mvc-jwt",

.blueprint/github-build-matrix/command.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const command = {
1919
scope: 'generator',
2020
},
2121
},
22-
options: {},
2322
};
2423

2524
export default command;

.blueprint/github-build-matrix/generator.mjs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
import { join } from 'node:path';
2-
import BaseGenerator from 'generator-jhipster/generators/base';
3-
import { convertToGitHubMatrix, getGithubOutputFile, getGithubSamplesGroup, setGithubTaskOutput } from 'generator-jhipster/testing';
42

5-
export default class extends BaseGenerator {
3+
import { convertToGitHubMatrix, getGithubOutputFile, getGithubSamplesGroup, setGithubTaskOutput } from 'generator-jhipster/ci';
4+
import BaseCoreGenerator from 'generator-jhipster/generators/base-core';
5+
6+
export default class extends BaseCoreGenerator {
67
/** @type {string} */
78
samplesFolder;
89
/** @type {string} */
910
samplesGroup;
1011
/** @type {object} */
1112
matrix;
1213

13-
constructor(args, opts, features) {
14-
super(args, opts, { ...features, queueCommandTasks: true, jhipsterBootstrap: false });
15-
}
16-
17-
get [BaseGenerator.WRITING]() {
18-
return this.asWritingTaskGroup({
14+
get [BaseCoreGenerator.WRITING]() {
15+
return this.asAnyTaskGroup({
1916
async buildMatrix() {
2017
const { samplesGroup = 'samples' } = this;
2118
const templatePath = this.templatePath('../../generate-sample/templates/');

.blueprint/github-build-matrix/generator.spec.mjs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
import { basename, dirname, join } from 'path';
2-
import { fileURLToPath } from 'url';
31
import { beforeAll, describe, expect, it } from 'vitest';
4-
import { getGithubSamplesGroups, defaultHelpers as helpers, runResult } from 'generator-jhipster/testing';
2+
import { basename, join } from 'path';
53

6-
const __filename = fileURLToPath(import.meta.url);
7-
const __dirname = dirname(__filename);
4+
import { getGithubSamplesGroups } from 'generator-jhipster/ci';
5+
import { defaultHelpers as helpers, runResult } from 'generator-jhipster/testing';
86

9-
const generator = basename(__dirname);
7+
const generator = basename(import.meta.dirname);
108

119
describe(`generator - ${generator}`, async () => {
12-
const groups = await getGithubSamplesGroups(join(__dirname, '../generate-sample/templates/'));
10+
const groups = await getGithubSamplesGroups(join(import.meta.dirname, '../generate-sample/templates/'));
1311
for (const workflow of groups.map(sample => sample.split('.')[0])) {
1412
describe(`with ${workflow}`, () => {
1513
beforeAll(async () => {
16-
await helpers.runJHipster(join(__dirname, 'index.mjs'), { useEnvironmentBuilder: true }).withArguments(workflow);
14+
await helpers.runJHipster(join(import.meta.dirname, 'index.mjs'), { prepareEnvironment: true }).withArguments(workflow);
1715
});
1816

1917
it('should match matrix value', () => {

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
*.scss text
2626
*.sh text eol=lf
2727
*.sql text
28-
*.txt text
2928
*.ts text
3029
*.xml text
3130
*.yaml text

.github/workflows/build-cache.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@ jobs:
1010
run:
1111
working-directory: ${{ github.workspace }}/app
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1414
with:
1515
path: generator-jhipster-entity-audit
16-
- uses: jhipster/actions/setup-runner@v0
16+
- uses: jhipster/actions/setup-runner@v1
1717
with:
18-
node-version: 20
18+
node-version: 24
1919
binary-dir: ${{ github.workspace }}/generator-jhipster-entity-audit/cli/
20-
- uses: jhipster/actions/cache-npm-dependencies@v0
20+
- uses: jhipster/actions/cache-npm-dependencies@v1
2121
with:
2222
generator-path: generator-jhipster-entity-audit
2323
if: always()
2424
- run: cli.cjs generate-sample --all
2525
continue-on-error: true
2626
- run: npm run backend:build-cache --workspaces
2727
continue-on-error: true
28-
- uses: jhipster/actions/save-cache@v0
28+
- uses: jhipster/actions/save-cache@v1
2929
if: always()
3030
with:
3131
key: ${{ github.run_id }}
3232
npm: true
3333
maven: true
3434
gradle: true
35-
- uses: jhipster/actions/restore-cache@v0
35+
- uses: jhipster/actions/restore-cache@v1
3636
with:
3737
npm: true
3838
maven: true

.github/workflows/generator.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99
timeout-minutes: 10
1010
steps:
11-
- uses: actions/checkout@v4
12-
- uses: actions/setup-node@v4
11+
- uses: actions/checkout@v6
12+
- uses: actions/setup-node@v6
1313
with:
14-
node-version: 22
14+
node-version: 24
1515
cache: 'npm'
1616
- run: npm ci
1717
- run: npm run test

0 commit comments

Comments
 (0)