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

Obtenir les CGUs de plusieurs fournisseurs #16

Merged
merged 15 commits into from Jun 12, 2020
Merged

Conversation

Ndpnt
Copy link
Member

@Ndpnt Ndpnt commented Jun 11, 2020

fixes #12

@Ndpnt Ndpnt force-pushed the multiple-service-providers branch from a94353a to 172f5e9 Compare June 11, 2020 15:52
Copy link
Member

@MattiSG MattiSG left a comment

Choose a reason for hiding this comment

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

Tests fail at execution due to two different errors

  1. Repeated for all tests that try to commit: Error: _commit for test_service_provider document terms_of_service experienced an error: MissingNameError: No name was provided for author in the argument or in the .git/config file.
  2. In CGUs#updateTerms: Error: ENOENT: no such file or directory, unlink 'cgus/test/data/sanitized/first_provider/tos.md'.

General feedback

  1. I see the added value of logging what's going on but I'm wondering if it's not a bit too many console.log. It's in the code now and the messages have been properly written, so it's fine for me to leave them there, but I feel we should have a discussion around the logging interface and expectations 🙂
  2. I feel it might be worth adding ESlint considering that quite a few comments were around meaningless stuff such as semicolons or spacing 🙂

src/history/persistor.js Outdated Show resolved Hide resolved

if (!fsApi.existsSync(directory)){
if (!fsApi.existsSync(directory)){
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
if (!fsApi.existsSync(directory)){
if (!fsApi.existsSync(directory)) {

Comment on lines 28 to 29
if (!fsApi.existsSync(directory)){
fsApi.mkdirSync(directory);
Copy link
Member

Choose a reason for hiding this comment

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

Why is this sync?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because it needs to exist before writing the file

Copy link
Member

Choose a reason for hiding this comment

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

But why not await instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep I can do that, I didn't see that I already import fs.promises

src/history/persistor.js Show resolved Hide resolved
src/history/persistor.js Show resolved Hide resolved
src/sanitizer/index.js Outdated Show resolved Hide resolved
src/service_providers/index.js Show resolved Hide resolved
src/service_providers/index.js Outdated Show resolved Hide resolved
src/service_providers/index.js Outdated Show resolved Hide resolved
src/service_providers/index.test.js Outdated Show resolved Hide resolved
@Ndpnt
Copy link
Member Author

Ndpnt commented Jun 12, 2020

It's weird for your tests, everything is ok on my machine. All tests pass. Do you have a .env file?

@Ndpnt
Copy link
Member Author

Ndpnt commented Jun 12, 2020

I tried to add eslint but as we use sourceType: module there are parsing errors with import.meta.url used to get __dirname. Eslint will fix this in the next release so I'm in favor to wait for this release before adding eslint.

@MattiSG
Copy link
Member

MattiSG commented Jun 12, 2020

I'm in favor to wait for this release before adding eslint.

Great! Thanks for this 🙂

Copy link
Member

@MattiSG MattiSG left a comment

Choose a reason for hiding this comment

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

All tests pass after cp .env.example .env… Sorry!

src/history/persistor.js Show resolved Hide resolved
src/sanitizer/index.js Outdated Show resolved Hide resolved
@Ndpnt Ndpnt merged commit 4984145 into master Jun 12, 2020
@Ndpnt Ndpnt deleted the multiple-service-providers branch June 12, 2020 09:57
martinratinaud pushed a commit that referenced this pull request Aug 6, 2021
Obtenir les CGUs de plusieurs fournisseurs
martinratinaud pushed a commit that referenced this pull request Aug 6, 2021
Obtenir les CGUs de plusieurs fournisseurs
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.

Obtenir les CGUs de plusieurs fournisseurs
2 participants