taichi / ci-yarn-upgrade Goto Github PK
View Code? Open in Web Editor NEWKeep NPM dependencies up-to-date with CI, providing version-to-version diff for each library
License: Apache License 2.0
Keep NPM dependencies up-to-date with CI, providing version-to-version diff for each library
License: Apache License 2.0
fail to parse giturl like below
https://github.com/babel/babel/blob/master/packages/babel-core/package.json
の手順に沿って、Read/write key を設定したけど、引き続き以下のようなエラーが発生します。
Read/write key を設定するだけでは ci-yarn-upgrade --execute
の内部で git push
する処理で利用されないのでしょうか 🤔 ?
他に設定項目があれば教えていただきたいです 🙏
エラーメッセージ
#!/bin/bash -eo pipefail
yarn global add ci-yarn-upgrade
export PATH="$PATH:`yarn global bin`"
ci-yarn-upgrade --execute
yarn global v1.0.2
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
- ci-yarn-upgrade
Done in 3.29s.
{ error: '',
errorcode: 128,
stdout: '',
stderr: 'ERROR: The key you are authenticating with has been marked as read only.\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n' }
Exited with code 1
現状の .circleci/config.yml
continuous_yarn_upgrade:
working_directory: ~/continuous_yarn_upgrade
branches:
only:
- master
docker:
- image: circleci/ruby:2.4.1-node-browsers
steps:
- checkout
- deploy:
name: Continuous yarn upgrade
command: |
yarn global add ci-yarn-upgrade
export PATH="$PATH:`yarn global bin`"
ci-yarn-upgrade --execute
こんにちは!
とても便利なツールを公開していただいてありがとうございます 😊
僕の関わるほとんどのプロジェクトで導入させてもらっていて、とても助かってます!
1つ低レベルな質問をさせてください 🙇
--latest
フラグがtrueの場合、package.json
はプルリクエストに含めなくてよいのかな?と気になっています。
package.json は最新バージョンの範囲を反映したものに更新されます。 デフォルトでは、package.json で既存の範囲を指定する表現が、 ^、 ~、 <、 =、 > のいずれか、もしくは当該のバージョンであった場合は再利用されます。 それ以外の場合、キャレット (^) に変更されます。 フラグ --caret、 --tilde もしくは --exact のいずれかが範囲を明示的に指定するのに使用されます。
https://yarnpkg.com/ja/docs/cli/upgrade#toc-yarn-upgrade-package-latest-l-caret-tilde-exact-pattern
package.json
だけ古いと、手元にpullしてきたときにyarn install
で差分が出てしまって困っております 💦
もしなにか手順の誤り等があればご教示いただけると幸いです!
package.json でバージョンを固定しても、upgrade 対象とされてしまう。そのため、バージョンを固定して利用したいライブラリまで含めたプルリクエストが作成されてしまう。
例です。
"dependencies": {
"react-swipeable-views": "0.10.5",
}
Hello, I'm using ci-yarn-upgrade
to keep a project of mine up-to-date. Recently, it started producing this error on the nightly runs:
yarn run v1.13.0
$ ci-yarn-upgrade --execute --prefix feature/
{ Error: Cannot find module './get-first-page'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:20:18)
at paginationPlugin (/src/node_modules/@octokit/rest/lib/plugins/pagination/index.js:4:26)
at plugin (/src/node_modules/@octokit/rest/index.js:24:33)
at Array.forEach (<anonymous>)
at new GitHubApi (/src/node_modules/@octokit/rest/index.js:28:11)
at new exports.default (/src/node_modules/ci-yarn-upgrade/lib/github.js:168:25)
at git.remoteurl.then.remote (/src/node_modules/ci-yarn-upgrade/lib/upgrade-request.js:12:1288) code: 'MODULE_NOT_FOUND' }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 1
It's managing to create the branch fine, but is producing this error when trying to open the pull request
ci-yarn-upgrade/src/upgrade-request.js
Line 126 in d730358
error: Unknown subcommand: get-url
が発生するのですが、もし解決方法などご存知でしたら教えていただけないでしょうか 🙏
> BEGIN git push origin yarn-upgrade/20171123021746/156e5c878ea37f45768b3ea883237cbb15cdf088
> END git push origin yarn-upgrade/20171123021746/156e5c878ea37f45768b3ea883237cbb15cdf088
> BEGIN git remote get-url --push origin
{ error: '',
errorcode: 129,
stdout: '',
stderr: 'error: Unknown subcommand: get-url\nusage: git remote [-v | --verbose]\n or: git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>\n or: git remote rename <old> <new>\n or: git remote remove <name>\n or: git remote set-head <name> (-a | --auto | -d | --delete |<branch>)\n or: git remote [-v | --verbose] show [-n] <name>\n or: git remote prune [-n | --dry-run] <name>\n or: git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]\n or: git remote set-branches [--add] <name> <branch>...\n or: git remote set-url [--push] <name> <newurl> [<oldurl>]\n or: git remote set-url --add <name> <newurl>\n or: git remote set-url --delete <name> <url>\n\n -v, --verbose be verbose; must be placed before a subcommand\n\n' }
Exited with code 1
https://isomorphic-git.org/en/
circleciにおける初期セットアップ部分を無くすため。
10月末頃から、npmjsから新しくインストールしたci-yarn-upgrade(version 0.6.3)を実行すると、リポジトリのURLが正しく生成されずにタグの一覧の取得やプルリクエストの作成が動かなくなりました。
https://circleci.com/gh/taichi/ci-yarn-upgrade/348
> BEGIN reconcile CompareModel @octokit/rest
> BEGIN getTags from https://git+https/github.com/octokit/rest.js
> BEGIN reconcile CompareModel commander
> BEGIN getTags from https://git+https/github.com/tj/commander.js
> BEGIN reconcile CompareModel eslint
> BEGIN getTags from https://git+https/github.com/eslint/eslint
> BEGIN reconcile CompareModel git-url-parse
> BEGIN getTags from https://git+ssh/[email protected]/IonicaBizau/git-url-parse
> BEGIN reconcile CompareModel lodash
> BEGIN getTags from https://git+https/github.com/lodash/lodash
> END getTags [object Object] {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
> END reconcile CompareModel @octokit/rest
> END getTags [object Object] {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
> END reconcile CompareModel git-url-parse
> END getTags [object Object] {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
> END reconcile CompareModel lodash
> END getTags [object Object] {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
> END reconcile CompareModel commander
> END getTags [object Object] {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
> END reconcile CompareModel eslint
> BEGIN Send PullRequest.
{ HttpError: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/pulls/#create-a-pull-request"}
at response.text.then.message (/usr/local/share/.config/yarn/global/node_modules/@octokit/rest/lib/request/request.js:72:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'HttpError',
code: 404,
status: 'Not Found',
headers:
{ 'access-control-allow-origin': '*',
'access-control-expose-headers':
'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type',
connection: 'close',
'content-encoding': 'gzip',
'content-security-policy': 'default-src \'none\'',
'content-type': 'application/json; charset=utf-8',
date: 'Wed, 31 Oct 2018 13:00:42 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
status: '404 Not Found',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
'x-accepted-oauth-scopes': 'repo',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': 'C8C8:6C41:2749E2:5AA447:5BD9A77A',
'x-oauth-scopes': 'repo',
'x-ratelimit-limit': '5000',
'x-ratelimit-remaining': '4988',
'x-ratelimit-reset': '1540994401',
'x-xss-protection': '1; mode=block' } }
どうやら依存しているライブラリが更新された影響らしく、各パッケージを最新に更新すると正しく動くようになりました。ライブラリを更新して新しいバージョンを公開してもらえると幸いです。
https://github.com/taichi/ci-yarn-upgrade/tree/yarn-upgrade/20181031010030/ef476465cfb1f8fb9253d024d582adbfd4e828f5
nspを使えばできるかも?
yarn upgrade
では、更新対象ライブラリを個別指定できるので簡単に可能。
yarn why
を使えばできる。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.