Skip to content

Commit

Permalink
Update generator-jhipster to 8.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored and github-actions[bot] committed Jun 25, 2024
1 parent b562fcd commit ab1de8f
Show file tree
Hide file tree
Showing 11 changed files with 1,052 additions and 765 deletions.
35 changes: 0 additions & 35 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package-lock.json
.git

# blueprint rules:
**/templates/**/
generators/**/templates/**/
1 change: 1 addition & 0 deletions .yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"written": true
}
},
"githubWorkflows": true,
"jhipsterVersion": "7.7.0",
"js": true,
"localBlueprint": false,
Expand Down
10 changes: 7 additions & 3 deletions cli/cli.cjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env node

const { dirname, join } = require('path');
const { dirname, basename, join } = require('path');
const { version, bin } = require('../package.json');

// Get package name to use as namespace.
// Allows blueprints to be aliased.
const packagePath = dirname(__dirname);
const packageFolderName = basename(packagePath);
const devBlueprintPath = join(packagePath, '.blueprint');
const blueprint = packageFolderName.startsWith('jhipster-') ? `generator-${packageFolderName}` : packageFolderName;

(async () => {
const { runJHipster, done, logger } = await import('generator-jhipster/cli');
Expand All @@ -15,9 +17,11 @@ const devBlueprintPath = join(packagePath, '.blueprint');
runJHipster({
executableName,
executableVersion: version,
defaultCommand: 'migrate',
defaultCommand: 'app',
devBlueprintPath,
commands: require('./commands.cjs'),
blueprints: {
[blueprint]: version,
},
printBlueprintLogo: () => {
console.log('===================== JHipster migrate =====================');
console.log('');
Expand Down
2 changes: 1 addition & 1 deletion cli/commands.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
migrate: {
desc: 'Run migrate sub-generator (migrate blueprint)',
description: 'Run migrate sub-generator (migrate blueprint)',
blueprint: 'generator-jhipster-migrate',
},
};
15 changes: 15 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import globals from 'globals';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import jhipsterRecommended from 'generator-jhipster/eslint/recommended';

export default [
{
languageOptions: {
globals: {
...globals.node,
},
},
},
jhipsterRecommended,
prettierRecommended,
];
2 changes: 1 addition & 1 deletion generators/migrate/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { dirname } from 'path';
import untildify from 'untildify';
import { fileURLToPath } from 'url';
import untildify from 'untildify';

export const V7_NODE = '16.20.2';

Expand Down
8 changes: 4 additions & 4 deletions generators/migrate/generator.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { setTimeout } from 'timers/promises';
import chalk from 'chalk';
import { readFile, rm, readdir, appendFile } from 'fs/promises';
import { join } from 'path';
import chalk from 'chalk';
import { transform } from 'p-transform';
import { globby } from 'globby';
import semver from 'semver';
import gitignore from 'parse-gitignore';
import { join } from 'path';
import latestVersion from 'latest-version';
import { loadFile } from 'mem-fs';
import { setModifiedFileState } from 'mem-fs-editor/state';
Expand All @@ -21,6 +21,8 @@ import {
} from 'generator-jhipster/generators/bootstrap/support';
import packageVersions from 'pkg-versions';

import { GENERATOR_JHIPSTER } from 'generator-jhipster';
import { GENERATOR_BOOTSTRAP } from 'generator-jhipster/generators';
import {
DEFAULT_CLI_OPTIONS,
DEFAULT_CLI_OPTIONS_V7,
Expand All @@ -37,9 +39,7 @@ import {
BASE_APPLICATION,
V7_NODE,
} from './constants.js';
import { GENERATOR_JHIPSTER } from 'generator-jhipster';
import command from './command.js';
import { GENERATOR_BOOTSTRAP } from 'generator-jhipster/generators';
import { normalizeBlueprintName } from './internal/blueprints.js';

export default class extends BaseGenerator {
Expand Down
2 changes: 1 addition & 1 deletion generators/migrate/generator.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { readFile } from 'fs/promises';
import assert from 'yeoman-assert';
import { beforeAll, describe, expect, it } from 'vitest';
import { readFile } from 'fs/promises';
import simpleGit from 'simple-git';
import { escapeRegExp } from 'lodash-es';

Expand Down
Loading

0 comments on commit ab1de8f

Please sign in to comment.