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

Version number is repeated in code #536

Open
MrDeshaies opened this issue Dec 23, 2020 · 1 comment
Open

Version number is repeated in code #536

MrDeshaies opened this issue Dec 23, 2020 · 1 comment

Comments

@MrDeshaies
Copy link
Contributor

The code defines the version number in way too many spots! Violation of the DRY principle ("Don't Repeat Yourself"). It makes it harder to increment the version number and risks having inconsistent version numbers between sections.

It's defined in:

  1. package.json (incorrectly as 0.1.0)
  2. wet.js versionIdentifier
  3. store.ts in StoreOptions definition
  4. survey-enfr.json in the HTML for welcome1
  5. en.json (to support Results.vue)
  6. fr.json (to support Results.vue)

As much as possible, a single source of truth should be identified and used. For example, Results.vue could use Survey.version instead of using the strings defined in en.json and fr.json.

@nschonni
Copy link
Member

I think there might be a need for 2 version numbers:

  1. The schema of the questions/response value files (4). EX: v0.8.0 we store departments as '001', and v0.9.0 the department is stored as a GUID.
  2. The application could have an independent version number and be able to support multiple survey/response schemas, while bumping version as dependencies and libraries are bumped under the hood

6 definitely seems like too much 😄

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

No branches or pull requests

2 participants