Skip to content

Commit

Permalink
chore(yarn): upgrade to yarn v3 (redhat-developer#1810)
Browse files Browse the repository at this point in the history
* chore(yarn): upgrade to yarn v3

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update turbo

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update prettier config

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update eslint config

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update tsc config

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update lint-staged config

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* fix prettier

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* add export-dynamic:clean

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update gh actions

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* add pr-semantic

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* fix tsc config

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* 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 <pschultz@pobox.com>

* include e2e-tests in workspace

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* clean up turbo

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* fix file resolution

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* fix file resolution

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update dynamic files

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update docker workflow

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* fix yarn lock

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* run prettier

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update some dynamic files

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update backstage deps

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* fix type errors

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* fix remaining tsc issues

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* remove backend common

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* fix @RoadieHQ and @Parfuemerie-Douglas plugins

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update dynamic files

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* fix tsconfig

Signed-off-by: Paul Schultz <pschultz@pobox.com>

* update workflow names

Signed-off-by: Paul Schultz <pschultz@pobox.com>

---------

Signed-off-by: Paul Schultz <pschultz@pobox.com>
Co-authored-by: Nick Boldt <nboldt@redhat.com>
  • Loading branch information
schultzp2020 and nickboldt authored Oct 24, 2024
1 parent 2b64b6b commit eae8a31
Show file tree
Hide file tree
Showing 478 changed files with 70,620 additions and 204,412 deletions.
65 changes: 0 additions & 65 deletions .github/workflows/ci.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ on:
pull_request:
paths-ignore:
- 'docs/**'
- 'showcase-docs/**'
- '.changeset/**'
branches-ignore:
- 'changeset-release/**'
schedule:
- cron: '17 0 * * 2'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Next Docker Build
name: Next

on:
push:
Expand All @@ -27,8 +27,8 @@ env:
REGISTRY: quay.io

jobs:
next-docker-build:
name: Next Docker Build
build-image:
name: Build Image
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: PR Docker Build
name: PR

on:
pull_request_target:
paths-ignore:
- 'docs/**'
- 'showcase-docs/**'
- '.changeset/**'
branches-ignore:
- 'changeset-release/**'

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

jobs:
pr-docker-build:
name: PR Docker Build
build-image:
name: Build Image
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/pr-semantic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: PR

on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

jobs:
title:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Since we use `conventionalcommits` preset for
# `@semantic-release/commit-analyzer`, this list has to match allowed types
# Ref: https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.2.0/README.md#types
types: |
feat
fix
chore
docs
style
refactor
perf
test
revert
requireScope: false
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
ignoreLabels: |
ignore-semantic-pull-request
# For work-in-progress PRs you can typically use draft pull requests
# from GitHub. However, private repositories on the free plan don't have
# this option and therefore this action allows you to opt-in to using the
# special "[WIP]" prefix to indicate this state. This will avoid the
# validation of the PR title and the pull request checks remain pending.
# Note that a second check will be reported if this is enabled.
wip: true

- uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
Hey there and thank you for opening this pull request! 👋🏼
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.
Details:
```
${{ steps.lint_pr_title.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2
with:
header: pr-title-lint-error
delete: true
97 changes: 97 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Copyright 2023-2024 The Janus IDP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: PR

on:
pull_request:

env:
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }}
TURBO_SCM_HEAD: ${{ github.sha }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build with Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Setup local Turbo cache
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1

- name: Use app-config.example.yaml
run: rm app-config.yaml && mv app-config.example.yaml app-config.yaml

- name: Install dependencies
run: |
yarn install
- name: Build packages
run: yarn run build --concurrency=75% --affected

test:
name: Test with Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Setup local Turbo cache
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1

- name: Use app-config.example.yaml
run: rm app-config.yaml && mv app-config.example.yaml app-config.yaml

- name: Install dependencies
run: |
yarn install
- name: Run prettier
run: yarn prettier:check --concurrency=75% --affected

- name: Run lint
run: yarn run lint:check --concurrency=75% --affected

- name: Run tests
run: yarn run test --concurrency=75% --affected
14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ coverage
node_modules/

# Yarn 3 files
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
**/.pnp.*
**/.yarn/*
!**/.yarn/patches
!**/.yarn/plugins
!**/.yarn/releases
!**/.yarn/sdks
!**/.yarn/versions

# dotenv environment variables file
.env
Expand Down
6 changes: 3 additions & 3 deletions .rhdh/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ENV EXTERNAL_SOURCE_NESTED=$REMOTE_SOURCES/upstream1/app/distgit/containers/rhdh
ENV CONTAINER_SOURCE=$REMOTE_SOURCES_DIR

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

WORKDIR $CONTAINER_SOURCE/
COPY $EXTERNAL_SOURCE_NESTED/.yarn ./.yarn
Expand Down Expand Up @@ -117,7 +117,7 @@ RUN \
# cat "$CONTAINER_SOURCE"/.npmrc || true; \
# "$YARN" config list --verbose; npm config list; npm config list -l

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

# Stage 3 - Build packages
COPY $EXTERNAL_SOURCE_NESTED ./
Expand Down Expand Up @@ -179,7 +179,7 @@ COPY $EXTERNAL_SOURCE_NESTED/patches/ ./patches/

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

0 comments on commit eae8a31

Please sign in to comment.