Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/skip_ci-maven_3.9.5' into skip_c…
Browse files Browse the repository at this point in the history
…i-node-18.18.0
  • Loading branch information
DanielFran committed Oct 13, 2023
2 parents 4e1a383 + 01ca101 commit 493ce25
Show file tree
Hide file tree
Showing 386 changed files with 4,851 additions and 3,550 deletions.
2 changes: 1 addition & 1 deletion .blueprint/code-workspace/generator.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { join } from 'path';
import _ from 'lodash';
import * as _ from 'lodash-es';
import BaseGenerator from '../../generators/base/index.mjs';
import { getPackageRoot } from '../../lib/index.mjs';
import command from './command.mjs';
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Go to the [generator-jhipster project](https://github.com/jhipster/generator-jhi
Since v8 `generator-jhipster` is written in typescript.
To run it you need to compile to javascript or use a just-in-time compilation.

#### Runnning jit executable
#### Running jit executable

The executable is located at `bin/jhipster.cjs`.
You can alias it to `jhipster` command:
Expand Down Expand Up @@ -339,7 +339,7 @@ Daily builds samples are prefixed with `daily-`.
#### Samples folder
A common samples folder will be used if `--global` option is used like `jhipster generate-sample ng-default --global`.
At first execution a prompt will ask for the samples folder, the choosen value will be reused at next executions.
At first execution a prompt will ask for the samples folder, the chosen value will be reused at next executions.
At samples folder, a `jhipster-samples.code-workspace` is generated. It provides a single vscode workspace for `generator-jhipster` and samples generated at the samples folder. It's very used for quick looks.

### Testing samples
Expand Down
2 changes: 1 addition & 1 deletion cli/environment-builder.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { existsSync, readFileSync } from 'fs';
import path, { dirname, resolve } from 'path';
import { fileURLToPath, pathToFileURL } from 'url';
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';
import Environment from 'yeoman-environment';
import { QueuedAdapter } from '@yeoman/adapter';

Expand Down
4 changes: 2 additions & 2 deletions cli/jhipster-command.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ export default class JHipsterCommand extends Command {

addJHipsterConfigs(configs = {}, blueprintOptionDescription) {
Object.entries(configs).forEach(([name, config]) => {
if (config.cli) {
const option = convertConfigToOption(name, config);
const option = convertConfigToOption(name, config);
if (option) {
this._addGeneratorOption(kebabCase(option.name), option, blueprintOptionDescription);
}
});
Expand Down
6 changes: 6 additions & 0 deletions generators/angular/__snapshots__/generator.spec.mts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,9 @@ exports[`generator - angular gateway-oauth2-withAdminUi(true)-skipJhipsterDepend
"clientRoot/src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.html": {
"stateCleared": "modified",
},
"clientRoot/src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.spec.ts": {
"stateCleared": "modified",
},
"clientRoot/src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.ts": {
"stateCleared": "modified",
},
Expand Down Expand Up @@ -3112,6 +3115,9 @@ exports[`generator - angular monolith-jwt-skipUserManagement(false)-withAdminUi(
"src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.html": {
"stateCleared": "modified",
},
"src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.spec.ts": {
"stateCleared": "modified",
},
"src/main/webapp/app/admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.ts": {
"stateCleared": "modified",
},
Expand Down
8 changes: 4 additions & 4 deletions generators/angular/files-angular.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ export const files = {
common: [
clientRootTemplatesBlock({
templates: [
'.eslintrc.json',
'angular.json',
'ngsw-config.json',
'package.json',
'tsconfig.json',
'tsconfig.app.json',
'tsconfig.spec.json',
'jest.conf.js',
'.eslintrc.json',
'angular.json',
'ngsw-config.json',
'README.md.jhi.client.angular',
'webpack/environment.js',
'webpack/proxy.conf.js',
'webpack/webpack.custom.js',
Expand Down Expand Up @@ -399,6 +398,7 @@ export const files = {
'admin/logs/logs.service.spec.ts',
'admin/metrics/metrics.component.spec.ts',
'admin/metrics/metrics.service.spec.ts',
'admin/metrics/blocks/metrics-modal-threads/metrics-modal-threads.component.spec.ts',
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion generators/angular/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import _ from 'lodash';
import * as _ from 'lodash-es';
import chalk from 'chalk';
import { isFilePending } from 'mem-fs-editor/state';

Expand Down
2 changes: 1 addition & 1 deletion generators/angular/needle-api/needle-client-angular.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* limitations under the License.
*/
import chalk from 'chalk';
import _ from 'lodash';
import * as _ from 'lodash-es';

import needleClientBase from '../../client/needle-api/needle-client.mjs';
import { LINE_LENGTH } from '../../generator-constants.mjs';
Expand Down
12 changes: 6 additions & 6 deletions generators/angular/resources/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"@angular/common": "16.2.6",
"@angular/common": "16.2.9",
"@fortawesome/angular-fontawesome": "0.13.0",
"@fortawesome/fontawesome-svg-core": "6.4.2",
"@fortawesome/free-solid-svg-icons": "6.4.2",
Expand All @@ -21,15 +21,15 @@
"@angular-builders/custom-webpack": "16.0.1",
"@angular-builders/jest": "16.0.1",
"@angular-eslint/eslint-plugin": "16.2.0",
"@angular/cli": "16.2.3",
"@angular/cli": "16.2.6",
"@types/jest": "29.5.5",
"@types/node": "18.18.0",
"@typescript-eslint/eslint-plugin": "6.7.3",
"@types/node": "18.18.5",
"@typescript-eslint/eslint-plugin": "6.7.5",
"browser-sync": "2.29.3",
"browser-sync-webpack-plugin": "2.3.0",
"buffer": "6.0.3",
"copy-webpack-plugin": "11.0.0",
"eslint": "8.50.0",
"eslint": "8.51.0",
"eslint-config-prettier": "9.0.0",
"eslint-webpack-plugin": "4.0.1",
"folder-hash": "4.0.4",
Expand All @@ -40,7 +40,7 @@
"jest-sonar": "0.2.16",
"merge-jsons-webpack-plugin": "2.0.1",
"postcss-rtlcss": "4.0.8",
"rimraf": "5.0.4",
"rimraf": "5.0.5",
"ts-jest": "29.1.1",
"typescript": "5.1.6",
"webpack": "5.88.2",
Expand Down
7 changes: 4 additions & 3 deletions generators/angular/support/update-languages.mts
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,18 @@ function updateLanguagesInConstantsTask(this: BaseGenerator, { application, cont
}

function updateLanguagesInWebpackTask(this: BaseGenerator, { application, control = {} }: UpdateClientLanguagesTaskParam) {
const { clientSrcDir, languages } = application;
const { clientSrcDir, clientRootDir, languages } = application;
const { ignoreNeedlesError: ignoreNonExisting } = control;
let newContent = 'groupBy: [\n';
const srcRelativePath = this.relativeDir(clientRootDir, clientSrcDir);
languages?.forEach(language => {
newContent += ` { pattern: "./${clientSrcDir}i18n/${language}/*.json", fileName: "./i18n/${language}.json" },\n`;
newContent += ` { pattern: "./${srcRelativePath}i18n/${language}/*.json", fileName: "./i18n/${language}.json" },\n`;
});
newContent +=
' // jhipster-needle-i18n-language-webpack - JHipster will add/remove languages in this array\n' +
' ]';

this.editFile('webpack/webpack.custom.js', { ignoreNonExisting }, content =>
this.editFile(`${clientRootDir}webpack/webpack.custom.js`, { ignoreNonExisting }, content =>
content.replace(/groupBy:.*\[([^\]]*jhipster-needle-i18n-language-webpack[^\]]*)\]/g, newContent),
);
}
Expand Down
2 changes: 1 addition & 1 deletion generators/angular/templates/.eslintrc.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"project": [
"./tsconfig.app.json",
<%_ if (cypressTests) { _%>
"./<%= clientTestDir %>cypress/tsconfig.json",
"./<%= this.relativeDir(clientRootDir, cypressDir) %>tsconfig.json",
<%_ } _%>
"./tsconfig.spec.json"
]
Expand Down
28 changes: 16 additions & 12 deletions generators/angular/templates/angular.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
},
"root": "",
"sourceRoot": "<%= clientSrcDir.replace(/\/$/, "") %>",
"sourceRoot": "<%= this.relativeDir(clientRootDir, clientSrcDir).replace(/\/$/, "") %>",
"prefix": "<%= jhiPrefixDashed %>",
"architect": {
"build": {
Expand All @@ -41,12 +41,12 @@
"customWebpackConfig": {
"path": "./webpack/webpack.custom.js"
},
"outputPath": "<%= clientDistDir %>",
"index": "<%= clientSrcDir %>index.html",
"main": "<%= clientSrcDir %>main.ts",
"outputPath": "<%= this.relativeDir(clientRootDir, clientDistDir) %>",
"index": "<%= this.relativeDir(clientRootDir, clientSrcDir) %>index.html",
"main": "<%= this.relativeDir(clientRootDir, clientSrcDir) %>main.ts",
"polyfills": [
<%_ if (communicationSpringWebsocket) { _%>
"./<%= clientSrcDir %>sockjs-client.polyfill",
"./<%= this.relativeDir(clientRootDir, clientSrcDir) %>sockjs-client.polyfill",
<%_ } _%>
<%_ if (microfrontend) { _%>
"zone.js/dist/zone"
Expand All @@ -57,12 +57,15 @@
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"<%= clientSrcDir %>content",
"<%= clientSrcDir %>favicon.ico",
"<%= clientSrcDir %>manifest.webapp",
"<%= clientSrcDir %>robots.txt"
"<%= this.relativeDir(clientRootDir, clientSrcDir) %>content",
"<%= this.relativeDir(clientRootDir, clientSrcDir) %>favicon.ico",
"<%= this.relativeDir(clientRootDir, clientSrcDir) %>manifest.webapp",
"<%= this.relativeDir(clientRootDir, clientSrcDir) %>robots.txt"
],
"styles": [
"<%= this.relativeDir(clientRootDir, clientSrcDir) %>content/scss/vendor.scss",
"<%= this.relativeDir(clientRootDir, clientSrcDir) %>content/scss/global.scss"
],
"styles": ["<%= clientSrcDir %>content/scss/vendor.scss", "<%= clientSrcDir %>content/scss/global.scss"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -119,7 +122,8 @@
"test": {
"builder": "@angular-builders/jest:run",
"options": {
"configPath": "jest.conf.js"
"configPath": "jest.conf.js",
"tsConfig": "tsconfig.spec.json"
}
}
}
Expand All @@ -128,7 +132,7 @@
"cli": {
"cache": {
"enabled": true,
"path": "./<%= temporaryDir %>angular/",
"path": "./<%= this.relativeDir(clientRootDir, temporaryDir) %>angular/",
"environment": "all"
},
"packageManager": "<%= clientPackageManager %>"
Expand Down
10 changes: 5 additions & 5 deletions generators/angular/templates/jest.conf.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ module.exports = {
roots: ['<rootDir>', `<rootDir>/${baseUrl}`],
modulePaths: [`<rootDir>/${baseUrl}`],
setupFiles: ['jest-date-mock'],
cacheDirectory: '<rootDir>/<%= temporaryDir %>jest-cache',
coverageDirectory: '<rootDir>/<%= temporaryDir %>test-results/',
cacheDirectory: '<rootDir>/<%= this.relativeDir(clientRootDir, temporaryDir) %>jest-cache',
coverageDirectory: '<rootDir>/<%= this.relativeDir(clientRootDir, temporaryDir) %>test-results/',
moduleNameMapper: pathsToModuleNameMapper(paths, { prefix: `<rootDir>/${baseUrl}/` }),
reporters: [
'default',
['jest-junit', { outputDirectory: '<rootDir>/<%= temporaryDir %>test-results/', outputName: 'TESTS-results-jest.xml' }],
['jest-sonar', { outputDirectory: './<%= temporaryDir %>test-results/jest', outputName: 'TESTS-results-sonar.xml' }],
['jest-junit', { outputDirectory: '<rootDir>/<%= this.relativeDir(clientRootDir, temporaryDir) %>test-results/', outputName: 'TESTS-results-jest.xml' }],
['jest-sonar', { outputDirectory: './<%= this.relativeDir(clientRootDir, temporaryDir) %>test-results/jest', outputName: 'TESTS-results-sonar.xml' }],
],
testMatch: ['<rootDir>/<%= clientSrcDir %>app/**/@(*.)@(spec.ts)'],
testMatch: ['<rootDir>/<%= this.relativeDir(clientRootDir, clientSrcDir) %>app/**/@(*.)@(spec.ts)'],
testEnvironmentOptions: {
url: 'https://jhipster.tech',
},
Expand Down
4 changes: 2 additions & 2 deletions generators/angular/templates/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
"prettier:format": "prettier --write \"{,src/**/,webpack/,.blueprint/**/}*.{<%= prettierExtensions %>}\"",
"lint": "eslint . --ext .js,.ts",
"lint:fix": "<%= clientPackageManager %> run lint -- --fix",
"cleanup": "rimraf <%= clientDistDir %>",
"clean-www": "rimraf <%= clientDistDir %>app/{src,<%= temporaryDir %>}",
"cleanup": "rimraf <%= this.relativeDir(clientRootDir, temporaryDir) %>",
"clean-www": "rimraf <%= this.relativeDir(clientRootDir, clientDistDir) %>",
"jest": "jest --coverage --logHeapUsage --maxWorkers=2 --config jest.conf.js",
"start": "ng serve<% if (!microfrontend) { %> --hmr<% } %>",
"start-tls": "<%= clientPackageManager %> run webapp:dev-ssl",
Expand Down
Loading

0 comments on commit 493ce25

Please sign in to comment.