Skip to content

Commit

Permalink
bump generator-jhipster to v8.4.0 (#248)
Browse files Browse the repository at this point in the history
* bump generator-jhipster to v8.4.0

* Regenerate with 8.4.0

* recreate package-lock
  • Loading branch information
mshima committed May 7, 2024
1 parent 1eda20a commit 2f3b187
Show file tree
Hide file tree
Showing 11 changed files with 692 additions and 2,139 deletions.
3 changes: 2 additions & 1 deletion .blueprint/cli/commands.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013-2023 the original author or authors from the JHipster project.
* Copyright 2013-2024 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
Expand All @@ -20,6 +20,7 @@
const defaultCommands = {
'generate-sample': {
desc: 'Generate a test sample',
blueprint: '@jhipster/jhipster-dev',
},
};

Expand Down
8 changes: 2 additions & 6 deletions .blueprint/generate-sample/command.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2013-2023 the original author or authors from the JHipster project.
* Copyright 2013-2024 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
Expand Down Expand Up @@ -27,11 +27,7 @@ const command = {
},
},
options: {},
import: [
GENERATOR_APP,
// Add blueprint server generator because RC.1 is not loading blueprints options for blueprint generator command.
`jhipster-entity-audit:server`,
],
import: [GENERATOR_APP],
};

export default command;
15 changes: 12 additions & 3 deletions .blueprint/generate-sample/generator.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import { readdir } from 'node:fs/promises';
import { readFileSync } from 'node:fs';
import BaseGenerator from 'generator-jhipster/generators/base';
import command from './command.mjs';

export default class extends BaseGenerator {
sampleName;

constructor(args, opts, features) {
super(args, opts, { ...features, jhipsterBootstrap: false });
}

get [BaseGenerator.INITIALIZING]() {
return this.asInitializingTaskGroup({
async parseCommand() {
await this.parseCurrentJHipsterCommand();
},
async initializeOptions() {
this.parseJHipsterArguments(command.arguments);
if (this.sampleName && !this.sampleName.endsWith('.jdl')) {
this.sampleName += '.jdl';
}
this.parseJHipsterOptions(command.options);
},
});
}
Expand Down Expand Up @@ -44,13 +49,17 @@ export default class extends BaseGenerator {
get [BaseGenerator.END]() {
return this.asEndTaskGroup({
async generateSample() {
const packageJson = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url)));
const projectVersion = `${packageJson.version}-git`;

await this.composeWithJHipster('jdl', {
generatorArgs: [this.sampleName],
generatorOptions: {
skipJhipsterDependencies: true,
insight: false,
skipChecks: true,
skipInstall: true,
projectVersion,
},
});
},
Expand Down
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
],
"rules": {
"func-names": "off",
"import/no-unresolved": "off",
"no-restricted-syntax": [
"error",
{
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ out/
######################
.gradle/
/build/
/buildSrc/.gradle/
/buildSrc/build/

######################
# Package Files
Expand Down
4 changes: 2 additions & 2 deletions .yo-resolve
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
!package.json skip

generators/** skip
README.md skip
2 changes: 1 addition & 1 deletion cli/cli.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const blueprint = packageFolderName.startsWith('jhipster-') ? `generator-${packa
console.log('===================== JHipster entity-audit =====================');
console.log('');
},
lookups: [{ packagePaths: [packagePath], lookups: ['generators'] }],
lookups: [{ packagePaths: [packagePath] }],
}).catch(done);

process.on('unhandledRejection', up => {
Expand Down
3 changes: 0 additions & 3 deletions generators/server/__snapshots__/generator.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ exports[`SubGenerator server of entity-audit JHipster blueprint > run > should s
"src/main/java/com/mycompany/myapp/config/LiquibaseConfiguration.java": {
"stateCleared": "modified",
},
"src/main/java/com/mycompany/myapp/config/LocaleConfiguration.java": {
"stateCleared": "modified",
},
"src/main/java/com/mycompany/myapp/config/LoggingAspectConfiguration.java": {
"stateCleared": "modified",
},
Expand Down
Loading

0 comments on commit 2f3b187

Please sign in to comment.