Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing The Same JDL File Multiple Times Will Lead to Duplicated Menus Items #15819

Merged
merged 30 commits into from
Aug 10, 2021

Conversation

akang
Copy link
Contributor

@akang akang commented Aug 2, 2021

Importing The Same JDL File Multiple Times Will Lead to Duplicated Menus Items

Fix #15745

@CLAassistant
Copy link

CLAassistant commented Aug 2, 2021

CLA assistant check
All committers have signed the CLA.

@akang akang changed the title Main Importing The Same JDL File Multiple Times Will Lead to Duplicated Menus Items Aug 2, 2021
@akang
Copy link
Contributor Author

akang commented Aug 3, 2021

Hi all,

First PR for this project. Just wondering if I have ticked all the right boxes as far as the PR submission is concerned?

thanks
aka

Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In angular framework, this is the test that check needles duplication:

it('should bail on any file change adding same needles again', async () => {
await runResult
.create('jhipster-myblueprint:client')
.withGenerators([[mockBlueprintSubGen, 'jhipster-myblueprint:client']])
.withOptions({ fromCli: true, force: false, bail: true, skipChecks: true, skipInstall: true })
.run();
});

Would be nice to add to vue, but not required.

utils/field.js Outdated
Comment on lines 102 to 115
// check if regex is valid. If not, issue warning and we skip fake data generation.
try {
// eslint-disable-next-line no-new
new RegExp(field.fieldValidateRulesPattern);
} catch (e) {
console.log(
`${chalk.yellowBright('WARNING!')} ${field.fieldName} pattern is not valid: ${
field.fieldValidateRulesPattern
}. Skipping generating fake data. `
);
return undefined;
}

const generated = field.createRandexp().gen();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// check if regex is valid. If not, issue warning and we skip fake data generation.
try {
// eslint-disable-next-line no-new
new RegExp(field.fieldValidateRulesPattern);
} catch (e) {
console.log(
`${chalk.yellowBright('WARNING!')} ${field.fieldName} pattern is not valid: ${
field.fieldValidateRulesPattern
}. Skipping generating fake data. `
);
return undefined;
}
const generated = field.createRandexp().gen();
const dataGenerator = field.createRandexp();
if (!dataGenerator) {
return undefined;
}
const generated = dataGenerator.gen();
    field.createRandexp = () => {
      // check field.fieldValidateRulesPattern and return undefined.
      return faker.createRandexp(field.fieldValidateRulesPattern);
    }
  • Replace console.log with this.warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

utils/field.js Outdated Show resolved Hide resolved
@akang
Copy link
Contributor Author

akang commented Aug 9, 2021

I used the wrong email when pushing the codes and now the "license/cla" agreement is unsigned.

@mshima is there a workaround to get this task ticked off?

@mshima
Copy link
Member

mshima commented Aug 9, 2021

@akang You should use only the one with the email you signed the cla, otherwise it won’t become green.
Squashing the commit should me enough.

@akang akang force-pushed the main branch 6 times, most recently from dbfcef6 to 5e612b4 Compare August 10, 2021 00:38
akang and others added 17 commits August 10, 2021 08:55
Bumps [webpack](https://github.com/webpack/webpack) from 5.48.0 to 5.49.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.48.0...v5.49.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](open-cli-tools/concurrently@v6.2.0...v6.2.1)

---
updated-dependencies:
- dependency-name: concurrently
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [fork-ts-checker-webpack-plugin](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin) from 6.3.1 to 6.3.2.
- [Release notes](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases)
- [Changelog](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/main/CHANGELOG.md)
- [Commits](TypeStrong/fork-ts-checker-webpack-plugin@v6.3.1...v6.3.2)

---
updated-dependencies:
- dependency-name: fork-ts-checker-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [fork-ts-checker-webpack-plugin](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin) from 6.3.1 to 6.3.2.
- [Release notes](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases)
- [Changelog](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/main/CHANGELOG.md)
- [Commits](TypeStrong/fork-ts-checker-webpack-plugin@v6.3.1...v6.3.2)

---
updated-dependencies:
- dependency-name: fork-ts-checker-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [webpack](https://github.com/webpack/webpack) from 5.48.0 to 5.49.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.48.0...v5.49.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.2.0 to 6.2.2.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](GoogleChrome/workbox@v6.2.0...v6.2.2)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [core-js](https://github.com/zloirock/core-js) from 3.16.0 to 3.16.1.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](zloirock/core-js@v3.16.0...v3.16.1)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [conf](https://github.com/sindresorhus/conf) from 10.0.1 to 10.0.2.
- [Release notes](https://github.com/sindresorhus/conf/releases)
- [Commits](sindresorhus/conf@v10.0.1...v10.0.2)

---
updated-dependencies:
- dependency-name: conf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.23.4 to 2.24.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.23.4...v2.24.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
dependabot bot and others added 12 commits August 10, 2021 08:57
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.3.2 to 2.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v2.3.2...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.962.0 to 2.963.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.962.0...v2.963.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 11.1.1 to 11.1.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](lint-staged/lint-staged@v11.1.1...v11.1.2)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [workbox-webpack-plugin](https://github.com/googlechrome/workbox) from 6.2.0 to 6.2.2.
- [Release notes](https://github.com/googlechrome/workbox/releases)
- [Commits](GoogleChrome/workbox@v6.2.0...v6.2.2)

---
updated-dependencies:
- dependency-name: workbox-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
# Conflicts:
#	generators/java/index.cjs
#	lib/support/mixin.cjs
#	test/support/index.cjs
@mshima mshima merged commit 4a922e4 into jhipster:main Aug 10, 2021
@pascalgrimaud pascalgrimaud added this to the 7.2.0 milestone Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Importing The Same JDL File Multiple Times Will Lead to Duplicated Menus Items
6 participants