Skip to content

Commit

Permalink
Merge pull request #612 from salesforcecli/ew/npm-version-sync
Browse files Browse the repository at this point in the history
Get npm from plugin-plugins instead
  • Loading branch information
iowillhoit authored Oct 3, 2023
2 parents 959668b + eba9f27 commit aaba0a7
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 72 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/update-npm-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ name: update-npm-version
on:
workflow_dispatch:
schedule:
# Tuesday 7a central (12 UTC)
- cron: '0 12 * * 2'
# Tuesday 9a central (14 UTC)
- cron: '0 14 * * 2'

jobs:
update-npm:
Expand All @@ -22,9 +22,13 @@ jobs:
node-version: lts/*
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- run: |
echo "package.json npm version: $(jq '.dependencies.npm' package.json)"
echo "GHA Node LTS npm version: $(npm -v)"
yarn add npm@$(npm -v)
# NOTE: Both @salesforce/plugin-trust and @oclif/plugin-plugins require npm.
# In order to ensure that we are not duplicating pinned npm versions
# and increasing the CLI bundle size, we get the version from plugin-plugins
NPM=$(curl https://raw.githubusercontent.com/oclif/plugin-plugins/main/package.json | jq -r '.dependencies.npm')
echo "Current package.json npm version: $(jq '.dependencies.npm' package.json)"
echo "Version in @oclif/plugin-plugins: $NPM"
yarn add npm@$NPM
- uses: salesforcecli/github-workflows/.github/actions/gitConfig@main
# Push changes if 'git status' is not empty
- run: |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@salesforce/core": "^5.2.9",
"@salesforce/sf-plugins-core": "^3.1.23",
"got": "^11",
"npm": "9.8.1",
"npm": "9.6.7",
"npm-run-path": "^4.0.1",
"proxy-agent": "^6.3.1",
"shelljs": "^0.8.4",
Expand Down
Loading

0 comments on commit aaba0a7

Please sign in to comment.