-
Notifications
You must be signed in to change notification settings - Fork 10
Migration to v7 #47
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
Merged
Merged
Migration to v7 #47
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
2681cc8
chore: remove `report.mjs` script
Ansonhkg 736d8d8
feat: use yarn 4.x workspaces
Ansonhkg 5a20ce5
feat: update package name
Ansonhkg cf828c1
feat: add `yarn` berry
Ansonhkg bd0aaa0
fix: add empty `yarn.lock`
Ansonhkg ccdbf7d
fix: should remove inner packages node_modules first
Ansonhkg 6b81146
resolved conflicts
anshss b66f820
fix: typescript bug for test file
anshss 63f4dd5
merge: resolved conflicts
anshss 543b694
feat: added more examples to test-lit command
anshss 9dc94f7
feat: github action for test-lit
anshss 9574d64
feat: added and excluded pkp-migration project to nx
anshss 386d8a2
feat: bash script to migrate to latest version
anshss ad2d615
fix: path on project.json and looping in script
anshss 7da4733
feat: action to migrate dependencies to latest version
anshss 482fabc
feat: condition for dependabot on update-lit action
anshss 287ed8f
fix: merge conflict
anshss cb9c6f7
merge
anshss 5d8a29d
refactor: removed extra file
anshss bdc62fb
Update test-lit.yml
anshss 8a03074
merge
anshss 26c6081
fix: update-lit to make script executable at the start
anshss 62a7b8d
fix: making update-lit callable with directory context
anshss 0519648
fix: run-test job made required
anshss d95be3a
merge: resolved conflicts
anshss fb83dc2
fix: scripts bug fix
anshss 95f3b25
resolved conflicts
anshss 17e142b
resolved conflicts
anshss 2a329fd
resolved conflict
anshss 2043fb4
resolved conflict
anshss 2d41a69
resolved conflicts
anshss 81815d4
resolved conflicts
anshss a4a7e9f
feat: extended nx
anshss 2e50362
fix: nx
anshss 1c91ef8
fix: nx passing all node tests
anshss 9cb747d
feat: initialized yarn workspace
anshss 24aed0a
feat: migrated and tested on v6.11.0
anshss 3e92d89
rebased over master
anshss 4c911fc
fix: actions fix, nx config fx, ran tests
anshss 7a5d4f2
feat: migration to v7
anshss 6e4fecd
feat: migrated and tested on v7 alpha
anshss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
ignore: | ||
- dependency-name: "*" | ||
allow: | ||
- dependency-name: "@lit-protocol/lit-node-client" |
This file contains hidden or 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,50 @@ | ||
name: Package Migration | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
types: [opened] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
migrate-package: | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Run package migration | ||
run: yarn upgrade:all | ||
|
||
- name: Create | ||
id: commit-changes | ||
run: | | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "GitHub Actions Bot" | ||
|
||
if [ "${{ github.event_name }}" = "pull_request" ]; then | ||
BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
else | ||
BRANCH_NAME="package-migration-branch-${{ github.sha }}" | ||
git checkout -b "$BRANCH_NAME" | ||
fi | ||
|
||
git add . | ||
git commit -m "Automated package migration" || echo "No changes to commit" | ||
|
||
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT | ||
|
||
- name: Push changes | ||
if: success() | ||
run: | | ||
git push --set-upstream origin "${{ steps.commit-changes.outputs.branch_name }}" | ||
echo "Pushed to branch: ${{ steps.commit-changes.outputs.branch_name }}" |
This file contains hidden or 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,74 @@ | ||
name: Test Lit Examples | ||
|
||
on: | ||
# schedule: | ||
# - cron: '0 0,12 * * *' | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
setup-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install root dependencies | ||
run: yarn install | ||
|
||
- name: Create .env file for lit-action-using-fetch | ||
run: | | ||
echo "ETHEREUM_PRIVATE_KEY=${{ secrets.ETHEREUM_PRIVATE_KEY }}" > $GITHUB_WORKSPACE/lit-action-using-fetch/nodejs/.env | ||
|
||
- name: Create .env file for paying-for-lit | ||
run: | | ||
echo "ETHEREUM_PRIVATE_KEY=${{ secrets.ETHEREUM_PRIVATE_KEY }}" > $GITHUB_WORKSPACE/paying-for-lit/nodejs/.env | ||
|
||
- name: Create .env file for payment-delegation-db-relayer | ||
run: | | ||
echo "ETHEREUM_PRIVATE_KEY=${{ secrets.ETHEREUM_PRIVATE_KEY }}" > $GITHUB_WORKSPACE/payment-delegation-db-relayer/nodejs/.env | ||
echo "LIT_NETWORK=${{ secrets.LIT_NETWORK }}" >> $GITHUB_WORKSPACE/payment-delegation-db-relayer/nodejs/.env | ||
echo "LIT_RELAYER_API_KEY=${{ secrets.LIT_RELAYER_API_KEY }}" >> $GITHUB_WORKSPACE/payment-delegation-db-relayer/nodejs/.env | ||
echo "LIT_PAYER_SECRET_KEY=${{ secrets.LIT_PAYER_SECRET_KEY }}" >> $GITHUB_WORKSPACE/payment-delegation-db-relayer/nodejs/.env | ||
|
||
- name: Create .env file for pkp-migration | ||
run: | | ||
echo "ETHEREUM_PRIVATE_KEY=${{ secrets.ETHEREUM_PRIVATE_KEY }}" > $GITHUB_WORKSPACE/pkp-migration/nodejs/.env | ||
echo "LIT_FROM_NETWORK=${{ secrets.LIT_FROM_NETWORK }}" >> $GITHUB_WORKSPACE/pkp-migration/nodejs/.env | ||
echo "LIT_TO_NETWORK=${{ secrets.LIT_TO_NETWORK }}" >> $GITHUB_WORKSPACE/pkp-migration/nodejs/.env | ||
echo "ADD_PKP_ETH_ADDRESS_AS_PERMITTED_ADDRESS=${{ secrets.ADD_PKP_ETH_ADDRESS_AS_PERMITTED_ADDRESS }}" >> $GITHUB_WORKSPACE/pkp-migration/nodejs/.env | ||
echo "SEND_PKP_TO_ITSELF=${{ secrets.SEND_PKP_TO_ITSELF }}" >> $GITHUB_WORKSPACE/pkp-migration/nodejs/.env | ||
|
||
- name: Create .env file for session-signatures/getLitActionSessionSigs | ||
run: | | ||
echo "ETHEREUM_PRIVATE_KEY=${{ secrets.ETHEREUM_PRIVATE_KEY }}" > $GITHUB_WORKSPACE/session-signatures/getLitActionSessionSigs/.env | ||
|
||
- name: Create .env file for session-signatures/getPkpSessionSigs | ||
run: | | ||
echo "ETHEREUM_PRIVATE_KEY=${{ secrets.ETHEREUM_PRIVATE_KEY }}" > $GITHUB_WORKSPACE/session-signatures/getPkpSessionSigs/.env | ||
|
||
- name: Create .env file for session-signatures/getSessionSigs | ||
run: | | ||
echo "ETHEREUM_PRIVATE_KEY=${{ secrets.ETHEREUM_PRIVATE_KEY }}" > $GITHUB_WORKSPACE/session-signatures/getSessionSigs/.env | ||
|
||
- name: Create .env file for sign-and-combine-ecdsa | ||
run: | | ||
echo "ETHEREUM_PRIVATE_KEY=${{ secrets.ETHEREUM_PRIVATE_KEY }}" > $GITHUB_WORKSPACE/sign-and-combine-ecdsa/nodejs/.env | ||
echo "CHAIN_TO_SEND_TX_ON=${{ secrets.CHAIN_TO_SEND_TX_ON }}" >> $GITHUB_WORKSPACE/sign-and-combine-ecdsa/nodejs/.env | ||
|
||
- name: Create .env file for wrapped-keys | ||
run: | | ||
echo "ETHEREUM_PRIVATE_KEY=${{ secrets.ETHEREUM_PRIVATE_KEY }}" > $GITHUB_WORKSPACE/wrapped-keys/nodejs/.env | ||
echo "SOLANA_PRIVATE_KEY=${{ secrets.SOLANA_PRIVATE_KEY }}" >> $GITHUB_WORKSPACE/wrapped-keys/nodejs/.env | ||
|
||
- name: Run Tests | ||
run: yarn test-lit | ||
anshss marked this conversation as resolved.
Show resolved
Hide resolved
|
||
continue-on-error: false |
This file contains hidden or 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,2 +1,10 @@ | ||
/**/*/node_modules | ||
/**/*/.env | ||
/**/*/.env | ||
/**/**/.yarn | ||
/**/*/.yarnrc.yml | ||
|
||
node_modules | ||
.nx | ||
.secrets | ||
.pnp.* | ||
|
This file contains hidden or 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,14 @@ | ||
LIT_NETWORK=datil-test | ||
anshss marked this conversation as resolved.
Show resolved
Hide resolved
|
||
LIT_FROM_NETWORK=cayenne | ||
LIT_TO_NETWORK=datil-dev | ||
ADD_PKP_ETH_ADDRESS_AS_PERMITTED_ADDRESS=false | ||
SEND_PKP_TO_ITSELF=false | ||
LIT_PKP_PUBLIC_KEY= | ||
LIT_CAPACITY_CREDIT_TOKEN_ID= | ||
CHAIN_TO_SEND_TX_ON=yellowstone | ||
|
||
# private secrets | ||
SOLANA_PRIVATE_KEY= | ||
ETHEREUM_PRIVATE_KEY= | ||
LIT_RELAYER_API_KEY= | ||
LIT_PAYER_SECRET_KEY= |
This file contains hidden or 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,2 @@ | ||
nodeLinker: node-modules | ||
yarnPath: "scripts/yarn-berry.cjs" |
This file contains hidden or 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 hidden or 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 hidden or 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,12 @@ | ||
{ | ||
"name": "btc-trigger-nodejs", | ||
"root": "btc-trigger/nodejs", | ||
"targets": { | ||
"test-lit": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"command": "cd btc-trigger/nodejs && yarn && yarn test" | ||
} | ||
} | ||
} | ||
} |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.