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

build: update to node v16 with npm v6 for packaging #4092

Merged
merged 15 commits into from
May 10, 2022

Conversation

mohanraj-r
Copy link
Contributor

@mohanraj-r mohanraj-r commented May 9, 2022

What does this PR do?

TODO

  • Debug missing peer deps (stretch)
  • rename vscode:install to vsix:install
  • eval if lerna bootstrap is needed with npm workspaces?
  • better to specify lockfile version in npmrc?
  • vsix ctv install check

What issues does this PR fix or reference?

@W-11004197@

Functionality Before

  • Node 14, npm6 was used with lockfile version 1
  • No workspaces: lock file didn't correctly account for all dependencies in the packages in the mono-repo

Functionality After

  • Node 16, npm 6 declared as a dependency and used by vsce packaging
  • Uses lockfile version 2 (npm 8) with better resolution
  • Uses workspaces with lockfile accounting for all deps in the mono-repo
  • lerna bootstrap is still used in post install as npm install --workspaces [--include-workspace-root] errors during arch specific node install
  • lerna is still used to run scripts instead of using npm run --workspaces due to [BUG] Unexpected, recursive workspace script calls npm/cli#4603

@mohanraj-r
Copy link
Contributor Author

mohanraj-r commented May 10, 2022

Bundle size validity

node 14, npm 6

baseline on develop@54.12.0 (ff49172)
Installed size: 795M

3.7M    ./packages/salesforcedx-vscode-visualforce/salesforcedx-vscode-visualforce-54.12.0.vsix
7.3M    ./packages/salesforcedx-vscode-apex-replay-debugger/salesforcedx-vscode-apex-replay-debugger-54.12.0.vsix
 26M    ./packages/salesforcedx-vscode-core/salesforcedx-vscode-core-54.12.0.vsix
 23M    ./packages/salesforcedx-vscode-apex/salesforcedx-vscode-apex-54.12.0.vsix
1.2M    ./packages/salesforcedx-vscode-apex-debugger/salesforcedx-vscode-apex-debugger-54.12.0.vsix
 32M    ./packages/salesforcedx-vscode-lwc/salesforcedx-vscode-lwc-54.12.0.vsix
5.5M    ./packages/salesforcedx-vscode-soql/salesforcedx-vscode-soql-54.12.0.vsix
 16K    ./packages/salesforcedx-vscode-expanded/salesforcedx-vscode-expanded-54.12.0.vsix
 24K    ./packages/salesforcedx-vscode/salesforcedx-vscode-54.12.0.vsix
8.8M    ./packages/salesforcedx-vscode-lightning/salesforcedx-vscode-lightning-54.12.0.vsix

node 16, npm 6 without Workspaces and lockfile v2:

Installed size: 795M

3.9M    ./packages/salesforcedx-vscode-visualforce/salesforcedx-vscode-visualforce-54.12.0.vsix
7.3M    ./packages/salesforcedx-vscode-apex-replay-debugger/salesforcedx-vscode-apex-replay-debugger-54.12.0.vsix
 25M    ./packages/salesforcedx-vscode-core/salesforcedx-vscode-core-54.12.0.vsix
 23M    ./packages/salesforcedx-vscode-apex/salesforcedx-vscode-apex-54.12.0.vsix
1.2M    ./packages/salesforcedx-vscode-apex-debugger/salesforcedx-vscode-apex-debugger-54.12.0.vsix
 32M    ./packages/salesforcedx-vscode-lwc/salesforcedx-vscode-lwc-54.12.0.vsix
5.7M    ./packages/salesforcedx-vscode-soql/salesforcedx-vscode-soql-54.12.0.vsix
 16K    ./packages/salesforcedx-vscode-expanded/salesforcedx-vscode-expanded-54.12.0.vsix
 24K    ./packages/salesforcedx-vscode/salesforcedx-vscode-54.12.0.vsix
9.1M    ./packages/salesforcedx-vscode-lightning/salesforcedx-vscode-lightning-54.12.0.vsix

