-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: auto-sync package manager versions (#88)
* chore: auto-sync package manager versions * Disables nock * Removes check for newline
- Loading branch information
Showing
4 changed files
with
159 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Version Sync | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: 'Update the package manager versions' | ||
run: | | ||
LATEST_NPM=$(curl https://registry.npmjs.org/npm | jq '.["dist-tags"].latest') | ||
LATEST_PNPM=$(curl https://registry.npmjs.org/pnpm | jq '.["dist-tags"].latest') | ||
LATEST_YARN=$(curl https://registry.npmjs.org/yarn | jq '.["dist-tags"].latest') | ||
LATEST_BERRY=$(curl https://repo.yarnpkg.com/tags | jq '.latest.stable') | ||
jq < config.json > config.json.new '. * '"{ | ||
definitions: { | ||
npm: { | ||
default: $LATEST_NPM, | ||
}, | ||
pnpm: { | ||
default: $LATEST_PNPM, | ||
}, | ||
yarn: { | ||
default: $LATEST_YARN, | ||
transparent: { | ||
default: $LATEST_BERRY, | ||
}, | ||
}, | ||
}, | ||
}" | ||
rm config.json | ||
mv config.json.new config.json | ||
if [[ ! -z "$(git status --porcelain)" ]]; then | ||
git config user.email '[email protected]' | ||
git config user.name 'Node.js GitHub Bot' | ||
git add config.json | ||
git commit -m 'chore: update package manager versions' | ||
git push | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,110 @@ | ||
{ | ||
"definitions": { | ||
"npm": { | ||
"default": "7.20.1", | ||
"transparent": { | ||
"commands": [ | ||
["npm", "init"], | ||
["npx"] | ||
] | ||
}, | ||
"ranges": { | ||
"*": { | ||
"url": "https://registry.npmjs.org/npm/-/npm-{}.tgz", | ||
"bin": { | ||
"npm": "./bin/npm-cli.js", | ||
"npx": "./bin/npx-cli.js" | ||
}, | ||
"registry": { | ||
"type": "npm", | ||
"package": "npm" | ||
} | ||
} | ||
} | ||
"definitions": { | ||
"npm": { | ||
"default": "8.4.0", | ||
"transparent": { | ||
"commands": [ | ||
[ | ||
"npm", | ||
"init" | ||
], | ||
[ | ||
"npx" | ||
] | ||
] | ||
}, | ||
"ranges": { | ||
"*": { | ||
"url": "https://registry.npmjs.org/npm/-/npm-{}.tgz", | ||
"bin": { | ||
"npm": "./bin/npm-cli.js", | ||
"npx": "./bin/npx-cli.js" | ||
}, | ||
"registry": { | ||
"type": "npm", | ||
"package": "npm" | ||
} | ||
} | ||
} | ||
}, | ||
"pnpm": { | ||
"default": "6.29.1", | ||
"transparent": { | ||
"commands": [ | ||
[ | ||
"pnpm", | ||
"init" | ||
], | ||
[ | ||
"pnpx" | ||
] | ||
] | ||
}, | ||
"ranges": { | ||
"<6.0.0": { | ||
"url": "https://registry.npmjs.org/pnpm/-/pnpm-{}.tgz", | ||
"bin": { | ||
"pnpm": "./bin/pnpm.js", | ||
"pnpx": "./bin/pnpx.js" | ||
}, | ||
"registry": { | ||
"type": "npm", | ||
"package": "pnpm" | ||
} | ||
}, | ||
"pnpm": { | ||
"default": "6.11.0", | ||
"transparent": { | ||
"commands": [ | ||
["pnpm", "init"], | ||
["pnpx"] | ||
] | ||
}, | ||
"ranges": { | ||
"<6.0.0": { | ||
"url": "https://registry.npmjs.org/pnpm/-/pnpm-{}.tgz", | ||
"bin": { | ||
"pnpm": "./bin/pnpm.js", | ||
"pnpx": "./bin/pnpx.js" | ||
}, | ||
"registry": { | ||
"type": "npm", | ||
"package": "pnpm" | ||
} | ||
}, | ||
">=6.0.0": { | ||
"url": "https://registry.npmjs.org/pnpm/-/pnpm-{}.tgz", | ||
"bin": { | ||
"pnpm": "./bin/pnpm.cjs", | ||
"pnpx": "./bin/pnpx.cjs" | ||
}, | ||
"registry": { | ||
"type": "npm", | ||
"package": "pnpm" | ||
} | ||
} | ||
} | ||
">=6.0.0": { | ||
"url": "https://registry.npmjs.org/pnpm/-/pnpm-{}.tgz", | ||
"bin": { | ||
"pnpm": "./bin/pnpm.cjs", | ||
"pnpx": "./bin/pnpx.cjs" | ||
}, | ||
"registry": { | ||
"type": "npm", | ||
"package": "pnpm" | ||
} | ||
} | ||
} | ||
}, | ||
"yarn": { | ||
"default": "1.22.17", | ||
"transparent": { | ||
"default": "3.1.1", | ||
"commands": [ | ||
[ | ||
"yarn", | ||
"dlx" | ||
] | ||
] | ||
}, | ||
"ranges": { | ||
"<2.0.0": { | ||
"url": "https://registry.yarnpkg.com/yarn/-/yarn-{}.tgz", | ||
"bin": { | ||
"yarn": "./bin/yarn.js", | ||
"yarnpkg": "./bin/yarn.js" | ||
}, | ||
"registry": { | ||
"type": "npm", | ||
"package": "yarn" | ||
} | ||
}, | ||
"yarn": { | ||
"default": "1.22.15", | ||
"transparent": { | ||
"default": "3.0.0", | ||
"commands": [ | ||
["yarn", "dlx"] | ||
] | ||
}, | ||
"ranges": { | ||
"<2.0.0": { | ||
"url": "https://registry.yarnpkg.com/yarn/-/yarn-{}.tgz", | ||
"bin": { | ||
"yarn": "./bin/yarn.js", | ||
"yarnpkg": "./bin/yarn.js" | ||
}, | ||
"registry": { | ||
"type": "npm", | ||
"package": "yarn" | ||
} | ||
}, | ||
">=2.0.0": { | ||
"name": "yarn", | ||
"url": "https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js", | ||
"bin": ["yarn", "yarnpkg"], | ||
"registry": { | ||
"type": "url", | ||
"url": "https://repo.yarnpkg.com/tags", | ||
"fields": { | ||
"tags": "latest", | ||
"versions": "tags" | ||
} | ||
} | ||
} | ||
">=2.0.0": { | ||
"name": "yarn", | ||
"url": "https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js", | ||
"bin": [ | ||
"yarn", | ||
"yarnpkg" | ||
], | ||
"registry": { | ||
"type": "url", | ||
"url": "https://repo.yarnpkg.com/tags", | ||
"fields": { | ||
"tags": "latest", | ||
"versions": "tags" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters