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

Upgrade to yarn4+ ditch Lerna #73

Merged
merged 69 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
4a90edb
upgrade to yarn3
aaronmgdr Oct 5, 2023
300f6d0
fix lint command
aaronmgdr Oct 5, 2023
be2eefc
lint should exit when successful
aaronmgdr Oct 5, 2023
04866e3
Merge branch 'main' into chore/yarn3
aaronmgdr Oct 9, 2023
c5ffa2d
setup to use yarn 3
aaronmgdr Oct 9, 2023
87f05b6
Update circleci.yml
alvarof2 Oct 9, 2023
96ce39f
commanded needed for machine to be able to install and use yarn 3 if …
aaronmgdr Oct 10, 2023
28e3ac4
add back sudo for now
aaronmgdr Oct 10, 2023
35aedd1
cs
aaronmgdr Oct 11, 2023
ff12bd7
try to get jest running
aaronmgdr Oct 11, 2023
30e2df6
yarn berry requires jest to be listed as dep in each package (seemingly)
aaronmgdr Oct 11, 2023
9296e34
Merge branch 'main' into chore/yarn3
aaronmgdr Oct 11, 2023
be204c8
docker changes for yarn3
aaronmgdr Oct 11, 2023
ebc444b
maybe this will show the issue?
aaronmgdr Oct 11, 2023
0da95a9
Merge branch 'main' into chore/yarn3
aaronmgdr Oct 12, 2023
2130fb2
revert to mean
aaronmgdr Oct 12, 2023
da045a5
remove lerna -- convert to yarn workspaces
aaronmgdr Oct 13, 2023
c92e9f3
Merge branch 'main' into chore/yarn3
aaronmgdr Oct 13, 2023
0d77001
update build commands, add examples scripts to ci
aaronmgdr Oct 13, 2023
ec0afdb
include examples in workspaces.
aaronmgdr Oct 13, 2023
7045cdf
Merge branch 'main' into chore/yarn3
aaronmgdr Oct 13, 2023
714cda0
pretty as a pearl
aaronmgdr Oct 13, 2023
860299f
Merge branch 'main' into chore/yarn3
aaronmgdr Oct 19, 2023
a2f9d7e
add back node types
aaronmgdr Oct 19, 2023
82eb20c
Merge branch 'main' into chore/yarn3
aaronmgdr Oct 24, 2023
945168f
no lerna file anymore
aaronmgdr Oct 24, 2023
5166321
why would you clean the cache after installing?
aaronmgdr Oct 24, 2023
a115c74
will docker build?
aaronmgdr Oct 24, 2023
2a0e8f7
copy yarn3 over
aaronmgdr Oct 24, 2023
9e50116
is this right?
aaronmgdr Oct 24, 2023
fc47cde
fix test run on combiner
aaronmgdr Oct 24, 2023
d3dc27d
try focus feature
aaronmgdr Oct 24, 2023
58f55d1
fix package ref
aaronmgdr Oct 24, 2023
108abec
need typescript to compile
aaronmgdr Oct 24, 2023
36c98b7
dont use plugin
aaronmgdr Oct 24, 2023
a9fa23c
work on docker run
aaronmgdr Oct 24, 2023
5b2eb31
yarn4 && fix global scripts
aaronmgdr Oct 24, 2023
57d314a
no plugins found
aaronmgdr Oct 24, 2023
2ff9d9b
fix running build command
aaronmgdr Oct 24, 2023
7994af8
toplevel
aaronmgdr Oct 24, 2023
f9e013e
add --top-level to call bins from workspaces
aaronmgdr Oct 25, 2023
d05e2f3
Merge branch 'main' into chore/yarn3
aaronmgdr Oct 25, 2023
49f768e
merge issues
aaronmgdr Oct 25, 2023
bcb1122
fix odis-id
aaronmgdr Oct 25, 2023
702e428
its plural
aaronmgdr Oct 25, 2023
33c108c
no postinstall
aaronmgdr Oct 25, 2023
1fa1a63
try seeing what is in bin
aaronmgdr Oct 25, 2023
0ac2b00
try just installing everything
aaronmgdr Oct 25, 2023
f83fd1c
fix the clean commands
aaronmgdr Oct 25, 2023
80fda27
build both containers (TEMP)
aaronmgdr Oct 25, 2023
8048cce
fix? index.d.ts is not a module
aaronmgdr Oct 25, 2023
7f90274
i think this is it
aaronmgdr Oct 25, 2023
89aaf15
ok better
aaronmgdr Oct 25, 2023
53d887e
are these indented wrong?
aaronmgdr Oct 25, 2023
d4d38b8
pretty
aaronmgdr Oct 25, 2023
b90e03c
Bump reusable wf version
alvarof2 Oct 25, 2023
27e9f3c
platforms: 'linux/amd64'
alvarof2 Oct 25, 2023
b6fe6e8
Master ref commit
alvarof2 Oct 25, 2023
1e16cd3
Update reusable wf commit and inputs
alvarof2 Oct 25, 2023
6b15ac0
Test signer Dockerfile
alvarof2 Oct 25, 2023
b3a8b98
Fix dockerfiles signer loadtest
alvarof2 Oct 25, 2023
e54f228
Load tests dockerfile
alvarof2 Oct 25, 2023
859d623
prune dev deps
aaronmgdr Oct 26, 2023
36c5427
fix commands
aaronmgdr Oct 26, 2023
6ac5a56
add info on setup and releasing
aaronmgdr Oct 26, 2023
de7d808
fix quoting
aaronmgdr Oct 26, 2023
e01ac28
Update GH Actions workflows
alvarof2 Oct 26, 2023
c3a0e3a
Merge branch 'main' into chore/yarn3
aaronmgdr Oct 27, 2023
b211968
add peer deps required by example project
aaronmgdr Oct 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/rare-lobsters-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'odis-example-scripts': patch
---

