Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Audit

on:
pull_request:
branches:
- master
- release
- "release-*"
types: [opened, edited, synchronize, reopened]
workflow_dispatch:

jobs:
audit:
name: Audit
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "yarn"

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

- name: Run security audit
run: yarn npm audit --severity moderate --no-deprecations
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Invalid flag for yarn npm audit command

The --no-deprecations flag is not a valid option for yarn npm audit in Yarn Berry. The available flags are --all, --recursive, --severity, --json, --exclude, and --ignore. Using this invalid flag will cause the audit workflow to fail with an unknown option error, preventing security audits from running successfully.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, it's wrong, audit works well with this flag


- name: Install SDK dependencies
run: |
cd sdk
yarn install --frozen-lockfile
- name: Run SDK security audit
run: |
cd sdk
yarn npm audit --severity moderate --no-deprecations
32 changes: 0 additions & 32 deletions .github/workflows/packages-scan.yml

This file was deleted.

70 changes: 28 additions & 42 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests and linting
name: Run Tests

on:
pull_request:
Expand All @@ -10,8 +10,8 @@ on:
workflow_dispatch:

jobs:
check-conflicts:
name: Check Merge Conflicts
ci:
name: Lint and Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -22,13 +22,6 @@ jobs:
chmod +x ./scripts/check-conflicts.sh
./scripts/check-conflicts.sh

lint:
name: Run Linting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -38,43 +31,36 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run linting
run: yarn lint

type-check:
name: Run Type Checking
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install SDK dependencies
run: |
cd sdk
yarn install --frozen-lockfile

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "22"
cache: "yarn"
- name: Build SDK
run: |
cd sdk
yarn build

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run linting
run: yarn lint:ci

- name: Run type checking
run: yarn tscheck
run: yarn tscheck:ci

test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run tests
run: yarn test:ci

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "22"
cache: "yarn"
- name: Run SDK linting
run: |
cd sdk
yarn lint:ci

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run SDK type checking
run: |
cd sdk
yarn tscheck:ci

- name: Run tests
run: yarn test:ci
- name: Run SDK tests
run: |
cd sdk
yarn test:ci
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
.env.test.local
.env.production.local

# cache files
.eslintcache
*.tsbuildinfo

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/sh
set -e
. "$(dirname "$0")/_/husky.sh"

yarn lingui:generate
yarn lint-staged
yarn tscheck
git add src/locales/
942 changes: 942 additions & 0 deletions .yarn/releases/yarn-4.12.0.cjs

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
defaultSemverRangePrefix: ""
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
enableImmutableInstalls: false

yarnPath: .yarn/releases/yarn-3.1.0.cjs
yarnPath: .yarn/releases/yarn-4.12.0.cjs
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@
"build-sdk": "cd ./sdk && yarn build",
"test": "vitest",
"test:ci": "vitest run",
"lint": "node node_modules/.bin/eslint src",
"lint": "node node_modules/.bin/eslint src --fix --cache --cache-location .eslintcache",
"lint:ci": "node node_modules/.bin/eslint src --max-warnings=0",
"lint:fix": "node node_modules/.bin/eslint src --fix",
"check:ci": "yarn lint && yarn test:ci && yarn tscheck",
"check:ci": "yarn lint:ci && yarn test:ci && yarn tscheck:ci",
"pre-commit": "yarn run lint",
"pre-push": "vitest run",
"prepare": "husky install && yarn lingui:prepare",
"extract": "NODE_ENV=development lingui extract --clean",
"compile": "lingui compile",
"lingui:prepare": "NODE_ENV=development yarn extract && yarn compile",
"lingui:generate": "NODE_ENV=development lingui extract --overwrite",
"ts:clean": "tsc --build --clean && tsc --build",
"tscheck": "yarn ts:clean && tsc -p tsconfig.json --noEmit",
"tscheck": "tsc -p tsconfig.json --noEmit --incremental",
"tscheck:ci": "tsc -p tsconfig.json --noEmit",
"clean:cache": "rm -rf .eslintcache tsconfig.tsbuildinfo build/**/*.tsbuildinfo",
"clean:lint": "rm -rf .eslintcache",
"clean:ts": "rm -rf tsconfig.tsbuildinfo build/**/*.tsbuildinfo",
"prettier": "prettier --write src/**/*.{js,ts,jsx,tsx,css,scss}",
"postinstall": "cd ./sdk && echo \"Building SDK\" && yarn && yarn build",
"prebuild": "cd ./sdk && yarn tsx scripts/prebuild",
Expand Down Expand Up @@ -137,20 +141,19 @@
]
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@babel/plugin-transform-private-property-in-object": "^7.25.9",
"@lingui/cli": "4.10.0",
"@lingui/loader": "4.10.0",
"@lingui/vite-plugin": "4.11.3",
"@types/react-calendar": "4.1.0",
"@types/react-date-range": "1.4.9",
"@typescript-eslint/eslint-plugin": "8.26.1",
"@typescript-eslint/parser": "8.26.1",
"@vitejs/plugin-react": "4.3.1",
"@vitest/web-worker": "2.0.5",
"@vitest/web-worker": "^2.1.9",
"autoprefixer": "10.4.20",
"babel-plugin-macros": "3.1.0",
"buffer": "6.0.3",
"eslint": "^8.41.0",
"eslint": "^8.57.1",
"eslint-config-react-app": "^7.0.1",
"eslint-import-resolver-typescript": "4.2.2",
"eslint-plugin-es-x": "8.1.0",
Expand All @@ -159,7 +162,7 @@
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-perf": "3.3.2",
"happy-dom": "14.12.3",
"happy-dom": "^20.0.0",
"husky": "7.0.4",
"lint-staged": "12.3.4",
"openapi-typescript": "7.10.1",
Expand All @@ -170,11 +173,11 @@
"tailwindcss": "3.4.4",
"terser": "5.43.1",
"tsx": "4.19.0",
"vite": "5.4.0",
"vite": "^5.4.18",
"vite-bundle-analyzer": "0.20.1",
"vite-plugin-svgr": "4.2.0",
"vite-tsconfig-paths": "5.0.1",
"vitest": "2.0.5"
"vitest": "^2.1.9"
},
"lint-staged": {
"sdk/**/*.{js,ts,jsx,tsx}": [
Expand All @@ -189,5 +192,5 @@
"prettier --write"
]
},
"packageManager": "yarn@3.1.0"
"packageManager": "yarn@4.12.0"
}
Loading
Loading