Skip to content

Commit

Permalink
chore: pob update and update to yarn 4 and node 18
Browse files Browse the repository at this point in the history
BREAKING CHANGE: drop node 16, requires node 18
  • Loading branch information
christophehurpeau committed Nov 5, 2023
1 parent 72328cd commit d474f59
Show file tree
Hide file tree
Showing 1,500 changed files with 4,203 additions and 4,936 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/gh-pages.yml
Expand Up @@ -8,11 +8,14 @@ jobs:
create-documentation-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Enable Corepack
run: corepack enable

- name: Install Dependencies
run: yarn install --immutable --immutable-cache
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/push-renovate-pob_root.yml
Expand Up @@ -3,16 +3,20 @@ name: Commit changes on @pob/root update
on:
push:
branches:
- "renovate/pob-root"
- "renovate/pob-root-**"

jobs:
run-install-and-commit-modified-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}

- name: Enable Corepack
run: corepack enable

- name: Install Dependencies
# no immutable here
run: yarn install
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/push-renovate-prettier.yml
Expand Up @@ -9,12 +9,15 @@ jobs:
run-prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}

- name: Enable Corepack
run: corepack enable

- name: Install Dependencies
run: yarn install --immutable --immutable-cache
run: yarn install --immutable

- name: Run Prettier
run: yarn prettier --write .
Expand Down
24 changes: 7 additions & 17 deletions .github/workflows/push.yml
Expand Up @@ -8,17 +8,20 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"

- name: Enable Corepack
run: corepack enable

- name: Install Dependencies
run: yarn install --immutable --immutable-cache

Expand All @@ -42,7 +45,7 @@ jobs:
if: startsWith(matrix.node-version, '18.')

- name: Generate Test Coverage
run: yarn run test --coverage --coverageReporters=json --coverageReporters=text
run: yarn run test:coverage
if: startsWith(matrix.node-version, '18.')
env:
CI: true
Expand All @@ -56,16 +59,3 @@ jobs:
- name: Check nothing was forgotten before commit
if: startsWith(matrix.node-version, '18.')
run: yarn run repository-check-dirty

- uses: GoogleCloudPlatform/release-please-action@v3
if: ${{ startsWith(matrix.node-version, '18.') && github.ref == 'refs/heads/main' }}
id: release
with:
token: ${{ secrets.GH_TOKEN }}
release-type: node

# publish:
- run: npm publish
if: ${{ startsWith(matrix.node-version, '18.') && github.ref == 'refs/heads/main' && steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,60 @@
name: Release
on:
workflow_dispatch:
inputs:
dry-run:
description: "Dry run"
required: true
type: boolean
default: false

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 200
fetch-tags: true

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Enable Corepack
run: corepack enable

- name: Install Dependencies
run: yarn install --immutable --immutable-cache

- name: New version (dry run)
if: github.ref == 'refs/heads/main' && inputs.dry-run
run: yarn version --dry-run
- name: Configure Git user
if: github.ref == 'refs/heads/main' && !inputs.dry-run
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: New version
if: github.ref == 'refs/heads/main' && !inputs.dry-run
run: |
yarn version --create-release=github -m 'chore: release %v [skip ci]'
env:
HUSKY: 0
GH_TOKEN: ${{ secrets.GH_TOKEN }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Publish to npm
run: |
if [ -z "$NODE_AUTH_TOKEN" ]; then
echo "Missing env variable NODE_AUTH_TOKEN"
exit 1
fi
echo >> ./.yarnrc.yml
echo "npmAuthToken: $NODE_AUTH_TOKEN" >> ./.yarnrc.yml
yarn npm publish
if: github.ref == 'refs/heads/main' && !inputs.dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .husky/post-checkout
Expand Up @@ -2,5 +2,5 @@
. "$(dirname "$0")/_/husky.sh"

if [ -n "$(git diff HEAD@{1}..HEAD@{0} -- yarn.lock)" ]; then
yarn install --immutable --immutable-cache || true
yarn install --immutable || true
fi
2 changes: 1 addition & 1 deletion .husky/post-merge
Expand Up @@ -2,5 +2,5 @@
. "$(dirname "$0")/_/husky.sh"

if [ -n "$(git diff HEAD@{1}..HEAD@{0} -- yarn.lock)" ]; then
yarn install --immutable --immutable-cache || true
yarn install --immutable || true
fi
2 changes: 1 addition & 1 deletion .husky/post-rewrite
Expand Up @@ -2,5 +2,5 @@
. "$(dirname "$0")/_/husky.sh"

if [ -n "$(git diff HEAD@{1}..HEAD@{0} -- yarn.lock)" ]; then
yarn install --immutable --immutable-cache || true
yarn install --immutable || true
fi
2 changes: 1 addition & 1 deletion .husky/pre-push
Expand Up @@ -10,7 +10,7 @@ do
# Skip if branch deletion
if [ "$local_sha" != "$z40" ]; then
if [ "$local_ref" = "$branch_ref" ]; then
yarn test --watchAll=false --changedSince=origin/main && yarn run checks
yarn run checks && yarn run lint && yarn test --watchAll=false --changedSince=origin/main
fi
fi
done
39 changes: 1 addition & 38 deletions .npmignore
@@ -1,38 +1 @@
/.husky
/.github
/build
/docs
/examples
/samples
/test
/*.config.js
/*.config.cjs
/*.config.mjs
/tsconfig.json
/dist/definitions/tsbuildinfo
/tsconfig.doc.json
babel.config.json
__snapshots__
/coverage
.yo-rc.json
/renovate.json
/yarn.lock
/.yarn
/.yarnrc.yml
/.pnp.*

/.settings
/.project
/.idea
/.vscode
*.sublime-project
*.sublime-workspace

#*
*$
*.BAK
*.bak
*.log
*.old
*~
.#*
# keep an empty file to avoid using gitignore.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit d474f59

Please sign in to comment.