This commit is contained in:
Felicio Mununga 2024-10-29 10:53:49 +01:00
parent 3c968a2bb2
commit fb66770831
No known key found for this signature in database
GPG Key ID: B8A18D62FCD9EA6E
23 changed files with 25644 additions and 20342 deletions

View File

@ -24,23 +24,28 @@ jobs:
with: with:
fetch-depth: 2 fetch-depth: 2
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.3
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18 node-version: 18
cache: 'yarn' cache: 'pnpm'
- name: Install dependencies - name: Install dependencies
run: yarn --frozen-lockfile run: pnpm --frozen-lockfile
- name: Build - name: Build
run: yarn build run: pnpm build
- name: Typecheck - name: Typecheck
run: yarn typecheck run: pnpm typecheck
- name: Lint - name: Lint
run: yarn lint && yarn format --check run: pnpm lint && pnpm format --check
- name: Test - name: Test
run: yarn test run: pnpm test

View File

@ -21,18 +21,21 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: 9.12.3
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 18 node-version: 18
- run: yarn install --frozen-lockfile - run: pnpm install --frozen-lockfile
- run: yarn build - run: pnpm build
- uses: changesets/action@v1 - uses: changesets/action@v1
id: changesets id: changesets
with: with:
title: Release title: Release
commit: Release commit: Release
version: yarn changeset version version: pnpm changeset version
publish: yarn changeset publish publish: pnpm changeset publish
createGithubReleases: true createGithubReleases: true
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
npx lint-staged pnpm lint-staged

2
.npmignore Normal file
View File

@ -0,0 +1,2 @@
!.npmrc
#!pnpm-lock.yaml

7
.npmrc Normal file
View File

@ -0,0 +1,7 @@
; https://pnpm.io/cli/run#enable-pre-post-scripts
enable-pre-post-scripts=true
; https://pnpm.io/npmrc#node-linker
; node-linker=hoisted
; https://pnpm.io/npmrc#shamefully-hoist
;shamefully-hoist=true
;auto-install-peers=true

View File

