Skip to content

Commit

Permalink
chore: use yarn3
Browse files Browse the repository at this point in the history
chore: commit yarn release

chore: don't use -s

fix: eslint deps

https://eslint.org/docs/latest/extend/shareable-configs#publishing-a-shareable-config

chore: fix eslint

chore: remove -s

fix: lint

chore: yarn 3 amends

chore: dont use npm run all

chore: fix securitylockfile action

chore: update lockfile post rebase

Revert "Delete index.js"

This reverts commit e6009ec.

Delete index.js

chore: remove validate-https because how yarn3 works

chore: remove validate-https

chore: use same time of cache everywhere
  • Loading branch information
joshuaellis committed Mar 24, 2023
1 parent 403c098 commit 0f008b4
Show file tree
Hide file tree
Showing 22 changed files with 33,598 additions and 23,141 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,8 @@ AUTHORS text
*.woff binary
*.pyc binary
*.pdf binary

# yarn
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
2 changes: 1 addition & 1 deletion .github/actions/check-pr-status/dist/index.js

Large diffs are not rendered by default.

180 changes: 0 additions & 180 deletions .github/actions/check-pr-status/yarn.lock

This file was deleted.

6 changes: 3 additions & 3 deletions .github/actions/run-api-tests/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export JWT_SECRET="aSecret"

opts=($DB_OPTIONS)

yarn run -s build:ts
yarn run -s test:generate-app "${opts[@]}"
yarn run -s test:api --no-generate-app
yarn run build:ts
yarn run test:generate-app "${opts[@]}"
yarn run test:api --no-generate-app
6 changes: 2 additions & 4 deletions .github/actions/security/lockfile/script.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
yarn global add lockfile-lint

lockfile-lint \
yarn dlx lockfile-lint \
--type $LOCKFILE_TYPE \
--path $LOCKFILE_PATH \
--allowed-hosts $LOCKFILE_ALLOWED_HOSTS \
--validate-https
--allowed-schemes "npm:" "workspace:" "patch:"
3 changes: 2 additions & 1 deletion .github/workflows/adminBundleSize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- uses: preactjs/compressed-size-action@v2
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- uses: ./.github/actions/security/lockfile
5 changes: 3 additions & 2 deletions .github/workflows/contributor-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Build website
run: yarn build
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- uses: nrwl/nx-set-shas@v3
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- name: Run build:ts
run: yarn nx run-many --target=build:ts --nx-ignore-cycles
- name: Run lint
Expand All @@ -61,7 +61,7 @@ jobs:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- uses: nrwl/nx-set-shas@v3
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- name: Run build:ts
run: yarn nx run-many --target=build:ts --nx-ignore-cycles
- name: Run tests
Expand All @@ -86,7 +86,7 @@ jobs:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- uses: nrwl/nx-set-shas@v3
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- name: Run test
run: yarn nx affected --target=test:front --nx-ignore-cycles

Expand All @@ -106,7 +106,7 @@ jobs:
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- name: Build
run: yarn build --projects=@strapi/admin,@strapi/helper-plugin

Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- uses: ./.github/actions/run-api-tests
with:
dbOptions: '--dbclient=postgres --dbhost=localhost --dbport=5432 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi'
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- uses: ./.github/actions/run-api-tests
with:
dbOptions: '--dbclient=mysql --dbhost=localhost --dbport=3306 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi'
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- uses: ./.github/actions/run-api-tests
with:
dbOptions: '--dbclient=mysql --dbhost=localhost --dbport=3306 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi'
Expand All @@ -242,7 +242,7 @@ jobs:
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- uses: ./.github/actions/run-api-tests
env:
SQLITE_PKG: ${{ matrix.sqlite_pkg }}
Expand Down Expand Up @@ -288,7 +288,7 @@ jobs:
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- uses: ./.github/actions/run-api-tests
with:
dbOptions: '--dbclient=postgres --dbhost=localhost --dbport=5432 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi'
Expand Down Expand Up @@ -330,7 +330,7 @@ jobs:
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- uses: ./.github/actions/run-api-tests
with:
dbOptions: '--dbclient=mysql --dbhost=localhost --dbport=3306 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi'
Expand All @@ -356,7 +356,7 @@ jobs:
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn install --immutable
- uses: ./.github/actions/run-api-tests
env:
SQLITE_PKG: ${{ matrix.sqlite_pkg }}
Expand Down
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,15 @@ schema.graphql
.vscode/
!.vscode/settings.json
front-workspace.code-workspace
.yarn
.yarnrc

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

0 comments on commit 0f008b4

Please sign in to comment.