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

Add Node V16 build and compatibility #64

Merged
merged 4 commits into from
Sep 28, 2021
Merged

Add Node V16 build and compatibility #64

merged 4 commits into from
Sep 28, 2021

Conversation

devinea
Copy link
Member

@devinea devinea commented Sep 23, 2021

@devinea devinea changed the title Add Node V16 build Add Node V16 build and compatibility Sep 23, 2021
@devinea devinea marked this pull request as ready for review September 23, 2021 23:08
Copy link
Contributor

@tobiasqueck tobiasqueck left a comment

Choose a reason for hiding this comment

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

@devinea instead of using a new library to delete the debug folder before all tests, could we instead change the debugging approach and only commit the folders to the file system if debug mode is enabled?
It would remove the requirement to delete anything (btw I think that was also the initial implementation of template tests by @ullasholla )

@devinea
Copy link
Member Author

devinea commented Sep 24, 2021

@tobiasqueck that is sort of a separate issue. In debug mode the dir stills needs to be deleted. Fs api's have a breaking change so it is easier to switch to fs-extra or rimraf for consistent API across versions.

@tobiasqueck
Copy link
Contributor

While I agree that this is kind of a separate issue, I saw it while reviewing this code and, I don't think it is a good idea to fix an issue that only exists because of another deeper issue: we have unit tests that rely on the file system. To be precise, not the tests itself rely on it but test preparation method that do things that are not related to the tests but for a very different problem: generating artifacts to manually review them.

In debug mode the dir stills needs to be deleted

No, there shouldn't be the need to delete anything because the tests will not write anything to the filestystem and they also don't rely on the file system. Only the debug mode would commit/write data to the fs, so that a developer can review. Under a normal (not debug) run nothing is ever written.

@devinea
Copy link
Member Author

devinea commented Sep 24, 2021

@tobiasqueck - Based on our discussion I have added the UX_DEBUG env to control writing the test-output or not via fs-commit. Since the test folders should be deleted anyway when UX_DEBUG is either true or false I've kept fs-extra in place for that.

tobiasqueck
tobiasqueck previously approved these changes Sep 24, 2021
Copy link
Contributor

@tobiasqueck tobiasqueck left a comment

Choose a reason for hiding this comment

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

  • checked that it works even if the test-output folder doesn't exist
  • reviewed the tests and verified that no data is written to the file system if one is not running in debug mode
  • looked at general coding style and all looks good to me
  • I did not check that data is written to the filesystem if it runs in debug mode

unseen1980
unseen1980 previously approved these changes Sep 27, 2021
@ullasholla
Copy link
Contributor

@tobiasqueck that is sort of a separate issue. In debug mode the dir stills needs to be deleted. Fs api's have a breaking change so it is easier to switch to fs-extra or rimraf for consistent API across versions.

@devinea , what's the breaking change in rmdirSync again? Curious because this might affect tools-suite too.

Copy link
Contributor

@ullasholla ullasholla left a comment

Choose a reason for hiding this comment

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

Changes look good, thanks.

There's one minor formatting change required (there's a suggestion that can be committed directly, if you're ok with it).

There's a comment about abstracting common code in the tests. Up to you how you handle this.

I'm curious about the breaking change in the fs API though. This might have an impact on our other code. Mind posting a link or two about it please?

packages/fiori-freestyle/test/basic.test.ts Outdated Show resolved Hide resolved
packages/ui5-application/test/options.test.ts Show resolved Hide resolved
Co-authored-by: Ullas Holla <212316+ullasholla@users.noreply.github.com>
@devinea devinea dismissed stale reviews from unseen1980 and tobiasqueck via 32bb5fd September 28, 2021 09:31
@devinea
Copy link
Member Author

devinea commented Sep 28, 2021

@ullasholla

There's one minor formatting change required (there's a suggestion that can be committed directly, if you're ok with it).

Applied. Thanks.

There's a comment about abstracting common code in the tests. Up to you how you handle this.

Yeah makes sense. Can look at that in another PR.

I'm curious about the breaking change in the fs API though. This might have an impact on our other code. Mind posting a link or two about it please?

See here https://github.com/nodejs/node/pull/37216/files#diff-11c13307cb334211e0d11f4e7e43bdc0a34e437779a63a6ff645e62448d973d2R1053-R1055

Copy link
Contributor

@tobiasqueck tobiasqueck left a comment

Choose a reason for hiding this comment

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

Approved again. Only formatting changes since my initial review.

Copy link
Contributor

@ullasholla ullasholla left a comment

Choose a reason for hiding this comment

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

Thanks @devinea, looks good.

@devinea devinea merged commit 550a57f into main Sep 28, 2021
@devinea devinea deleted the devinea-patch-1 branch September 28, 2021 20:30
@devinea devinea mentioned this pull request Sep 28, 2021
4 tasks
devinea added a commit that referenced this pull request Oct 5, 2021
* main:
  update(FF): Updates FF Worklist controllers and tests (#63)
  fix: app-id creation at scaffolding time in Component.js (fixes #70) (#77)
  Add Node V16 build and compatibility (#64)
  chore: set version of all modules to v0.9.0 (#71)
  chore: add github codeowners file (#58)

# Conflicts:
#	.github/workflows/pipeline.yml
#	packages/fiori-freestyle/package.json
#	pnpm-lock.yaml
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.

None yet

6 participants