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

chore: nx migrate plus keep lock files #10536

Merged
merged 3 commits into from May 6, 2024
Merged

Conversation

NathanWalker
Copy link
Contributor

@NathanWalker NathanWalker commented May 2, 2024

PR Checklist

@cla-bot cla-bot bot added the cla: yes label May 2, 2024
@@ -7,7 +7,6 @@

# dependencies
**/node_modules
**/package-lock.json
Copy link
Contributor

@shirakaba shirakaba May 3, 2024

Choose a reason for hiding this comment

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

Although I think npm is the slowest package manager at installing, it's indeed the one with the lowest barrier to entry for contributors (it's definitely installed), so probably the right one to standardise on 👍

(if only the package managers could agree on a common lockfile format 🥲)

Comment on lines -76 to -85
"overrides": {
"@nx/devkit": "18.2.2",
"@nx/eslint-plugin": "18.2.2",
"@nx/jest": "18.2.2",
"@nx/js": "18.2.2",
"@nx/node": "18.2.2",
"@nx/plugin": "18.2.2",
"@nx/workspace": "18.2.2",
"nx": "18.2.2"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice that we're able to drop these!

Copy link
Contributor

Choose a reason for hiding this comment

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

In nx monorepos, does each package get its own package lock? Just that in npm workspaces and pnpm monorepos, they don't, so checking that it's right for this to be here at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

webpack5 is only exception here since we still manage it's package in isolated fashion. We can move away from that soon but it won't be addressed in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks correct. It's using the specified local packages (e.g. @nativescript/core), it's the latest lockfileVersion, and pulls from registry.npmjs.org.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need them in apps, I"ll add ignore for this - doesn't hurt either but agreed not needed in apps - these are essentially demo apps to support testing/experimentation/verifying of the packages.

shirakaba
shirakaba previously approved these changes May 3, 2024
Copy link
Contributor

@shirakaba shirakaba left a comment

Choose a reason for hiding this comment

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

Looks like a great improvement, thanks for taking the time! @NathanWalker

I'm approving, assuming the answer to this is "yes, each package does get a lockfile":

In nx monorepos, does each package get its own package lock? Just that in npm workspaces and pnpm monorepos, they don't, so checking that it's right for this to be here at all.

If each package is actually not supposed to have its own lockfile, then let's get to the bottom of that before proceeding.

@shirakaba
Copy link
Contributor

shirakaba commented May 3, 2024

Actually, that's a point. Either all packages and apps should have their own lockfile, or none of them. I notice that the lockfiles for toolbox and devtools and some other apps and packages are missing, so something's amiss.

It seems I can't withdraw my PR approval for now, so could you please just check on that (or address in a follow-up PR)!

@NathanWalker
Copy link
Contributor Author

  • apps/* don't need lock files but they don't hurt either.
  • packages/* don't need lock files, exception of webpack5 in this workspace for now (can change in future).

Copy link
Contributor

@shirakaba shirakaba left a comment

Choose a reason for hiding this comment

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

Having discussed on Discord that the package-lock for Webpack5 is present because it's not a properly integrated member of the monorepo (i.e. not a true workspace), I'm happy to approve. Will be happy for Webpack5 to be properly integrated in a follow-up PR in future.

@NathanWalker NathanWalker merged commit 415ff34 into main May 6, 2024
4 checks passed
@NathanWalker NathanWalker deleted the chore/workspace-updates branch May 6, 2024 17:20
apburgess pushed a commit to apburgess/NativeScript that referenced this pull request May 15, 2024
apburgess pushed a commit to apburgess/NativeScript that referenced this pull request May 15, 2024
apburgess pushed a commit to apburgess/NativeScript that referenced this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants