Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into renovate/major-pretti…
Browse files Browse the repository at this point in the history
…er-packages
  • Loading branch information
viceice committed Aug 3, 2023
2 parents f634a8e + 3ac9ec9 commit 05598de
Show file tree
Hide file tree
Showing 142 changed files with 12,002 additions and 11,164 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ RUN install-apt make g++
RUN install-tool python 3.11.4

# renovate: datasource=npm
RUN install-tool yarn 1.22.19
RUN install-tool corepack 0.19.0

USER ubuntu
2 changes: 1 addition & 1 deletion .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ fi

set -x

exec yarn install
exec pnpm install
1 change: 1 addition & 0 deletions .github/DISCUSSION_TEMPLATE/ask-a-question.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ body:
attributes:
label: Was this something which used to work for you, and then stopped?
options:
- 'Placeholder value, please select the correct response from the dropdown'
- 'It used to work, and then stopped'
- 'I never saw this working'
validations:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/calculate-prefetch-matrix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
- name: Calculate cache keys
id: cache-keys
env:
HASH: ${{ hashFiles('yarn.lock') }}
HASH: ${{ hashFiles('pnpm-lock.yaml') }}
shell: bash
run: |
echo 'MACOS_KEY=node_modules-macOS-${{ inputs.node-version }}-${{ env.HASH }}' >> "$GITHUB_ENV"
Expand Down
16 changes: 9 additions & 7 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inputs:
save-cache:
description: 'Save cache when needed'
required: false
default: false
default: 'false'
runs:
using: 'composite'
steps:
Expand All @@ -29,7 +29,7 @@ runs:
}}-${{
inputs.node-version
}}-${{
hashFiles('yarn.lock')
hashFiles('pnpm-lock.yaml')
}}' >> "$GITHUB_ENV"
- name: Restore `node_modules`
Expand All @@ -47,21 +47,23 @@ runs:
(steps.node-modules-restore.outputs.cache-hit == 'true') && 'true' || ''
}}' >> "$GITHUB_ENV"
- name: Enable corepack
shell: bash
run: corepack enable

- name: Setup Node
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version: ${{ inputs.node-version }}
cache: ${{ env.CACHE_HIT != 'true' && 'yarn' || '' }}
cache: ${{ env.CACHE_HIT != 'true' && 'pnpm' || '' }}

- name: Install dependencies
uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2.8.3
if: env.CACHE_HIT != 'true'
with:
timeout_minutes: 10
max_attempts: 3
command: |
yarn install --frozen-lockfile --ignore-scripts
yarn prepare:re2
command: pnpm install

- name: Write `node_modules` cache
if: inputs.save-cache == 'true' && env.CACHE_HIT != 'true'
Expand All @@ -75,7 +77,7 @@ runs:
shell: bash
run: >
if [[ -d lib ]]; then
yarn prepare:generate;
pnpm prepare:generate;
fi
- name: Git config
Expand Down
2 changes: 1 addition & 1 deletion .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Before you start any Pull Request, it's recommended that you open a [discussion]
That way you can be sure that the maintainer(s) agree on what to change and how, and you can hopefully get a quick merge afterwards.
Also, let the maintainers know that you plan to work on a particular issue so that no one else starts any duplicate work.

Pull Requests can only be merged once all status checks are green, which means `yarn test` passes, and coverage is 100%.
Pull Requests can only be merged once all status checks are green, which means `pnpm test` passes, and coverage is 100%.

## Do not force push to your pull request branch

Expand Down
46 changes: 25 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env:
data/
tools/
package.json
yarn.lock
pnpm-lock.yaml
codecov.yml
jobs:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
FILTER_SHARDS: ${{ github.event.pull_request.draft && 'true' || '' }}
CHANGED_FILES: ${{ steps.changed-files.outputs.changed-files }}
run: |
echo "$(yarn -s schedule-test-shards)" >> "$GITHUB_OUTPUT"
echo "$(pnpm -s schedule-test-shards)" >> "$GITHUB_OUTPUT"
prefetch:
needs: [setup]
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
key: eslint-main-cache

- name: Lint
run: yarn -s eslint-ci
run: pnpm -s eslint-ci

- name: Remove cache
if: github.event_name == 'push'
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
key: prettier-main-cache

- name: Lint
run: yarn -s prettier --cache-location .cache/prettier
run: pnpm -s prettier --cache-location .cache/prettier

- name: Remove cache
if: github.event_name == 'push'
Expand Down Expand Up @@ -267,10 +267,10 @@ jobs:
uses: DavidAnson/markdownlint-cli2-action@8f3516061301755c97ff833a8e933f09282cc5b5 # v11.0.0

- name: Lint fenced code blocks
run: yarn -s doc-fence-check
run: pnpm -s doc-fence-check

- name: Lint documentation
run: yarn -s lint-documentation
run: pnpm -s lint-documentation

lint-other:
needs: [setup]
Expand All @@ -288,13 +288,13 @@ jobs:
os: ${{ runner.os }}

- name: Lint project file structure
run: yarn -s ls-lint
run: pnpm -s ls-lint

- name: Check git version
run: yarn -s git-check
run: pnpm -s git-check

- name: Test schema
run: yarn -s test-schema
run: pnpm -s test-schema

test:
needs: [setup, prefetch]
Expand Down Expand Up @@ -331,7 +331,7 @@ jobs:
}}-${{
env.NODE_VERSION
}}-${{
hashFiles('yarn.lock')
hashFiles('pnpm-lock.yaml')
}}-${{
matrix.cache-key
}}
Expand All @@ -341,7 +341,7 @@ jobs:
run: |
for shard in ${{ matrix.shards }};
do
TEST_SHARD="$shard" yarn -s jest \
TEST_SHARD="$shard" pnpm -s jest \
--ci \
--test-timeout ${{ matrix.test-timeout-milliseconds }} \
--coverage ${{ matrix.coverage }}
Expand Down Expand Up @@ -396,11 +396,11 @@ jobs:
os: ${{ runner.os }}

- name: Merge coverage reports
run: yarn -s nyc merge ./coverage/json ./coverage/nyc/coverage.json
run: pnpm nyc merge ./coverage/json ./coverage/nyc/coverage.json

- name: Check coverage threshold
run: |
yarn -s nyc check-coverage -t ./coverage/nyc \
pnpm nyc check-coverage -t ./coverage/nyc \
--branches 98 \
--functions 100 \
--lines 100 \
Expand Down Expand Up @@ -455,16 +455,16 @@ jobs:
os: ${{ runner.os }}

- name: Build
run: yarn -s build
run: pnpm -s build

- name: Pack
run: yarn -s test-e2e:pack
run: pnpm -s test-e2e:pack

- name: Upload
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: renovate-package
path: renovate-v0.0.0-semantic-release.tgz
path: renovate-0.0.0-semantic-release.tgz

build-docs:
needs: [lint-docs]
Expand All @@ -482,7 +482,7 @@ jobs:
os: ${{ runner.os }}

- name: Build
run: yarn -s build:docs
run: pnpm -s build:docs

- name: Upload
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
Expand All @@ -506,16 +506,20 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
shell: bash
run: corepack enable

- name: Download package
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: renovate-package

- name: Install dependencies
run: yarn -s test-e2e:install
run: pnpm -s test-e2e:install

- name: E2E Test
run: yarn -s test-e2e:run
run: pnpm -s test-e2e:run

release:
needs:
Expand Down Expand Up @@ -560,8 +564,8 @@ jobs:
- name: semantic-release
run: |
echo '//registry.yarnpkg.com/:_authToken=${NPM_TOKEN}' >> ./.npmrc
yarn -s semantic-release --dry-run ${{env.DRY_RUN}}
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ./.npmrc
pnpm -s semantic-release --dry-run ${{env.DRY_RUN}}
git checkout -- .npmrc
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
- name: Build and run dev container task
uses: devcontainers/ci@57eaf0c9b518a76872bc429cdceefd65a912309b # v0.3.1900000329
with:
runCmd: yarn build
runCmd: pnpm build
11 changes: 7 additions & 4 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,32 @@ jobs:
with:
ref: ${{ env.GIT_SHA }}

- name: Enable corepack
shell: bash
run: corepack enable

- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

- name: Init platform
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global user.email 'renovate@whitesourcesoftware.com'
git config --global user.name 'Renovate Bot'
yarn config set version-git-tag false
- name: Installing dependencies
uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2.8.3
with:
timeout_minutes: 10
max_attempts: 3
command: yarn install --frozen-lockfile
command: pnpm install

- name: Build ${{ env.NPM_VERSION }}
run: yarn build
run: pnpm build

- name: Prepare ${{ env.NPM_VERSION }}
run: |
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,24 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Enable corepack
shell: bash
run: corepack enable

- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
cache: pnpm

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

- name: Update static data
run: yarn run update-static-data
run: pnpm run update-static-data

- name: Run Prettier
run: yarn prettier-fix
run: pnpm prettier-fix

- name: Create pull request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
Expand Down
4 changes: 3 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/sh

# shellcheck source=/dev/null
. "$(dirname "$0")/_/husky.sh"

yarn ls-lint
pnpm ls-lint

BRANCH_NAME=$(git branch --show-current)

Expand Down
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
save-exact = true
provenance = true

# pnpm run settings
# https://pnpm.io/cli/run
shell-emulator = true
enable-pre-post-scripts = true
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
package.json
**/__fixtures__/
**/__mocks__/
bin/yarn*
.clinic/
.eslintcache

Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"cwd": "${workspaceFolder}",
"runtimeExecutable": "yarn",
"runtimeExecutable": "pnpm",
"args": [
"jest",
"--runInBand",
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
"omnisharp.autoStart": false,
"jest.autoRun": "off",
"jest.jestCommandLine": "yarn jest",
"npm.packageManager": "yarn",
"jest.jestCommandLine": "pnpm jest",
"npm.packageManager": "pnpm",
"prettier.prettierPath": "./node_modules/prettier",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
Expand Down

0 comments on commit 05598de

Please sign in to comment.