Skip to content

Commit eae8a31

Browse files
chore(yarn): upgrade to yarn v3 (redhat-developer#1810)
* chore(yarn): upgrade to yarn v3 Signed-off-by: Paul Schultz <[email protected]> * update turbo Signed-off-by: Paul Schultz <[email protected]> * update prettier config Signed-off-by: Paul Schultz <[email protected]> * update eslint config Signed-off-by: Paul Schultz <[email protected]> * update tsc config Signed-off-by: Paul Schultz <[email protected]> * update lint-staged config Signed-off-by: Paul Schultz <[email protected]> * fix prettier Signed-off-by: Paul Schultz <[email protected]> * add export-dynamic:clean Signed-off-by: Paul Schultz <[email protected]> * update gh actions Signed-off-by: Paul Schultz <[email protected]> * add pr-semantic Signed-off-by: Paul Schultz <[email protected]> * fix tsc config Signed-off-by: Paul Schultz <[email protected]> * Update Dockerfile - use ENV YARN=$CONTAINER_SOURCE/.yarn/releases/yarn-3.8.6.cjs * Update Dockerfile - use ENV YARN=$CONTAINER_SOURCE/.yarn/releases/yarn-3.8.6.cjs * add tsc to wrappers Signed-off-by: Paul Schultz <[email protected]> * include e2e-tests in workspace Signed-off-by: Paul Schultz <[email protected]> * clean up turbo Signed-off-by: Paul Schultz <[email protected]> * fix file resolution Signed-off-by: Paul Schultz <[email protected]> * fix file resolution Signed-off-by: Paul Schultz <[email protected]> * update dynamic files Signed-off-by: Paul Schultz <[email protected]> * update docker workflow Signed-off-by: Paul Schultz <[email protected]> * fix yarn lock Signed-off-by: Paul Schultz <[email protected]> * run prettier Signed-off-by: Paul Schultz <[email protected]> * update some dynamic files Signed-off-by: Paul Schultz <[email protected]> * update backstage deps Signed-off-by: Paul Schultz <[email protected]> * fix type errors Signed-off-by: Paul Schultz <[email protected]> * fix remaining tsc issues Signed-off-by: Paul Schultz <[email protected]> * remove backend common Signed-off-by: Paul Schultz <[email protected]> * fix @RoadieHQ and @Parfuemerie-Douglas plugins Signed-off-by: Paul Schultz <[email protected]> * update dynamic files Signed-off-by: Paul Schultz <[email protected]> * fix tsconfig Signed-off-by: Paul Schultz <[email protected]> * update workflow names Signed-off-by: Paul Schultz <[email protected]> --------- Signed-off-by: Paul Schultz <[email protected]> Co-authored-by: Nick Boldt <[email protected]>
1 parent 2b64b6b commit eae8a31

File tree

478 files changed

+70620
-204412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

478 files changed

+70620
-204412
lines changed

.github/workflows/ci.yaml

-65
This file was deleted.

.github/workflows/codeql.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ on:
1414
pull_request:
1515
paths-ignore:
1616
- 'docs/**'
17-
- 'showcase-docs/**'
18-
- '.changeset/**'
19-
branches-ignore:
20-
- 'changeset-release/**'
2117
schedule:
2218
- cron: '17 0 * * 2'
2319

.github/workflows/next-docker-build.yaml .github/workflows/next-build-image.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Next Docker Build
15+
name: Next
1616

1717
on:
1818
push:
@@ -27,8 +27,8 @@ env:
2727
REGISTRY: quay.io
2828

2929
jobs:
30-
next-docker-build:
31-
name: Next Docker Build
30+
build-image:
31+
name: Build Image
3232
runs-on: ubuntu-latest
3333
permissions:
3434
contents: read

.github/workflows/pr-docker-build.yaml .github/workflows/pr-build-image.yaml

+3-7
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: PR Docker Build
15+
name: PR
1616

1717
on:
1818
pull_request_target:
1919
paths-ignore:
2020
- 'docs/**'
21-
- 'showcase-docs/**'
22-
- '.changeset/**'
23-
branches-ignore:
24-
- 'changeset-release/**'
2521

2622
concurrency:
2723
group: ${{ github.workflow }}-${{ github.event.number || github.event.pull_request.head.ref }}
@@ -31,8 +27,8 @@ env:
3127
REGISTRY: quay.io
3228

3329
jobs:
34-
pr-docker-build:
35-
name: PR Docker Build
30+
build-image:
31+
name: Build Image
3632
runs-on: ubuntu-latest
3733
permissions:
3834
contents: read

.github/workflows/pr-semantic.yaml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: PR
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
- labeled
10+
- unlabeled
11+
12+
jobs:
13+
title:
14+
name: Conventional Commits
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5
18+
id: lint_pr_title
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
with:
22+
# Since we use `conventionalcommits` preset for
23+
# `@semantic-release/commit-analyzer`, this list has to match allowed types
24+
# Ref: https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.2.0/README.md#types
25+
types: |
26+
feat
27+
fix
28+
chore
29+
docs
30+
style
31+
refactor
32+
perf
33+
test
34+
revert
35+
requireScope: false
36+
subjectPattern: ^(?![A-Z]).+$
37+
subjectPatternError: |
38+
The subject "{subject}" found in the pull request title "{title}"
39+
didn't match the configured pattern. Please ensure that the subject
40+
doesn't start with an uppercase character.
41+
ignoreLabels: |
42+
ignore-semantic-pull-request
43+
# For work-in-progress PRs you can typically use draft pull requests
44+
# from GitHub. However, private repositories on the free plan don't have
45+
# this option and therefore this action allows you to opt-in to using the
46+
# special "[WIP]" prefix to indicate this state. This will avoid the
47+
# validation of the PR title and the pull request checks remain pending.
48+
# Note that a second check will be reported if this is enabled.
49+
wip: true
50+
51+
- uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2
52+
# When the previous steps fails, the workflow would stop. By adding this
53+
# condition you can continue the execution with the populated error message.
54+
if: always() && (steps.lint_pr_title.outputs.error_message != null)
55+
with:
56+
header: pr-title-lint-error
57+
message: |
58+
Hey there and thank you for opening this pull request! 👋🏼
59+
60+
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
61+
62+
Details:
63+
64+
```
65+
${{ steps.lint_pr_title.outputs.error_message }}
66+
```
67+
68+
# Delete a previous comment when the issue has been resolved
69+
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
70+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2
71+
with:
72+
header: pr-title-lint-error
73+
delete: true

.github/workflows/pr.yaml

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Copyright 2023-2024 The Janus IDP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: PR
16+
17+
on:
18+
pull_request:
19+
20+
env:
21+
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }}
22+
TURBO_SCM_HEAD: ${{ github.sha }}
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: true
27+
28+
jobs:
29+
build:
30+
name: Build with Node.js ${{ matrix.node-version }}
31+
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
node-version: [20]
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
38+
with:
39+
fetch-depth: 0
40+
41+
- name: Setup Node.js
42+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
43+
with:
44+
node-version: ${{ matrix.node-version }}
45+
registry-url: 'https://registry.npmjs.org'
46+
cache: 'yarn'
47+
48+
- name: Setup local Turbo cache
49+
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1
50+
51+
- name: Use app-config.example.yaml
52+
run: rm app-config.yaml && mv app-config.example.yaml app-config.yaml
53+
54+
- name: Install dependencies
55+
run: |
56+
yarn install
57+
58+
- name: Build packages
59+
run: yarn run build --concurrency=75% --affected
60+
61+
test:
62+
name: Test with Node.js ${{ matrix.node-version }}
63+
runs-on: ubuntu-latest
64+
strategy:
65+
matrix:
66+
node-version: [20]
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
70+
with:
71+
fetch-depth: 0
72+
73+
- name: Setup Node.js
74+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
75+
with:
76+
node-version: ${{ matrix.node-version }}
77+
registry-url: 'https://registry.npmjs.org'
78+
cache: 'yarn'
79+
80+
- name: Setup local Turbo cache
81+
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1
82+
83+
- name: Use app-config.example.yaml
84+
run: rm app-config.yaml && mv app-config.example.yaml app-config.yaml
85+
86+
- name: Install dependencies
87+
run: |
88+
yarn install
89+
90+
- name: Run prettier
91+
run: yarn prettier:check --concurrency=75% --affected
92+
93+
- name: Run lint
94+
run: yarn run lint:check --concurrency=75% --affected
95+
96+
- name: Run tests
97+
run: yarn run test --concurrency=75% --affected

