Skip to content

Commit

Permalink
Merge pull request #21082 from mshima/skip_ci-force-yo
Browse files Browse the repository at this point in the history
don't load manually written config file to mem-fs
  • Loading branch information
DanielFran authored Feb 12, 2023
2 parents 8eb4892 + d4f0557 commit 3424cec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 80 deletions.
14 changes: 0 additions & 14 deletions generators/bootstrap/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import memFsEditor from 'mem-fs-editor';
import environmentTransfrom from 'yeoman-environment/transform';
import { transform } from 'p-transform';
import { stat } from 'fs/promises';
Expand Down Expand Up @@ -46,9 +45,6 @@ const {
patternSpy,
} = environmentTransfrom;

const { State } = memFsEditor as any;
const { hasState, setModifiedFileState } = State;

const TRANSFORM_PRIORITY = BaseGenerator.asPriority(TRANSFORM);
const PRE_CONFLICTS_PRIORITY = BaseGenerator.asPriority(PRE_CONFLICTS);

Expand Down Expand Up @@ -181,17 +177,7 @@ export default class BootstrapGenerator extends BaseGenerator {
const { withGeneratedFlag, autoCrlf } = this.jhipsterConfig;
const env: any = this.env;

// JDL writes directly to disk, set the file as modified so prettier will be applied
const { ignoreErrors } = this.options;
if (!this.upgradeCommand) {
stream = stream.pipe(
patternSpy((file: any) => {
if (file.contents && !hasState(file) && !this.options.reproducibleTests) {
setModifiedFileState(file);
}
}, '**/{.yo-rc.json,.jhipster/*.json}').name('jhipster:config-files:modify')
);
}

const conflicterStatus = {
fileActions: [
Expand Down
66 changes: 0 additions & 66 deletions test/__snapshots__/openapi-client.spec.mts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,6 @@ exports[`generator - OpenAPI Client Spring: microservice petstore custom endpoin
"contents": "pom.xml
README.md
package.json
",
"stateCleared": "modified",
},
".yo-rc.json": {
"contents": "{
"generator-jhipster": {
"applicationType": "microservice",
"baseName": "sampleOpenApiClient",
"packageName": "com.mycompany.myapp",
"packageFolder": "com/mycompany/myapp",
"serverPort": "8081",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "h2Memory",
"prodDatabaseType": "mysql",
"searchEngine": "no",
"messageBroker": "no",
"serviceDiscoveryType": "consul",
"buildTool": "maven",
"enableSwaggerCodegen": true,
"jwtSecretKey": "Y2Q4NzYwMzEwMzNiZTExYzI1Y2E2Yjg2MGViNjRjMGE2YjcwNTEzY2ZkMDgxNTYwNTUxZWJjMzJhYjUwY2JiOTBiNjk3YWExMWRiNWM0MDljOTJhN2M2ODBkZDY5MjQ4MTVhYmUyZGUwYjFiODE1YmFhMTE0MjY2NDRiZDI5NDI=",
"testFrameworks": [],
"enableTranslation": false,
"skipClient": true,
"skipUserManagement": true
}
}
",
"stateCleared": "modified",
},
Expand All @@ -60,42 +30,6 @@ exports[`generator - OpenAPI Client Spring: microservice petstore regenerate sh
"contents": "pom.xml
README.md
package.json
",
"stateCleared": "modified",
},
".yo-rc.json": {
"contents": "{
"generator-jhipster": {
"applicationType": "microservice",
"baseName": "sampleOpenApiClient",
"packageName": "com.mycompany.myapp",
"packageFolder": "com/mycompany/myapp",
"serverPort": "8081",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "h2Memory",
"prodDatabaseType": "mysql",
"searchEngine": "no",
"messageBroker": "no",
"serviceDiscoveryType": "consul",
"buildTool": "maven",
"enableSwaggerCodegen": true,
"jwtSecretKey": "Y2Q4NzYwMzEwMzNiZTExYzI1Y2E2Yjg2MGViNjRjMGE2YjcwNTEzY2ZkMDgxNTYwNTUxZWJjMzJhYjUwY2JiOTBiNjk3YWExMWRiNWM0MDljOTJhN2M2ODBkZDY5MjQ4MTVhYmUyZGUwYjFiODE1YmFhMTE0MjY2NDRiZDI5NDI=",
"testFrameworks": [],
"enableTranslation": false,
"skipClient": true,
"skipUserManagement": true,
"openApiClients": {
"petstore": {
"spec": "petstore-openapi-3.yml",
"generatorName": "spring"
}
}
}
}
",
"stateCleared": "modified",
},
Expand Down

0 comments on commit 3424cec

Please sign in to comment.