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

migrate to yarn v3 #219

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.yarn/** binary
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set Tag with SHA
run: echo "TAG=`echo $GITHUB_SHA | cut -c 1-7`" >> $GITHUB_ENV

- run: yarn
- run: yarn install --immutable
- run: yarn tsc
- name: create empty credentials config file
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
echo $PR_NUMBER
echo $TAG

- run: yarn
- run: yarn install --immutable
- run: yarn tsc
- name: create empty credentials config file
run: |
Expand Down
28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

873 changes: 873 additions & 0 deletions .yarn/releases/yarn-3.4.1.cjs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.4.1.cjs
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM node:16-bullseye-slim

# Set Python interpreter for `node-gyp` to use
ENV PYTHON /usr/bin/python3

# From here on we use the least-privileged `node` user to run the backend.
WORKDIR /app
RUN chown node:node /app
Expand All @@ -11,10 +14,14 @@ ENV NODE_ENV production
# Copy repo skeleton first, to avoid unnecessary docker cache invalidation.
# The skeleton contains the package.json of each package in the monorepo,
# and along with yarn.lock and the root package.json, that's enough to run yarn install.
COPY .yarn ./.yarn
COPY .yarnrc.yml ./
COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz

RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
# this command does not support the immutable flag
# but we use it for the initial build in github actions
RUN yarn workspaces focus --all --production && rm -rf "$(yarn cache clean)"

# Then copy the rest of the backend bundle, along with any other files we might want.
COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"@spotify/prettier-config": "^12.0.0",
"concurrently": "^7.5.0",
"lerna": "^4.0.0",
"node-gyp": "^9.0.0",
"prettier": "^2.3.2",
"typescript": "~4.6.4",
"node-gyp": "^9.0.0"
"typescript": "~4.6.4"
},
"resolutions": {
"@types/react": "^17",
Expand All @@ -62,5 +62,6 @@
"volta": {
"node": "18.12.1",
"yarn": "1.22.19"
}
},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"@backstage/plugin-search-react": "^1.4.0",
"@backstage/plugin-tech-radar": "^0.6.0",
"@backstage/plugin-techdocs": "^1.4.3",
"@backstage/plugin-techdocs-react": "^1.1.2",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.0.9",
"@backstage/plugin-techdocs-react": "^1.1.2",
"@backstage/plugin-user-settings": "^0.6.2",
"@backstage/theme": "^0.2.16",
"@frontside/backstage-plugin-effection-inspector": "^0.1.5",
Expand Down
10 changes: 5 additions & 5 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@
"@backstage/plugin-proxy-backend": "^0.2.35",
"@backstage/plugin-scaffolder-backend": "^1.10.1",
"@backstage/plugin-search-backend": "^1.2.2",
"@backstage/plugin-search-backend-node": "^1.1.2",
"@backstage/plugin-search-backend-module-pg": "^0.5.2",
"@backstage/plugin-search-backend-node": "^1.1.2",
"@backstage/plugin-techdocs-backend": "^1.5.2",
"@frontside/backstage-plugin-effection-inspector-backend": "0.1.5",
"@frontside/backstage-plugin-batch-loader": "0.3.1",
"@frontside/backstage-plugin-humanitec-backend": "^0.3.5",
"@frontside/backstage-plugin-effection-inspector-backend": "0.1.5",
"@frontside/backstage-plugin-graphql": "^0.6.1",
"@frontside/backstage-plugin-humanitec-backend": "^0.3.5",
"@frontside/backstage-plugin-incremental-ingestion-backend": "*",
"graphql-modules": "^2.1.0",
"@gitbeaker/node": "^34.6.0",
"@internal/plugin-healthcheck": "0.1.4",
"@octokit/rest": "^19.0.5",
Expand All @@ -53,6 +52,7 @@
"effection": "^2.0.6",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"graphql-modules": "^2.1.0",
"knex": "^2.0.0",
"luxon": "^2.3.1",
"pg": "^8.3.0",
Expand All @@ -64,8 +64,8 @@
"@octokit/types": "^6.34.0",
"@types/dockerode": "^3.3.0",
"@types/express": "^4.17.6",
"@types/luxon": "^2.0.4",
"@types/express-serve-static-core": "^4.17.5",
"@types/luxon": "^2.0.4",
"better-sqlite3": "^7.5.0"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},
"dependencies": {
"@backstage/backend-common": "^0.18.1",
"@backstage/catalog-model": "^1.1.5",
"@backstage/catalog-client": "^1.3.0",
"@backstage/catalog-model": "^1.1.5",
"@envelop/core": "^2.3.0",
"@envelop/dataloader": "^3.3.2",
"@envelop/graphql-modules": "^3.3.0",
Expand Down
1 change: 0 additions & 1 deletion plugins/humanitec-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": false,
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
Expand Down
6 changes: 3 additions & 3 deletions plugins/incremental-ingestion-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
},
"devDependencies": {
"@backstage/cli": "^0.22.1",
"@types/supertest": "^2.0.8",
"@types/luxon": "^2.0.4",
"@types/supertest": "^2.0.8",
"@types/uuid": "^8.3.4",
"supertest": "^4.0.2",
"msw": "^0.35.0"
"msw": "^0.35.0",
"supertest": "^4.0.2"
},
"files": [
"dist",
Expand Down
4 changes: 2 additions & 2 deletions plugins/scaffolder-frontend-workflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^14.0.0",
"@types/node": "*",
"msw": "^0.49.0",
"cross-fetch": "^3.1.5"
"cross-fetch": "^3.1.5",
"msw": "^0.49.0"
},
"files": [
"dist"
Expand Down
Loading