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

Migrate from yarn to pnpm #2424

Merged
merged 41 commits into from
Oct 10, 2023
Merged

Migrate from yarn to pnpm #2424

merged 41 commits into from
Oct 10, 2023

Conversation

rudyflores
Copy link
Contributor

@rudyflores rudyflores commented Aug 18, 2023

Proposed changes

Migrate to new package manager PNPM for improved install and build times for development vs Yarn

Release Notes

Milestone: v3.0

Changelog: Changed Yarn package manager to PNPM package manager.

Testing this PR

For testing this PR perform the following:

  • run pnpm i
  • run pnpm build
  • run pnpm package
  • run pnpm test
  • run pnpm fresh-clone (this one uses the new concurrency feature!)
  • try running any npm or yarn command (this should throw an error since only pnpm commands are allowed)

Make sure to test normal ZE functionality in the dev host as well as packaged extension to make sure everything is in order as well :)

Metrics

fresh-clone command:

Yarn
Screen Shot 2023-08-10 at 3 08 36 PM

PNPM
Screen Shot 2023-08-10 at 3 08 56 PM

install command:

Yarn
Screen Shot 2023-08-10 at 3 11 10 PM

PNPM
Screen Shot 2023-08-10 at 3 10 17 PM

package command:

Yarn
Screen Shot 2023-08-10 at 3 13 23 PM

PNPM
Screen Shot 2023-08-10 at 3 14 44 PM

Types of changes

What types of changes does your code introduce to Zowe Explorer?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Updates to Documentation or Tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the reviewer

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • PR title follows Conventional Commits Guidelines
  • PR Description is included
  • gif or screenshot is included if visual changes are made
  • yarn workspace vscode-extension-for-zowe vscode:prepublish has been executed
  • All checks have passed (DCO, Jenkins and Code Coverage)
  • I have added unit test and it is passing
  • I have added integration test and it is passing
  • There is coverage for the code that I have added
  • I have tested it manually and there are no regressions found
  • I have added necessary documentation (if appropriate)
  • Any PR dependencies have been merged and published (if appropriate)

Further comments

Signed-off-by: Rudy Flores <[email protected]>
@rudyflores rudyflores changed the base branch from main to next August 18, 2023 19:00
@rudyflores rudyflores self-assigned this Aug 18, 2023
@rudyflores rudyflores changed the title Migrate to new tools2 Migrate from yarn to pnpm Aug 18, 2023
@rudyflores rudyflores mentioned this pull request Aug 18, 2023
16 tasks
@rudyflores rudyflores marked this pull request as ready for review August 18, 2023 19:47
@rudyflores rudyflores requested review from t1m0thyj, traeok, zFernand0 and JillieBeanSim and removed request for t1m0thyj August 18, 2023 19:47
Copy link
Member

@awharn awharn left a comment

Choose a reason for hiding this comment

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

I have a couple of questions

package.json Outdated Show resolved Hide resolved
.npmrc Show resolved Hide resolved
Signed-off-by: Rudy Flores <[email protected]>
.github/workflows/changelog.yml Show resolved Hide resolved
.github/workflows/circular-deps.yml Outdated Show resolved Hide resolved
.github/workflows/lint.yml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
packages/zowe-explorer/package.json Outdated Show resolved Hide resolved
Signed-off-by: Rudy Flores <[email protected]>
Signed-off-by: Rudy Flores <[email protected]>
Signed-off-by: Rudy Flores <[email protected]>
Signed-off-by: Rudy Flores <[email protected]>
@rudyflores
Copy link
Contributor Author

@traeok I think the samples packages in our repo should be maybe just moved to its own repository? otherwise we should define it in the pnpm-workspaces.yaml which will cause it to bundle and install when running pnpm i && pnpm build.

This is also why you see the check for the samples fail too

@traeok
Copy link
Member

traeok commented Sep 25, 2023

@rudyflores We can definitely discuss moving the samples in tomorrow's stand-up - if we add more samples in the future, we are probably better off having a separate repo, so I'm in favor of that 👍

t1m0thyj
t1m0thyj previously approved these changes Oct 5, 2023
Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

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

Thanks @rudyflores! pnpm commands are running nice and fast for me locally.

JillieBeanSim
JillieBeanSim previously approved these changes Oct 9, 2023
Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

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

this all LGTM! thanks @rudyflores for all of the hard work that went into this change. If all are on board for pnpm, then so am I 😄 . With the amount of changes this introduces into the next branch it will be easier for PRs raised against main or maintenance to have another PR with same work possibly cherry-picked against next to avoid the conflicts that will come from the differences between the branches.

traeok
traeok previously approved these changes Oct 9, 2023
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @rudyflores! pnpm is definitely quicker, looking forward to using it instead of yarn 🎉

zFernand0
zFernand0 previously approved these changes Oct 9, 2023
Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

What Trae said 👆🏽
LGTM! 😋

@awharn
Copy link
Member

awharn commented Oct 9, 2023

I only have one comment about this PR, as the rest of this looks fantastic. Would anyone be against removing --parallel from the test script, and adding a test:parallel script? I only ask because the test data is getting mixed between packages, and personally, it becomes a little bit harder to track what is going wrong, and where.

image

@sonarcloud
Copy link

sonarcloud bot commented Oct 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@zFernand0 zFernand0 merged commit c1a504b into next Oct 10, 2023
13 of 14 checks passed
@zFernand0 zFernand0 deleted the migrate-to-new-tools2 branch October 10, 2023 13:35
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.

Remove yarn build from the top level prepare script
6 participants