Skip to content

Commit

Permalink
Merge pull request #919 from lens-protocol/release-react-2.1.1
Browse files Browse the repository at this point in the history
chore: prepare release 2.1.1
  • Loading branch information
krzysu authored Apr 18, 2024
2 parents 41c20df + e2235a6 commit 212d506
Show file tree
Hide file tree
Showing 54 changed files with 3,504 additions and 990 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "develop",
"updateInternalDependencies": "patch",
"ignore": ["example-*"]
"ignore": ["example-*", "lens-next-app"]
}
13 changes: 5 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3

- name: Use Node.js
uses: actions/setup-node@v4
Expand All @@ -73,12 +73,9 @@ jobs:
- name: Run tests
run: pnpm test
env:
SDK_GATED_TEST_PK: ${{secrets.SDK_GATED_TEST_PK}}
SDK_GATED_TEST_PROFILE_ID: ${{secrets.SDK_GATED_TEST_PROFILE_ID}}
SDK_GATED_TEST_PUBLICATION_ID: ${{secrets.SDK_GATED_TEST_PUBLICATION_ID}}
TESTING_ENV_URL: ${{secrets.TESTING_ENV_URL}}
TESTING_HEADER_KEY: ${{secrets.TESTING_HEADER_KEY}}
TESTING_HEADER_VALUE: ${{secrets.TESTING_HEADER_VALUE}}
TESTING_NO_RATE_LIMIT: ${{secrets.TESTING_NO_RATE_LIMIT}}
TESTING_WHITELISTED: ${{secrets.TESTING_WHITELISTED}}

build:
name: Build
Expand All @@ -89,7 +86,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3

- name: Use Node.js
uses: actions/setup-node@v4
Expand All @@ -110,7 +107,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3

- name: Use Node.js
uses: actions/setup-node@v4
Expand Down
25 changes: 11 additions & 14 deletions .github/workflows/lens-next-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,33 @@ name: "Lens Next App E2E Test"

on:
push:
branches: [main, develop]
branches: [main]

jobs:
e2e:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3

- name: Use Node.js
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"

- run: pnpm install --frozen-lockfile
node-version: lts/*

- name: Install Playwright Browsers
run: pnpm --dir examples/lens-next-app exec playwright install --with-deps
run: npx playwright install --with-deps

- name: Create a new Next.js App from the template
run: npx create-next-app -e https://github.com/lens-protocol/lens-sdk/tree/develop/examples/lens-next-app test-app

- name: Run Playwright tests
run: pnpm --dir examples/lens-next-app run test:e2e
run: |
cd test-app
npm run test:e2e
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
retention-days: 10
17 changes: 0 additions & 17 deletions examples/lens-next-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,3 @@ bun dev
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
30 changes: 15 additions & 15 deletions examples/lens-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@
"dependencies": {
"@lens-protocol/react-web": "latest",
"@lens-protocol/wagmi": "latest",
"@tanstack/react-query": "^5.18.1",
"connectkit": "^1.7.2",
"next": "^14.1.1",
"react": "^18",
"react-dom": "^18",
"@tanstack/react-query": "^5.29.2",
"connectkit": "^1.7.3",
"next": "^14.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "^2.9.16",
"wagmi": "^2.5.19"
},
"devDependencies": {
"@playwright/test": "^1.42.1",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"dotenv": "^16.3.1",
"eslint": "^8",
"@playwright/test": "^1.43.1",
"@types/node": "^20.12.7",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"autoprefixer": "^10.4.19",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-next": "14.1.1",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^5"
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.5"
}
}
2 changes: 1 addition & 1 deletion examples/lens-next-app/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default defineConfig({
},
/* Run your local dev server before starting the tests */
webServer: {
command: "pnpm dev",
command: "npm run dev",
url: "http://localhost:3000",
reuseExistingServer: !process.env.CI,
},
Expand Down
2 changes: 1 addition & 1 deletion examples/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@ethersproject/providers": "^5.7.2",
"@irys/sdk": "^0.0.4",
"@lens-protocol/client": "workspace:*",
"@lens-protocol/metadata": "^1.0.5",
"@lens-protocol/metadata": "^1.1.6",
"dotenv": "^16.3.1",
"ethers": "^5.7.2",
"typechain": "^8.3.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@gluestack-style/react": "^1.0.48",
"@gluestack-ui/config": "^1.1.16",
"@gluestack-ui/themed": "^1.1.9",
"@lens-protocol/metadata": "^1.0.5",
"@lens-protocol/metadata": "^1.1.6",
"@lens-protocol/react-native": "link:../../packages/react-native",
"ethers": "^5.7.2",
"react": "18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@ethersproject/providers": "^5.7.2",
"@irys/sdk": "^0.0.4",
"@lens-protocol/client": "workspace:*",
"@lens-protocol/metadata": "^1.0.5",
"@lens-protocol/metadata": "^1.1.6",
"@lens-protocol/react-web": "workspace:*",
"@lens-protocol/wagmi": "workspace:*",
"@tanstack/react-query": "^5.18.1",
Expand Down
9 changes: 9 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @lens-protocol/client

