Skip to content

Commit

Permalink
bump prettier-plugin-java from 2.2.0 to 2.3.0 (#7263)
Browse files Browse the repository at this point in the history
  • Loading branch information
qmonmert authored Aug 22, 2023
1 parent ba58938 commit b385b0f
Show file tree
Hide file tree
Showing 60 changed files with 1,018 additions and 905 deletions.
57 changes: 17 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"lint-staged": "14.0.1",
"postcss-scss": "4.0.7",
"prettier": "3.0.2",
"prettier-plugin-java": "2.2.0",
"prettier-plugin-java": "2.3.0",
"prettier-plugin-packagejson": "2.4.5",
"pug-lint": "2.7.0",
"rimraf": "5.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ public class AngularHealthModuleFactory {

private static final String ADMIN_NAVIGATION_TEST =
"""
it('should navigate on admin endpoint', () => {
router.navigateByUrl('/admin');
});\
""";
it('should navigate on admin endpoint', () => {
router.navigateByUrl('/admin');
});\
""";

private static final String HEALTH_LINK = " <a routerLink=\"admin/health\" mat-menu-item><span>Health</span></a>";

private static final String ADMIN_ROUTING =
"""
{
path: 'admin',
loadChildren: () => import('./admin/admin-routing.module'),
},\
""";
{
path: 'admin',
loadChildren: () => import('./admin/admin-routing.module'),
},\
""";

public JHipsterModule buildModule(JHipsterModuleProperties properties) {
Assert.notNull("properties", properties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ public class AngularJwtModuleFactory {
},\
""";

private static final String AUTH_INTERCEPTOR_IMPORT = """
import { AuthInterceptor } from './app/auth/auth.interceptor';
""";
private static final String AUTH_INTERCEPTOR_IMPORT =
"""
import { AuthInterceptor } from './app/auth/auth.interceptor';
""";

private static final JHipsterSource SOURCE = from("client/angular/security/jwt/src/main/webapp/app");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public class AngularOauth2ModuleFactory {
private static final ElementReplacer ENVIRONMENT_NEEDLE = lineAfterRegex("export const environment *= *\\{");
private static final String KEYCLOAK_ENVIRONMENT =
"""
keycloak: {
url: 'http://localhost:9080',
realm: 'jhipster',
client_id: 'web_app'
},
""";
keycloak: {
url: 'http://localhost:9080',
realm: 'jhipster',
client_id: 'web_app'
},
""";

private static final Pattern EMPTY_ALLOWED_COMMON_DEPENDENCIES_PATTERN = Pattern.compile(
"(\"allowedCommonJsDependencies\": *\\[\\s*)\\]"
Expand Down Expand Up @@ -57,64 +57,69 @@ public class AngularOauth2ModuleFactory {

private static final String TEST_IMPORTS =
"""
import { By } from '@angular/platform-browser';
import { Oauth2AuthService } from "./auth/oauth2-auth.service";
import LoginComponent from './login/login.component';
""";
import { By } from '@angular/platform-browser';
import { Oauth2AuthService } from "./auth/oauth2-auth.service";
import LoginComponent from './login/login.component';
""";
private static final ElementReplacer TEST_NEEDLE = lineAfterRegex("^\\s+it\\('should have appName',[^}]+\\}\\);");

private static final String LOGIN_IMPORT = """
import LoginComponent from './login/login.component';
""";
private static final String LOGIN_IMPORT =
"""
import LoginComponent from './login/login.component';
""";

private static final String OAUTH2_AUTH_SERVICE_IMPORT =
"""
import { Oauth2AuthService } from './auth/oauth2-auth.service';
""";
import { Oauth2AuthService } from './auth/oauth2-auth.service';
""";

private static final ElementReplacer APPNAME_NEEDLE = lineAfterRegex("appName = '';");

private static final String INJECT_OAUTH2_AUTH_SERVICE = """
private oauth2AuthService = inject(Oauth2AuthService);\
""";
private static final String INJECT_OAUTH2_AUTH_SERVICE =
"""
private oauth2AuthService = inject(Oauth2AuthService);\
""";

private static final String INIT_AUTHENTICATION = """
this.oauth2AuthService.initAuthentication();\
""";
private static final String INIT_AUTHENTICATION =
"""
this.oauth2AuthService.initAuthentication();\
""";

private static final String INJECT_IMPORT = """
import { Component, inject, OnInit } from '@angular/core';
""";
private static final String INJECT_IMPORT =
"""
import { Component, inject, OnInit } from '@angular/core';
""";

private static final ElementReplacer INJECT_NEEDLE = text("import { Component, OnInit } from '@angular/core';");

private static final ElementReplacer BEFORE_EACH_NEEDLE = lineAfterRegex("comp = fixture.componentInstance;");

private static final String TESTBED_INJECT_OAUTH2_AUTH_SERVICE =
"""
oauth2AuthService = TestBed.inject(Oauth2AuthService);\
""";
oauth2AuthService = TestBed.inject(Oauth2AuthService);\
""";

private static final ElementReplacer TEST_APP_COMPONENT = lineAfterRegex("let comp: AppComponent;");

private static final String DECLARE_INJECT_OAUTH2_AUTH_SERVICE = """
let oauth2AuthService: Oauth2AuthService;\
""";
private static final String DECLARE_INJECT_OAUTH2_AUTH_SERVICE =
"""
let oauth2AuthService: Oauth2AuthService;\
""";

private static final String LOGIN_COMPONENT_TEST =
"""
it('should display login component', () => {
fixture.detectChanges();
it('should display login component', () => {
fixture.detectChanges();
expect(fixture.debugElement.query(By.directive(LoginComponent))).toBeTruthy();
});
""";
expect(fixture.debugElement.query(By.directive(LoginComponent))).toBeTruthy();
});
""";

private static final String HTTP_AUTH_INTERCEPTOR_IMPORT =
"""
import { HttpAuthInterceptor } from './app/auth/http-auth.interceptor';
""";
import { HttpAuthInterceptor } from './app/auth/http-auth.interceptor';
""";

private static final JHipsterSource SOURCE = from("client/angular/security/oauth2/src/main/webapp/app");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public class VueModulesFactory {
import { createPinia } from 'pinia';
import piniaPersist from 'pinia-plugin-persist';
""";
private static final String PINIA_PROVIDER = """
private static final String PINIA_PROVIDER =
"""
const pinia = createPinia();
pinia.use(piniaPersist);
app.use(pinia);
Expand Down
Loading

0 comments on commit b385b0f

Please sign in to comment.