@ -1,6 +1,6 @@
{ {
"typescript.tsdk": "node_modules/typescript/lib", "typescript.tsdk": "node_modules/typescript/lib",
"npm.packageManager": "yarn", "npm.packageManager": "pnpm",
"eslint.workingDirectories": [ "eslint.workingDirectories": [
{ {
"mode": "auto", "mode": "auto",

View File

@ -25,7 +25,7 @@ This monorepo contains packages for building web applications in the Status ecos
Required: Required:
- **[Node.js](https://nodejs.org/)** v18.x - **[Node.js](https://nodejs.org/)** v18.x
- **[Yarn](https://yarnpkg.com/)** v1.22.x - **[pnpm](https://pnpm.io)** v9.12.x
Recommended: Recommended:
@ -57,24 +57,24 @@ Recommended:
2. Install dependencies: 2. Install dependencies:
``` ```
yarn install pnpm install
``` ```
3. Build all packages: 3. Build all packages:
``` ```
yarn build pnpm build
``` ```
4. Run tests: 4. Run tests:
``` ```
yarn test pnpm test
``` ```
5. Start development mode: 5. Start development mode:
``` ```
yarn dev pnpm dev
``` ```
## Storybook ## Storybook
@ -82,7 +82,7 @@ Recommended:
To view and interact with the components, you can run Storybook: To view and interact with the components, you can run Storybook:
``` ```
yarn storybook pnpm storybook
``` ```
This will start the Storybook server, allowing you to browse and test components in isolation. This will start the Storybook server, allowing you to browse and test components in isolation.

View File

@ -48,7 +48,7 @@ pipeline {
dir("${env.WORKSPACE}/apps/connector") { dir("${env.WORKSPACE}/apps/connector") {
script { script {
nix.shell( nix.shell(
'yarn install --frozen-lockfile', 'pnpm install --frozen-lockfile',
pure: false, pure: false,
entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix" entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix"
) )
@ -65,7 +65,7 @@ pipeline {
dir("${env.WORKSPACE}/apps/connector") { dir("${env.WORKSPACE}/apps/connector") {
script { script {
nix.shell( nix.shell(
'yarn build:chrome', 'pnpm build:chrome',
pure: false, pure: false,
entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix" entryPoint: "${env.WORKSPACE}/apps/connector/shell.nix"
) )

View File

@ -20,13 +20,13 @@ Tested with these browsers:
#### Develop #### Develop
```bash ```bash
yarn dev:chrome pnpm dev:chrome
``` ```
#### Build #### Build
```bash ```bash
yarn build:chrome pnpm build:chrome
``` ```
#### Load #### Load
@ -42,7 +42,7 @@ Google Chrome > Window > Extensions > Load unpacked > select build (build/chrome
#### Develop #### Develop
```bash ```bash
yarn dev:safari pnpm dev:safari
``` ```
#### Convert #### Convert
@ -70,13 +70,13 @@ Safari > Settings... > Extensions > check Status
#### Develop #### Develop
```bash ```bash
yarn dev:firefox pnpm dev:firefox
``` ```
#### Build #### Build
```bash ```bash
yarn build:firefox pnpm build:firefox
``` ```
#### Load #### Load

View File

@ -9,6 +9,7 @@
"directory": "apps/connector" "directory": "apps/connector"
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"dev:chrome": "plasmo dev --target=chrome-mv3", "dev:chrome": "plasmo dev --target=chrome-mv3",
"dev:safari": "plasmo dev --target=safari-mv3", "dev:safari": "plasmo dev --target=safari-mv3",
"dev:firefox": "plasmo dev --target=firefox-mv3", "dev:firefox": "plasmo dev --target=firefox-mv3",

View File

@ -11,6 +11,6 @@ pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
nodejs_20 nodejs_20
yarn pnpm
]; ];
} }

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,7 @@
}, },
"keywords": [], "keywords": [],
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"postinstall": "patch-package", "postinstall": "patch-package",
"prepare": "husky install", "prepare": "husky install",
"test": "turbo run test --filter=@status-im/* -- --run", "test": "turbo run test --filter=@status-im/* -- --run",
@ -21,7 +22,7 @@
"typecheck": "turbo run typecheck", "typecheck": "turbo run typecheck",
"format": "prettier --ignore-path .gitignore --write .", "format": "prettier --ignore-path .gitignore --write .",
"clean": "turbo run clean && rimraf node_modules", "clean": "turbo run clean && rimraf node_modules",
"storybook": "yarn workspace @status-im/components storybook" "storybook": "pnpm --workspace @status-im/components storybook"
}, },
"resolutions": { "resolutions": {
"@types/react": "18.0.33", "@types/react": "18.0.33",
@ -29,7 +30,7 @@
}, },
"devDependencies": { "devDependencies": {
"@changesets/cli": "^2.26.2", "@changesets/cli": "^2.26.2",
"@status-im/eslint-config": "*", "@status-im/eslint-config": "workspace:*",
"@tsconfig/strictest": "^2.0.0", "@tsconfig/strictest": "^2.0.0",
"@types/prettier": "^2.7.2", "@types/prettier": "^2.7.2",
"husky": "^8.0.3", "husky": "^8.0.3",
@ -44,7 +45,14 @@
"vite-node": "^0.29.8", "vite-node": "^0.29.8",
"vitest": "^0.29.8" "vitest": "^0.29.8"
}, },
"packageManager": "yarn@1.22.17", "packageManager": "pnpm@9.12.3",
"pnpm": {
"patchedDependencies": {
"@achingbrain/ssdp@4.0.1": "patches/@achingbrain__ssdp@4.0.1.patch",
"@libp2p/bootstrap@9.0.10": "patches/@libp2p+bootstrap+9.0.10.patch",
"it-length-prefixed@9.0.3": "patches/it-length-prefixed+9.0.3.patch"
}
},
"lint-staged": { "lint-staged": {
"*.{md,mdx,yml,yaml,json}": [ "*.{md,mdx,yml,yaml,json}": [
"prettier --write" "prettier --write"

View File

@ -20,24 +20,25 @@
"./package.json": "./package.json" "./package.json": "./package.json"
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"sync": "rimraf src && vite-node scripts/sync.ts", "sync": "rimraf src && vite-node scripts/sync.ts",
"dev": "vite build --watch --mode development", "dev": "vite build --watch --mode development",
"build:types": "tsc --noEmit false --emitDeclarationOnly", "build:types": "tsc --noEmit false --emitDeclarationOnly",
"build": "vite build", "build": "vite build",
"postbuild": "yarn build:types", "postbuild": "pnpm build:types",
"#test": "vitest", "#test": "vitest",
"typecheck": "tsc", "typecheck": "tsc",
"lint": "eslint src", "lint": "eslint src",
"lint:fix": "yarn lint --fix", "lint:fix": "pnpm lint --fix",
"format": "prettier --write src", "format": "prettier --write src",
"clean": "rimraf dist node_modules .turbo", "clean": "rimraf dist node_modules .turbo",
"prepack": "yarn build" "prepack": "pnpm build"
}, },
"peerDependencies": {}, "peerDependencies": {},
"devDependencies": { "devDependencies": {
"@clack/prompts": "^0.6.3", "@clack/prompts": "^0.6.3",
"colorjs.io": "^0.4.3", "colorjs.io": "^0.4.3",
"@status-im/eslint-config": "*", "@status-im/eslint-config": "workspace:*",
"figma-api": "^1.11.0", "figma-api": "^1.11.0",
"fs-extra": "^11.1.1", "fs-extra": "^11.1.1",
"vite": "^5.4.3", "vite": "^5.4.3",

View File

@ -25,9 +25,10 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "vite build --watch --mode development", "dev": "vite build --watch --mode development",
"build": "vite build", "build": "vite build",
"postbuild": "yarn build:types", "postbuild": "pnpm build:types",
"build:types": "tsc --noEmit false --emitDeclarationOnly", "build:types": "tsc --noEmit false --emitDeclarationOnly",
"typecheck": "tsc", "typecheck": "tsc",
"lint": "eslint src", "lint": "eslint src",
@ -36,7 +37,7 @@
"storybook:dev": "storybook dev -p 3001", "storybook:dev": "storybook dev -p 3001",
"storybook:build": "storybook build", "storybook:build": "storybook build",
"clean": "rimraf node_modules dist .turbo storybook-static", "clean": "rimraf node_modules dist .turbo storybook-static",
"prepack": "yarn build" "prepack": "pnpm build"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^18.2.0" "react": "^18.2.0"
@ -52,8 +53,8 @@
"@radix-ui/react-toast": "^1.2.1", "@radix-ui/react-toast": "^1.2.1",
"@radix-ui/react-toggle-group": "^1.1.0", "@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2", "@radix-ui/react-tooltip": "^1.1.2",
"@status-im/colors": "*", "@status-im/colors": "workspace:*",
"@status-im/icons": "*", "@status-im/icons": "workspace:*",
"cva": "^1.0.0-beta.1", "cva": "^1.0.0-beta.1",
"date-fns": "^2.30.0", "date-fns": "^2.30.0",
"react-aria-components": "^1.3.3", "react-aria-components": "^1.3.3",
@ -62,7 +63,7 @@
"zustand": "^4.3.7" "zustand": "^4.3.7"
}, },
"devDependencies": { "devDependencies": {
"@status-im/eslint-config": "*", "@status-im/eslint-config": "workspace:*",
"@storybook/addon-designs": "^8.0.3", "@storybook/addon-designs": "^8.0.3",
"@storybook/addon-essentials": "^8.3.0", "@storybook/addon-essentials": "^8.3.0",
"@storybook/addon-interactions": "^8.3.0", "@storybook/addon-interactions": "^8.3.0",

View File

@ -7,7 +7,7 @@
const child_process = require('node:child_process') const child_process = require('node:child_process')
const process = require('node:process') const process = require('node:process')
const subprocess = child_process.spawn('yarn', ['storybook:dev', '--no-open'], { const subprocess = child_process.spawn('pnpm', ['storybook:dev', '--no-open'], {
detached: true, detached: true,
stdio: 'inherit', stdio: 'inherit',
}) })

View File

@ -1,6 +1,6 @@
{ {
"$schema": "https://openapi.vercel.sh/vercel.json", "$schema": "https://openapi.vercel.sh/vercel.json",
"ignoreCommand": "git diff --quiet HEAD^ HEAD ../../{patches,package.json,turbo.json} ../../packages/{colors,icons} ./", "ignoreCommand": "git diff --quiet HEAD^ HEAD ../../{patches,package.json,turbo.json} ../../packages/{colors,icons} ./",
"installCommand": "yarn install --cwd ../../ --frozen-lockfile", "installCommand": "pnpm install --dir ../../ --frozen-lockfile",
"buildCommand": "turbo run build --cwd ../../ --filter=components... && yarn storybook:build" "buildCommand": "turbo run build --cwd ../../ --filter=components... && pnpm storybook:build"
} }

View File

@ -11,6 +11,7 @@
"./package.json": "./package.json" "./package.json": "./package.json"
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"clean": "rimraf node_modules" "clean": "rimraf node_modules"
}, },
"dependencies": { "dependencies": {

View File

@ -54,19 +54,20 @@
} }
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"sync": "vite-node scripts/sync.ts && prettier --parser=html --write 'svg/**/*.svg'", "sync": "vite-node scripts/sync.ts && prettier --parser=html --write 'svg/**/*.svg'",
"generate": "rimraf src && svgr svg --out-dir src && yarn lint:fix && yarn format", "generate": "rimraf src && svgr svg --out-dir src && pnpm lint:fix && pnpm format",
"dev": "vite build --watch --mode development", "dev": "vite build --watch --mode development",
"build": "vite build", "build": "vite build",
"postbuild": "yarn build:types", "postbuild": "pnpm build:types",
"build:types": "tsc src/**/index.ts --emitDeclarationOnly --declaration --jsx react-jsx --skipLibCheck --declarationDir ./dist", "build:types": "tsc src/**/index.ts --emitDeclarationOnly --declaration --jsx react-jsx --skipLibCheck --declarationDir ./dist",
"#test": "vitest", "#test": "vitest",
"typecheck": "tsc", "typecheck": "tsc",
"lint": "eslint 'src/**/*.{ts,tsx}'", "lint": "eslint 'src/**/*.{ts,tsx}'",
"lint:fix": "yarn lint --fix", "lint:fix": "pnpm lint --fix",
"format": "prettier --write 'src/**/*.{ts,tsx}'", "format": "prettier --write 'src/**/*.{ts,tsx}'",
"clean": "rimraf dist node_modules .turbo", "clean": "rimraf dist node_modules .turbo",
"prepack": "yarn build" "prepack": "pnpm build"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^16.x || ^17.x || ^18.x", "react": "^16.x || ^17.x || ^18.x",
@ -74,7 +75,7 @@
}, },
"devDependencies": { "devDependencies": {
"@clack/prompts": "^0.7.0", "@clack/prompts": "^0.7.0",
"@status-im/eslint-config": "*", "@status-im/eslint-config": "workspace:*",
"@svgr/cli": "^8.1.0", "@svgr/cli": "^8.1.0",
"@svgr/core": "^8.1.0", "@svgr/core": "^8.1.0",
"@svgr/plugin-prettier": "^8.1.0", "@svgr/plugin-prettier": "^8.1.0",

View File

@ -34,10 +34,11 @@
"url": "https://github.com/status-im/status-web/issues" "url": "https://github.com/status-im/status-web/issues"
}, },
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm",
"test": "vitest", "test": "vitest",
"dev": "vite build --watch --mode development", "dev": "vite build --watch --mode development",
"build": "vite build", "build": "vite build",
"postbuild": "yarn build:types", "postbuild": "pnpm build:types",
"build:types": "tsc --noEmit false --emitDeclarationOnly || true", "build:types": "tsc --noEmit false --emitDeclarationOnly || true",
"lint": "eslint src", "lint": "eslint src",
"typecheck": "tsc", "typecheck": "tsc",
@ -60,7 +61,7 @@
}, },
"devDependencies": { "devDependencies": {
"@bufbuild/protoc-gen-es": "1.4.2", "@bufbuild/protoc-gen-es": "1.4.2",
"@status-im/eslint-config": "*", "@status-im/eslint-config": "workspace:*",
"@waku/interfaces": "^0.0.21", "@waku/interfaces": "^0.0.21",
"happy-dom": "^9.1.7" "happy-dom": "^9.1.7"
}, },

25554
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

7
pnpm-workspace.yaml Normal file
View File

@ -0,0 +1,7 @@
packages:
- 'packages/eslint-config'
- 'packages/status-js'
- 'packages/colors'
- 'packages/icons'
- 'packages/components'
- 'apps/*'

12570
yarn.lock

File diff suppressed because it is too large Load Diff