Skip to content

Commit

Permalink
chore: ✅ update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
AllyMurray committed Feb 18, 2024
1 parent 416aa83 commit 2c4bb95
Showing 1 changed file with 50 additions and 33 deletions.
83 changes: 50 additions & 33 deletions src/projects/__snapshots__/npm-package.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,16 @@ jobs:
CI: "true"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: \${{ github.event.pull_request.head.ref }}
repository: \${{ github.event.pull_request.head.repo.full_name }}
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v3
with:
version: "8"
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.0.0
- name: Install dependencies
Expand All @@ -223,10 +223,11 @@ jobs:
git diff --staged --patch --exit-code > .repo.patch || echo "self_mutation_happened=true" >> $GITHUB_OUTPUT
- name: Upload patch
if: steps.self_mutation.outputs.self_mutation_happened
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: .repo.patch
path: .repo.patch
overwrite: true
- name: Fail build on mutation
if: steps.self_mutation.outputs.self_mutation_happened
run: |-
Expand All @@ -241,13 +242,13 @@ jobs:
if: always() && needs.build.outputs.self_mutation_happened && !(github.event.pull_request.head.repo.full_name != github.repository)
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: \${{ secrets.PROJEN_GITHUB_TOKEN }}
ref: \${{ github.event.pull_request.head.ref }}
repository: \${{ github.event.pull_request.head.repo.full_name }}
- name: Download patch
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: .repo.patch
path: \${{ runner.temp }}
Expand Down Expand Up @@ -284,7 +285,7 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: amannn/action-semantic-pull-request@v5.0.2
- uses: amannn/action-semantic-pull-request@v5.4.0
env:
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -293,7 +294,6 @@ jobs:
fix
chore
requireScope: false
githubBaseUrl: \${{ github.api_url }}
",
".github/workflows/release.yml": "# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
Expand All @@ -310,55 +310,65 @@ jobs:
contents: write
outputs:
latest_commit: \${{ steps.git_remote.outputs.latest_commit }}
tag_exists: \${{ steps.check_tag_exists.outputs.exists }}
env:
CI: "true"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set git identity
run: |-
git config user.name "github-actions"
git config user.email "[email protected]"
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v3
with:
version: "8"
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.0.0
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: release
run: npx projen release
- name: Check if version has already been tagged
id: check_tag_exists
run: |-
TAG=$(cat dist/releasetag.txt)
([ ! -z "$TAG" ] && git ls-remote -q --exit-code --tags origin $TAG && (echo "exists=true" >> $GITHUB_OUTPUT)) || (echo "exists=false" >> $GITHUB_OUTPUT)
cat $GITHUB_OUTPUT
- name: Check for new commits
id: git_remote
run: echo "latest_commit=$(git ls-remote origin -h \${{ github.ref }} | cut -f1)" >> $GITHUB_OUTPUT
run: |-
echo "latest_commit=$(git ls-remote origin -h \${{ github.ref }} | cut -f1)" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
- name: Backup artifact permissions
if: \${{ steps.git_remote.outputs.latest_commit == github.sha }}
run: cd dist && getfacl -R . > permissions-backup.acl
continue-on-error: true
- name: Upload artifact
if: \${{ steps.git_remote.outputs.latest_commit == github.sha }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: dist
overwrite: true
release_github:
name: Publish to GitHub Releases
needs: release
runs-on: ubuntu-latest
permissions:
contents: write
if: needs.release.outputs.latest_commit == github.sha
if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.0.0
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifact
path: dist
Expand All @@ -376,14 +386,15 @@ jobs:
needs: release
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
if: needs.release.outputs.latest_commit == github.sha
if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.0.0
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifact
path: dist
Expand All @@ -394,6 +405,7 @@ jobs:
env:
NPM_DIST_TAG: latest
NPM_REGISTRY: registry.npmjs.org
NPM_CONFIG_PROVENANCE: true
NPM_TOKEN: \${{ secrets.NPM_TOKEN }}
run: npx -p publib@latest publib-npm
",
Expand All @@ -414,15 +426,15 @@ jobs:
patch_created: \${{ steps.create_patch.outputs.patch_created }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: main
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v3
with:
version: "8"
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.0.0
- name: Install dependencies
Expand All @@ -436,10 +448,11 @@ jobs:
git diff --staged --patch --exit-code > .repo.patch || echo "patch_created=true" >> $GITHUB_OUTPUT
- name: Upload patch
if: steps.create_patch.outputs.patch_created
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: .repo.patch
path: .repo.patch
overwrite: true
pr:
name: Create Pull Request
needs: upgrade
Expand All @@ -449,11 +462,11 @@ jobs:
if: \${{ needs.upgrade.outputs.patch_created }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: main
- name: Download patch
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: .repo.patch
path: \${{ runner.temp }}
Expand All @@ -465,7 +478,7 @@ jobs:
git config user.email "[email protected]"
- name: Create Pull Request
id: create-pr
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
token: \${{ secrets.PROJEN_GITHUB_TOKEN }}
commit-message: |-
Expand Down Expand Up @@ -527,7 +540,6 @@ jspm_packages/
.DS_Store
*yalc*
test-reports
!/.projenrc.js
!/.github/workflows/build.yml
/dist/changelog.md
/dist/version.txt
Expand All @@ -546,6 +558,7 @@ test-reports
/dist/
!/.eslintrc.json
!/.nvmrc
!/.projenrc.ts
!/tsup.config.ts
!/vitest.config.ts
",
Expand Down Expand Up @@ -580,6 +593,8 @@ permissions-backup.acl
/dist/changelog.md
/dist/version.txt
/.mergify.yml
/.prettierignore
/.prettierrc.json
/test/
/tsconfig.dev.json
/src/
Expand All @@ -598,6 +613,8 @@ tsup.config.ts
.nvmrc
vitest.config.ts
.projenrc.ts
/.gitattributes
/.projenrc.ts
",
".npmrc": "# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
Expand Down Expand Up @@ -836,7 +853,8 @@ save-exact=true
"name": "eslint",
"steps": [
{
"exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools projenrc .projenrc.ts",
"exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ src test build-tools projenrc .projenrc.ts",
"receiveArgs": true,
},
],
},
Expand Down Expand Up @@ -866,7 +884,7 @@ save-exact=true
"exec": "mkdir -p dist/js",
},
{
"exec": "mv $(npm pack) dist/js/",
"exec": "mv $(pnpm pack) dist/js/",
},
],
},
Expand Down Expand Up @@ -951,13 +969,13 @@ save-exact=true
"name": "upgrade",
"steps": [
{
"exec": "pnpx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@types/node,@typescript-eslint/eslint-plugin,@typescript-eslint/parser,@vitest/coverage-v8,constructs,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-prettier,eslint,prettier,projen,standard-version,ts-node,tsup,vitest",
"exec": "pnpm dlx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@vitest/coverage-v8,eslint-config-prettier,eslint-import-resolver-typescript,eslint-plugin-import,eslint-plugin-prettier,prettier,projen,ts-node,tsup,typescript,vitest",
},
{
"exec": "pnpm i --no-frozen-lockfile",
},
{
"exec": "pnpm update @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser @vitest/coverage-v8 constructs eslint-config-prettier eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint prettier projen standard-version ts-node tsup vitest",
"exec": "pnpm update @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser @vitest/coverage-v8 constructs eslint-config-prettier eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint prettier projen standard-version ts-node tsup typescript vitest",
},
{
"exec": "npx projen",
Expand All @@ -978,7 +996,7 @@ save-exact=true
},
},
},
"LICENSE": "Copyright (c) 2023 Ally Murray
"LICENSE": "Copyright (c) 2024 Ally Murray
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -1105,7 +1123,6 @@ SOFTWARE.
"node_modules",
],
"include": [
".projenrc.js",
"src/**/*.ts",
"test/**/*.ts",
".projenrc.ts",
Expand Down

0 comments on commit 2c4bb95

Please sign in to comment.