Skip to content

Commit

Permalink
Merge pull request #3865 from thematters/develop
Browse files Browse the repository at this point in the history
Release: v4.27.0
  • Loading branch information
wlliaml authored Nov 9, 2023
2 parents 07049e0 + 1c5f530 commit 3403b88
Show file tree
Hide file tree
Showing 840 changed files with 27,745 additions and 12,221 deletions.
20 changes: 1 addition & 19 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
{
"presets": [
[
"next/babel",
{
"preset-env": {
"modules": false
},
"transform-runtime": {
"useESModules": false
},
}
]
],
"plugins": [
"@babel/plugin-proposal-optional-chaining",
[
"formatjs",
{
"idInterpolationPattern": "[sha512:contenthash:base64:6]",
"ast": true
}
"next/babel"
]
]
}
4 changes: 4 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ NEXT_PUBLIC_LOGBOOKS_URL=https://logbooks-vercel.matters.town
NEXT_PUBLIC_ALCHEMY_KEY=1dMo8xjAFo8M6Y4sQ45WTD3Zie2-MA4C
NEXT_PUBLIC_USDT_CONTRACT_ADDRESS=0xfe4F5145f6e09952a5ba9e956ED0C25e3Fa4c7F1
NEXT_PUBLIC_CURATION_CONTRACT_ADDRESS=0xa219c6722008aa22828b31a13ab9ba93bb91222c
NEXT_PUBLIC_GOOGLE_CLIENT_ID=315393900359-2r9fundftis7dc0tdeo2hf8630nfdd8h.apps.googleusercontent.com
NEXT_PUBLIC_TWITTER_CLIENT_ID=X3d6Szg5bnVCMm5wRWxSVmhXUTc6MTpjaQ
NEXT_PUBLIC_FACEBOOK_CLIENT_ID=823885921293850
NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY=0x4AAAAAAAKiedvR5qiLUhIs
DEBUG=false
PLAYWRIGHT_RUNTIME_ENV=ci
PLAYWRIGHT_TEST_BASE_URL=https://web-develop.matters.town
Expand Down
6 changes: 6 additions & 0 deletions .env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
NEXT_PUBLIC_RUNTIME_ENV=production
NEXT_PUBLIC_SITE_DOMAIN=matters.town
NEXT_PUBLIC_SITE_BRAND_NAME=Matters.Town
NEXT_PUBLIC_SITE_DOMAIN_TLD=matters.town
NEXT_PUBLIC_SITE_DOMAIN_TLD_OLD=matters.news
NEXT_PUBLIC_EMBED_ASSET_DOMAIN=assets.matters.news
NEXT_PUBLIC_CF_IMAGE_URL=https://imagedelivery.net/kDRCweMmqLnTPNlbum-pYA/prod
NEXT_PUBLIC_NEXT_ASSET_DOMAIN=assets-next.mattersprotocol.io
Expand All @@ -27,4 +29,8 @@ NEXT_PUBLIC_LOGBOOKS_URL=https://logbook.matters.town
NEXT_PUBLIC_ALCHEMY_KEY=bOu-fCphi9mvePsxg968Qe-pidHQNdlT
NEXT_PUBLIC_USDT_CONTRACT_ADDRESS=0xc2132D05D31c914a87C6611C10748AEb04B58e8F
NEXT_PUBLIC_CURATION_CONTRACT_ADDRESS=0x5edebbdae7b5c79a69aacf7873796bb1ec664db8
NEXT_PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY=0x4AAAAAAAKVODkJMwfIxG78
DEBUG=false
NEXT_PUBLIC_GOOGLE_CLIENT_ID=751677068109-rkml7q9ujf8ems09cclh7qckf14svcgs.apps.googleusercontent.com
NEXT_PUBLIC_TWITTER_CLIENT_ID=cmdKbUlyd1ZZZDZYa3dTampidGo6MTpjaQ
NEXT_PUBLIC_FACEBOOK_CLIENT_ID=1415638158583454
25 changes: 21 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"extends": [
"next/core-web-vitals",
"prettier",
"plugin:storybook/recommended"
"plugin:storybook/recommended",
"plugin:testing-library/react"
],
"plugins": [
"simple-import-sort",
"formatjs"
"formatjs",
"testing-library"
],
"rules": {
"simple-import-sort/imports": "error",
Expand All @@ -15,6 +17,21 @@
"@next/next/no-img-element": "off",
"formatjs/no-offset": "error",
"formatjs/enforce-default-message": "error",
"formatjs/no-multiple-whitespaces": "error"
}
"formatjs/no-multiple-whitespaces": "error",
"formatjs/enforce-id": [
"error",
{
"idInterpolationPattern": "[sha512:contenthash:base64:6]"
}
]
},
"overrides": [
// Only uses Testing Library lint rules in test files
{
"files": [
"**/*.test.{ts,tsx}"
],
"extends": ["plugin:testing-library/react"]
}
]
}
4 changes: 2 additions & 2 deletions .github/workflows/test_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}

- name: Install Playwright Browsers
run: npm run test:prepare
run: npm run test:e2e:prepare
if: steps.playwright_cache.outputs.cache-hit != 'true'

- name: Generate Types (Develop)
Expand All @@ -52,7 +52,7 @@ jobs:
run: npm run gen:type:prod

- name: Run Playwright tests
run: cp .env.dev .env.local && npm run test
run: cp .env.dev .env.local && npm run test:e2e

- name: Output Playwright tests
uses: actions/upload-artifact@v3
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/test_unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test Unit

on: push

jobs:
unit:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.14'
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Generate Types (Develop)
if: github.base_ref != 'master'
run: npm run gen:type

- name: Generate Types (production)
if: github.base_ref == 'master'
run: npm run gen:type:prod

- name: Compile i18n
run: |
npm run i18n
- name: Run unit tests
run: cp .env.dev .env.local && npm run test:unit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,4 @@ compiled-lang
# Relay build output

*__generated__*
*.diff
10 changes: 10 additions & 0 deletions __mocks__/svgrMock.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React, { SVGProps } from 'react'

const SvgrMock = React.forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>(
(props, ref) => <svg ref={ref} {...props} />
)

SvgrMock.displayName = 'SvgrMock'

export const ReactComponent = SvgrMock
export default SvgrMock
2 changes: 1 addition & 1 deletion bin/i18nGenerate.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ for (let locale of locales) {
for (let locale of locales) {
fs.writeFileSync(
`./lang/${locale}.json`,
JSON.stringify(generate(source, target[locale]), null, 2),
JSON.stringify(generate(source, target[locale]), null, 2) + '\n',
'utf8'
)
}
Loading

0 comments on commit 3403b88

Please sign in to comment.