## 2.1.1

### Patch Changes

- 577b6457e: **chore:** make @lens-protocol/metadata a direct dependency
- 105005590: **feat:** added asFiat to AmountFragment, exposes amount value in requested fiat currency
- Updated dependencies [577b6457e]
- @lens-protocol/gated-content@0.5.1

## 2.1.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lens-protocol/client",
"version": "2.1.0",
"version": "2.1.1",
"description": "Low level Lens API client",
"repository": {
"directory": "packages/client",
Expand Down Expand Up @@ -84,7 +84,7 @@
"@graphql-codegen/typescript-graphql-request": "^5.0.0",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@lens-protocol/eslint-config": "workspace:*",
"@lens-protocol/metadata": "^1.0.5",
"@lens-protocol/metadata": "^1.1.6",
"@lens-protocol/prettier-config": "workspace:*",
"@lens-protocol/tsconfig": "workspace:*",
"@types/jest": "^29.5.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/__helpers__/buildTestEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dotenv.config();
export const buildTestEnvironment = (): Environment => {
invariant(process.env.TESTING_ENV_URL, 'TESTING_ENV_URL is not defined in .env file');

return new Environment('testing', process.env.TESTING_ENV_URL, GatedEnvironments.development);
return new Environment('testing', process.env.TESTING_ENV_URL, GatedEnvironments.testing);
};
10 changes: 0 additions & 10 deletions packages/client/src/__helpers__/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,3 @@ export async function postOnchainViaLensManager(

return publication;
}

export async function collect(client: LensClient, publicationId: string) {
const result = await client.publication.actions.actOn({
actOn: { simpleCollectOpenAction: true },
for: publicationId,
});
const value = result.unwrap();
invariant(isRelaySuccess(value), `Broadcast failed: ${JSON.stringify(value)}`);
await client.transaction.waitUntilComplete({ forTxId: value.txId });
}
26 changes: 0 additions & 26 deletions packages/client/src/__mocks__/graphql-request.ts

This file was deleted.

11 changes: 11 additions & 0 deletions packages/client/src/gated/__helpers/setup.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
import { Wallet } from '@ethersproject/wallet';
import { invariant } from '@lens-protocol/shared-kernel';
import * as dotenv from 'dotenv';

import { buildTestEnvironment } from '../../__helpers__';
import { LensClient } from '../LensClient';

dotenv.config();

export function createGatedLensClient(signer: Wallet) {
invariant(process.env.TESTING_NO_RATE_LIMIT, 'TESTING_NO_RATE_LIMIT is not defined in .env file');
invariant(process.env.TESTING_WHITELISTED, 'TESTING_WHITELISTED is not defined in .env file');

return new LensClient({
environment: buildTestEnvironment(),
authentication: {
domain: 'lens.dev',
uri: 'https://lens.dev',
},
headers: {
'x-e2e-lens-no-rl': process.env.TESTING_NO_RATE_LIMIT,
'X-Whitelisted': process.env.TESTING_WHITELISTED,
},
signer,
});
}
Loading

0 comments on commit 212d506

Please sign in to comment.