node 16, npm 6 with Workspaces and lockfile v2:

Installed size: 796M

3.8M    ./packages/salesforcedx-vscode-visualforce/salesforcedx-vscode-visualforce-54.12.0.vsix
7.3M    ./packages/salesforcedx-vscode-apex-replay-debugger/salesforcedx-vscode-apex-replay-debugger-54.12.0.vsix
 25M    ./packages/salesforcedx-vscode-core/salesforcedx-vscode-core-54.12.0.vsix
 23M    ./packages/salesforcedx-vscode-apex/salesforcedx-vscode-apex-54.12.0.vsix
1.3M    ./packages/salesforcedx-vscode-apex-debugger/salesforcedx-vscode-apex-debugger-54.12.0.vsix
 32M    ./packages/salesforcedx-vscode-lwc/salesforcedx-vscode-lwc-54.12.0.vsix
5.5M    ./packages/salesforcedx-vscode-soql/salesforcedx-vscode-soql-54.12.0.vsix
 16K    ./packages/salesforcedx-vscode-expanded/salesforcedx-vscode-expanded-54.12.0.vsix
 24K    ./packages/salesforcedx-vscode/salesforcedx-vscode-54.12.0.vsix
8.8M    ./packages/salesforcedx-vscode-lightning/salesforcedx-vscode-lightning-54.12.0.vsix

node 16, npm 6 with Workspaces and lockfile v3:

Installed size: 796M

3.3M    ./packages/salesforcedx-vscode-visualforce/salesforcedx-vscode-visualforce-54.12.0.vsix
7.5M    ./packages/salesforcedx-vscode-apex-replay-debugger/salesforcedx-vscode-apex-replay-debugger-54.12.0.vsix
 25M    ./packages/salesforcedx-vscode-core/salesforcedx-vscode-core-54.12.0.vsix
 23M    ./packages/salesforcedx-vscode-apex/salesforcedx-vscode-apex-54.12.0.vsix
1.3M    ./packages/salesforcedx-vscode-apex-debugger/salesforcedx-vscode-apex-debugger-54.12.0.vsix
 31M    ./packages/salesforcedx-vscode-lwc/salesforcedx-vscode-lwc-54.12.0.vsix
5.7M    ./packages/salesforcedx-vscode-soql/salesforcedx-vscode-soql-54.12.0.vsix
 16K    ./packages/salesforcedx-vscode-expanded/salesforcedx-vscode-expanded-54.12.0.vsix
 24K    ./packages/salesforcedx-vscode/salesforcedx-vscode-54.12.0.vsix
8.8M    ./packages/salesforcedx-vscode-lightning/salesforcedx-vscode-lightning-54.12.0.vsix

@mohanraj-r mohanraj-r marked this pull request as ready for review May 10, 2022 03:40
@mohanraj-r mohanraj-r requested a review from a team as a code owner May 10, 2022 03:40
@mohanraj-r mohanraj-r changed the title build: update to node v16 from node v14 build: update to node v16 with npm v6 for packaging May 10, 2022
package.json Outdated Show resolved Hide resolved
.npmrc Outdated
# TODO (debug):
# npm ERR! While resolving: salesforcedx-vscode-soql@54.8.0
# npm ERR! Found: @typescript-eslint/parser@3.10.1
Copy link
Contributor

Choose a reason for hiding this comment

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

does it suggest a version that works or what?

Copy link
Contributor Author

@mohanraj-r mohanraj-r May 10, 2022

Choose a reason for hiding this comment

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

Modified the peer/dev deps to match the versions and removed the legacy peer deps flag

Copy link
Contributor

@gbockus-sf gbockus-sf left a comment

Choose a reason for hiding this comment

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

Thanks Mohan. Glad you finally peeled the onion :)

@mohanraj-r mohanraj-r merged commit 191cfce into develop May 10, 2022
@mohanraj-r mohanraj-r deleted the mohanraj-r/node16_npm8_update_take3 branch May 10, 2022 21:00
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.

2 participants