Use @tsconfig/recommended
7 changes: 5 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
Thank you for considering making a contribution to the Celo community!
Everyone is encouraged to contribute, even the smallest fixes are welcome.

If you'd like to contribute to Celo, please fork, fix, commit and send a
pull request for the maintainers to review.
If you'd like to contribute to Celo, please fork, fix, [write a changeset](../RELEASE.md), commit, and send a pull request for the maintainers to review.

If you wish to submit more complex changes, please sync with a core developer first.
This will help ensure those changes are in line with the general philosophy of the project
and enable you to get some early feedback.

See the [contributing guide](https://docs.celo.org/community/contributing) for details on how to participate.

## Dev Setup

We use yarn berry. You may need to run `corepack enable`. This doesnt setup yarn itself but is a node.js feature for enabling package managers.
2 changes: 1 addition & 1 deletion .github/actions/sync-workspace/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ runs:
if: ${{ fromJSON(env.REBUILD_PACKAGE) }}
run: |
yarn install
yarn build --ignore docs --include-dependencies
yarn build
4 changes: 2 additions & 2 deletions .github/workflows/odis-combiner-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
odis-combiner-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/container-cicd.yaml@v1.11.4
uses: celo-org/reusable-workflows/.github/workflows/container-cicd.yaml@v1.12.2
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/odis-combiner
if: |
github.ref != 'refs/heads/main'
Expand All @@ -30,7 +30,7 @@ jobs:
trivy: true

odis-combiner-build:
uses: celo-org/reusable-workflows/.github/workflows/container-cicd.yaml@v1.11.4
uses: celo-org/reusable-workflows/.github/workflows/container-cicd.yaml@v1.12.2
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-combiner
if: |
github.ref == 'refs/heads/main'
Expand Down
86 changes: 43 additions & 43 deletions .github/workflows/odis-loadtest-container.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
---
name: Build ODIS loadtest image
on:
push:
paths:
- 'dockerfiles/phone-number-privacy/Dockerfile-loadtest'
- 'packages/phone-number-privacy/monitor/**'
branches:
- main
pull_request:
paths:
- 'dockerfiles/phone-number-privacy/Dockerfile-loadtest'
- 'packages/phone-number-privacy/monitor/**'
workflow_dispatch:
jobs:
odis-loadtest-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].0
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/odis-loadtest
if: |
github.ref != 'refs/heads/main'
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-social-connect/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/odis-loadtest
tag: ${{ github.sha }}
context: .
file: dockerfiles/phone-number-privacy/Dockerfile-loadtest
trivy: true
odis-loadtest-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].0
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-loadtest
if: |
github.ref == 'refs/heads/main'
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-social-connect-main/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/social-connect/odis-loadtest
tag: ${{ github.sha }}
context: .
file: dockerfiles/phone-number-privacy/Dockerfile-loadtest
trivy: true
name: Build ODIS loadtest image

on:
push:
paths:
- 'dockerfiles/phone-number-privacy/Dockerfile-loadtest'
- 'packages/phone-number-privacy/monitor/**'
branches:
- main
pull_request:
paths:
- 'dockerfiles/phone-number-privacy/Dockerfile-loadtest'
- 'packages/phone-number-privacy/monitor/**'
workflow_dispatch:

jobs:
odis-loadtest-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/odis-loadtest
if: |
github.ref != 'refs/heads/main'
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-social-connect/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/odis-loadtest
tag: ${{ github.sha }}
context: .
file: dockerfiles/phone-number-privacy/Dockerfile-loadtest
trivy: true

