From dfe6d4bc511771b7c2e63e8009056000270aa72b Mon Sep 17 00:00:00 2001 From: Jonathan Ruddell Date: Sun, 5 Dec 2021 22:28:30 -0500 Subject: [PATCH] fix jhipster v7.4.x compatibility and prettier differences --- .github/workflows/app.yml | 2 +- .github/workflows/ios.yml | 2 +- .github/workflows/sample-app.yml | 2 +- generators/app/index.js | 9 +---- generators/entity/index.js | 1 - package-lock.json | 64 ++++++++++++++++++++++++++------ 6 files changed, 56 insertions(+), 24 deletions(-) diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index 727e058ca..3b2ace8df 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - jhipster_version: [7.3.1, 6] + jhipster_version: [7, 6] node_version: [14.x] app_type: - JwtDtoWebsocketsApp diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 0e7b47f90..7a3764b01 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - jhipster_version: [7.3.1] + jhipster_version: [7] node_version: [14.x] app_type: - JwtDtoApp diff --git a/.github/workflows/sample-app.yml b/.github/workflows/sample-app.yml index ea23e0d7a..ccdef1267 100644 --- a/.github/workflows/sample-app.yml +++ b/.github/workflows/sample-app.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - jhipster_version: [7.3.1] + jhipster_version: [7] node_version: [14.15.0] os: [ubuntu-latest] env: diff --git a/generators/app/index.js b/generators/app/index.js index ffc038a70..790ef85ad 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -19,13 +19,7 @@ const { module.exports = class extends AppGenerator { constructor(args, opts) { - super(args, { fromBlueprint: true, ...opts }); // fromBlueprint variable is important - - const jhContext = (this.jhipsterContext = this.options.jhipsterContext); - - if (!jhContext) { - this.error(`This is a JHipster blueprint and should be used only like ${chalk.yellow('jhipster --blueprints react-native')}`); - } + super(args, { fromBlueprint: true, skipClient: false, ...opts }); // fromBlueprint variable is important this.patchInFile = patchInFile.bind(this); if (!this.context) { @@ -36,7 +30,6 @@ module.exports = class extends AppGenerator { // this does not look to be configurable from blueprints (see getPrettierExtensions in generator-base.js) // skipClient has no effect for generator-jhipster-react-native since it only generates a client this.skipClient = false; - this.jhipsterConfig.skipClient = false; } get initializing() { diff --git a/generators/entity/index.js b/generators/entity/index.js index 9cfdd5b7f..f7b6eeeb2 100644 --- a/generators/entity/index.js +++ b/generators/entity/index.js @@ -31,7 +31,6 @@ module.exports = class extends EntityGenerator { // this does not look to be configurable from blueprints (see getPrettierExtensions in generator-base.js) // skipClient has no effect for generator-jhipster-react-native since it only generates a client this.skipClient = false; - this.jhipsterConfig.skipClient = false; } get initializing() { diff --git a/package-lock.json b/package-lock.json index 056e3ef24..0212c3587 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2096,9 +2096,9 @@ } }, "node_modules/conf": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/conf/-/conf-10.0.3.tgz", - "integrity": "sha512-4gtQ/Q36qVxBzMe6B7gWOAfni1VdhuHkIzxydHkclnwGmgN+eW4bb6jj73vigCfr7d3WlmqawvhZrpCUCTPYxQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/conf/-/conf-10.1.0.tgz", + "integrity": "sha512-qZ+642TRK8uQq7IFL/c0iw9UsgowK0jkNpDeQMY2znki6Rvlm6ks+YljmaIayIRaTrLk0eJvyFgY0hOByxvmmw==", "dependencies": { "ajv": "^8.6.3", "ajv-formats": "^2.1.1", @@ -4125,6 +4125,29 @@ "node": ">= 12" } }, + "node_modules/generator-jhipster/node_modules/conf": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/conf/-/conf-10.0.3.tgz", + "integrity": "sha512-4gtQ/Q36qVxBzMe6B7gWOAfni1VdhuHkIzxydHkclnwGmgN+eW4bb6jj73vigCfr7d3WlmqawvhZrpCUCTPYxQ==", + "dependencies": { + "ajv": "^8.6.3", + "ajv-formats": "^2.1.1", + "atomically": "^1.7.0", + "debounce-fn": "^4.0.0", + "dot-prop": "^6.0.1", + "env-paths": "^2.2.1", + "json-schema-typed": "^7.0.3", + "onetime": "^5.1.2", + "pkg-up": "^3.1.0", + "semver": "^7.3.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/generator-jhipster/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -11738,9 +11761,9 @@ } }, "node_modules/yeoman-environment": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-3.8.0.tgz", - "integrity": "sha512-BPo3btCxefe8NzDMk59QRDNBXMC4Ra6SHhFfEsV2DTmAp/6ZoovMANlJiWrXu41rtFQBmjH/rT2tSiHGowt38w==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-3.8.1.tgz", + "integrity": "sha512-UM42p60GcJOwPfL63yBwBiiZiZ4p7taEjR5B+XdEu+sf73T+510gxiAqYuTCDOVTYBqhywVpZoWEnR+HtshiBA==", "dependencies": { "@npmcli/arborist": "^4.0.4", "are-we-there-yet": "^2.0.0", @@ -14008,9 +14031,9 @@ } }, "conf": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/conf/-/conf-10.0.3.tgz", - "integrity": "sha512-4gtQ/Q36qVxBzMe6B7gWOAfni1VdhuHkIzxydHkclnwGmgN+eW4bb6jj73vigCfr7d3WlmqawvhZrpCUCTPYxQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/conf/-/conf-10.1.0.tgz", + "integrity": "sha512-qZ+642TRK8uQq7IFL/c0iw9UsgowK0jkNpDeQMY2znki6Rvlm6ks+YljmaIayIRaTrLk0eJvyFgY0hOByxvmmw==", "requires": { "ajv": "^8.6.3", "ajv-formats": "^2.1.1", @@ -15621,6 +15644,23 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-8.2.0.tgz", "integrity": "sha512-LLKxDvHeL91/8MIyTAD5BFMNtoIwztGPMiM/7Bl8rIPmHCZXRxmSWr91h57dpOpnQ6jIUqEWdXE/uBYMfiVZDA==" }, + "conf": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/conf/-/conf-10.0.3.tgz", + "integrity": "sha512-4gtQ/Q36qVxBzMe6B7gWOAfni1VdhuHkIzxydHkclnwGmgN+eW4bb6jj73vigCfr7d3WlmqawvhZrpCUCTPYxQ==", + "requires": { + "ajv": "^8.6.3", + "ajv-formats": "^2.1.1", + "atomically": "^1.7.0", + "debounce-fn": "^4.0.0", + "dot-prop": "^6.0.1", + "env-paths": "^2.2.1", + "json-schema-typed": "^7.0.3", + "onetime": "^5.1.2", + "pkg-up": "^3.1.0", + "semver": "^7.3.5" + } + }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -21539,9 +21579,9 @@ "dev": true }, "yeoman-environment": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-3.8.0.tgz", - "integrity": "sha512-BPo3btCxefe8NzDMk59QRDNBXMC4Ra6SHhFfEsV2DTmAp/6ZoovMANlJiWrXu41rtFQBmjH/rT2tSiHGowt38w==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-3.8.1.tgz", + "integrity": "sha512-UM42p60GcJOwPfL63yBwBiiZiZ4p7taEjR5B+XdEu+sf73T+510gxiAqYuTCDOVTYBqhywVpZoWEnR+HtshiBA==", "requires": { "@npmcli/arborist": "^4.0.4", "are-we-there-yet": "^2.0.0",