Skip to content

Commit

Permalink
chore(sage-monorepo): migrate to pnpm (#2771)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter authored Aug 26, 2024
1 parent 8d54ad7 commit d3edceb
Show file tree
Hide file tree
Showing 15 changed files with 32,758 additions and 34,269 deletions.
12 changes: 6 additions & 6 deletions .github/actions/setup-dev-container/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ description: 'Installs the dev container CLI, fetches caches (if exist), and sta
runs:
using: 'composite'
steps:
- name: Set up Yarn cache
- name: Set up pnpm cache
uses: actions/cache@v3
with:
path: '/tmp/.yarn/cache'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: '/tmp/.pnpm-store'
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-pnpm-store-
- name: Set up Renv cache
uses: actions/cache@v3
Expand Down Expand Up @@ -51,15 +51,15 @@ runs:
shell: bash
run: |
mkdir -p \
/tmp/.yarn/cache \
/tmp/.pnpm-store \
/tmp/.cache/R/renv/cache \
/tmp/.cache/pypoetry \
/tmp/.local/share/virtualenv \
/tmp/.gradle/caches \
/tmp/.gradle/wrapper
devcontainer up \
--mount type=bind,source=/tmp/.yarn/cache,target=/workspaces/sage-monorepo/.yarn/cache \
--mount type=bind,source=/tmp/.pnpm-store,target=/workspaces/sage-monorepo/.pnpm-store \
--mount type=bind,source=/tmp/.cache/R/renv/cache,target=/home/vscode/.cache/R/renv/cache \
--mount type=bind,source=/tmp/.cache/pypoetry,target=/home/vscode/.cache/pypoetry \
--mount type=bind,source=/tmp/.local/share/virtualenv,target=/home/vscode/.local/share/virtualenv \
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/schematic-api-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
pr:
runs-on: ubuntu-22.04-4core-16GBRAM-150GBSSD
# Runs this job if:
# 1. Triggered by a PR
# 1. Triggered by a PR
# 2. The PR originate from the Schematic-API-Staging branch
# 3. Targets the main branch
if: |
github.event_name == 'pull_request' &&
github.event_name == 'pull_request' &&
github.event.pull_request.base.ref == 'main' &&
github.event.pull_request.head.ref == 'Schematic-API-Staging'
Expand All @@ -36,13 +36,13 @@ jobs:
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v3

- name: Set up Yarn cache
- name: Set up pnpm cache
uses: actions/cache@v3
with:
path: '/tmp/.yarn/cache'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: '/tmp/.pnpm-store'
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-pnpm-store-
- name: Set up Poetry cache
uses: actions/cache@v3
Expand Down Expand Up @@ -74,15 +74,15 @@ jobs:
- name: Start the dev container
run: |
mkdir -p \
/tmp/.yarn/cache \
/tmp/.pnpm-store \
/tmp/.cache/R/renv/cache \
/tmp/.cache/pypoetry \
/tmp/.local/share/virtualenv \
/tmp/.gradle/caches \
/tmp/.gradle/wrapper
devcontainer up \
--mount type=bind,source=/tmp/.yarn/cache,target=/workspaces/sage-monorepo/.yarn/cache \
--mount type=bind,source=/tmp/.pnpm-store,target=/workspaces/sage-monorepo/.pnpm-store \
--mount type=bind,source=/tmp/.cache/R/renv/cache,target=/home/vscode/.cache/R/renv/cache \
--mount type=bind,source=/tmp/.cache/pypoetry,target=/home/vscode/.cache/pypoetry \
--mount type=bind,source=/tmp/.local/share/virtualenv,target=/home/vscode/.local/share/virtualenv \
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
credentials_file_name = "apps/schematic/api/schematic_service_account_creds.json"
with open(credentials_file_name, 'w', encoding='utf-8') as f:
json.dump(credentials_dict, f, ensure_ascii=False, indent=4)
shell: python
shell: python

- name: Test the affected projects (all)
run: |
Expand Down
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.nx-container/
.nx/
.pnpm-store/
Expand Down Expand Up @@ -53,7 +47,6 @@ sitemap.xml
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
service_account.json
Expand Down
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn nx affected --uncommitted --target=format
yarn nx affected --uncommitted --target=lint
nx affected --uncommitted --target=format
nx affected --uncommitted --target=lint

# Re-index the staged files after they have been formatted
# git diff --name-only --cached | xargs -l git add
33 changes: 0 additions & 33 deletions .yarn/plugins/@yarnpkg/plugin-outdated.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.1.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions .yarnrc.yml

This file was deleted.

4 changes: 2 additions & 2 deletions dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ function workspace-cd {
export PATH="$PATH:$WORKSPACE_DIR/node_modules/.bin"

function workspace-install {
yarn install --immutable
pnpm install --frozen-lockfile
nx run-many --target=create-config
nx run-many --target=prepare --projects=tag:language:java --parallel=1
nx run-many --target=prepare --projects=tag:language:python --projects=tag:language:r
}

function workspace-install-affected {
yarn install --immutable
pnpm install --frozen-lockfile
nx affected --target=create-config
nx affected --target=prepare --exclude '!tag:language:java' --parallel=1
nx affected --target=prepare --exclude 'tag:language:java'
Expand Down
2 changes: 1 addition & 1 deletion libs/openchallenges/api-client-angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"constructs": "10.2.13",
"core-js": "3.36.1",
"express": "~4.18.2",
"json5": "2.2.3",
"keycloak-angular": "12.1.0",
"keycloak-js": "19.0.3",
"lodash": "4.17.21",
Expand Down Expand Up @@ -157,5 +158,5 @@
"ts-node": "10.9.1",
"typescript": "5.4.5"
},
"packageManager": "[email protected]"
}
"packageManager": "[email protected]"
}
Loading

0 comments on commit d3edceb

Please sign in to comment.