Skip to content

Commit

Permalink
release: 2024-05-29 (#1279)
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored May 29, 2024
2 parents 32aeac8 + e7f599b commit 9e354ee
Show file tree
Hide file tree
Showing 584 changed files with 34,438 additions and 25,014 deletions.
14 changes: 12 additions & 2 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
version = 1

exclude_patterns = ["docs/database"]
exclude_patterns = [
"**/generated/**",
"*.code-workspace",
"packages/db/.snaplet/**",
"packages/db/prisma/data-migrations/**",
"packages/db/prisma/migrations/**",
"packages/db/prisma/views/**",
"packages/ui/icon/iconList.ts",
"packages/ui/mockData/json/**",
]

[[analyzers]]
enabled = true
name = "javascript"

[analyzers.meta]
plugins = ["react"]
environment = ["nodejs"]
plugins = ["react"]

[[analyzers]]
enabled = true
Expand Down
4 changes: 2 additions & 2 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"packageRules": [
{
"groupName": "patched packages",
"matchPackageNames": ["@crowdin/ota-client", "trpc-panel", "msw-storybook-addon"],
"matchDepNames": ["@crowdin/ota-client", "trpc-panel", "json-schema-to-zod"],
"matchUpdateTypes": ["major", "minor", "patch"]
},
{
"enabled": false,
"groupName": "Ignored Versions",
"matchCurrentVersion": "0.9.2",
"matchPackageNames": ["@t3-oss/env-nextjs"]
"matchDepNames": ["@t3-oss/env-nextjs"]
}
],
"semanticCommitScope": "{{parentDir}}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: '🧹 Cleanup'
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
run:
working-directory: packages/ui
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
id: pnpm-install
with:
Expand All @@ -50,7 +50,7 @@ jobs:

# 👇 Runs Chromatic CLI in ./packages/ui
- name: Publish to Chromatic
uses: chromaui/action@ea1eee60c663ccb7e5d4cfd7a05fcc3a25b7c494 # v11
uses: chromaui/action@57a72947e9d7a6d213906cd506276c707e0c580f # v11
with:
workingDir: packages/ui
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
security-events: write
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: 🏗 Initialize CodeQL
uses: github/codeql-action/init@1b1aada464948af03b950897e5eb522f92603cc2 # v3
uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # v3
- name: 🚀 Perform CodeQL Analysis
uses: github/codeql-action/analyze@1b1aada464948af03b950897e5eb522f92603cc2 # v3
uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v3
10 changes: 5 additions & 5 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
HUSKY: 0
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Import GPG key
id: import_gpg
Expand All @@ -44,7 +44,7 @@ jobs:
git_commit_gpgsign: true
git_committer_name: 'InReach [bot]'

- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
id: pnpm-install
with:
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:

- name: Check for updated files
if: (github.event_name != 'pull_request' && github.ref_name == 'dev') || github.event_name == 'scheduled'
uses: tj-actions/verify-changed-files@d774a4c7ebe335445d79c7b44138f56a76058ba0 # v19
uses: tj-actions/verify-changed-files@6ed7632824d235029086612d4330d659005af687 # v20
id: verify-changed-files
with:
files: '**/locales/*/*.json'
Expand All @@ -114,15 +114,15 @@ jobs:
- name: Get files to commit
if: steps.run-prettier.conclusion == 'success'
uses: tj-actions/verify-changed-files@d774a4c7ebe335445d79c7b44138f56a76058ba0 # v19
uses: tj-actions/verify-changed-files@6ed7632824d235029086612d4330d659005af687 # v20
id: get-pending-files
with:
separator: <br>

- name: Commit files
id: commit-files
if: ((github.event_name != 'pull_request' && github.ref_name == 'dev') || github.event_name == 'scheduled') && steps.verify-changed-files.outputs.files_changed
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6
with:
token: ${{ secrets.GH_ACT_PAT }}
commit-message: Updated translations from Crowdin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: 🚀 Run Label Syncer
uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
# Setup steps
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: ${{ github.head_ref }}

Expand All @@ -31,7 +31,7 @@ jobs:
git_config_global: true
git_commit_gpgsign: true

- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
id: pnpm-install
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nextjs_bundle_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
HUSKY: 0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
name: Install pnpm
id: pnpm-install
with:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
run: npx -p nextjs-bundle-analysis report

- name: Upload bundle
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with:
name: bundle
path: /home/runner/work/InReach/InReach/apps/app/.next/analyze/__bundle_analysis.json
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
echo "$(cat /home/runner/work/InReach/InReach/apps/app/.next/analyze/__bundle_analysis_comment.txt)" >> $GITHUB_STEP_SUMMARY
- name: Find Comment
uses: peter-evans/find-comment@d5fe37641ad8451bdd80312415672ba26c86575e # v3
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3
if: success() && github.event.number
id: fc
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/njsscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:
name: njsscan code scanning
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: 🧐 nodejsscan scan
id: njsscan
uses: ajinabraham/njsscan-action@74e5a58c1edb363b84c9ddd626b0e22f038ac09e
with:
args: '. --sarif --output results.sarif || true'
- name: Upload njsscan report
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_ACT_PAT }}
steps:
- name: 🏷 Verify PR has a valid label
uses: mheap/github-action-required-labels@132879b972cb7f2ac593006455875098e73cc7f2 # v5
uses: mheap/github-action-required-labels@5847eef68201219cf0a4643ea7be61e77837bbce # v5
with:
labels: 'breaking-change, bugfix, documentation, enhancement, refactor, performance, new-feature, maintenance, ci, dependencies, translations, changelog-ignore, release'
mode: minimum
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.12.0
20.13.1
16 changes: 13 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{
"sonarlint.connectedMode.project": {
"connectionId": "inreach",
"projectKey": "weareinreach_InReach"
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"packages": true,
"apps": true,
"lambdas": true,
"patches": true,
"docker": true,
"docs": true
}
}
20 changes: 10 additions & 10 deletions InReach.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"figma.figma-vscode-extension",
"yoavbls.pretty-ts-errors",
"quick-lint.quick-lint-js",
"sonarsource.sonarlint-vscode",
],
},
"folders": [
Expand Down Expand Up @@ -187,19 +188,12 @@
"**/.DS_Store": true,
"**/.git": true,
"**/Thumbs.db": true,
"apps/": true,
"docker/": true,
"docs/": true,
"node_modules/": true,
"packages/": true,
"patches/": true,
"storybook-static/": true,
"lambdas/": true,
"node_modules": true,
},
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/node_modules/**": true,
"**/.hg/store/**": true,
"**/.next/**": true,
"**/.vercel/output/**": true,
Expand All @@ -221,9 +215,15 @@
},
"prettier.resolveGlobalModules": false,
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.tsdk": "✨ InReach (root)/node_modules/typescript/lib",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.workspaceSymbols.scope": "allOpenProjects",
"sonarlint.connectedMode.project": {
"connectionId": "inreach",
"projectKey": "weareinreach_InReach",
},
"sonarlint.output.showAnalyzerLogs": true,
"sonarlint.output.showVerboseLogs": false,
},
"launch": {
"configurations": [
Expand Down
1 change: 1 addition & 0 deletions apps/app/.eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.spec.ts
webpack-stats.json
2 changes: 2 additions & 0 deletions apps/app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ yarn-error.log*

# Sentry Auth Token
.sentryclirc

webpack-stats.json
1 change: 1 addition & 0 deletions apps/app/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ pnpm-lock.yaml
.DS_Store
.eslintignore
.trace/*.json
webpack-stats.json
13 changes: 13 additions & 0 deletions apps/app/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
"type": "chrome",
"url": "http://localhost:3000",
"userDataDir": false
},
{
"name": "Attach to Arc",
"type": "chrome",
"request": "attach",
"port": 9222,
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!${workspaceFolder:✨ InReach (root)}node_modules/**"
],
"smartStep": true
}
]
}
6 changes: 0 additions & 6 deletions apps/app/.vscode/settings.json

This file was deleted.

17 changes: 12 additions & 5 deletions apps/app/lib/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@ import { generateTranslationKeys } from 'lib/generators'
const program = new Command()

export type PassedTask = ListrTaskWrapper<unknown, ListrDefaultRenderer, ListrSimpleRenderer>
type TaskDef = ListrTask<unknown, ListrDefaultRenderer, ListrSimpleRenderer>

const options = {
const rendererOptions: TaskDef['rendererOptions'] = {
bottomBar: 10,
persistentOutput: true,
outputBar: true,
}
const translation = [
{
title: 'Translation definitions from DB',
task: (_ctx: ListrContext, task: PassedTask) => generateTranslationKeys(task),
options,
skip: !process.env.DATABASE_URL,
rendererOptions,
},
]
] satisfies TaskDef[]

program
.name('generate')
Expand All @@ -37,12 +39,17 @@ program.parse(process.argv)
const cliOpts = program.opts()
let tasklist: ListrJob[] = []

if (cliOpts.translations) tasklist.push(...translation)
if (cliOpts.translations) {
tasklist.push(...translation)
}

if (Object.keys(cliOpts).length === 0) tasklist = [...translation]
if (Object.keys(cliOpts).length === 0) {
tasklist = [...translation]
}

const tasks = new Listr(tasklist, {
exitOnError: false,
rendererOptions: { collapseSubtasks: false },
})

tasks.run()
Expand Down
Loading

0 comments on commit 9e354ee

Please sign in to comment.