.gitignore

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ coverage
1616
node_modules/
1717

1818
# Yarn 3 files
19-
.pnp.*
20-
.yarn/*
21-
!.yarn/patches
22-
!.yarn/plugins
23-
!.yarn/releases
24-
!.yarn/sdks
25-
!.yarn/versions
19+
**/.pnp.*
20+
**/.yarn/*
21+
!**/.yarn/patches
22+
!**/.yarn/plugins
23+
!**/.yarn/releases
24+
!**/.yarn/sdks
25+
!**/.yarn/versions
2626

2727
# dotenv environment variables file
2828
.env

.rhdh/docker/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ENV EXTERNAL_SOURCE_NESTED=$REMOTE_SOURCES/upstream1/app/distgit/containers/rhdh
4040
ENV CONTAINER_SOURCE=$REMOTE_SOURCES_DIR
4141

4242
# Env vars
43-
ENV YARN=$CONTAINER_SOURCE/.yarn/releases/yarn-1.22.19.cjs
43+
ENV YARN=$CONTAINER_SOURCE/.yarn/releases/yarn-3.8.6.cjs
4444

4545
WORKDIR $CONTAINER_SOURCE/
4646
COPY $EXTERNAL_SOURCE_NESTED/.yarn ./.yarn
@@ -117,7 +117,7 @@ RUN \
117117
# cat "$CONTAINER_SOURCE"/.npmrc || true; \
118118
# "$YARN" config list --verbose; npm config list; npm config list -l
119119

120-
RUN "$YARN" install --frozen-lockfile --network-timeout 600000
120+
RUN "$YARN" install --immutable --network-timeout 600000
121121

122122
# Stage 3 - Build packages
123123
COPY $EXTERNAL_SOURCE_NESTED ./
@@ -179,7 +179,7 @@ COPY $EXTERNAL_SOURCE_NESTED/patches/ ./patches/
179179

180180
# Install production dependencies
181181
# hadolint ignore=DL3059
182-
RUN "$YARN" install --frozen-lockfile --production --network-timeout 600000 && \
182+
RUN "$YARN" install --immutable --production --network-timeout 600000 && \
183183
# delete all the nested .npmrc files and set default values
184184
find . -type f -name .npmrc -exec rm -Rf {} \; && \
185185
# reset npm config to the default registry and absolute path to .pem file

0 commit comments

Comments
 (0)