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

(PC-31397) chore(deps): bump yarn and modify types in ts config #6796

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ eval "$(devbox generate direnv --print-envrc)"
layout node

source ./scripts/load_certificate.sh
export NODE_TLS_REJECT_UNAUTHORIZED=0

source ./scripts/install_node_modules_when_not_installed.sh

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dev_on_pull_request_reassure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
test-performance:
runs-on: ubuntu-latest
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dev_on_workflow_chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
yarn_test_and_publish_storybook_with_chromatic:
runs-on: ubuntu-latest
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
with:
# by default, it only retrieves the last commit
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dev_on_workflow_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
name: "Install yarn dependencies"
runs-on: ubuntu-latest
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dev_on_workflow_linter_ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
yarn_lint:
runs-on: ubuntu-latest
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand All @@ -41,6 +43,8 @@ jobs:
yarn_typescript:
runs-on: ubuntu-latest
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/dev_on_workflow_tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
matrix:
shard: [1, 2, 3]
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
- name: 'OpenID Connect Authentication'
uses: 'google-github-actions/auth@v2'
Expand Down Expand Up @@ -62,6 +64,8 @@ jobs:
matrix:
shard: [1, 2, 3, 4, 5, 6, 7]
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
- name: 'OpenID Connect Authentication'
uses: 'google-github-actions/auth@v2'
Expand Down Expand Up @@ -104,6 +108,8 @@ jobs:
runs-on: ubuntu-latest
needs: yarn_test_native
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
- name: "OpenID Connect Authentication"
uses: 'google-github-actions/auth@v2'
Expand Down Expand Up @@ -144,6 +150,8 @@ jobs:
yarn_test_proxy:
runs-on: ubuntu-latest
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand All @@ -164,8 +172,10 @@ jobs:
key: v1-yarn-proxy-dependency-cache-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
v1-yarn-proxy-dependency-cache-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --immutable --cwd server
- run: yarn --cwd server test:unit:ci
- name: Install packages for proxy
run: cd server && yarn install && cd ..
- name: Run proxy unit tests
run: cd server && yarn test:unit:ci && cd ..
- name: Get secrets for SonarCloud
id: 'sonar_secrets'
uses: 'google-github-actions/get-secretmanager-secrets@v2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
yarn-ts-noUncheckedIndexedAccess:
runs-on: ubuntu-latest
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dev_on_workflow_ts_prune.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
yarn-ts-prune:
runs-on: ubuntu-latest
steps:
- name: Enable Corepack
run: corepack enable
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/dev_on_workflow_web_proxy_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ jobs:
key: v1-yarn-proxy-dependency-cache-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
v1-yarn-proxy-dependency-cache-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install
- name: Install package for proxy
run: yarn install --immutable --cwd server
- name: Install app dependencies
run: yarn install
- name: Install packages for proxy
run: cd server && yarn install --immutable && cd ..
- name: Get Secret
id: 'secrets'
uses: 'google-github-actions/get-secretmanager-secrets@v2'
Expand All @@ -66,7 +67,7 @@ jobs:
workload_identity_provider: ${{ secrets.GCP_PROD_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_PROD_SERVICE_ACCOUNT }}
- name: 'Push proxy for input env'
run: yarn --cwd server deploy:${{ inputs.ENV }}
run: cd server && yarn deploy:${{ inputs.ENV }} && cd ..

- name: 'Clear unused apps'
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ local.properties
node_modules/
npm-debug.log
yarn-error.log
.yarn/install-state.gz

# fastlane
#
Expand Down
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodeLinker: node-modules
checksumBehavior: update
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"start:web:testing": "yarn start:web --mode=testing",
"storybook": "NODE_OPTIONS='--openssl-legacy-provider' TZ=UTC start-storybook --static-dir ./public -p 6006",
"test": "yarn test:lint && yarn test:types && yarn test:unit && yarn test:unit:web",
"test:deadcode": "yarn --silent ts-prune",
"test:deadcode": "yarn ts-prune",
"test:deadcode:count": "yarn test:deadcode | wc -l",
"test:deadcode:update": "yarn --silent test:deadcode > scripts/dead_code_snapshot.txt",
"test:e2e:android:staging": "./scripts/run_e2e_tests.sh test android staging",
Expand Down Expand Up @@ -330,7 +330,7 @@
"react-native-web-linear-gradient": "^1.1.2",
"react-query-native-devtools": "^3.0.1",
"react-test-renderer": "18.2.0",
"reassure": "^0.7.2",
"reassure": "1.1.0",
"resolve": "^1.20.0",
"resolve-url-loader": "^3.1.2",
"sass-loader": "^11.0.1",
Expand Down Expand Up @@ -382,5 +382,6 @@
"./jsx-dev-runtime": "./jsx-dev-runtime.js",
"./jsx-runtime": "./jsx-runtime.js",
"./": "./"
}
}
},
"packageManager": "yarn@3.6.4"
}
2 changes: 1 addition & 1 deletion scripts/check_dead_code_introduced.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o errexit
set -o nounset
set -o pipefail

yarn --silent test:deadcode >scripts/dead_code_current.txt
yarn test:deadcode >scripts/dead_code_current.txt

current_dead_code_count=$(wc -l <scripts/dead_code_current.txt)
snapshot_dead_code_count=$(wc -l <scripts/dead_code_snapshot.txt)
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_noUncheckedIndexedAccess_error_introduced.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o errexit
set -o nounset
set -o pipefail

yarn --silent test:types:noUncheckedIndexedAccess >scripts/noUncheckedIndexedAccess_current.txt
yarn test:types:noUncheckedIndexedAccess >scripts/noUncheckedIndexedAccess_current.txt

current_count=$(wc -l <scripts/noUncheckedIndexedAccess_current.txt)
snapshot_count=$(wc -l <scripts/noUncheckedIndexedAccess_snapshot.txt)
Expand Down
6 changes: 5 additions & 1 deletion scripts/reassure_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -o errexit
set -o nounset
set -o pipefail

set -x

# Test on branch master as baseline
BASELINE_BRANCH=${BASELINE_BRANCH:="master"}

Expand All @@ -14,8 +16,10 @@ git fetch origin
git switch "$BASELINE_BRANCH"
yarn install --force
yarn test:perf --baseline
git diff
git restore .

# Gather current perf measurements & compare results
git switch --detach -
yarn install --force
yarn install
yarn test:perf
Loading
Loading