Skip to content

Commit

Permalink
Merge pull request #38 from fingerprintjs/refactor/inter-551
Browse files Browse the repository at this point in the history
refactor: change from yarn to pnpm
  • Loading branch information
Orkuncakilkaya committed Apr 5, 2024
2 parents d6481a3 + b19ac6a commit 03eede6
Show file tree
Hide file tree
Showing 27 changed files with 6,278 additions and 17,359 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
es6: true,
node: true,
},
extends: ['plugin:@typescript-eslint/eslint-recommended'],
extends: ['@fingerprintjs/eslint-config-dx-team'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
Expand Down
32 changes: 5 additions & 27 deletions .github/workflows/analyze-commits.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
name: Analyze Commit Messages
on: [pull_request]
on:
pull_request:

permissions:
pull-requests: write
contents: write
jobs:
release-notes-comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Collect semantic-release-info
id: semantic_release_info
uses: fingerprintjs/action-semantic-release-info@v1
- if: ${{ steps.semantic_release_info.outputs.no_release == 'false' }}
name: Add comment to the PR
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: ReleasePreview
recreate: true
message: |
## This PR will create a ${{steps.semantic_release_info.outputs.type}} release :rocket:
${{steps.semantic_release_info.outputs.notes}}
- if: ${{ steps.semantic_release_info.outputs.no_release == 'true' }}
name: Add comment to the PR
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: ReleasePreview
recreate: true
message: |
## This PR will not create a new release :rocket:
analyze-commits:
name: Generate docs and coverage report
uses: fingerprintjs/dx-team-toolkit/.github/workflows/analyze-commits.yml@v1
34 changes: 6 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,10 @@
# Reference on this file: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Lint, build and test
name: build

on:
pull_request:
branches: [ main ]

jobs:
build:
name: Lint, build and test
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
**/node_modules
!**/dist/node_modules
key: nodemodules-${{ hashFiles('**/yarn.lock') }}
restore-keys: nodemodules-
- uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
- name: Install Node packages
run: yarn install
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Tests
run: yarn test
build-and-check:
name: Build project and run CI checks
uses: fingerprintjs/dx-team-toolkit/.github/workflows/build-typescript-project.yml@v1
52 changes: 0 additions & 52 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

24 changes: 1 addition & 23 deletions .github/workflows/coverage-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,8 @@ on:

jobs:
run-tests-check-coverage:
runs-on: ubuntu-20.04
name: Run tests & check coverage
permissions:
checks: write
pull-requests: write
contents: read # for private repos
steps:
- uses: actions/checkout@v3
- name: Jest coverage comment
id: coverage
uses: ArtiomTr/jest-coverage-report-action@f1a1382101d9b92b38e3df05c9ed89a834af97c8
with:
package-manager: yarn
output: report-markdown
- run: yarn test:coverage
- name: Read coverage text report
uses: fingerprintjs/action-coverage-report-md@v1
id: coverage-md
- uses: marocchino/sticky-pull-request-comment@adca94abcaf73c10466a71cc83ae561fd66d1a56
with:
message: |
${{ steps.coverage.outputs.report }}
<details>
<summary>Show full coverage report</summary>
${{ steps.coverage-md.outputs.markdownReport }}
</details>
uses: fingerprintjs/dx-team-toolkit/.github/workflows/coverage-diff.yml@v1
15 changes: 15 additions & 0 deletions .github/workflows/coverage-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Coverage report

on:
push:
branches:
- main

jobs:
coverage-report:
name: Coverage report
uses: fingerprintjs/dx-team-toolkit/.github/workflows/docs-and-coverage.yml@v1
with:
skip-docs-step: true
prepare-gh-pages-commands: |
mv coverage/lcov-report/* ./gh-pages
40 changes: 0 additions & 40 deletions .github/workflows/docs-and-coverage.yml

This file was deleted.

37 changes: 11 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
name: Release

on:
# We prefer manual release only
workflow_dispatch:
push:
branches:
- main
- test

jobs:
release:
environment: production
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Install dependencies
run: yarn install

- name: Build library
run: yarn build

- name: Semantic Release
uses: cycjimmy/semantic-release-action@91ab76a4a393a8d0c4739e9aea1818b56bc953ea
with:
extra_plugins: |
@semantic-release/exec@6.0.3
conventional-changelog-conventionalcommits@5.0.0
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
HUSKY: 0
build-and-release:
name: 'Build project, run CI checks and publish new release'
uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-typescript-project.yml@v1
with:
appId: ${{ vars.APP_ID }}
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
12 changes: 12 additions & 0 deletions .github/workflows/reset-prerelease-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Reset Prerelease Branch
on:
workflow_dispatch:

jobs:
reset-feature-branch:
uses: fingerprintjs/dx-team-toolkit/.github/workflows/reset-prerelease-branch.yml@v1
with:
branch_name: 'test'
appId: ${{ vars.APP_ID }}
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
15 changes: 11 additions & 4 deletions .github/workflows/teste2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ jobs:
runs-on: ubuntu-20.04
name: Test e2e
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: 'Install pnpm'
uses: pnpm/action-setup@129abb77bf5884e578fcaf1f37628e41622cc371
with:
version: 8

- name: Install node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'

Expand All @@ -26,10 +31,12 @@ jobs:
id: random-path-generator
- name: Install dependencies
run: |
yarn install
pnpm install --frozen-lockfile
npx playwright install
env:
CI: true
- name: Run test
run: yarn test:e2e
run: pnpm test:e2e
env:
TEST_CLIENT_DOMAIN: ${{secrets.TEST_CLIENT_DOMAIN}}
TEST_ID: ${{steps.random-path-generator.outputs.TEST_ID}}
Expand Down
13 changes: 1 addition & 12 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always"
}
"@fingerprintjs/prettier-config-dx-team"
Loading

0 comments on commit 03eede6

Please sign in to comment.