odis-loadtest-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-loadtest
if: |
github.ref == 'refs/heads/main'
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-social-connect-main/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/social-connect/odis-loadtest
tag: ${{ github.sha }}
context: .
file: dockerfiles/phone-number-privacy/Dockerfile-loadtest
trivy: true
86 changes: 43 additions & 43 deletions .github/workflows/odis-signer-container.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
---
name: Build ODIS signer image
on:
push:
paths:
- 'dockerfiles/phone-number-privacy/Dockerfile-signer'
- 'packages/phone-number-privacy/signer/**'
branches:
- main
pull_request:
paths:
- 'dockerfiles/phone-number-privacy/Dockerfile-signer'
- 'packages/phone-number-privacy/signer/**'
workflow_dispatch:
jobs:
odis-signer-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].0
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/odis-signer
if: |
github.ref != 'refs/heads/main'
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-social-connect/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/odis-signer
tag: ${{ github.sha }}
context: .
file: dockerfiles/phone-number-privacy/Dockerfile-signer
trivy: true
odis-signer-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].0
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-signer
if: |
github.ref == 'refs/heads/main'
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-social-connect-main/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/social-connect/odis-signer
tag: ${{ github.sha }}
context: .
file: dockerfiles/phone-number-privacy/Dockerfile-signer
trivy: true
name: Build ODIS signer image

on:
push:
paths:
- 'dockerfiles/phone-number-privacy/Dockerfile-signer'
- 'packages/phone-number-privacy/signer/**'
branches:
- main
pull_request:
paths:
- 'dockerfiles/phone-number-privacy/Dockerfile-signer'
- 'packages/phone-number-privacy/signer/**'
workflow_dispatch:

jobs:
odis-signer-build-dev:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
name: Build us-west1-docker.pkg.dev/devopsre/dev-images/odis-signer
if: |
github.ref != 'refs/heads/main'
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-social-connect/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/odis-signer
tag: ${{ github.sha }}
context: .
file: dockerfiles/phone-number-privacy/Dockerfile-signer
trivy: true

odis-signer-build:
uses: celo-org/reusable-workflows/.github/workflows/[email protected].2
name: Build us-west1-docker.pkg.dev/devopsre/social-connect/odis-signer
if: |
github.ref == 'refs/heads/main'
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-social-connect-main/providers/github-by-repos
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/social-connect/odis-signer
tag: ${{ github.sha }}
context: .
file: dockerfiles/phone-number-privacy/Dockerfile-signer
trivy: true
24 changes: 16 additions & 8 deletions .github/workflows/social-connect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ jobs:
key: code-${{ github.sha }}
restore-keys: |
code-${{ github.sha }}
- name: "enable corepack"
run : sudo corepack enable yarn
- name: Install yarn dependencies
run: git config --global url."https://".insteadOf ssh:// && yarn install
if: steps.cache_node.outputs.cache-hit != 'true'
- name: Run yarn postinstall if cache hitted
run: yarn run postinstall
if: steps.cache_node.outputs.cache-hit == 'true'
- name: Fail if any file changed on git
run: |
Expand All @@ -119,7 +118,7 @@ jobs:
exit 1
fi
- name: Build packages
run: yarn build --ignore docs --include-dependencies
run: yarn build
- name: Check licenses
if: steps.cache_node.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -153,18 +152,27 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
- name: Filter paths
id: changes
uses: dorny/paths-filter@v2
with:
filters: |
markdown:
- added|deleted|modified: '*.md'
others:
- added|deleted|modified: "!('*.md')"
- name: Find ChangeSet in PR
uses: peter-evans/find-comment@v2
id: fc
# Skip if author is github-bot from celo-org
if: github.event_name == 'pull_request' && github.event.pull_request.user.type != 'Bot'
# Skip if author is github-bot from celo-org or only md files changed
if: github.event_name == 'pull_request' && github.event.pull_request.user.type != 'Bot' && steps.changes.outputs.others == 'true'
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: Changeset detected
comment-author: changeset-bot[bot]
- name: Fail if Changeset commit not found
# Skip if author is github-bot from celo-org
if: github.event_name == 'pull_request' && github.event.pull_request.user.type != 'Bot'
# Skip if author is github-bot from celo-org or only md files changed
if: github.event_name == 'pull_request' && github.event.pull_request.user.type != 'Bot' && steps.changes.outputs.others == 'true'
run: |
if ${{ steps.fc.outputs.comment-id == 0 }}; then
echo "Error: No Changeset Found. You create an empty changeset with 'yarn cs add --empty'" && exit 1
Expand Down
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ dist/
npm-debug.log
yarn-error.log

# yarn3 files https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# BUCK
buck-out/
\.buckd/
Expand All @@ -71,8 +80,6 @@ buck-out/
coverage
coverage.json

lerna-debug.log

# Typechain types
**/types/typechain/
**/types/typechain-*/
Expand Down Expand Up @@ -107,4 +114,5 @@ scripts/failedSDKs.json

packages/protocol/types/typechain-mento/*.d.ts
tmp
docs/examples/lib
packages/odis-identifiers/lib
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ package.json

packages/**/dist
packages/**/lib
docs/examples/**/lib


Loading
Loading